Content
Nothing here is managed by vUX. The sidebar has a width, this column is flex:1, and the browser does the rest.
The grip carries no x or y class. It does not need one: direction is "x", which leaves the module only one axis to pick.
vUX / Resizer / v4.1.0
A drag handle on any element, on either axis, clamped to bounds you set.
Drag the right edge or the bottom edge.
Every config property, wired to one box. Changing a setting tears the
Resizer down with destroy() and builds a new one: config is
read at initialize(), so a live instance cannot be reconfigured in place.
0 means unset, not zero: it is the sentinel the module uses to skip a clamp.
Set config.myResizeHandler to a class name and the module stops building
handles: it listens for a mousedown on your element instead. The grip below is a
sibling of the panel it resizes, not a child of it, and it holds an icon: a mousedown
landing on that icon still counts, because the module walks up from the event target.
Nothing here is managed by vUX. The sidebar has a width, this column is flex:1, and the browser does the rest.
The grip carries no x or y class. It does not need one: direction is "x", which leaves the module only one axis to pick.
A handle grows the element in the direction it faces. Drag the left handle left, or the top handle up, and the box gets bigger: the travelled distance is inverted for those two edges.
The module writes a size, never a position. Growing leftward or upward is this page anchoring each box to the far side of its cell with flexbox; without that the box would still change size, but it would visibly grow the other way.
destroy() unregisters the module's listeners and removes the handles it
injected. Anything hosting a Resizer inside a view that comes and goes (an SPA route, a
modal) needs it.
Both methods are safe to call twice. initialize() on a live
instance returns immediately rather than appending a second set of handles,
listeners and stylesheets.
Every setter validates and throws, naming the property and what it wanted. Press a button
to run the call and print the real Error.
No error yet.