From 9fd502ae0c0a677a765553a9968b9c9269c63954 Mon Sep 17 00:00:00 2001 From: farzanuddin Date: Wed, 18 Dec 2019 13:38:30 +0400 Subject: [PATCH] Added argument to photoview function instead of manager --- index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 59c46cb..c15f188 100644 --- a/index.js +++ b/index.js @@ -197,7 +197,7 @@ class PhotoViewManager { this._manager.off('zoom'); } - reset({ animate = false } = {}) { + reset(animate) { if(animate) { this._setTransition(true); this._transform(0, 0, 1); @@ -229,12 +229,11 @@ class PhotoView { new PhotoViewManager(options).init(item) ); }); - } - reset() { + reset({ animate = false } = {}) { this.instances.forEach(photoViewInstance => { - photoViewInstance.reset(); + photoViewInstance.reset(animate); }); }