Show:

A Resize plugin that will attempt to constrain the resize node to the boundaries.

Methods

_checkConstrain

(
  • axis
  • axisConstrain
  • offset
)
protected

Helper method to update the current values on <a href="Resize.html#property_info">info</a> to respect the constrain node.

Parameters:

  • axis String

    'top' or 'left'

  • axisConstrain String

    'bottom' or 'right'

  • offset String

    'offsetHeight' or 'offsetWidth'

_checkHeight

() protected

Update the current values on <a href="Resize.html#property_info">info</a> to respect the maxHeight and minHeight.

_checkRatio

() protected

Update the current values on <a href="Resize.html#property_info">info</a> calculating the correct ratio for the other values.

_checkRegion

() Boolean protected

Check whether the resizable node is inside the constrain region.

Returns:

Boolean:

_checkWidth

() protected

Update the current values on <a href="Resize.html#property_info">info</a> to respect the maxWidth and minWidth.

_getConstrainRegion

() Object Region protected

Get the constrain region based on the <code>constrain</code> attribute.

Returns:

Object Region:

Properties

constrainSurrounding

Object

Stores the <code>constrain</code> surrounding information retrieved from <a href="Resize.html#method__getBoxSurroundingInfo">_getBoxSurroundingInfo</a>.

Default: null

Attributes

constrain

String | Object | Node

Will attempt to constrain the resize node to the boundaries. Arguments:<br> 'view': Contrain to Viewport<br> '#selector_string': Constrain to this node<br> '{Region Object}': An Object Literal containing a valid region (top, right, bottom, left) of page positions

maxHeight

Number

The maximum height of the element

Default: Infinity

maxWidth

Number

The maximum width of the element

Default: Infinity

minHeight

Number

The minimum height of the element

Default: 15

minWidth

Number

The minimum width of the element

Default: 15

preserveRatio

Boolean

Maintain the element's ratio when resizing.

Default: false

tickX

Number | false

The number of x ticks to span the resize to.

Default: false

tickY

Number | false

The number of y ticks to span the resize to.

Default: false