大屏禁用拖拽

This commit is contained in:
fan 2020-05-06 17:18:06 +08:00
parent 15d88d2f7f
commit 997b962851
2 changed files with 6 additions and 5 deletions

View File

@ -502,8 +502,7 @@ class Jlmap {
}
off(eventname, cb) {
console.log(eventname, 111111);
const idx = Object.values(this.events).indexOf(eventname);
const idx = Object.values(this.events).indexOf(eventname);
if (idx >= 0) {
switch (eventname) {
case this.events.Selected:
@ -519,7 +518,10 @@ class Jlmap {
this.$keyboardController.off(this.events.keyboard, cb);
break;
case this.events.__Pan:
this.$keyboardController.off(this.events.__Pan, cb);
this.$mouseController.off(this.events.__Pan, cb);
break;
case this.events.__Zoom:
this.$mouseController.off(this.events.__Zoom, cb);
break;
}
}

View File

@ -8,7 +8,6 @@ import JlmapVisual from '@/views/newMap/jlmapNew/index';
import { loadMapDataById } from '@/utils/loaddata';
import { EventBus } from '@/scripts/event-bus';
import { mapGetters } from 'vuex';
import Vue from 'vue';
export default {
name: 'MapPreview',
@ -55,7 +54,7 @@ export default {
'$store.state.map.mapViewLoadedCount':function() {
this.$store.dispatch('map/setTrainWindowShow', false);
console.log(this, this.$jlmap);
this.$jlmap.off('dataZoom');
this.$jlmap.off('zoom');
this.$jlmap.off('pan');
}
},