@meta2d/core 1.0.26 → 1.0.27
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 +2 -2
- package/src/canvas/canvas.js +7 -2
- package/src/canvas/canvas.js.map +1 -1
- package/src/core.d.ts +1 -0
- package/src/core.js +70 -32
- package/src/core.js.map +1 -1
- package/src/pen/model.d.ts +6 -0
- package/src/pen/model.js.map +1 -1
- package/src/pen/render.js +66 -4
- package/src/pen/render.js.map +1 -1
- package/src/store/store.d.ts +2 -0
- package/src/store/store.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meta2d/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
4
4
|
"description": "@meta2d/core: Powerful, Beautiful, Simple, Open - Web-Based 2D At Its Best .",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"gitHead": "78f2a53ca1839c89b56e2e498d17ba4eb987ad14"
|
|
39
|
-
}
|
|
39
|
+
}
|
package/src/canvas/canvas.js
CHANGED
|
@@ -1886,7 +1886,11 @@ var Canvas = /** @class */ (function () {
|
|
|
1886
1886
|
((_c = _this.store.activeAnchor) === null || _c === void 0 ? void 0 : _c.twoWay) === TwoWay.Disable) {
|
|
1887
1887
|
continue;
|
|
1888
1888
|
}
|
|
1889
|
+
_this.title.hide();
|
|
1889
1890
|
if (_this.inAnchor(pt, pen, anchor)) {
|
|
1891
|
+
var _anchor = deepClone(anchor);
|
|
1892
|
+
Object.assign(_anchor, pt);
|
|
1893
|
+
_this.title.show(_anchor, pen);
|
|
1890
1894
|
return true;
|
|
1891
1895
|
}
|
|
1892
1896
|
}
|
|
@@ -2085,7 +2089,7 @@ var Canvas = /** @class */ (function () {
|
|
|
2085
2089
|
}
|
|
2086
2090
|
if (anchor.type === PointType.Line) {
|
|
2087
2091
|
//旋转的情况
|
|
2088
|
-
var _rotate = _this.store.pens[anchor.penId].rotate;
|
|
2092
|
+
var _rotate = _this.store.pens[anchor.penId].rotate || 0;
|
|
2089
2093
|
if (_this.store.pens[anchor.penId].calculative.flipX) {
|
|
2090
2094
|
_rotate *= -1;
|
|
2091
2095
|
}
|
|
@@ -4374,7 +4378,8 @@ var Canvas = /** @class */ (function () {
|
|
|
4374
4378
|
var _this = this;
|
|
4375
4379
|
var _a;
|
|
4376
4380
|
if (center === void 0) { center = { x: 0, y: 0 }; }
|
|
4377
|
-
var
|
|
4381
|
+
var minScale = this.store.data.minScale || this.store.options.minScale;
|
|
4382
|
+
var maxScale = this.store.data.maxScale || this.store.options.maxScale;
|
|
4378
4383
|
if (!(scale >= minScale && scale <= maxScale)) {
|
|
4379
4384
|
return;
|
|
4380
4385
|
}
|