@threedddplus/logoeditor 0.0.68 → 0.0.70

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.
@@ -4687,15 +4687,14 @@ var initCanvas = function initCanvas() {
4687
4687
  getAllColors();
4688
4688
  };
4689
4689
  var onObjectMoving = function onObjectMoving(e) {
4690
- console.log('onMoveing', e);
4691
4690
  use3dddPlus.getState().updateModifaction(false);
4692
4691
  var obj = e.target;
4693
- // if (
4694
- // obj.getBoundingRect().width > obj.canvas.height ||
4695
- // obj.getBoundingRect().height > obj.canvas.width
4696
- // ) {
4697
- // return;
4698
- // }
4692
+ console.log(e);
4693
+ if (!e.pointer.x) return;
4694
+ if (!e.pointer.y) return;
4695
+ if (obj.getBoundingRect().width > obj.canvas.height || obj.getBoundingRect().height > obj.canvas.width) {
4696
+ return;
4697
+ }
4699
4698
  obj.setCoords();
4700
4699
  if (obj.getBoundingRect().top < 0 || obj.getBoundingRect().left < 0) {
4701
4700
  obj.top = Math.max(obj.top, obj.top - obj.getBoundingRect().top);
@@ -4708,7 +4707,15 @@ var initCanvas = function initCanvas() {
4708
4707
  obj.setCoords();
4709
4708
  }
4710
4709
  var brNew = obj.getBoundingRect();
4711
- if (brNew.width + brNew.left >= obj.canvas.width || brNew.height + brNew.top >= obj.canvas.height || brNew.left < 0 || brNew.top < 0) ; else {
4710
+ if (brNew.width + brNew.left >= obj.canvas.width || brNew.height + brNew.top >= obj.canvas.height || brNew.left < 0 || brNew.top < 0) {
4711
+ return;
4712
+ // obj.left = left1;
4713
+ // obj.top = top1;
4714
+ // obj.scaleX = scale1x;
4715
+ // obj.scaleY = scale1y;
4716
+ // obj.width = width1;
4717
+ // obj.height = height1;
4718
+ } else {
4712
4719
  left1 = obj.left;
4713
4720
  top1 = obj.top;
4714
4721
  scale1x = obj.scaleX;