Extends
Constructor
new ve.ce.MWBlockImageNode(model, [config])
#
Hierarchy
ContentEditable MediaWiki image node.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
model |
ve.dm.MWBlockImageNode | Model to observe |
|
config |
Object |
optional |
Configuration options |
- Mixes in:
- Source:
Methods
getCssClass(type, alignment) → {string}
#
Get the right CSS class to use for alignment
Parameters:
Name | Type | Description |
---|---|---|
type |
string | 'none' or 'default' |
alignment |
string | 'left', 'right', 'center', 'none' or 'default' |
Returns:
CSS class
- Type
- string
getDescription()
#
- Mixes in:
- Source:
onAttributeChange()
#
onResizableResizing(dimensions)
#
Parameters:
Name | Type | Description |
---|---|---|
dimensions |
Object | New dimensions |
onSetup()
#
Override the default onSetup to add direction-dependent classes to the image thumbnail.
Override the default onSetup to add direction-dependent classes to the image thumbnail.
updateClasses([oldAlign])
#
Update CSS classes based on alignment and type
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
oldAlign |
string |
optional |
The old alignment, for removing classes |
updateSize([dimensions])
#
Redraw the image and its wrappers at the specified dimensions
The current dimensions from the model are used if none are specified.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
dimensions |
Object |
optional |
Dimension object containing width & height |
Redraw the image and its wrappers at the specified dimensions
The current dimensions from the model are used if none are specified.