Class orion.editor.TextViewShowOptions
This object describes the selection show options.
See:
orion.editor.TextView#setSelection
orion.editor.TextView#setCaretOffset
orion.editor.TextView#showSelection
Defined in: </jobs/genie.orion/orion-client-stable/workspace/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
the scroll policy.
|
|
the selection anchor.
|
|
the view anchor.
|
|
an offset from the view anchor.
|
Field Detail
{String}
scrollPolicy
the scroll policy. The scroll policy can be one of these values:
- "always" - always scroll vertically to the desired pixel offset even if the caret is already visible.
- by default - only scroll if the caret is not visible.
{String}
selectionAnchor
the selection anchor. The seleciton anchor can be one of these values:
- "top" - align the top of the selection to the view anchor.
- "bottom" - align the bottom of the selection to the view anchor.
- "center" - align the center of the selection to the view anchor.
- by default - align the top or bottom of the selection to the view anchor depending on whether the caret is at the start or end of the selection.
- Default Value:
- caret
{String}
viewAnchor
the view anchor. The view anchor can be one of these values:
- "top" - align the selection to the top of the view client area.
- "bottom" - align the selection to the bottom of the view client area.
- "center" - align the selection to the center of the view client area.
- by default - align the selection to the top or bottom of the client area depending on whether the caret is above or below the client area respectively.
{Number}
viewAnchorOffset
an offset from the view anchor. The offset is a percentage of the client area height and it is clamped to [0-1] range.
- Default Value:
- 0