Skip to content

Commit

Permalink
fix: duplicate functions for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jan 16, 2021
1 parent 46080b3 commit 67d9d58
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions lib/minimap.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ export default class Minimap {
/**
* @return {MinimapElement} returns the current minimapElement
*/
getMinimapElement() {
getMinimapElement () {
return this.minimapElement
}

Expand Down Expand Up @@ -1065,8 +1065,21 @@ export default class Minimap {
* get the DecorationManagement API for the current minimapElement
* @return {DecorationManagement}
*/
getDecorationManagement() {
getDecorationManagement () {
return this.minimapElement.DecorationManagement
}

// Decoration API duplicated for backward compatibility in the service
getDecorations () { return this.minimapElement.DecorationManagement.getDecorations() }
onDidAddDecoration (...args) { return this.minimapElement.DecorationManagement.onDidAddDecoration(...args) }
onDidRemoveDecoration (...args) { return this.minimapElement.DecorationManagement.onDidRemoveDecoration(...args) }
onDidChangeDecorationRange (...args) { return this.minimapElement.DecorationManagement.onDidChangeDecorationRange(...args) }
onDidUpdateDecoration (...args) { return this.minimapElement.DecorationManagement.onDidUpdateDecoration(...args) }
decorationForId (...args) { return this.minimapElement.DecorationManagement.decorationForId(...args) }
decorationsForScreenRowRange (...args) { return this.minimapElement.DecorationManagement.decorationsForScreenRowRange(...args) }
decorationsByTypeThenRows () { return this.minimapElement.DecorationManagement.decorationsByTypeThenRows() }
decorateMarker (...args) { return this.minimapElement.DecorationManagement.decorateMarker(...args) }
removeDecoration (...args) { return this.minimapElement.DecorationManagement.removeDecoration(...args) }
removeAllDecorationsForMarker (...args) { return this.minimapElement.DecorationManagement.removeAllDecorationsForMarker(...args) }
removeAllDecorations () { return this.minimapElement.DecorationManagement.removeAllDecorations() }
}

0 comments on commit 67d9d58

Please sign in to comment.