.. | .. |
---|
14604 | 14604 | Globals.MOUSEDRAGGED = false; |
---|
14605 | 14605 | |
---|
14606 | 14606 | movingcamera = false; |
---|
14607 | | - X = Y = 0; |
---|
| 14607 | + X = 0; // getBounds().width/2; |
---|
| 14608 | + Y = 0; // getBounds().height/2; |
---|
14608 | 14609 | //System.out.println("mouseReleased: " + e); |
---|
14609 | 14610 | clickEnd(e.getX(), e.getY(), e.getModifiersEx()); |
---|
14610 | 14611 | } |
---|
.. | .. |
---|
15717 | 15718 | */ |
---|
15718 | 15719 | if (!isRenderer) |
---|
15719 | 15720 | { |
---|
15720 | | - object.drawEditHandles(info, 0); |
---|
15721 | | - |
---|
15722 | | - if (drag && (X != 0 || Y != 0) && object.selection.Size() > 0) |
---|
| 15721 | + if (object.selection.Size() > 0) |
---|
15723 | 15722 | { |
---|
15724 | | - switch (object.selection.get(0).hitSomething) |
---|
| 15723 | + int hitSomething = object.selection.get(0).hitSomething; |
---|
| 15724 | + |
---|
| 15725 | + info.DX = 0; |
---|
| 15726 | + info.DY = 0; |
---|
| 15727 | + info.W = 1; |
---|
| 15728 | + if (hitSomething == Object3D.hitCenter) |
---|
15725 | 15729 | { |
---|
15726 | | - case Object3D.hitCenter: gr.setColor(Color.pink); |
---|
15727 | | - gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); |
---|
15728 | | - break; |
---|
15729 | | - case Object3D.hitRotate: gr.setColor(Color.yellow); |
---|
15730 | | - gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); |
---|
15731 | | - break; |
---|
15732 | | - case Object3D.hitScale: gr.setColor(Color.cyan); |
---|
15733 | | - gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); |
---|
15734 | | - break; |
---|
| 15730 | + info.DX = X; |
---|
| 15731 | + if (X != 0) |
---|
| 15732 | + info.DX -= info.bounds.width/2; |
---|
| 15733 | + |
---|
| 15734 | + info.DY = Y; |
---|
| 15735 | + if (Y != 0) |
---|
| 15736 | + info.DY -= info.bounds.height/2; |
---|
15735 | 15737 | } |
---|
15736 | | - |
---|
| 15738 | + |
---|
| 15739 | + object.drawEditHandles(info, 0); |
---|
| 15740 | + |
---|
| 15741 | + if (drag && (X != 0 || Y != 0)) |
---|
| 15742 | + { |
---|
| 15743 | + switch (hitSomething) |
---|
| 15744 | + { |
---|
| 15745 | + case Object3D.hitCenter: gr.setColor(Color.pink); |
---|
| 15746 | + gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); |
---|
| 15747 | + break; |
---|
| 15748 | + case Object3D.hitRotate: gr.setColor(Color.yellow); |
---|
| 15749 | + gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); |
---|
| 15750 | + break; |
---|
| 15751 | + case Object3D.hitScale: gr.setColor(Color.cyan); |
---|
| 15752 | + gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); |
---|
| 15753 | + break; |
---|
| 15754 | + } |
---|
| 15755 | + |
---|
| 15756 | + } |
---|
15737 | 15757 | } |
---|
15738 | 15758 | } |
---|
15739 | 15759 | } |
---|