@meta2d/core 1.0.19 → 1.0.20
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 +14 -2
- package/src/canvas/canvas.js.map +1 -1
- package/src/core.d.ts +1 -0
- package/src/core.js +71 -38
- package/src/core.js.map +1 -1
- package/src/diagrams/gif.js +4 -2
- package/src/diagrams/gif.js.map +1 -1
- package/src/options.d.ts +1 -0
- package/src/options.js.map +1 -1
- package/src/pen/render.js +8 -8
- package/src/pen/render.js.map +1 -1
- package/src/store/store.d.ts +2 -0
- package/src/store/store.js +1 -0
- package/src/store/store.js.map +1 -1
package/package.json
CHANGED
package/src/canvas/canvas.js
CHANGED
|
@@ -246,6 +246,10 @@ var Canvas = /** @class */ (function () {
|
|
|
246
246
|
}
|
|
247
247
|
e.preventDefault();
|
|
248
248
|
e.stopPropagation();
|
|
249
|
+
//移动画笔过程中不允许缩放
|
|
250
|
+
if (_this.mouseDown &&
|
|
251
|
+
(_this.hoverType === HoverType.Node || _this.hoverType === HoverType.Line))
|
|
252
|
+
return;
|
|
249
253
|
if (_this.store.data.locked === LockState.Disable)
|
|
250
254
|
return;
|
|
251
255
|
if (_this.store.data.locked === LockState.DisableScale)
|
|
@@ -2853,6 +2857,10 @@ var Canvas = /** @class */ (function () {
|
|
|
2853
2857
|
pen.height *= this.store.data.scale;
|
|
2854
2858
|
pen.x = e.x - pen.width / 2;
|
|
2855
2859
|
pen.y = e.y - pen.height / 2;
|
|
2860
|
+
if (pen.tags && pen.tags.includes('meta3d')) {
|
|
2861
|
+
pen.x = this.store.data.origin.x;
|
|
2862
|
+
pen.y = this.store.data.origin.y;
|
|
2863
|
+
}
|
|
2856
2864
|
}
|
|
2857
2865
|
}
|
|
2858
2866
|
}
|
|
@@ -2883,7 +2891,11 @@ var Canvas = /** @class */ (function () {
|
|
|
2883
2891
|
{ x: pen.x, y: pen.y + pen.height },
|
|
2884
2892
|
{ x: pen.x + pen.width, y: pen.y + pen.height },
|
|
2885
2893
|
];
|
|
2886
|
-
if (
|
|
2894
|
+
if ((pen.x === rect_1.x &&
|
|
2895
|
+
pen.y === rect_1.y &&
|
|
2896
|
+
pen.width === rect_1.width &&
|
|
2897
|
+
pen.height === rect_1.height) ||
|
|
2898
|
+
points.some(function (point) { return pointInRect(point, rect_1); })) {
|
|
2887
2899
|
flag = false;
|
|
2888
2900
|
break;
|
|
2889
2901
|
}
|
|
@@ -4009,7 +4021,7 @@ var Canvas = /** @class */ (function () {
|
|
|
4009
4021
|
};
|
|
4010
4022
|
Canvas.prototype.loadImage = function (pen) {
|
|
4011
4023
|
var _this = this;
|
|
4012
|
-
if (pen.image !== pen.calculative.image) {
|
|
4024
|
+
if (pen.image !== pen.calculative.image || !pen.calculative.img) {
|
|
4013
4025
|
pen.calculative.img = undefined;
|
|
4014
4026
|
if (pen.image) {
|
|
4015
4027
|
if (globalStore.htmlElements[pen.image]) {
|