MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / moveHandler

Function moveHandler

src/leaflet/overlay/EChartsLayer.js:124–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122 const ecLayers = api.getZr().painter.getLayers();
123 _setCanvasPosition(me._map, viewportRoot);
124 const moveHandler = function () {
125 if (rendering) {
126 return;
127 }
128 const mapOffset = _setCanvasPosition(me._map, viewportRoot);
129
130 if (!me.options.loadWhileAnimating) {
131 for (let item in ecLayers) {
132 if (!ecLayers.hasOwnProperty(item)) {
133 continue;
134 }
135 ecLayers[item] && clearContext(ecLayers[item].ctx);
136 }
137 me._enableEchartsContainer();
138 }
139
140 coordSys.setMapOffset(mapOffset);
141 LeafletMapModel.__mapOffset = mapOffset;
142
143 api.dispatchAction({
144 type: 'LeafletMapLayout'
145 });
146
147
148 };
149
150 function clearContext(context) {
151 context && context.clearRect && context.clearRect(0, 0, context.canvas.width, context.canvas.height);

Callers

nothing calls this directly

Calls 2

_setCanvasPositionFunction · 0.85
clearContextFunction · 0.85

Tested by

no test coverage detected