@@ -52222,20 +52222,19 @@ var Theme = function () {
5222252222 }
5222352223 }, {
5222452224 key: 'moveStartEvent',
52225- value: function moveStartEvent(e ) {
52225+ value: function moveStartEvent() {
5222652226 if (this.loadWhileAnimating || !this.visibility) {
5222752227 return;
5222852228 }
5222952229 this.startPitch = this.map.getPitch();
5223052230 this.startBearing = this.map.getBearing();
52231- if (e.originalEvent) {
52232- this.startMoveX = e.originalEvent.pageX;
52233- this.startMoveY = e.originalEvent.pageY;
52234- }
52231+ var startMovePoint = this.map.project(new _mapboxGl2.default.LngLat(0, 0));
52232+ this.startMoveX = startMovePoint.x;
52233+ this.startMoveY = startMovePoint.y;
5223552234 }
5223652235 }, {
5223752236 key: 'moveEvent',
52238- value: function moveEvent(e ) {
52237+ value: function moveEvent() {
5223952238 if (this.loadWhileAnimating || !this.visibility) {
5224052239 this.redrawThematicFeatures(this.map.getBounds());
5224152240 return;
@@ -52249,8 +52248,9 @@ var Theme = function () {
5224952248 this.mapContainer.style.perspective = this.map.transform.cameraToCenterDistance + 'px';
5225052249 var tPitch = this.map.getPitch() - this.startPitch;
5225152250 var tBearing = -this.map.getBearing() + this.startBearing;
52252- var tMoveX = this.startMoveX && e.originalEvent ? e.originalEvent.pageX - this.startMoveX : 0;
52253- var tMoveY = this.startMoveY && e.originalEvent ? e.originalEvent.pageY - this.startMoveY : 0;
52251+ var endMovePoint = this.map.project(new _mapboxGl2.default.LngLat(0, 0));
52252+ var tMoveX = endMovePoint.x - this.startMoveX;
52253+ var tMoveY = endMovePoint.y - this.startMoveY;
5225452254 this.div.style.transform = 'rotateX(' + tPitch + 'deg)' + ' rotateZ(' + tBearing + 'deg)' + ' translate3d(' + tMoveX + 'px, ' + tMoveY + 'px, 0px)';
5225552255 }
5225652256 }, {
@@ -53289,20 +53289,19 @@ var HeatMapLayer = exports.HeatMapLayer = function () {
5328953289 }
5329053290 }, {
5329153291 key: '_moveStartEvent',
53292- value: function _moveStartEvent(e ) {
53292+ value: function _moveStartEvent() {
5329353293 if (this.loadWhileAnimating || !this.visibility) {
5329453294 return;
5329553295 }
5329653296 this.startPitch = this.map.getPitch();
5329753297 this.startBearing = this.map.getBearing();
53298- if (e.originalEvent) {
53299- this.startMoveX = e.originalEvent.pageX;
53300- this.startMoveY = e.originalEvent.pageY;
53301- }
53298+ var startMovePoint = this.map.project(new _mapboxGl2.default.LngLat(0, 0));
53299+ this.startMoveX = startMovePoint.x;
53300+ this.startMoveY = startMovePoint.y;
5330253301 }
5330353302 }, {
5330453303 key: '_moveEvent',
53305- value: function _moveEvent(e ) {
53304+ value: function _moveEvent() {
5330653305 if (this.loadWhileAnimating || !this.visibility) {
5330753306 this.refresh();
5330853307 return;
@@ -53316,8 +53315,9 @@ var HeatMapLayer = exports.HeatMapLayer = function () {
5331653315 this.mapContainer.style.perspective = this.map.transform.cameraToCenterDistance + 'px';
5331753316 var tPitch = this.map.getPitch() - this.startPitch;
5331853317 var tBearing = -this.map.getBearing() + this.startBearing;
53319- var tMoveX = this.startMoveX && e.originalEvent ? e.originalEvent.pageX - this.startMoveX : 0;
53320- var tMoveY = this.startMoveY && e.originalEvent ? e.originalEvent.pageY - this.startMoveY : 0;
53318+ var endMovePoint = this.map.project(new _mapboxGl2.default.LngLat(0, 0));
53319+ var tMoveX = endMovePoint.x - this.startMoveX;
53320+ var tMoveY = endMovePoint.y - this.startMoveY;
5332153321 this.rootCanvas.style.transform = 'rotateX(' + tPitch + 'deg)' + ' rotateZ(' + tBearing + 'deg)' + ' translate3d(' + tMoveX + 'px, ' + tMoveY + 'px, 0px)';
5332253322 }
5332353323 }, {
@@ -80575,20 +80575,19 @@ var MapvRenderer = exports.MapvRenderer = function (_BaseLayer) {
8057580575 }
8057680576 }, {
8057780577 key: 'moveStartEvent',
80578- value: function moveStartEvent(e ) {
80578+ value: function moveStartEvent() {
8057980579 this.startPitch = this.map.getPitch();
8058080580 this.startBearing = this.map.getBearing();
80581- if (e.originalEvent) {
80582- this.startMoveX = e.originalEvent.pageX;
80583- this.startMoveY = e.originalEvent.pageY;
80584- }
80581+ var startMovePoint = this.map.project(new _mapboxGl2.default.LngLat(0, 0));
80582+ this.startMoveX = startMovePoint.x;
80583+ this.startMoveY = startMovePoint.y;
8058580584 if (this.animation) {
8058680585 this.stopAniamation = true;
8058780586 }
8058880587 }
8058980588 }, {
8059080589 key: 'moveEvent',
80591- value: function moveEvent(e ) {
80590+ value: function moveEvent() {
8059280591 if (this.rotating || this.zooming) {
8059380592 return;
8059480593 }
@@ -80598,8 +80597,9 @@ var MapvRenderer = exports.MapvRenderer = function (_BaseLayer) {
8059880597 this.canvasLayer.mapContainer.style.perspective = this.map.transform.cameraToCenterDistance + 'px';
8059980598 var tPitch = this.map.getPitch() - this.startPitch;
8060080599 var tBearing = -this.map.getBearing() + this.startBearing;
80601- var tMoveX = this.startMoveX && e.originalEvent ? e.originalEvent.pageX - this.startMoveX : 0;
80602- var tMoveY = this.startMoveY && e.originalEvent ? e.originalEvent.pageY - this.startMoveY : 0;
80600+ var endMovePoint = this.map.project(new _mapboxGl2.default.LngLat(0, 0));
80601+ var tMoveX = endMovePoint.x - this.startMoveX;
80602+ var tMoveY = endMovePoint.y - this.startMoveY;
8060380603 var canvas = this.getContext().canvas;
8060480604 canvas.style.transform = 'rotateX(' + tPitch + 'deg)' + ' rotateZ(' + tBearing + 'deg)' + ' translate3d(' + tMoveX + 'px, ' + tMoveY + 'px, 0px)';
8060580605 }
@@ -82298,7 +82298,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
8229882298 }
8229982299
8230082300 function Promise(fn) {
82301- if (! (this instanceof Promise) ) throw new TypeError('Promises must be constructed via new');
82301+ if (_typeof (this) !== 'object' ) throw new TypeError('Promises must be constructed via new');
8230282302 if (typeof fn !== 'function') throw new TypeError('not a function');
8230382303 this._state = 0;
8230482304 this._handled = false;
@@ -82422,9 +82422,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
8242282422 };
8242382423
8242482424 Promise.all = function (arr) {
82425+ var args = Array.prototype.slice.call(arr);
82426+
8242582427 return new Promise(function (resolve, reject) {
82426- if (!arr || typeof arr.length === 'undefined') throw new TypeError('Promise.all accepts an array');
82427- var args = Array.prototype.slice.call(arr);
8242882428 if (args.length === 0) return resolve([]);
8242982429 var remaining = args.length;
8243082430
0 commit comments