Skip to content

Commit bd52649

Browse files
committed
fix: use minimap methods in CanvasDrawer
1 parent 101d001 commit bd52649

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/minimap-element.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,8 @@ class MinimapElement {
673673
*/
674674
setModel (minimap) {
675675
this.minimap = minimap
676+
// TODO: go direct
677+
this.CanvasDrawer.minimap = minimap
676678

677679
this.subscriptions.add(
678680

lib/mixins/canvas-drawer.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ let thisSpec
1818
* methods are available on any `MinimapElement` instance.
1919
*/
2020
export default class CanvasDrawer {
21+
constructor() {
22+
// set in setModel of minimapElement
23+
this.minimap = undefined
24+
}
2125
/**
2226
* Initializes the canvas elements needed to perform the `Minimap` rendering.
2327
*/

0 commit comments

Comments
 (0)