|
@@ -3,7 +3,11 @@
|
|
<GraphicAction class="full-action">
|
|
<GraphicAction class="full-action">
|
|
<ui-icon type="lock" ctrl @click="clickHandlerFactory(VectorEvents.UnLock)()" />
|
|
<ui-icon type="lock" ctrl @click="clickHandlerFactory(VectorEvents.UnLock)()" />
|
|
</GraphicAction>
|
|
</GraphicAction>
|
|
- <GeoTeleport :menus="menus" class="geo-teleport-use" />
|
|
|
|
|
|
+ <GeoTeleport
|
|
|
|
+ :menus="menus"
|
|
|
|
+ class="geo-teleport-use"
|
|
|
|
+ :active="menus.find((menu) => menu.key === selectKey)"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -23,10 +27,17 @@ const vector = computed(
|
|
dataService.getRoad(props.geo.vectorId) ||
|
|
dataService.getRoad(props.geo.vectorId) ||
|
|
dataService.getCurveRoad(props.geo.vectorId)
|
|
dataService.getCurveRoad(props.geo.vectorId)
|
|
);
|
|
);
|
|
-const clickHandlerFactory = (key) => {
|
|
|
|
|
|
+
|
|
|
|
+const selectKey = ref("");
|
|
|
|
+const clickHandlerFactory = (key, isEE = false) => {
|
|
return () => {
|
|
return () => {
|
|
|
|
+ if (isEE) {
|
|
|
|
+ if (selectKey.value === key) {
|
|
|
|
+ key = null;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ selectKey.value = key;
|
|
drawRef.value.uiControl.updateVectorForSelectUI(key);
|
|
drawRef.value.uiControl.updateVectorForSelectUI(key);
|
|
- console.log(vector);
|
|
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
@@ -52,13 +63,13 @@ const menus = ref([
|
|
key: VectorEvents.AddLane,
|
|
key: VectorEvents.AddLane,
|
|
icon: "lane_a",
|
|
icon: "lane_a",
|
|
text: "加车道",
|
|
text: "加车道",
|
|
- onClick: clickHandlerFactory(VectorEvents.AddLane),
|
|
|
|
|
|
+ onClick: clickHandlerFactory(VectorEvents.AddLane, true),
|
|
},
|
|
},
|
|
{
|
|
{
|
|
key: VectorEvents.DelLane,
|
|
key: VectorEvents.DelLane,
|
|
icon: "lane_d",
|
|
icon: "lane_d",
|
|
text: "减车道",
|
|
text: "减车道",
|
|
- onClick: clickHandlerFactory(VectorEvents.DelLane),
|
|
|
|
|
|
+ onClick: clickHandlerFactory(VectorEvents.DelLane, true),
|
|
},
|
|
},
|
|
...appendMenus,
|
|
...appendMenus,
|
|
{
|
|
{
|