@meta2d/core 1.0.76 → 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
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
|
}
|