Changes between Initial Version and Version 1 of Ticket #5426

Mar 25, 2010, 9:13:26 PM (12 years ago)
Scott González


  • Ticket #5426

    • Property Milestone changed from TBD to
    • Property Summary changed from Change event for resizable with width and height values to Resizable: Expose an API for programatically triggering a resize
  • Ticket #5426 – Description

    initial v1  
    1 I would like to see a change event for resizable. You could add width and height options which when you pass them in to the resizable object they trigger the change event which performs the resizing as specified by the object. There is a lot of functionality handled by resizable that should not need to be duplicated. Just alsoResize, animate, helper, and such are enough to want to have a change event so they are triggered with other resizes.
    3 Example:
    5 $('#myId').resizable({
    6    handles: 'all',
    7    alsoResize: '#otherId, #anotherId',
    8    aspectRatio: true,
    9    animate: true,
    10    start: function(e, ui){
    11       /*complex function*/
    12    },
    13    resize: function(e, ui){
    14       /*complex function*/
    15    },
    16    change: function(e, ui){
    17       /*complex function*/
    18    },
    19    stop: function(e, ui){
    20       /*complex function*/
    21    }
    22 });
    23 $('#myId').resizable('option','width', 600).resizable('option','height', 350);//triggers the change event
     1It would be nice to be able to tell the resizable plugin to resize an element to a specific size. This would take into account any other settings, such as aspect ratio, max height/width, also resize, etc. This should probably also trigger start, resize and stop events.