Skip to content

Commit 85c98c6

Browse files
committed
fix layer clipping on retina screen
1 parent a2c9337 commit 85c98c6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/renderer/layer/CanvasRenderer.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,14 @@ class CanvasRenderer extends Class {
502502
//when clipping, layer's southwest needs to be reset for mask's containerPoint conversion
503503
this._southWest = map._containerPointToPoint(new Point(0, map.height));
504504
context.save();
505+
if (Browser.retina) {
506+
context.save();
507+
context.scale(2, 2);
508+
}
505509
mask._getPainter().paint(null, context);
510+
if (Browser.retina) {
511+
context.restore();
512+
}
506513
context.clip();
507514
this._southWest = old;
508515
if (this.isRenderComplete()) {

0 commit comments

Comments
 (0)