Skip to content

Commit

Permalink
Merge pull request #36 from BeneSim/fix-progress
Browse files Browse the repository at this point in the history
Fix progress
  • Loading branch information
BeneSim authored Feb 22, 2022
2 parents 465c8b7 + c3e3f68 commit a8e2486
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion html/js/progress/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function setupProgress(data_refs) {

function setProgressBarValue() {
let ratio = getRatio(data_refs["flight/distance_to_destination"].data, data_refs["flight/route_distance"].data);
$("#progress-line").attr("x2", "calc((100% - 20) * " + (1 - ratio) + " + 10)");
$("#progress-line").attr("x2", "calc((100% - 20px) * " + (1 - ratio) + " + 10px)");
}

attachToFun(setProgressBarValue, data_refs["flight/distance_to_destination"]);
Expand Down
6 changes: 3 additions & 3 deletions html/progress.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
<use xlink:href="#airplane-half" x="0" y="0" transform="scale(1,-1)" />
</marker>
</defs>
<line x1="10" x2="calc(100% - 10)" y1="50%" y2="50%" stroke-width="7" class="primary-stroke" />
<line x1="10" x2="calc(100% - 10px)" y1="50%" y2="50%" stroke-width="7" class="primary-stroke" />
<circle cx="10" cy="50%" r="10" class="secondary-fill" />
<circle cx="calc(100% - 10)" cy="50%" r="10" class="secondary-fill" />
<line id="progress-line" x1="10" x2="calc((100% - 20) * 0.5 + 10)" y1="50%" y2="50%" stroke-width="7" class="secondary-stroke" marker-end="url(#head)" />
<circle cx="calc(100% - 10px)" cy="50%" r="10" class="secondary-fill" />
<line id="progress-line" x1="10" x2="calc((100% - 20px) * 0.5 + 10px)" y1="50%" y2="50%" stroke-width="7" class="secondary-stroke" marker-end="url(#head)" />
</svg>

<span width="100%" id="route" class="primary-color primary-font">BRANE Q201 BUREL UM736 TABAT UL87 ANELA UN869 TEDGO T724 RILAX </span>
Expand Down
2 changes: 1 addition & 1 deletion include/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

int const VERSION_MAJOR = 1;
int const VERSION_MINOR = 2;
int const VERSION_PATCH = 1;
int const VERSION_PATCH = 2;
bool const VERSION_PRERELEASE = false;

QString const VERSION_STRING = VERSION_PRERELEASE ? QString("%1.%2.%3 (Beta)")
Expand Down

0 comments on commit a8e2486

Please sign in to comment.