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

View File

@@ -22,15 +22,6 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer {
constructor(imageLayer) {
super(imageLayer);
/**
* @protected
* @type {CanvasRenderingContext2D}
*/
this.context = createCanvasContext2D();
const canvas = this.context.canvas;
canvas.style.position = 'absolute';
/**
* @protected
* @type {import("../../transform.js").Transform}