|
@@ -324,6 +324,21 @@ export default class Layer {
|
|
|
}
|
|
|
break;
|
|
|
case LayerEvents.AddCurveLine:
|
|
|
+ needAutoRedraw = true;
|
|
|
+ listenLayer.start(position);
|
|
|
+ if (listenLayer.modifyPoint) {
|
|
|
+ position = {
|
|
|
+ x: listenLayer.modifyPoint.x,
|
|
|
+ y: listenLayer.modifyPoint.y,
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+ elementService.hideAll();
|
|
|
+ elementService.setPoint(position);
|
|
|
+ elementService.showPoint();
|
|
|
+ if (listenLayer.modifyPoint) {
|
|
|
+ elementService.execute(listenLayer.modifyPoint, position);
|
|
|
+ }
|
|
|
break;
|
|
|
case LayerEvents.AddCircle:
|
|
|
needAutoRedraw = true;
|
|
@@ -681,6 +696,8 @@ export default class Layer {
|
|
|
stateService.setFocusItem(focusItem);
|
|
|
this.uiControl.focusVector = focusItem;
|
|
|
stateService.clearDraggingItem();
|
|
|
+ } else {
|
|
|
+ this.uiControl.focusVector = null;
|
|
|
}
|
|
|
|
|
|
let position = coordinate.getXYFromScreen({
|
|
@@ -835,6 +852,7 @@ export default class Layer {
|
|
|
needAutoRedraw = true;
|
|
|
if (draggingItem && draggingItem.vectorId) {
|
|
|
movePoint.finish(draggingItem.vectorId);
|
|
|
+ uiService.setPointCategory(VectorCategory.Point.NormalPoint);
|
|
|
}
|
|
|
this.history.save();
|
|
|
break;
|
|
@@ -1104,6 +1122,7 @@ export default class Layer {
|
|
|
if (Settings.isMobile) {
|
|
|
stateService.clearEventName();
|
|
|
this.exit();
|
|
|
+ uiService.setLineCategory(VectorCategory.Line.NormalLine);
|
|
|
} else {
|
|
|
stateService.setEventName(LayerEvents.AddLine);
|
|
|
}
|
|
@@ -1118,7 +1137,6 @@ export default class Layer {
|
|
|
stateService.setEventName(LayerEvents.AddingLine);
|
|
|
} else {
|
|
|
stateService.clearEventName();
|
|
|
- this.exit();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1126,9 +1144,6 @@ export default class Layer {
|
|
|
exit() {
|
|
|
stateService.clear();
|
|
|
this.uiControl.clearUI();
|
|
|
- this.uiControl.focusVector = null;
|
|
|
- uiService.setPointCategory(VectorCategory.Point.NormalPoint);
|
|
|
- uiService.setLineCategory(VectorCategory.Line.NormalLine);
|
|
|
}
|
|
|
|
|
|
stopAddVector() {
|