| 537 | } |
| 538 | |
| 539 | rotateEvent() { |
| 540 | if (this.loadWhileAnimating || !this.visibility) { |
| 541 | return; |
| 542 | } |
| 543 | if (this.map.getPitch() !== 0) { |
| 544 | this._hide(); |
| 545 | } |
| 546 | this.mapContainer.style.perspective = this.map.transform.cameraToCenterDistance + 'px'; |
| 547 | var tPitch = this.map.getPitch() - this.startPitch; |
| 548 | var tBearing = -this.map.getBearing() + this.startBearing; |
| 549 | this.div.style.transform = 'rotateX(' + tPitch + 'deg)' + ' rotateZ(' + tBearing + 'deg)' |
| 550 | } |
| 551 | |
| 552 | rotateEndEvent() { |
| 553 | if (this.loadWhileAnimating || !this.visibility) { |