<resizestatemin>
Standard resizing behavior with a minimum width and height.

JavaScript: lz.resizestatemin
extends <resizestate> » <state> » <node> » lz.Eventable »

resizestatemin can be used to change the width and height of a view in response to the movement of the mouse.

Like resizestate, resizestatemin tracks differences in the mouse position from after it is applied, so the bottom right corner of the resizing view does not snap to the mouse position.

Note that the red box can not be resized to be smaller than the default minimum width and height of 0. The green box can only be resized to a minimum width of 100 and height of 50.

Example 88. Resizing a view to a minumum size using the mouse

<canvas> 
                    <simplelayout spacing="10"/>

                    <view bgcolor="red" width="200" height="200" onmousedown="this.res.setAttribute('applied', true)" onmouseup="this.res.setAttribute('applied', false)">
                        <resizestatemin name="res"/>
                    </view>
                    <view bgcolor="green" width="200" height="200" onmousedown="this.res.setAttribute('applied', true)" onmouseup="this.res.setAttribute('applied', false)">
                        <resizestatemin name="res" resize_min_width="${100}" resize_min_height="${50}"/>
                    </view>
                </canvas>

Resizes its immediateparent with a minimum size in response to mouse events, when applied.

Attributes

Name (CSS property) Type (tag) Type (js) Default Category
resize_min_height number Number 0 read/write
  The minimum height to resize to
resize_min_width number Number 0 read/write
  The minimum width to resize to

Attributes inherited from <state>

applied, pooling

Methods

Methods inherited from <state>

apply, remove

Methods inherited from lz.Eventable

destroy, setAttribute

Events

Events inherited from <state>

onapply, onremove

Events inherited from <node>

onconstruct, ondata, oninit

Events inherited from lz.Eventable

ondestroy