Git Product home page Git Product logo

compass's People

Contributors

roger-random avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

compass's Issues

Remove workaround for broken writing-mode: sideways-lr

According to MDN, CSS writing-mode: sideways-lr should rotate text 90 degrees counter-clockwise for vertical display.
https://developer.mozilla.org/en-US/docs/Web/CSS/writing-mode

Landscape orientation for this app wants such behavior for header and footer text. Unfortunately, as of Chrome 112 this behavior is not working. (See discrepancy between live table vs. image of desired output on above link.)

As a workaround, this app uses writing-mode: vertical-lr which rotates text 90 degrees clockwise, followed by transform: rotate(180deg) to rotate it another 180 degrees.

Replace the workaround with correct CSS declaration once browser bug is fixed.

Relevant source: two locations in src/app/app.component.css

Conform to standardized magnetometer API

This compass web app uses W3C Magnetometer API which is still a work in progress and not widely available. As of this writing, it means the app is effectively restricted to Chrome browser on Android devices, and even then the user has to go to chrome://flags to enable "Generic Sensor Extra Classes" before this app will run.

Once the API is official and supported by default on more browsers, this app should be updated to match.

Relevant source code: /src/app/magnetometer.service.ts

Remove workaround for incorrect {referenceFrame: 'screen'}

When magnetometer API is created, one of the possible parameters is referenceFrame:'screen' which is intended to automatically transform magnetometer vector in sync with screen orientation as per https://developer.chrome.com/articles/generic-sensor/#synchronization-with-screen-coordinates

Unfortunately, as of Chrome 112 landscape transformation used by browser is backwards. When in landscape-right, the applied transform is landscape-left. And vice versa.

To workaround this issue, src/app/compass-needle/compass-needle.component.css applies a 180 degree transformation when in landscape mode in order to flip the data back.

Once the browser bug is fixed, this workaround should be removed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.