@meta2d/core 1.1.5 → 1.1.6
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 +40 -40
- package/src/canvas/canvas.js +22 -8
- package/src/canvas/canvas.js.map +1 -1
- package/src/core.js +10 -9
- package/src/core.js.map +1 -1
- package/src/diagrams/iterator.d.ts +0 -0
- package/src/diagrams/iterator.js +109 -0
- package/src/diagrams/iterator.js.map +1 -0
- package/src/dialog/dialog.js +60 -60
- package/src/message/message.js +18 -18
- 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/src/utils/jetLinks.js +7 -7
package/package.json
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@meta2d/core",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "@meta2d/core: Powerful, Beautiful, Simple, Open - Web-Based 2D At Its Best .",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"types": "index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"copy": "copyfiles package.json ../../dist/core/",
|
|
9
|
-
"build": "tsc && npm run copy"
|
|
10
|
-
},
|
|
11
|
-
"keywords": [
|
|
12
|
-
"meta2d",
|
|
13
|
-
"diagram",
|
|
14
|
-
"2D",
|
|
15
|
-
"canvas"
|
|
16
|
-
],
|
|
17
|
-
"author": "alsmile123@qq.com",
|
|
18
|
-
"license": "MIT",
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "git+https://github.com/le5le-com/meta2d.js.git"
|
|
22
|
-
},
|
|
23
|
-
"bugs": {
|
|
24
|
-
"url": "https://github.com/le5le-com/meta2d.js/issues"
|
|
25
|
-
},
|
|
26
|
-
"homepage": "https://github.com/le5le-com/meta2d.js#readme",
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@types/marked": "^4.0.3",
|
|
29
|
-
"@types/offscreencanvas": "latest",
|
|
30
|
-
"@types/zrender": "^4.0.0"
|
|
31
|
-
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"mitt": "^2.1.0",
|
|
34
|
-
"mqtt": "^4.2.6"
|
|
35
|
-
},
|
|
36
|
-
"publishConfig": {
|
|
37
|
-
"access": "public"
|
|
38
|
-
},
|
|
39
|
-
"gitHead": "78f2a53ca1839c89b56e2e498d17ba4eb987ad14"
|
|
40
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@meta2d/core",
|
|
3
|
+
"version": "1.1.6",
|
|
4
|
+
"description": "@meta2d/core: Powerful, Beautiful, Simple, Open - Web-Based 2D At Its Best .",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"copy": "copyfiles package.json ../../dist/core/",
|
|
9
|
+
"build": "tsc && npm run copy"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"meta2d",
|
|
13
|
+
"diagram",
|
|
14
|
+
"2D",
|
|
15
|
+
"canvas"
|
|
16
|
+
],
|
|
17
|
+
"author": "alsmile123@qq.com",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/le5le-com/meta2d.js.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/le5le-com/meta2d.js/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/le5le-com/meta2d.js#readme",
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/marked": "^4.0.3",
|
|
29
|
+
"@types/offscreencanvas": "latest",
|
|
30
|
+
"@types/zrender": "^4.0.0"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"mitt": "^2.1.0",
|
|
34
|
+
"mqtt": "^4.2.6"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"gitHead": "78f2a53ca1839c89b56e2e498d17ba4eb987ad14"
|
|
40
|
+
}
|
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;
|
|
@@ -6835,8 +6842,8 @@ export class Canvas {
|
|
|
6835
6842
|
}
|
|
6836
6843
|
sheet.deleteRule(0);
|
|
6837
6844
|
sheet.deleteRule(0);
|
|
6838
|
-
sheet.insertRule(`.meta2d-input
|
|
6839
|
-
.input-div{
|
|
6845
|
+
sheet.insertRule(`.meta2d-input
|
|
6846
|
+
.input-div{
|
|
6840
6847
|
resize:none;border:none;outline:none;background:transparent;position:absolute;flex-grow:1;height:100%;width: 100%;position:absolute;left:0;top:0;display:flex;flex-direction: column;cursor: text;${style}}`);
|
|
6841
6848
|
sheet.insertRule(`.input-div div{${div_style}}`);
|
|
6842
6849
|
// sheet.insertRule(`.meta2d-input .input-div-font{${style_font}}`);
|
|
@@ -8172,9 +8179,16 @@ export class Canvas {
|
|
|
8172
8179
|
this.externalElements.removeEventListener('gesturestart', this.onGesturestart);
|
|
8173
8180
|
this.externalElements.ondragover = (e) => e.preventDefault();
|
|
8174
8181
|
this.externalElements.ondrop = undefined;
|
|
8175
|
-
this.
|
|
8176
|
-
|
|
8177
|
-
|
|
8182
|
+
if (this.store.options.parentTouch) {
|
|
8183
|
+
this.parentElement.ontouchstart = undefined;
|
|
8184
|
+
this.parentElement.ontouchmove = undefined;
|
|
8185
|
+
this.parentElement.ontouchend = undefined;
|
|
8186
|
+
}
|
|
8187
|
+
else {
|
|
8188
|
+
this.externalElements.ontouchstart = undefined;
|
|
8189
|
+
this.externalElements.ontouchmove = undefined;
|
|
8190
|
+
this.externalElements.ontouchend = undefined;
|
|
8191
|
+
}
|
|
8178
8192
|
this.externalElements.onmousedown = undefined;
|
|
8179
8193
|
this.externalElements.onmousemove = undefined;
|
|
8180
8194
|
this.externalElements.onmouseup = undefined;
|