Extends
Constructor
new ve.ui.TableLineContext(tableNode, itemGroup, [config])
#
Context menu for editing tables.
Three are usually generated for column, row and (on mobile) table-wide actions separately.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
tableNode |
ve.ce.TableNode | ||
itemGroup |
string | Tool group to use, 'col', 'row', or 'table' |
|
config |
Object |
optional |
Configuration options |
Properties
getRelatedSources
#
Get related item sources.
Result is cached, and cleared when the model or selection changes.
- Overrides:
- Source:
Methods
destroy() → {ve.ui.Context}chainable
#
getSurface() → {ve.ui.Surface}
#
getSurfacePadding() → {ve.ui.Surface.Padding|null
}
#
null
}
#
Get an object describing the amount of padding the context adds to the surface.
For example the mobile context, which is fixed to the bottom of the viewport, will add bottom padding, whereas the floating desktop context will add none.
- Inherited from:
- Source:
Returns:
Padding object, or null
- Type
-
ve.ui.Surface.Padding
|
null
hide()
#
Hide the context while it has valid items in the menu
This could be triggered by clicking the close button on mobile or by pressing escape.
- Inherited from:
- Source:
Hide the context while it has valid items in the menu
This could be triggered by clicking the close button on mobile or by pressing escape.
isMobile() → {boolean}
#
Check if context is for mobile devices
- Inherited from:
- Source:
Returns:
Context is for mobile devices
- Type
- boolean
isVisible() → {boolean}
#
Check if context is visible.
- Inherited from:
- Source:
Returns:
Context is visible
- Type
- boolean
onContextItemCommand()
#
Handle command events from context items
- Overrides:
- Source:
onDocumentMouseDown(e)
#
onIconMouseDown(e)
#
Handle mouse down events on the icon
Parameters:
Name | Type | Description |
---|---|---|
e |
jQuery.Event | Mouse down event |
onModelSelect(selection)
#
setupMenuItems([previousItems]) → {ve.ui.Context}protectedchainable
#
Setup menu items.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
previousItems |
Array.<ve.ui.ContextItem> |
optional |
if a context is being refreshed, this will be the previously-open items for comparison |
- Inherited from:
- Source:
Returns:
- Type
- ve.ui.Context
teardownMenuItems() → {ve.ui.Context}protectedchainable
#
toggle([show]) → {jQuery.Promise}
#
Toggle the visibility of the context.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
show |
boolean |
optional |
Show the context, omit to toggle |
- Inherited from:
- Source:
Returns:
Promise resolved when context is finished showing/hiding
- Type
- jQuery.Promise
Fires:
toggleMenu([show]) → {ve.ui.Context}chainable
#
Toggle the menu.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
show |
boolean |
optional |
Show the menu, omit to toggle |
- Overrides:
- Source:
Returns:
- Type
- ve.ui.Context
updateDimensions() → {ve.ui.Context}chainable
#
Update the size and position of the context.
- Inherited from:
- Source:
Returns:
- Type
- ve.ui.Context
Fires:
Events
resize()
#
- Inherited from:
- Source: