Adjust for layer canvas rotation

replace missed lines
This commit is contained in:
mike-000
2019-12-04 23:47:12 +00:00
committed by GitHub
parent b4ae4ab86f
commit 2790d50660

View File

@@ -34,7 +34,8 @@ const swipe = document.getElementById('swipe');
aerial.on('prerender', function(event) {
const ctx = event.context;
const width = ctx.canvas.width * (swipe.value / 100);
const mapSize = map.getSize();
const width = mapSize[0] * (swipe.value / 100);
const tl = getRenderPixel(event, [width, 0]);
const tr = getRenderPixel(event, [mapSize[0], 0]);
const bl = getRenderPixel(event, [width, mapSize[1]]);