Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ResizeComplete/ResizeEnd

    Reading the documentation I see that there are resize events that can be listened for, however I do not see one for ResizeEnd or ResizeComplete. Is there an event on Window or does it inherit any ability to handle when a resize operation is completed.

    Use case: I would like to resize contents of a an ojbect in a Window, however, I don't want to handle every resize event along the way to it being completed. I would also like to leave the animation property set to true if possible.

    Thanks,

    #2
    The quickest approach which is also probably the least jarring is to switch the dragAppearance to "outline". This way there's only one resize, and you don't have to worry about ignoring intervening resizes.

    Comment


      #3
      Originally posted by Isomorphic
      The quickest approach which is also probably the least jarring is to switch the dragAppearance to "outline". This way there's only one resize, and you don't have to worry about ignoring intervening resizes.
      On which 'item' do I set the dragAppearance? I have a UI with several nested canvas-based controls. When I drag-resize the entire window with my mouse, I'm getting multiple 'resized' events on my nested controls. I only want a final 'resized' event.

      Setting dragAppearance on the nested controls does not seem to affect anything. Setting dragAppearance on the topmost parent canvas doesn't seem to make a difference either.

      Using addDragResizeStartHandler on my nested controls never fires, I'm presuming because they themselves are not being dragResized...their parent is. Setting addDragResizeStartHandler on the top-most parent control doesn't fire either on a drag resize of the entire browser window.

      Comment


        #4
        The original poster was talking about a Window component, not the browser window. When the browser window as a whole is being resized, you are not doing a SmartGWT drag - the drag is under control of the browser / OS and there will not be SmartGWT drag events.

        If you don't want to react to browser resize until the browser is done resizing, you would have to set your outermost container to a fixed size, use the core GWT APIs to register for window resize events and heuristically detect completion by the absence of new resize events for a given period of time, then resize your outer container to the browser's new dimensions.

        Comment

        Working...
        X