Constructor
new ve.ce.ResizableNode([$resizable], [config])abstract
#
ContentEditable resizable node.
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$resizable |
jQuery |
optional |
this.$element | Resizable DOM element |
|||||||||||||||||||||||||
config |
Object |
optional |
Configuration options Properties:
|
- Source:
Methods
getAttributeChanges(width, height) → {Object}
#
Generate an object of attributes changes from the new width and height.
Parameters:
Name | Type | Description |
---|---|---|
width |
number | New image width |
height |
number | New image height |
- Source:
Returns:
Attribute changes
- Type
- Object
getResizableOffset() → {Object}
#
Get and cache the relative offset of the $resizable node
- Source:
Returns:
Position coordinates, containing top & left
- Type
- Object
hideSizeLabel()
#
Hide the size label
- Source:
isResizable() → {boolean}
#
Check if the node is resizable in its current state
- Source:
Returns:
The node is currently resizable
- Type
- boolean
onDocumentMouseMove(e)
#
onDocumentMouseUp()
#
Handle body mouseup.
- Source:
Fires:
onResizableAlign(align)
#
Respond to AlignableNodes changing their alignment by hiding useless resize handles.
Parameters:
Name | Type | Description |
---|---|---|
align |
string | Alignment |
- Source:
onResizableAttributeChange(key, from, to)
#
Handle attribute change events from the model.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | Attribute key |
from |
string | Old value |
to |
string | New value |
- Source:
onResizableBlur()
#
Handle node blur.
- Source:
onResizableFocus()
#
Handle node focus.
- Source:
onResizableResizing(dimensions)
#
Handle resizing event.
Parameters:
Name | Type | Description |
---|---|---|
dimensions |
Object | Dimension object containing width & height |
- Source:
onResizableSetup()
#
Handle setup event.
- Source:
onResizableTeardown()
#
Handle teardown event.
- Source:
onResizeHandlesCornerMouseDown(e)
#
Handle bounding box handle mousedown.
Parameters:
Name | Type | Description |
---|---|---|
e |
jQuery.Event | Click event |
- Source:
Fires:
setOriginalDimensions(dimensions)
#
Set the original dimensions of the scalable object
Parameters:
Name | Type | Description |
---|---|---|
dimensions |
Object |
- Source:
setResizableHandlesPosition()
#
Set the proper position for resize handles
- Source:
setResizableHandlesSizeAndPosition()
#
Set the proper size and position for resize handles
- Source:
showHandles([handles])
#
Show specific resize handles
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
handles |
Array.<string> |
optional |
List of handles to show: 'nw', 'ne', 'sw', 'se'. Show all if undefined. |
- Source:
updateSizeLabel()
#
Update the contents and position of the size label
- Source:
Events
resizeEnd()
#
- Source:
resizeStart()
#
- Source: