@threedddplus/logoeditor 0.0.78 → 0.0.79

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.
@@ -4689,21 +4689,32 @@ 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 (isNaN(obj.left)) {
4693
- obj.left = -1;
4694
- obj.setCoords();
4692
+ if (isNaN(e.pointer.x)) {
4693
+ return;
4695
4694
  }
4696
- if (isNaN(obj.top)) {
4697
- obj.top = -1;
4698
- obj.setCoords();
4695
+ if (isNaN(e.pointer.y)) {
4696
+ return;
4699
4697
  }
4700
- console.log(e);
4701
4698
  // if (
4702
4699
  // obj.getBoundingRect().width > obj.canvas.height ||
4703
4700
  // obj.getBoundingRect().height > obj.canvas.width
4704
4701
  // ) {
4705
4702
  // return;
4706
4703
  // }
4704
+ // if (obj.left < 1 || obj.top < 1) {
4705
+ // obj.top = obj.top + 0.5;
4706
+ // obj.left = obj.left + 0.5;
4707
+ // obj.setCoords();
4708
+ // }
4709
+ // if (isNaN(obj.left)) {
4710
+ // obj.left = -1;
4711
+ // obj.setCoords();
4712
+ // }
4713
+ // if (isNaN(obj.top)) {
4714
+ // obj.top = -1;
4715
+ // obj.setCoords();
4716
+ // }
4717
+ console.log(e);
4707
4718
  obj.setCoords();
4708
4719
  if (obj.getBoundingRect().top < 0 || obj.getBoundingRect().left < 0) {
4709
4720
  obj.top = Math.max(obj.top, obj.top - obj.getBoundingRect().top);