Interface IViewZone
Expand description
interface IViewZone {
afterColumn?: number;
afterColumnAffinity?: PositionAffinity;
afterLineNumber: number;
domNode: HTMLElement;
heightInLines?: number;
heightInPx?: number;
marginDomNode?: HTMLElement;
minWidthInPx?: number;
onComputedHeight?: (height: number) => void;
onDomNodeTop?: (top: number) => void;
ordinal?: number;
showInHiddenAreas?: boolean;
suppressMouseDown?: boolean;
}Properties§
after Column?: numberThe column after which this zone should appear.
If not set, the maxLineColumn of afterLineNumber will be used.
This is relevant for wrapped lines.
after Column Affinity?: PositionAffinityIf the afterColumn has multiple view columns, the affinity specifies which one to use. Defaults to none.
after Line Number: numberThe line number after which this zone should appear. Use 0 to place a view zone before the first line number.
dom Node: HTMLElementThe dom node of the view zone
height In Lines?: numberThe height in lines of the view zone.
If specified, heightInPx will be used instead of this.
If neither heightInPx nor heightInLines is specified, a default of heightInLines = 1 will be chosen.
height In Px?: numberThe height in px of the view zone.
If this is set, the editor will give preference to it rather than heightInLines above.
If neither heightInPx nor heightInLines is specified, a default of heightInLines = 1 will be chosen.
margin Dom Node?: HTMLElementAn optional dom node for the view zone that will be placed in the margin area.
min Width In Px?: numberThe minimum width in px of the view zone. If this is set, the editor will ensure that the scroll width is >= than this value.
on Computed Height?: { ... }Callback which gives the height in pixels of the view zone.
on Dom Node Top?: { ... }Callback which gives the relative top of the view zone as it appears (taking scrolling into account).
ordinal?: numberTiebreaker that is used when multiple view zones want to be after the same line.
Defaults to afterColumn otherwise 10000;
Render the zone even when its line is hidden.
suppress Mouse Down?: booleanSuppress mouse down events. If set, the editor will attach a mouse down listener to the view zone and .preventDefault on it. Defaults to false
A view zone is a full horizontal rectangle that 'pushes' text down. The editor reserves space for view zones when rendering.