@meta2d/core 1.0.75 → 1.0.77
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 +10 -3
- package/src/canvas/canvas.js.map +1 -1
- package/src/core.js +9 -5
- package/src/core.js.map +1 -1
- package/src/diagrams/line/line.js +1 -1
- package/src/diagrams/line/line.js.map +1 -1
- package/src/diagrams/svg/parse.js +3 -2
- package/src/diagrams/svg/parse.js.map +1 -1
- package/src/diagrams/video.js +5 -5
- package/src/diagrams/video.js.map +1 -1
- package/src/dialog/dialog.js +2 -0
- package/src/dialog/dialog.js.map +1 -1
- package/src/pen/model.d.ts +1 -0
- package/src/pen/model.js.map +1 -1
- package/src/pen/render.d.ts +1 -0
- package/src/pen/render.js +5 -0
- package/src/pen/render.js.map +1 -1
- package/src/pen/text.js +2 -2
- package/src/utils/jetLinks.js +5 -1
- package/src/utils/jetLinks.js.map +1 -1
package/package.json
CHANGED
package/src/canvas/canvas.js
CHANGED
|
@@ -5819,8 +5819,14 @@ export class Canvas {
|
|
|
5819
5819
|
const curPage = sessionStorage.getItem('page');
|
|
5820
5820
|
const scale = this.store.data.scale;
|
|
5821
5821
|
if (this.store.clipboard.mousePos && (Math.abs(this.store.clipboard.mousePos.x - this.mousePos.x) > 100 * scale || Math.abs(this.store.clipboard.mousePos.y - this.mousePos.y) > 100 * scale)) {
|
|
5822
|
-
|
|
5823
|
-
|
|
5822
|
+
let _x = -this.store.clipboard.initRect.width / this.store.clipboard.scale / 10 / (scale);
|
|
5823
|
+
let _y = -this.store.clipboard.initRect.height / this.store.clipboard.scale / 10 / (scale);
|
|
5824
|
+
let offsetX = (scale - this.store.clipboard.scale) * this.store.clipboard.initRect.width / 2 + _x;
|
|
5825
|
+
let offsetY = (scale - this.store.clipboard.scale) * this.store.clipboard.initRect.height / 2 + _y;
|
|
5826
|
+
if (this.store.clipboard.pens.length > 1) {
|
|
5827
|
+
offsetX = (scale - 1) * this.store.clipboard.initRect.width / this.store.clipboard.scale / 2;
|
|
5828
|
+
offsetY = (scale - 1) * this.store.clipboard.initRect.height / this.store.clipboard.scale / 2;
|
|
5829
|
+
}
|
|
5824
5830
|
this.store.clipboard.pos = { x: this.mousePos.x - offsetX, y: this.mousePos.y - offsetY };
|
|
5825
5831
|
this.store.clipboard.offset = 0;
|
|
5826
5832
|
}
|
|
@@ -6893,7 +6899,7 @@ export class Canvas {
|
|
|
6893
6899
|
if (needCalcIconRectProps.includes(k)) {
|
|
6894
6900
|
willCalcIconRect = true;
|
|
6895
6901
|
}
|
|
6896
|
-
if (pen.image && pen.name !== 'gif' && ['globalAlpha', 'flipY', 'flipX', 'x', 'y', 'width', 'height', 'iconWidth', 'iconHeight', 'imageRatio', 'iconLeft', 'iconTop', 'iconAlign', 'rotate'].includes(k)) {
|
|
6902
|
+
if (pen.image && pen.name !== 'gif' && ['globalAlpha', 'flipY', 'flipX', 'x', 'y', 'width', 'height', 'iconWidth', 'iconHeight', 'imageRatio', 'iconLeft', 'iconTop', 'iconAlign', 'rotate', 'visible'].includes(k)) {
|
|
6897
6903
|
willRenderImage = true;
|
|
6898
6904
|
}
|
|
6899
6905
|
}
|
|
@@ -7409,6 +7415,7 @@ export class Canvas {
|
|
|
7409
7415
|
this.externalElements.style.zIndex = '5';
|
|
7410
7416
|
this.magnifierCanvas.magnifier = false;
|
|
7411
7417
|
this.externalElements.style.cursor = 'default';
|
|
7418
|
+
this.magnifierCanvas.render();
|
|
7412
7419
|
this.render();
|
|
7413
7420
|
}
|
|
7414
7421
|
inFitBorder = (pt) => {
|