Skip to content

Commit

Permalink
fix: move DOMStylesReader to CanvasDrawer
Browse files Browse the repository at this point in the history
This is where DOMStylesReader is actually used
  • Loading branch information
aminya committed Jan 2, 2021
1 parent bcee054 commit 6999bc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/minimap-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { EventsDelegation, AncestorsMethods } from 'atom-utils-plus'
import elementResizeDetectorImport from 'element-resize-detector'

import * as Main from './main'
import DOMStylesReader from './dom-styles-reader'
import CanvasDrawer from './mixins/canvas-drawer'
import include from './decorators/include'
import element from './decorators/element'
Expand Down Expand Up @@ -178,11 +177,6 @@ class MinimapElement {
*/
this.quickSettingsElement = undefined

/**
* This MinimapElement's DOMStylesReader
*/
this.DOMStylesReader = new DOMStylesReader()

// States

/**
Expand Down
6 changes: 6 additions & 0 deletions lib/mixins/canvas-drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Mixin from 'mixto'

import * as Main from '../main'
import CanvasLayer from '../canvas-layer'
import DOMStylesReader from '../dom-styles-reader'

/**
* The `CanvasDrawer` mixin is responsible for the rendering of a `Minimap`
Expand Down Expand Up @@ -63,6 +64,11 @@ export default class CanvasDrawer extends Mixin {

// the maximum number of tokens to render in one line
this.maxTokensInOneLine = atom.config.get('minimap.maxTokensInOneLine')

/**
* This MinimapElement's DOMStylesReader
*/
this.DOMStylesReader = new DOMStylesReader()
}

/**
Expand Down

0 comments on commit 6999bc5

Please sign in to comment.