ebaoferc 0.0.2-beta.1 → 0.0.2-beta.2
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.
|
@@ -84,7 +84,6 @@ export var Zoom = /*#__PURE__*/_createClass(function Zoom(viewport) {
|
|
|
84
84
|
this.controller.filter(function (event) {
|
|
85
85
|
// 修改默认,手势
|
|
86
86
|
// 右键移动,ctrl+滚轮 缩放
|
|
87
|
-
event.preventDefault();
|
|
88
87
|
return event.button === 0 && event.type !== 'dblclick' || event.ctrlKey && event.type === 'wheel';
|
|
89
88
|
});
|
|
90
89
|
});
|
|
@@ -176,26 +176,29 @@ export var View = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
176
176
|
// 重布局计算
|
|
177
177
|
mind === null || mind === void 0 || mind.refresh();
|
|
178
178
|
}, [render]);
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
179
|
+
|
|
180
|
+
// 鼠标滚轮滚动缩放后会变成上下滚动,不需要这个功能,所以注释掉
|
|
181
|
+
// useEffect(() => {
|
|
182
|
+
// if (viewport) {
|
|
183
|
+
// const callback = (event: WheelEvent) => {
|
|
184
|
+
// // 禁止默认事件(右滑快捷返回)
|
|
185
|
+
// event.preventDefault()
|
|
186
|
+
|
|
187
|
+
// if (mind) {
|
|
188
|
+
// mind.translate({
|
|
189
|
+
// x: -event.deltaX * wheelMoveSpeed,
|
|
190
|
+
// y: -event.deltaY * wheelMoveSpeed
|
|
191
|
+
// })
|
|
192
|
+
// }
|
|
193
|
+
// }
|
|
194
|
+
// viewport.addEventListener('wheel', callback, {
|
|
195
|
+
// passive: false
|
|
196
|
+
// })
|
|
197
|
+
|
|
198
|
+
// return () => viewport.removeEventListener('wheel', callback)
|
|
199
|
+
// }
|
|
200
|
+
// }, [viewport, mind, wheelMoveSpeed])
|
|
201
|
+
|
|
199
202
|
return /*#__PURE__*/_jsxs("div", {
|
|
200
203
|
className: Classnames(classNameWrapper(Style, 'root'), className),
|
|
201
204
|
children: [/*#__PURE__*/_jsx("div", {
|