Align layer canvas to the left

So that the position is not affected by the `text-align` css rule.
This commit is contained in:
Frederic Junod
2019-10-07 13:48:30 +02:00
parent 2ce14a50a1
commit f20db28901
3 changed files with 3 additions and 0 deletions

View File

@@ -138,6 +138,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
const overlayContext = createCanvasContext2D();
const style = overlayContext.canvas.style;
style.position = 'absolute';
style.left = '0';
style.transformOrigin = 'top left';
this.overlayContext_ = overlayContext;
this.overlayContextUid_ = getUid(overlayContext);