Explorar el Código

improve the chart layer

tags/4.0.0
cavencj hace 1 año
padre
commit
4477625411
Se han modificado 1 ficheros con 9 adiciones y 5 borrados
  1. 9
    5
      src/modules/chart/GLMapView.js

+ 9
- 5
src/modules/chart/GLMapView.js Ver fichero

@@ -11,16 +11,20 @@ extendComponentView({
init: function (ecModel, api) {
this.api = api
let viewer = api.getZr().viewer
viewer.scene.postRender.addEventListener(this.moveHandler, this)
viewer.clock.onTick.addEventListener(this.moveHandler, this)
},
moveHandler: function () {
this.api.dispatchAction({
type: 'GLMapRoam',
})
if (this.api.getZr().dom.style.visibility !== 'hidden') {
this.api.dispatchAction({
type: 'GLMapRoam',
})
}
},

render: function (t, e, i) {},

dispose: function () {
let viewer = this.api.getZr().viewer
viewer.scene.postRender.removeEventListener(this.moveHandler, this)
viewer.clock.onTick.removeEventListener(this.moveHandler, this)
},
})

Cargando…
Cancelar
Guardar