Skip to content

Commit

Permalink
Some fix for the GMF applications
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jun 28, 2019
1 parent 30e5fb1 commit 69bbfe8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
3 changes: 0 additions & 3 deletions contribs/gmf/src/mobile/measure/baseComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ MeasueMobileBaseController.prototype.init = function() {
if (!this.measure) {
throw new Error('Missing measure');
}
if (!this.drawInteraction) {
throw new Error('Missing drawInteraction');
}

this.measure.setActive(this.active);
interactionDecoration(this.measure);
Expand Down
5 changes: 1 addition & 4 deletions contribs/gmf/src/mobile/measure/lengthComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,9 @@ class Controller extends MeasueMobileBaseController {
* Initialise the controller.
*/
init() {
if (this.precision === null) {
throw new Error('Missing precision');
}
this.measure = new ngeoInteractionMeasureLengthMobile(
this.filter('ngeoUnitPrefix'), this.gettextCatalog, {
precision: this.precision,
precision: this.precision || 0,
sketchStyle: this.sketchStyle
}
);
Expand Down
5 changes: 2 additions & 3 deletions src/geolocation/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,9 @@ Controller.prototype.autorotateListener = function() {
if (!(event instanceof DeviceOrientationEvent)) {
throw new Error('Wrong event type');
}
if (!event.alpha) {
throw new Error('Missing event.alpha');
if (event.alpha) {
currentAlpha = this.handleRotate_(event.alpha, currentAlpha);
}
currentAlpha = this.handleRotate_(event.alpha, currentAlpha);
}, true);
} else if (window.hasOwnProperty('ondeviceorientation')) {
window.addEventListener('deviceorientation', (evt) => {
Expand Down
1 change: 0 additions & 1 deletion src/layertree/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export function LayertreeController($scope, $rootScope, $attrs) {
});
} else {
node = $scope.$eval(nodeExpr);
console.assert(this.node !== undefined);
}
/**
* @type {import('gmf/themes.js').GmfGroup|import('gmf/themes.js').GmfLayer}
Expand Down

0 comments on commit 69bbfe8

Please sign in to comment.