Skip to content

Commit

Permalink
fixup after review
Browse files Browse the repository at this point in the history
Signed-off-by: Baptiste Prevot <pro.baptiste.prevot@gmail.com>
  • Loading branch information
Castavo committed Oct 21, 2024
1 parent 89e99b8 commit 00edf02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion wasm/html_demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ async function file_selected(el) {
let window_lrms = window.Alpine.store('lrms')

window_lrms.selectedFeature = curves_features[lrm_id];
window_lrms.pkStart = projection.measure.anchor_name + '+' + Math.round(projection.measure.scale_offset);
let offset = Math.round(projection.measure.scale_offset)
window_lrms.pkStart = projection.measure.anchor_name + '+' + String(offset).padStart(3, "0");

window_lrms.startMeasure = projection.measure;
let point = lrs.resolve(lrm_id, projection.measure)
Expand Down
4 changes: 3 additions & 1 deletion wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ pub struct Point {

#[wasm_bindgen]
impl Point {
/// Build a new [`LrmMeasure`] from an [`Anchor`] `name` and the `offset` on the [`LrmScale`].
/// Build a new geographical point.
///
/// When using spherical coordinates, longitude is x and latitude y
#[wasm_bindgen(constructor)]
pub fn new(x: f64, y: f64) -> Self {
Self { x, y }
Expand Down

0 comments on commit 00edf02

Please sign in to comment.