Create context in the canvas layer base class

This commit is contained in:
Tim Schaub
2018-11-14 21:42:10 +01:00
parent 33f6d6f110
commit b5378deb45
4 changed files with 11 additions and 28 deletions
-10
View File
@@ -3,7 +3,6 @@
*/
import {getUid} from '../../util.js';
import ViewHint from '../../ViewHint.js';
import {createCanvasContext2D} from '../../dom.js';
import {listen, unlisten} from '../../events.js';
import EventType from '../../events/EventType.js';
import rbush from 'rbush';
@@ -77,15 +76,6 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
*/
this.replayGroupChanged = true;
/**
* @type {CanvasRenderingContext2D}
*/
this.context = createCanvasContext2D();
const canvas = this.context.canvas;
canvas.style.position = 'absolute';
canvas.className = this.getLayer().getClassName();
listen(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);
}