@threedddplus/logoeditor 0.0.84 → 0.0.85
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 +21 -11
- 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 +21 -11
- package/dist/logoeditor.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/logoeditor.esm.js
CHANGED
@@ -4689,26 +4689,36 @@ var initCanvas = function initCanvas() {
|
|
4689
4689
|
var onObjectMoving = function onObjectMoving(e) {
|
4690
4690
|
use3dddPlus.getState().updateModifaction(false);
|
4691
4691
|
var obj = e.target;
|
4692
|
-
|
4693
|
-
|
4694
|
-
// obj.getBoundingRect().height > obj.canvas.width
|
4695
|
-
// ) {
|
4696
|
-
// return;
|
4697
|
-
// }
|
4698
|
-
console.log(e);
|
4699
|
-
obj.setCoords();
|
4700
|
-
if (obj.getBoundingRect().top < 10 || obj.getBoundingRect().left < 45) {
|
4692
|
+
if (obj.getBoundingRect().top < 10) {
|
4693
|
+
console.log('top < 10', obj.getBoundingRect().top < 10);
|
4701
4694
|
obj.top = Math.max(obj.top, obj.top - obj.getBoundingRect().top + 10);
|
4695
|
+
obj.setCoords();
|
4696
|
+
}
|
4697
|
+
if (obj.getBoundingRect().left < 45) {
|
4698
|
+
console.log('left < 45', obj.getBoundingRect().left < 45);
|
4702
4699
|
obj.left = Math.max(obj.left, obj.left - obj.getBoundingRect().left + 45);
|
4703
4700
|
obj.setCoords();
|
4704
4701
|
}
|
4705
|
-
if (obj.getBoundingRect().top + obj.getBoundingRect().height + 10 > obj.canvas.height
|
4702
|
+
if (obj.getBoundingRect().top + obj.getBoundingRect().height + 10 > obj.canvas.height) {
|
4703
|
+
console.log(' top> obj.canvas.height ', obj.getBoundingRect().top + obj.getBoundingRect().height + 10 > obj.canvas.height);
|
4706
4704
|
obj.top = Math.min(obj.top, obj.canvas.height - obj.getBoundingRect().height + obj.top - obj.getBoundingRect().top - 10);
|
4705
|
+
obj.setCoords();
|
4706
|
+
}
|
4707
|
+
if (obj.getBoundingRect().left + obj.getBoundingRect().width + 45 > obj.canvas.width) {
|
4708
|
+
console.log('left > obj.canvas.width', obj.getBoundingRect().left + obj.getBoundingRect().width + 45 > obj.canvas.width);
|
4707
4709
|
obj.left = Math.min(obj.left, obj.canvas.width - obj.getBoundingRect().width + obj.left - obj.getBoundingRect().left - 45);
|
4708
4710
|
obj.setCoords();
|
4709
4711
|
}
|
4710
4712
|
var brNew = obj.getBoundingRect();
|
4711
|
-
if (brNew.width + brNew.left + 45 >= obj.canvas.width || brNew.height + brNew.top + 10 >= obj.canvas.height || brNew.left < 45 || brNew.top < 10)
|
4713
|
+
if (brNew.width + brNew.left + 45 >= obj.canvas.width || brNew.height + brNew.top + 10 >= obj.canvas.height || brNew.left < 45 || brNew.top < 10) {
|
4714
|
+
console.log('if condition');
|
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 {
|
4712
4722
|
left1 = obj.left;
|
4713
4723
|
top1 = obj.top;
|
4714
4724
|
scale1x = obj.scaleX;
|