Browse Source

Fix closing media viewer by slide

master
Eduard Kuzmenko 3 years ago
parent
commit
7f48b0601f
  1. 4
      .env
  2. 4
      src/components/appMediaViewerBase.ts

4
.env

@ -1,5 +1,5 @@
API_ID=1025907 API_ID=1025907
API_HASH=452b0359b988148995f22ff0f4229750 API_HASH=452b0359b988148995f22ff0f4229750
VERSION=1.1.0 VERSION=1.1.0
VERSION_FULL=1.1.0 (97) VERSION_FULL=1.1.0 (98)
BUILD=97 BUILD=98

4
src/components/appMediaViewerBase.ts

@ -310,7 +310,7 @@ export default class AppMediaViewerBase<
const percentsY = Math.abs(yDiff) / windowSize.height; const percentsY = Math.abs(yDiff) / windowSize.height;
if(percentsY > .2 || yDiff > 125) { if(percentsY > .2 || yDiff > 125) {
this.buttons.close.click(); this.close();
return true; return true;
} }
@ -492,7 +492,7 @@ export default class AppMediaViewerBase<
}); });
if(/* target === this.mediaViewerDiv */!mover || (!isZooming && (target.tagName === 'IMG' || target.tagName === 'image'))) { if(/* target === this.mediaViewerDiv */!mover || (!isZooming && (target.tagName === 'IMG' || target.tagName === 'image'))) {
this.buttons.close.click(); this.close();
} }
}; };

Loading…
Cancel
Save