Class DecorationManagement
Defined in: | lib/mixins/decoration-management.coffee |
Inherits: | Mixin |
Overview
The mixin that provides the decorations API to the minimap editor view.
Instance Method Summary
-
::decorateMarker(marker, decorationParams)
Adds a decoration that tracks a
Marker
. - ::decorationForId(id) Returns the decoration with the passed-in id.
- Array ::decorationsByTypesForRow(row, types..., decorations) Returns all the decorations of the given type that intersect the passed-in row.
- Array ::decorationsForScreenRowRange(startScreenRow, endScreenRow) Returns all the decorations that intersect the passed-in row range.
- ::initializeDecorations() Initializes the decorations related properties.
- ::onDidAddDecoration(callback)
- ::onDidChangeDecoration(callback)
- ::onDidRemoveDecoration(callback)
- ::onDidUpdateDecoration(callback)
- ::removeAllDecorationsForMarker(marker) Removes all the decorations registered for the passed-in marker.
-
::removeDecoration(decoration)
Removes a
Decoration
from this minimap.
Instance Method Details
::decorateMarker(marker, decorationParams) Source
Adds a decoration that tracks a Marker
. When the marker moves, is invalidated, or is destroyed, the decoration will be updated to reflect the marker's state.
There are three types of supported decorations:
- line: Fills the line background with the decoration color.
- highlight: Renders a colored rectangle on the minimap. The highlight is rendered above the line's text.
- highlight-over: Same as highlight.
- highlight-under: Renders a colored rectangle on the minimap. The highlight is rendered below the line's text.
::decorationForId(id) Source
Returns the decoration with the passed-in id.
Array ::decorationsByTypesForRow(row, types..., decorations) Source
Returns all the decorations of the given type that intersect the passed-in row.
Array ::decorationsForScreenRowRange(startScreenRow, endScreenRow) Source
Returns all the decorations that intersect the passed-in row range.
::initializeDecorations() Source
Initializes the decorations related properties.
::onDidAddDecoration(callback) Source
::onDidChangeDecoration(callback) Source
::onDidRemoveDecoration(callback) Source
::onDidUpdateDecoration(callback) Source
::removeAllDecorationsForMarker(marker) Source
Removes all the decorations registered for the passed-in marker.
::removeDecoration(decoration) Source
Removes a Decoration
from this minimap.