绘图相关调整_(添加快捷删除)
This commit is contained in:
parent
b88693c772
commit
75f400a1c7
@ -38,7 +38,7 @@ class KeyboardController extends Eventful {
|
||||
this._keyboards = [
|
||||
{ key: 'Control', keyCode: 17, active: false },
|
||||
{ key: 'Shift', keyCode: 16, active: false },
|
||||
{ key: 'Alt', keyCode: 18, active: false }
|
||||
{ key: 'Alt', keyCode: 18, active: false },
|
||||
];
|
||||
}
|
||||
|
||||
@ -47,7 +47,6 @@ class KeyboardController extends Eventful {
|
||||
var index = this._keyboards.findIndex(
|
||||
elem=> { return elem.keyCode == e.keyCode; }
|
||||
);
|
||||
|
||||
if (index >= 0) {
|
||||
this._keyboards[index].active = true;
|
||||
} else {
|
||||
|
@ -250,7 +250,8 @@ const map = {
|
||||
mapIdList: {}, // 地图数据列表(以id为标识)
|
||||
mapViewLoadedCount: 0, // 地图视图加载完成标识
|
||||
mapDataLoadedCount: 0, // 地图数据加载完成标识
|
||||
trainDetails: null // 地图'列车详情'显示
|
||||
trainDetails: null, // 地图'列车详情'显示
|
||||
deleteCount: 0 // 绘图快捷删除标识
|
||||
},
|
||||
|
||||
getters: {
|
||||
@ -577,6 +578,9 @@ const map = {
|
||||
state.map[type].push(item);
|
||||
}
|
||||
});
|
||||
},
|
||||
setDeleteCount: (state) => {
|
||||
state.deleteCount++;
|
||||
}
|
||||
},
|
||||
|
||||
@ -685,6 +689,10 @@ const map = {
|
||||
|
||||
updateMapStandData: ({ commit }, { models, type }) => {
|
||||
commit('updateMapStandData', { models, type });
|
||||
},
|
||||
|
||||
setDeleteCount: ({ commit }) => {
|
||||
commit('setDeleteCount');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -222,6 +222,8 @@ export default {
|
||||
break;
|
||||
case 'Control_Y': this.$store.dispatch('map/setRecover');
|
||||
break;
|
||||
case 'DELETE': this.$store.dispatch('map/setDeleteCount');
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 视图缩放事件
|
||||
|
@ -634,6 +634,9 @@ export default {
|
||||
watch: {
|
||||
'$store.state.menuOperation.mapDrawSelectCount': function(val) {
|
||||
this.deviceSelect(this.selected);
|
||||
},
|
||||
'$store.state.map.deleteCount': function (val) {
|
||||
this.deleteObj();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -196,6 +196,9 @@ export default {
|
||||
watch: {
|
||||
selected(val, oldVal) {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
'$store.state.map.deleteCount': function (val) {
|
||||
this.deleteObj();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -210,6 +210,9 @@ export default {
|
||||
watch: {
|
||||
selected: function (val) {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
'$store.state.map.deleteCount': function (val) {
|
||||
this.deleteObj();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -205,6 +205,9 @@ export default {
|
||||
watch: {
|
||||
selected: function (val, oldVal) {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
'$store.state.map.deleteCount': function (val) {
|
||||
this.deleteObj();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -180,6 +180,9 @@ export default {
|
||||
watch: {
|
||||
selected: function (val, oldVal) {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
'$store.state.map.deleteCount': function (val) {
|
||||
this.deleteObj();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
Loading…
Reference in New Issue
Block a user