Skip to main content

Search and Top Navigation

#4500 closed enhancement (duplicate)

Opened April 28, 2009 07:50PM UTC

Closed October 20, 2010 03:53AM UTC

Resizable: in event resize when using grid ui.size does not honor the grid

Reported by: mmoossen Owned by:
Priority: major Milestone: 1.9.0
Component: ui.resizable Version: 1.7.1
Keywords: resizable event resize grid Cc:
Blocked by: Blocking:
Description

Given the following code, the event will be fired continuously as if ignoring the grid option.

      $div.resizable({
        grid: [10, 10],
        resize: function(/**Event*/event, /**UIHelper*/ui) {
                  $width.val(ui.size.width + 'px');
                  $height.val(ui.size.height + 'px');
                }
      });
Attachments (0)
Change History (5)

Changed April 28, 2009 08:17PM UTC by mmoossen comment:1

I did fix it with following code:

        resize: function(/**Event*/event, /**UIHelper*/ui) {
                  // HACK: we can not use ui.size because of bug #4500
                  var /**int*/width = $div.css('width');
                  var /**int*/height = $div.css('height');
                  if ((width == $width.val()) && (height == $height.val())) {
                    // prevent unneeded calls
                    return;
                  }
                  $width.val(width);
                  $height.val(height);
                }

Changed April 28, 2009 08:19PM UTC by mmoossen comment:2

And of course, /**int*/ should be /**String*/ ;)

Changed May 07, 2009 10:38AM UTC by jzaefferer comment:3

milestone: TBD1.7.2
type: bugenhancement

Changed May 07, 2009 01:19PM UTC by jzaefferer comment:4

milestone: 1.7.21.8

Changed October 20, 2010 03:53AM UTC by scottgonzalez comment:5

resolution: → duplicate
status: newclosed

Duplicate of #5817.