@threedddplus/logoeditor 0.0.82 → 0.0.83
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/dist/logoeditor.cjs.development.js +14 -24
- package/dist/logoeditor.cjs.development.js.map +1 -1
- package/dist/logoeditor.cjs.production.min.js +1 -1
- package/dist/logoeditor.cjs.production.min.js.map +1 -1
- package/dist/logoeditor.esm.js +14 -24
- package/dist/logoeditor.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/logoeditor.esm.js
CHANGED
@@ -4689,36 +4689,26 @@ var initCanvas = function initCanvas() {
|
|
4689
4689
|
var onObjectMoving = function onObjectMoving(e) {
|
4690
4690
|
use3dddPlus.getState().updateModifaction(false);
|
4691
4691
|
var obj = e.target;
|
4692
|
-
if (
|
4693
|
-
|
4694
|
-
|
4695
|
-
|
4696
|
-
|
4697
|
-
}
|
4698
|
-
console.log(
|
4692
|
+
// if (
|
4693
|
+
// obj.getBoundingRect().width > obj.canvas.height ||
|
4694
|
+
// obj.getBoundingRect().height > obj.canvas.width
|
4695
|
+
// ) {
|
4696
|
+
// return;
|
4697
|
+
// }
|
4698
|
+
console.log(e);
|
4699
4699
|
obj.setCoords();
|
4700
|
-
|
4701
|
-
|
4702
|
-
|
4703
|
-
obj.top = Math.max(obj.top, obj.top - obj.getBoundingRect().top + 10);
|
4704
|
-
obj.left = Math.max(obj.left, obj.left - obj.getBoundingRect().left + 45);
|
4700
|
+
if (obj.getBoundingRect().top < 0 || obj.getBoundingRect().left < 0) {
|
4701
|
+
obj.top = Math.max(obj.top, obj.top - obj.getBoundingRect().top);
|
4702
|
+
obj.left = Math.max(obj.left, obj.left - obj.getBoundingRect().left);
|
4705
4703
|
obj.setCoords();
|
4706
4704
|
}
|
4707
|
-
if (obj.getBoundingRect().top + obj.getBoundingRect().height
|
4708
|
-
obj.top = Math.min(obj.top, obj.canvas.height - obj.getBoundingRect().height + obj.top - obj.getBoundingRect().top
|
4709
|
-
obj.left = Math.min(obj.left, obj.canvas.width - obj.getBoundingRect().width + obj.left - obj.getBoundingRect().left
|
4705
|
+
if (obj.getBoundingRect().top + obj.getBoundingRect().height > obj.canvas.height || obj.getBoundingRect().left + obj.getBoundingRect().width > obj.canvas.width) {
|
4706
|
+
obj.top = Math.min(obj.top, obj.canvas.height - obj.getBoundingRect().height + obj.top - obj.getBoundingRect().top);
|
4707
|
+
obj.left = Math.min(obj.left, obj.canvas.width - obj.getBoundingRect().width + obj.left - obj.getBoundingRect().left);
|
4710
4708
|
obj.setCoords();
|
4711
4709
|
}
|
4712
4710
|
var brNew = obj.getBoundingRect();
|
4713
|
-
if (brNew.width + brNew.left
|
4714
|
-
console.log(obj.left, obj.top, obj.scaleX, obj.scaleY, obj.width, obj.height);
|
4715
|
-
// obj.left = left1;
|
4716
|
-
// obj.top = top1;
|
4717
|
-
// obj.scaleX = scale1x;
|
4718
|
-
// obj.scaleY = scale1y;
|
4719
|
-
// obj.width = width1;
|
4720
|
-
// obj.height = height1;
|
4721
|
-
} else {
|
4711
|
+
if (brNew.width + brNew.left >= obj.canvas.width || brNew.height + brNew.top >= obj.canvas.height || brNew.left < 0 || brNew.top < 0) ; else {
|
4722
4712
|
left1 = obj.left;
|
4723
4713
|
top1 = obj.top;
|
4724
4714
|
scale1x = obj.scaleX;
|