@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
@@ -4697,36 +4697,26 @@ var initCanvas = function initCanvas() {
|
|
4697
4697
|
var onObjectMoving = function onObjectMoving(e) {
|
4698
4698
|
use3dddPlus.getState().updateModifaction(false);
|
4699
4699
|
var obj = e.target;
|
4700
|
-
if (
|
4701
|
-
|
4702
|
-
|
4703
|
-
|
4704
|
-
|
4705
|
-
}
|
4706
|
-
console.log(
|
4700
|
+
// if (
|
4701
|
+
// obj.getBoundingRect().width > obj.canvas.height ||
|
4702
|
+
// obj.getBoundingRect().height > obj.canvas.width
|
4703
|
+
// ) {
|
4704
|
+
// return;
|
4705
|
+
// }
|
4706
|
+
console.log(e);
|
4707
4707
|
obj.setCoords();
|
4708
|
-
|
4709
|
-
|
4710
|
-
|
4711
|
-
obj.top = Math.max(obj.top, obj.top - obj.getBoundingRect().top + 10);
|
4712
|
-
obj.left = Math.max(obj.left, obj.left - obj.getBoundingRect().left + 45);
|
4708
|
+
if (obj.getBoundingRect().top < 0 || obj.getBoundingRect().left < 0) {
|
4709
|
+
obj.top = Math.max(obj.top, obj.top - obj.getBoundingRect().top);
|
4710
|
+
obj.left = Math.max(obj.left, obj.left - obj.getBoundingRect().left);
|
4713
4711
|
obj.setCoords();
|
4714
4712
|
}
|
4715
|
-
if (obj.getBoundingRect().top + obj.getBoundingRect().height
|
4716
|
-
obj.top = Math.min(obj.top, obj.canvas.height - obj.getBoundingRect().height + obj.top - obj.getBoundingRect().top
|
4717
|
-
obj.left = Math.min(obj.left, obj.canvas.width - obj.getBoundingRect().width + obj.left - obj.getBoundingRect().left
|
4713
|
+
if (obj.getBoundingRect().top + obj.getBoundingRect().height > obj.canvas.height || obj.getBoundingRect().left + obj.getBoundingRect().width > obj.canvas.width) {
|
4714
|
+
obj.top = Math.min(obj.top, obj.canvas.height - obj.getBoundingRect().height + obj.top - obj.getBoundingRect().top);
|
4715
|
+
obj.left = Math.min(obj.left, obj.canvas.width - obj.getBoundingRect().width + obj.left - obj.getBoundingRect().left);
|
4718
4716
|
obj.setCoords();
|
4719
4717
|
}
|
4720
4718
|
var brNew = obj.getBoundingRect();
|
4721
|
-
if (brNew.width + brNew.left
|
4722
|
-
console.log(obj.left, obj.top, obj.scaleX, obj.scaleY, obj.width, obj.height);
|
4723
|
-
// obj.left = left1;
|
4724
|
-
// obj.top = top1;
|
4725
|
-
// obj.scaleX = scale1x;
|
4726
|
-
// obj.scaleY = scale1y;
|
4727
|
-
// obj.width = width1;
|
4728
|
-
// obj.height = height1;
|
4729
|
-
} else {
|
4719
|
+
if (brNew.width + brNew.left >= obj.canvas.width || brNew.height + brNew.top >= obj.canvas.height || brNew.left < 0 || brNew.top < 0) ; else {
|
4730
4720
|
left1 = obj.left;
|
4731
4721
|
top1 = obj.top;
|
4732
4722
|
scale1x = obj.scaleX;
|