gridstack.js icon indicating copy to clipboard operation
gridstack.js copied to clipboard

Get the final resize value

Open TheCherry opened this issue 10 years ago • 4 comments

There are at the moment the event "resize", its give me the width and height in pixel, that's fine. But the values aren't the "final" values, they say me only the point there the mouse did stop the click, not the true size of the widget.

The "change" event only works for the whole grid, so its give me all widgets. Even in this data, i can't find the final width and height in pixel.

TheCherry avatar Sep 14 '16 15:09 TheCherry

Did try to find a workarround, but the final size isent set with the change event:

$('.grid-stack').on('change', function(event, items) {
      console.log(items[0].el.css("width"));
});

TheCherry avatar Sep 16 '16 13:09 TheCherry

Fixed in v0.3.0.

radiolips avatar Apr 20 '17 20:04 radiolips

This will get you the updated values. $(this).data('_gridstack_node');

rozxorx avatar Jun 07 '17 03:06 rozxorx

https://github.com/troolee/gridstack.js/issues/577

radiolips avatar Jun 08 '17 12:06 radiolips