cozy-ui 81.2.0 → 81.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [81.2.1](https://github.com/cozy/cozy-ui/compare/v81.2.0...v81.2.1) (2023-02-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* ImageViewer crashes when render are too fast ([c9e7698](https://github.com/cozy/cozy-ui/commit/c9e7698))
|
|
7
|
+
|
|
1
8
|
# [81.2.0](https://github.com/cozy/cozy-ui/compare/v81.1.0...v81.2.0) (2023-02-20)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -85,14 +85,16 @@ class ImageViewer extends Component {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
tearDownGestures() {
|
|
88
|
-
this.gestures
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
if (this.gestures) {
|
|
89
|
+
this.gestures.off('swipe')
|
|
90
|
+
this.gestures.on('swipe', this.props.onSwipe)
|
|
91
|
+
this.gestures.off('panstart')
|
|
92
|
+
this.gestures.off('pinchstart')
|
|
93
|
+
this.gestures.off('pinchend')
|
|
94
|
+
this.gestures.off('pan')
|
|
95
|
+
this.gestures.off('pinch')
|
|
96
|
+
this.gestures.off('panend')
|
|
97
|
+
}
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
onSwipe = e => {
|
|
@@ -149,14 +149,16 @@ var ImageViewer = /*#__PURE__*/function (_Component) {
|
|
|
149
149
|
}, {
|
|
150
150
|
key: "tearDownGestures",
|
|
151
151
|
value: function tearDownGestures() {
|
|
152
|
-
this.gestures
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
152
|
+
if (this.gestures) {
|
|
153
|
+
this.gestures.off('swipe');
|
|
154
|
+
this.gestures.on('swipe', this.props.onSwipe);
|
|
155
|
+
this.gestures.off('panstart');
|
|
156
|
+
this.gestures.off('pinchstart');
|
|
157
|
+
this.gestures.off('pinchend');
|
|
158
|
+
this.gestures.off('pan');
|
|
159
|
+
this.gestures.off('pinch');
|
|
160
|
+
this.gestures.off('panend');
|
|
161
|
+
}
|
|
160
162
|
}
|
|
161
163
|
}, {
|
|
162
164
|
key: "initGestures",
|