Skip to content

Commit

Permalink
feat: add getDecorationManagement as the recommended way of using dec…
Browse files Browse the repository at this point in the history
…oration API
  • Loading branch information
aminya committed Jan 16, 2021
1 parent 03726ed commit 46080b3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/minimap-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,14 @@ class MinimapElement {
delete this.openQuickSettings
}

/**
* get the DecorationManagement API for minimapElement
* @return {DecorationManagement}
*/
getDecorationManagement () {
return this.DecorationManagement
}

// ## ## ####### ######## ######## ##
// ### ### ## ## ## ## ## ##
// #### #### ## ## ## ## ## ##
Expand Down
9 changes: 9 additions & 0 deletions lib/minimap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1060,4 +1060,13 @@ export default class Minimap {
clearCache () { this.adapter.clearCache() }

editorDestroyed () { this.adapter.editorDestroyed() }

/**
* get the DecorationManagement API for the current minimapElement
* @return {DecorationManagement}
*/
getDecorationManagement() {
return this.minimapElement.DecorationManagement
}

}

0 comments on commit 46080b3

Please sign in to comment.