|
@@ -8,10 +8,12 @@ import UIControl from "./Controls/UIControl";
|
|
// import { moveRectangle } from "./Controls/MoveRectangle";
|
|
// import { moveRectangle } from "./Controls/MoveRectangle";
|
|
import { moveText } from "./Controls/MoveText";
|
|
import { moveText } from "./Controls/MoveText";
|
|
import { moveSVG } from "./Controls/MoveSVG";
|
|
import { moveSVG } from "./Controls/MoveSVG";
|
|
|
|
+import { moveMagnifier } from "./Controls/MoveMagnifier";
|
|
import { addRoad } from "./Controls/AddRoad";
|
|
import { addRoad } from "./Controls/AddRoad";
|
|
import { addLine } from "./Controls/AddLine";
|
|
import { addLine } from "./Controls/AddLine";
|
|
import { addCircle } from "./Controls/AddCircle";
|
|
import { addCircle } from "./Controls/AddCircle";
|
|
import { addText } from "./Controls/AddText";
|
|
import { addText } from "./Controls/AddText";
|
|
|
|
+import { addMagnifier } from "./Controls/AddMagnifier";
|
|
import { addSVG } from "./Controls/AddSVG";
|
|
import { addSVG } from "./Controls/AddSVG";
|
|
import { moveRoad } from "./Controls/MoveRoad";
|
|
import { moveRoad } from "./Controls/MoveRoad";
|
|
import { moveLine } from "./Controls/MoveLine";
|
|
import { moveLine } from "./Controls/MoveLine";
|
|
@@ -133,6 +135,15 @@ export default class Layer {
|
|
SelectState.Select
|
|
SelectState.Select
|
|
);
|
|
);
|
|
break;
|
|
break;
|
|
|
|
+ case LayerEvents.AddMagnifier:
|
|
|
|
+ stateService.setEventName(LayerEvents.MoveMagnifier);
|
|
|
|
+ addMagnifier.buildMagnifier(position);
|
|
|
|
+ stateService.setSelectItem(
|
|
|
|
+ addMagnifier.newMagnifier.vectorId,
|
|
|
|
+ VectorType.Magnifier,
|
|
|
|
+ SelectState.Select
|
|
|
|
+ );
|
|
|
|
+ break;
|
|
case LayerEvents.AddSVG:
|
|
case LayerEvents.AddSVG:
|
|
stateService.setEventName(LayerEvents.MoveSVG);
|
|
stateService.setEventName(LayerEvents.MoveSVG);
|
|
addSVG.buildSVG(position);
|
|
addSVG.buildSVG(position);
|
|
@@ -507,6 +518,12 @@ export default class Layer {
|
|
moveText.moveFullText(position, draggingItem.vectorId);
|
|
moveText.moveFullText(position, draggingItem.vectorId);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
|
|
+ case LayerEvents.MoveMagnifier:
|
|
|
|
+ needAutoRedraw = true;
|
|
|
|
+ if (draggingItem != null) {
|
|
|
|
+ moveMagnifier.moveFullMagnifier(position, draggingItem.vectorId);
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
case LayerEvents.MoveSVG:
|
|
case LayerEvents.MoveSVG:
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
if (draggingItem != null) {
|
|
if (draggingItem != null) {
|
|
@@ -643,6 +660,11 @@ export default class Layer {
|
|
this.history.save();
|
|
this.history.save();
|
|
elementService.hideAll();
|
|
elementService.hideAll();
|
|
break;
|
|
break;
|
|
|
|
+ case LayerEvents.MoveMagnifier:
|
|
|
|
+ needAutoRedraw = true;
|
|
|
|
+ this.history.save();
|
|
|
|
+ elementService.hideAll();
|
|
|
|
+ break;
|
|
case LayerEvents.MoveSVG:
|
|
case LayerEvents.MoveSVG:
|
|
needAutoRedraw = true;
|
|
needAutoRedraw = true;
|
|
this.history.save();
|
|
this.history.save();
|
|
@@ -923,6 +945,8 @@ export default class Layer {
|
|
stateService.setEventName(LayerEvents.MoveCircle);
|
|
stateService.setEventName(LayerEvents.MoveCircle);
|
|
} else if (selectItem.type == VectorType.Text) {
|
|
} else if (selectItem.type == VectorType.Text) {
|
|
stateService.setEventName(LayerEvents.MoveText);
|
|
stateService.setEventName(LayerEvents.MoveText);
|
|
|
|
+ } else if (selectItem.type == VectorType.Magnifier) {
|
|
|
|
+ stateService.setEventName(LayerEvents.MoveMagnifier);
|
|
} else if (selectItem.type == VectorType.SVG) {
|
|
} else if (selectItem.type == VectorType.SVG) {
|
|
stateService.setEventName(LayerEvents.MoveSVG);
|
|
stateService.setEventName(LayerEvents.MoveSVG);
|
|
}
|
|
}
|