Expand all

ve.ce.MWBlockImageNode

Extends

Constructor

new ve.ce.MWBlockImageNode(model, [config]) #

ContentEditable MediaWiki image node.

Parameters:

Name Type Attributes Description
model ve.dm.MWBlockImageNode

Model to observe

config Object optional

Configuration options

Mixes in:
Source:
ContentEditable MediaWiki image node.

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'

Source:

Returns:

CSS class

Type
string
Get the right CSS class to use for alignment

onAttributeChange() #

onResizableResizing(dimensions) #

Parameters:

Name Type Description
dimensions Object

New dimensions

Source:

onSetup() #

Override the default onSetup to add direction-dependent classes to the image thumbnail.

Source:

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

Source:
Update CSS classes based on alignment and type

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

Source:

Redraw the image and its wrappers at the specified dimensions

The current dimensions from the model are used if none are specified.