Resizable: how original is ui.originalSize?
Hi,
A quick question re the ui object passed by Resizable into the "resize" event handler. Every time I use Resizable, I find myself having to manually resize one or more children. To that end, I need to understand by how much the event driver has actually resized. My immediate thought was therefore to calculate:
dx= ui.size.width - ui.originalSize.width;
dy= ui.size.height - ui.originalSize.height;
Obviously, what I understand/want [dx, dy] to be is the change in dimensions over the previous step (so that I can mirror the incremental adjustment that has taken place). What happens instead is that originalSize never changes and my [dx, dy]s work out to be cumulative, relative to the (fairly arbitrary and somewhat irrelevant (coz long forgotten)) original size of the Resizable widget.
I have obviously solved this dilemma by carrying around my own state data for "originalSize". It's tedious but I live. What I am curious to find out is whether ANYONE here found any use for ui.originalSize? In other terms, would a request to change the definition/behaviour of ui.originalSize give rise to any compatibility issues with existing code? Or have I perhaps missed a trick and there's another snippet of information lying about that would allow me to calculate the incremental [dx, dy] on the fly, without the need to carry my own state?
Thanks.