Fix layer canvas reuse

If the scale values have more than 6 decimals they are rounded and can no longer be
compared to the created transform string.
This commit is contained in:
Maximilian Krög
2021-05-17 14:19:37 +02:00
parent 0486caf659
commit bf0671fc08
5 changed files with 22 additions and 31 deletions

View File

@@ -6,8 +6,8 @@ import Worker from 'worker-loader!./offscreen-canvas.worker.js'; //eslint-disabl
import stringify from 'json-stringify-safe';
import {FullScreen} from '../src/ol/control.js';
import {compose, create} from '../src/ol/transform.js';
import {createTransformString} from '../src/ol/render/canvas.js';
import {createXYZ} from '../src/ol/tilegrid.js';
import {toString as toTransformString} from '../src/ol/transform.js';
const worker = new Worker();
@@ -45,7 +45,7 @@ function updateContainerTransform() {
0
);
}
transformContainer.style.transform = createTransformString(transform);
transformContainer.style.transform = toTransformString(transform);
}
}