@meta2d/core 1.1.5 → 1.1.7
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/package.json +1 -1
- package/src/canvas/canvas.js +26 -11
- package/src/canvas/canvas.js.map +1 -1
- package/src/core.js +5 -3
- package/src/core.js.map +1 -1
- package/src/options.d.ts +1 -0
- package/src/options.js +1 -0
- package/src/options.js.map +1 -1
- package/src/utils/debounce.d.ts +4 -0
- package/src/utils/debounce.js +19 -0
- package/src/utils/debounce.js.map +1 -1
package/package.json
CHANGED
package/src/canvas/canvas.js
CHANGED
|
@@ -181,9 +181,16 @@ export class Canvas {
|
|
|
181
181
|
this.externalElements.ondrop = this.ondrop;
|
|
182
182
|
this.externalElements.oncontextmenu = (e) => e.preventDefault();
|
|
183
183
|
this.store.options.interval = 50;
|
|
184
|
-
this.
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
if (this.store.options.parentTouch) {
|
|
185
|
+
this.parentElement.ontouchstart = this.ontouchstart;
|
|
186
|
+
this.parentElement.ontouchmove = this.ontouchmove;
|
|
187
|
+
this.parentElement.ontouchend = this.ontouchend;
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
this.externalElements.ontouchstart = this.ontouchstart;
|
|
191
|
+
this.externalElements.ontouchmove = this.ontouchmove;
|
|
192
|
+
this.externalElements.ontouchend = this.ontouchend;
|
|
193
|
+
}
|
|
187
194
|
this.externalElements.onmousedown = (e) => {
|
|
188
195
|
if (this.isMobile) {
|
|
189
196
|
return;
|
|
@@ -6959,11 +6966,12 @@ export class Canvas {
|
|
|
6959
6966
|
}
|
|
6960
6967
|
}
|
|
6961
6968
|
};
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
}
|
|
6969
|
+
// 下拉 点击滚动条
|
|
6970
|
+
// this.inputDiv.onblur = ()=>{
|
|
6971
|
+
// setTimeout(()=> {
|
|
6972
|
+
// this.hideInput()
|
|
6973
|
+
// },300)
|
|
6974
|
+
// }
|
|
6967
6975
|
this.inputDiv.oninput = (e) => {
|
|
6968
6976
|
const pen = this.store.pens[this.inputDiv.dataset.penId];
|
|
6969
6977
|
if (pen && pen.inputType === 'number') {
|
|
@@ -8172,9 +8180,16 @@ export class Canvas {
|
|
|
8172
8180
|
this.externalElements.removeEventListener('gesturestart', this.onGesturestart);
|
|
8173
8181
|
this.externalElements.ondragover = (e) => e.preventDefault();
|
|
8174
8182
|
this.externalElements.ondrop = undefined;
|
|
8175
|
-
this.
|
|
8176
|
-
|
|
8177
|
-
|
|
8183
|
+
if (this.store.options.parentTouch) {
|
|
8184
|
+
this.parentElement.ontouchstart = undefined;
|
|
8185
|
+
this.parentElement.ontouchmove = undefined;
|
|
8186
|
+
this.parentElement.ontouchend = undefined;
|
|
8187
|
+
}
|
|
8188
|
+
else {
|
|
8189
|
+
this.externalElements.ontouchstart = undefined;
|
|
8190
|
+
this.externalElements.ontouchmove = undefined;
|
|
8191
|
+
this.externalElements.ontouchend = undefined;
|
|
8192
|
+
}
|
|
8178
8193
|
this.externalElements.onmousedown = undefined;
|
|
8179
8194
|
this.externalElements.onmousemove = undefined;
|
|
8180
8195
|
this.externalElements.onmouseup = undefined;
|