Closed ciaranj closed 10 years ago
Mmmm-kay, so this approach still doesn't work :( What I found I had to do to ensure that my widths + heights were 'correct' on at least the final resize callback was pass the width + height of the $resize_preview_holder element to the resize.start, resize.stop and resize.resize callbacks. This seems to work. Anyone want to see a PR on that ?
This would be a cool fix, our old code uses setTimeout to trail actual size
Yeah, I used a setTimeout for a while, but it ended up being 'jumpy' at the end :/
So have you found issues with this PR? I've applied your fix and it seems to work fine.
Well, with the PR in its current form it didn't really work too well :/ The version I'm actually using over in
Works a lot better where I pass back the placeholder element and use those sizes instead. I left this PR around to discuss whether there was interest in that approach (As it would change the interface, it might be frowned upon)
Thanks! Merged here e21f63a05a539f5c611eb49cd6861b1e38b36531.
Previously the resize.stop callback was being called before the widget had reached the final size that Gridster would make it (the widget continues to grows up and until it matches the placeholder size after releasing the drag)
This change pushes the resize.stop callback to the last possible moment where the size of the widget the callback receives is more likely to be correct.
The second commit is just a regen of the distributables, feel free to drop that commit :)
P.s. Gridster is ace thank you!