Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix autorotate #3103

Merged
merged 2 commits into from
Nov 28, 2017
Merged

Fix autorotate #3103

merged 2 commits into from
Nov 28, 2017

Conversation

llienher
Copy link
Member

@llienher llienher commented Nov 16, 2017

Use native javascript to fetch gyroscope data from mobile devices instead of ol.DeviceOrientation

TODO:

  • Fetch data from native APIs
  • Adapt the code
  • Remove old code (use of ol.DeviceOrientation)

@llienher llienher mentioned this pull request Nov 16, 2017
3 tasks
@sbrunner sbrunner added this to the 2.3 milestone Nov 21, 2017
* @private
*/
ngeo.MobileGeolocationController.prototype.handleRotate_ = function(eventAlpha, currentAlpha) {
console.log(eventAlpha, currentAlpha);
const alpha = eventAlpha;

if (alpha === undefined || alpha === null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apha is declared as a number than he can't be null or undefined ...

@@ -334,11 +334,10 @@ ngeo.MobileGeolocationController.prototype.autorotateListener = function() {
* Handle rotation.
* @param {number} eventAlpha .
* @param {number} currentAlpha .
* @return {number} currentAlpha .
* @return {number|undefined} .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me it should be just {number}

@llienher llienher changed the title [WIP] Fix autorotate Fix autorotate Nov 28, 2017
@llienher llienher requested a review from fredj November 28, 2017 12:09
@llienher llienher merged commit ef6a79f into master Nov 28, 2017
@llienher llienher deleted the fix_autorotate branch November 28, 2017 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants