Announcement

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

    Event to trigger *after* canvas has finished resizing

    The canvas class has a method "addresizehandler()" which allows one to trigger code when the canvas is resized. However, during a normal resizing event, this seems to get triggered many times. Is there a way to trigger the code only after the user has **finished** resizing the canvas? Presumably, one would need some sort of threshold, such as "x miliseconds" (where x could be 2000), to determine whether the user has actually finished resizing the event. Or, is there a better way such as detecting that the user has stopped pressing down on the mouse. I couldn't find any method such as "afterResized".

    Additional details:
    ======================
    SmartGWT (not smartclient) Version: SmartClient Version: v8.3p_2012-11-26/PowerEdition Deployment (built 2012-11-26)
    ...
    Browser: Mozilla Firefox ESR 10.0.7
    GWT SDK: 2.5.0rc2
    Sun JDK 1.6.0_13
    OS: Centos 6.x
    IDE: MyEclipse 10.6 with Google Plugin for Eclipse (3.1.0)

    #2
    If you're talking about reacting to a live drag resize (dragAppearance:target) on that Canvas, dragStop fires at the end of the drag.

    If there's some other, more indirect trigger, there's no general way that a widget can know that resize isn't going to be called anymore - you would just need to write code that sets and resets a timer so that your action takes place X milliseconds after the last resize.

    Comment

    Working...
    X