Lock user mode on the normal screen.
This commit is contained in:
parent
e47e1c61f9
commit
0171a56d6e
@ -260,7 +260,7 @@ class CanvasView extends View implements PartGrid {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (motionMode == MotionMode.Type.LongTouch) {
|
else if (motionMode == MotionMode.Type.LongTouch && _devMode) {
|
||||||
if (selectedPart != null) {
|
if (selectedPart != null) {
|
||||||
selectedPart.getMoveable().drop(xInCanvas, yInCanvas);
|
selectedPart.getMoveable().drop(xInCanvas, yInCanvas);
|
||||||
|
|
||||||
@ -286,6 +286,10 @@ class CanvasView extends View implements PartGrid {
|
|||||||
|
|
||||||
case MotionEvent.ACTION_MOVE:
|
case MotionEvent.ACTION_MOVE:
|
||||||
{
|
{
|
||||||
|
if (!_devMode) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (selectedPart == null){
|
if (selectedPart == null){
|
||||||
int xMovement = _mouseDownPoint.item1 - xInScreen;
|
int xMovement = _mouseDownPoint.item1 - xInScreen;
|
||||||
int yMovement = _mouseDownPoint.item2 - yInScreen;
|
int yMovement = _mouseDownPoint.item2 - yInScreen;
|
||||||
@ -296,10 +300,6 @@ class CanvasView extends View implements PartGrid {
|
|||||||
_mouseDownPoint = new Tuple2(xInScreen, yInScreen);
|
_mouseDownPoint = new Tuple2(xInScreen, yInScreen);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!_devMode) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.i("Canvas", "X: " + xInScreen + " Y: " + yInScreen
|
Log.i("Canvas", "X: " + xInScreen + " Y: " + yInScreen
|
||||||
+ " in drop zone " + _dropToRemoveZone + " : "
|
+ " in drop zone " + _dropToRemoveZone + " : "
|
||||||
+ inDropZone(xInScreen, yInScreen));
|
+ inDropZone(xInScreen, yInScreen));
|
||||||
@ -449,6 +449,9 @@ class CanvasView extends View implements PartGrid {
|
|||||||
|
|
||||||
public void setDevMode(boolean devMode) {
|
public void setDevMode(boolean devMode) {
|
||||||
_devMode = devMode;
|
_devMode = devMode;
|
||||||
|
if (!_devMode) {
|
||||||
|
this._viewOrigin = new Tuple2<>(0, 0);
|
||||||
|
}
|
||||||
this.invalidate();
|
this.invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user