MinimapElement
Public: The MinimapElement is the view meant to render a Minimap instance in the DOM.
You can retrieve the MinimapElement associated to a Minimap
using the atom.views.getView
method.
Note that most interactions with the Minimap package is done through the Minimap model so you should never have to access MinimapElement instances.
Example:
let minimapElement = atom.views.getView(minimap)
Static Method Summary
Static Public Methods | ||
public static |
The method that registers the MinimapElement factory in the
|
Method Summary
Public Methods | ||
public |
attach(parent: HTMLElement) Attaches the MinimapElement to the DOM. |
|
public |
destroy() Destroys this MinimapElement |
|
public |
detach() Detaches the MinimapElement from the DOM. |
|
public |
Returns the Minimap for which this MinimapElement was created. |
|
public |
getTextEditor(): TextEditor Returns the target |
|
public |
getTextEditorElement(): TextEditorElement Returns the |
|
public |
getTextEditorElementRoot(): HTMLElement Returns the root of the |
|
public |
Returns whether the MinimapElement is currently visible on screen or not. |
|
public |
Requests an update to be performed on the next frame that will completely redraw the minimap. |
|
public |
Requests an update to be performed on the next frame. |
|
public |
setDisplayCodeHighlights(displayCodeHighlights: Boolean) Defines whether to render the code highlights or not. |
|
public |
Defines the Minimap model for this MinimapElement instance. |
|
public |
setStandAlone(standAlone: boolean) Sets the stand-alone mode for this MinimapElement. |
Static Public Methods
public static registerViewProvider() source
The method that registers the MinimapElement factory in the
atom.views
registry with the Minimap model.
Public Methods
public attach(parent: HTMLElement) source
Attaches the MinimapElement to the DOM.
The position at which the element is attached is defined by the
displayMinimapOnLeft
setting.
Params:
Name | Type | Attribute | Description |
parent | HTMLElement |
|
the DOM node where attaching the minimap element |
public getTextEditor(): TextEditor source
Returns the target TextEditor
of the Minimap.
Return:
TextEditor | the minimap's text editor |
public getTextEditorElement(): TextEditorElement source
Returns the TextEditorElement
for the Minimap's TextEditor
.
Return:
TextEditorElement | the minimap's text editor element |
public getTextEditorElementRoot(): HTMLElement source
Returns the root of the TextEditorElement
content.
This method is mostly used to ensure compatibility with the shadowDom
setting.
Return:
HTMLElement | the root of the |
public isVisible(): boolean source
Returns whether the MinimapElement is currently visible on screen or not.
The visibility of the minimap is defined by testing the size of the offset width and height of the element.
public requestForcedUpdate() source
Requests an update to be performed on the next frame that will completely redraw the minimap.
public setDisplayCodeHighlights(displayCodeHighlights: Boolean) source
Defines whether to render the code highlights or not.
Params:
Name | Type | Attribute | Description |
displayCodeHighlights | Boolean | whether to render the code highlights or not |