Classes
Components
Modules
Selection
Class defined in model/Selection.js#7
A document selection. Refers to a Substance document model, not to the DOM.
new Selection()
Constructor defined in model/Selection.js#9
this.getDocument()
Method defined in model/Selection.js#34
Returns
Document | The attached document instance |
this.attach(doc)
Method defined in model/Selection.js#53
Attach document to the selection.
Parameters
doc | Document | document to attach |
Returns
this |
this.isNull()
Method defined in model/Selection.js#61
Returns
Boolean | true when selection is null. |
this.isPropertySelection()
Method defined in model/Selection.js#66
Returns
Boolean | true for property selections |
this.isContainerSelection()
Method defined in model/Selection.js#71
Returns
Boolean | true if selection is a {@link model/ContainerSelection} |
this.isNodeSelection()
Method defined in model/Selection.js#76
Returns
Boolean | true if selection is a {@link model/NodeSelection} |
this.isCollapsed()
Method defined in model/Selection.js#83
Returns
Boolean | true when selection is collapsed |
this.isReverse()
Method defined in model/Selection.js#88
Returns
Boolean | true if startOffset < endOffset |
this.equals()
Method defined in model/Selection.js#97
Returns
Boolean | true if selection equals |
this.toString()
Method defined in model/Selection.js#116
Returns
String | This selection as human readable string. |
this.toJSON()
Method defined in model/Selection.js#126
Convert container selection to JSON.
Returns
Object |
this.getFragments()
Method defined in model/Selection.js#136
Get selection fragments for this selection.
A selection fragment is bound to a single property.
Returns
Selection.Fragment[] |
nullSelection
Property defined in model/Selection.js#171
We use a singleton to represent NullSelections.