|
@@ -180,12 +180,14 @@ export default class Layer {
|
|
|
needAutoRedraw = listenLayer.start(position);
|
|
|
break;
|
|
|
case LayerEvents.PanBackGround:
|
|
|
- // stateService.clearItems()
|
|
|
- // coordinate.center.x = coordinate.center.x - (dx * Constant.defaultZoom) / coordinate.zoom / coordinate.res
|
|
|
- // coordinate.center.y = coordinate.center.y + (dy * Constant.defaultZoom) / coordinate.zoom / coordinate.res
|
|
|
- // this.lastX = X
|
|
|
- // this.lastY = Y
|
|
|
- // needAutoRedraw = true
|
|
|
+ break;
|
|
|
+ case LayerEvents.ModifyBgImage:
|
|
|
+ needAutoRedraw = true;
|
|
|
+ if (draggingItem != null) {
|
|
|
+ moveCustomImage.moveFullCustomImage(dx, dy, draggingItem.vectorId);
|
|
|
+ this.lastX = X;
|
|
|
+ this.lastY = Y;
|
|
|
+ }
|
|
|
break;
|
|
|
case LayerEvents.AddWall:
|
|
|
stateService.clearDraggingItem();
|
|
@@ -932,9 +934,6 @@ export default class Layer {
|
|
|
} else if (eventName == LayerEvents.AddTable) {
|
|
|
stateService.clearEventName();
|
|
|
}
|
|
|
- // else if (eventName == LayerEvents.AddCustomImage) {
|
|
|
- // stateService.clearEventName();
|
|
|
- // }
|
|
|
else if (
|
|
|
eventName != LayerEvents.AddWall &&
|
|
|
eventName != LayerEvents.AddingWall
|
|
@@ -974,13 +973,6 @@ export default class Layer {
|
|
|
stateService.clearItems();
|
|
|
}
|
|
|
}
|
|
|
- // else if (eventName == LayerEvents.AddCustomImage) {
|
|
|
- // if (draggingItem && draggingItem.vectorId) {
|
|
|
- // customImageService.deleteCustomImage(draggingItem.vectorId);
|
|
|
- // this.uiControl.clearUI();
|
|
|
- // stateService.clearItems();
|
|
|
- // }
|
|
|
- // }
|
|
|
} else {
|
|
|
stateService.setEventName(LayerEvents.AddWall);
|
|
|
}
|