Constructor
new CodeMirrorVisualEditorHighlightLineNumbering(surfaceView, [formatNumber])
#
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
surfaceView |
ve.ce.Surface | ||
formatNumber |
function |
optional |
( number ) => string, e.g. for localised digits |
Properties
contentPadding :number
#
The document node's own edge padding, which the gutter sits in.
Type:
- number
digitCount :number
#
Digit count the width was last sized for.
Type:
- number
enabled :boolean
#
formatNumber :function
#
paintedViewport :Object|null
#
null
#
The pixel band, in surface coordinates, of the last draw. Null if the gutter must draw the numbers again.
Type:
-
Object
|
null
side :string|null
#
null
#
'left' or 'right'; null until applySide() settles it.
Type:
-
string
|
null
surfaceView :ve.ce.Surface|null
#
null
#
Methods
destroy()
#
Destroy the gutter.
invalidate()
#
Make update draw the numbers again, even if the viewport did not move.
Use this when the lines move, because the band monitors only the viewport.
update draw the numbers again, even if the viewport did not move.
repaint()
#
Drop the band and draw the numbers again now.
setEnabled(enabled)
#
Enable or disable the gutter.
Parameters:
| Name | Type | Description |
|---|---|---|
enabled |
boolean |
update()
#
Repaint the numbers for the visible lines, positioning each at its line's top.