From 980adbe5950c8236740ada6639d20eb5c2882c96 Mon Sep 17 00:00:00 2001 From: Sebastian Kupke Date: Wed, 2 Oct 2019 09:27:12 +0200 Subject: [PATCH] Fixed clipping issue for PixiJS v5. --- dist/iwmlib.pixi.js | 4 ++-- lib/pixi/deepzoom/image.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/iwmlib.pixi.js b/dist/iwmlib.pixi.js index 492bdc5..3709c26 100644 --- a/dist/iwmlib.pixi.js +++ b/dist/iwmlib.pixi.js @@ -9657,11 +9657,11 @@ if (deepZoomInfo.clip) { let mask = new PIXI.Graphics(); - mask.beginFill(1, 1); + mask.alpha = 0.0000001; + mask.beginFill(0xff0000, 1); mask.drawRect(0, 0, w, h); mask.endFill(); this.mask = mask; - mask.alpha = 0; this.addChild(mask); this.minimumLevel = deepZoomInfo.baseLevel; } diff --git a/lib/pixi/deepzoom/image.js b/lib/pixi/deepzoom/image.js index 000ac47..f4ecb5a 100755 --- a/lib/pixi/deepzoom/image.js +++ b/lib/pixi/deepzoom/image.js @@ -386,6 +386,7 @@ export class DeepZoomImage extends PIXI.Container { if (deepZoomInfo.clip) { let mask = new PIXI.Graphics() + mask.alpha = 0.0000001 mask.beginFill(0xff0000, 1) mask.drawRect(0, 0, w, h) mask.endFill()