Skip to content

Conversation

@Bill-P
Copy link

@Bill-P Bill-P commented Jan 1, 2018

Adds Labels to UI and Truncates the Pressure Altitude to 2 decimal points

Copy link
Collaborator

@orviwan orviwan left a comment

Choose a reason for hiding this comment

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

Thanks Bill, some minor nits.

@@ -1,7 +1,15 @@
{
"fitbit": {
"appUUID": "0cb04f31-513b-4afe-9bea-3c6eb955f583",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please don't include appUUID in the example.

@@ -0,0 +1 @@
{"appManifestVersion":1,"main":"app/index.js","svgMain":"resources/index.gui","svgWidgets":"resources/widgets.gui","appType":"app","i18n":{"en":{"name":"Altimeter"}},"buildId":"0x0ab90f121979b2ad","uuid":"0cb04f31-513b-4afe-9bea-3c6eb955f583","name":"Altimeter","bundleDate":"2018-01-01T17:01:16.275Z","requestedPermissions":[],"wipeColor":"#03a9f4"} No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't need the manifest file.

bar.onreading = function() {
altitudeLabel.innerText = altitudeFromPressure(bar.pressure / 100) + " ft";
pressureLabel.innerText = Math.round(bar.pressure / 100) + " hPa";
altitudeLabel.text = Math.round(altitudeFromPressure(bar.pressure / 100)*100)/100 + " ft";
Copy link
Collaborator

Choose a reason for hiding this comment

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

This probably needs simplifying a bit.

<svg>
<text id="altitude" x="50%" y="180" class="large-value">altitude</text>
<text id="pressure" x="50%" y="230" class="small-value">pressure</text>
<text id="altitude-Label" x="50%" y="50" class="label">Pressure altitude</text>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Lowercase "label" for consistency

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.

2 participants