Extends
Constructor
new ve.ui.SumCellsContextItem(context, model, [config])
#
Show the sum and average of numeric values across a table selection.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
context |
ve.ui.LinearContext | Context the item is in |
|
model |
ve.dm.Model | Model the item is related to |
|
config |
Object |
optional |
Configuration options |
Show the sum and average of numeric values across a table selection.
Methods
equals(other) → {boolean}
#
Check whether this context item represents the same content as another
Parameters:
Name | Type | Description |
---|---|---|
other |
ve.ui.ContextItem |
- Inherited from:
- Source:
Returns:
- Type
- boolean
Check whether this context item represents the same content as another
getCommand() → {ve.ui.Command}
#
Get the command for this item.
getDescription() → {string}
#
Get the description.
- Inherited from:
- Source:
Returns:
Item description
- Type
- string
Get the description.
getFragment() → {ve.dm.SurfaceFragment}
#
Get a surface fragment covering the related model node, or the current selection otherwise
- Inherited from:
- Source:
Returns:
Surface fragment
Get a surface fragment covering the related model node, or the current selection otherwise
isEditable() → {boolean}
#
Check if item is editable.
- Inherited from:
- Source:
Returns:
Item is editable
- Type
- boolean
Check if item is editable.
isNode() → {boolean}
#
Check if model is a node
- Inherited from:
- Source:
Returns:
Model is a node
- Type
- boolean
Check if model is a node
isReadOnly() → {boolean}
#
Check if the context's surface is readOnly
- Inherited from:
- Source:
Returns:
Context's surface is readOnly
- Type
- boolean
Check if the context's surface is readOnly
onEditButtonClick()protected
#
Handle edit button click events.
- Inherited from:
- Source:
Fires:
Handle edit button click events.
renderBody()
#
Render the body.
- Inherited from:
- Source:
Render the body.
setup(refreshing) → {ve.ui.ContextItem}chainable
#
Setup the item.
Parameters:
Name | Type | Description |
---|---|---|
refreshing |
boolean | If this is a reconstruction/refresh of a context |
- Overrides:
- Source:
Returns:
- Type
- ve.ui.ContextItem
Setup the item.
teardown() → {ve.ui.ContextItem}chainable
#
Teardown the item.
isCompatibleWith()static
#
Events
command()
#
The context executed a ve.ui.Command
- Inherited from:
- Source:
The context executed a ve.ui.Command