Rotate images

This commit is contained in:
Tim Schaub
2018-11-14 22:07:49 +01:00
parent b5378deb45
commit 8b077c66d8
2 changed files with 5 additions and 3 deletions

View File

@@ -700,8 +700,8 @@ class CanvasExecutor {
backgroundFill = backgroundStroke = false; backgroundFill = backgroundStroke = false;
} }
if (rotateWithView) { if (!rotateWithView) {
rotation += viewRotation; rotation -= viewRotation;
} }
let widthIndex = 0; let widthIndex = 0;
for (; d < dd; d += 2) { for (; d < dd; d += 2) {

View File

@@ -78,6 +78,8 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
style.display = 'flex'; style.display = 'flex';
style.alignItems = 'center'; style.alignItems = 'center';
style.justifyContent = 'center'; style.justifyContent = 'center';
style.width = '100%';
style.height = '100%';
container.appendChild(baseCanvas); container.appendChild(baseCanvas);
container.appendChild(overlayCanvas); container.appendChild(overlayCanvas);
@@ -420,7 +422,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
continue; continue;
} }
if (!transform) { if (!transform) {
transform = this.getTransform(frameState, worldOffset); transform = this.getRenderTransform(frameState, width, height, worldOffset);
} }
const currentZ = sourceTile.tileCoord[0]; const currentZ = sourceTile.tileCoord[0];
const currentClip = executorGroup.getClipCoords(transform); const currentClip = executorGroup.getClipCoords(transform);