Set pixelTransform and inversePixelTransform as protected

The variables are used in child classes
This commit is contained in:
Frederic Junod
2019-06-14 14:52:26 +02:00
parent 92c16ecdf5
commit ec5e8bfa50
4 changed files with 19 additions and 19 deletions

View File

@@ -86,10 +86,10 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
const layerState = frameState.layerStatesArray[frameState.layerIndex];
// set forward and inverse pixel transforms
makeScale(this.pixelTransform_, 1 / pixelRatio, 1 / pixelRatio);
makeInverse(this.inversePixelTransform_, this.pixelTransform_);
makeScale(this.pixelTransform, 1 / pixelRatio, 1 / pixelRatio);
makeInverse(this.inversePixelTransform, this.pixelTransform);
this.useContainer(target, this.pixelTransform_, layerState.opacity);
this.useContainer(target, this.pixelTransform, layerState.opacity);
const context = this.context;
const canvas = context.canvas;
@@ -107,7 +107,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
if (canvas.width != width || canvas.height != height) {
canvas.width = width;
canvas.height = height;
const canvasTransform = transformToString(this.pixelTransform_);
const canvasTransform = transformToString(this.pixelTransform);
if (canvas.style.transform !== canvasTransform) {
canvas.style.transform = canvasTransform;
}