Skip to content

Commit

Permalink
Adjust for layer canvas rotation
Browse files Browse the repository at this point in the history
replace missed lines
  • Loading branch information
mike-000 committed Dec 4, 2019
1 parent b4ae4ab commit 2790d50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/layer-swipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]]);
Expand Down

0 comments on commit 2790d50

Please sign in to comment.