MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / moveEvent

Method moveEvent

src/mapboxgl/overlay/theme/ThemeLayer.js:496–514  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

494 }
495
496 moveEvent() {
497 if (this.loadWhileAnimating || !this.visibility) {
498 this.redrawThematicFeatures(this.map.getBounds());
499 return;
500 }
501 if (this.rotating || this.zooming) {
502 return;
503 }
504 if (this.map.getPitch() !== 0) {
505 this._hide();
506 }
507 this.mapContainer.style.perspective = this.map.transform.cameraToCenterDistance + 'px';
508 var tPitch = this.map.getPitch() - this.startPitch;
509 var tBearing = -this.map.getBearing() + this.startBearing;
510 var endMovePoint = this.map.project(new mapboxgl.LngLat(0, 0));
511 var tMoveX = endMovePoint.x - this.startMoveX;
512 var tMoveY = endMovePoint.y - this.startMoveY;
513 this.div.style.transform = 'rotateX(' + tPitch + 'deg)' + ' rotateZ(' + tBearing + 'deg)' + ' translate3d(' + tMoveX + 'px, ' + tMoveY + 'px, 0px)';
514 }
515
516 zoomStartEvent() {
517 if (this.loadWhileAnimating || !this.visibility) {

Callers 1

Calls 3

_hideMethod · 0.95
getBoundsMethod · 0.45

Tested by

no test coverage detected