Skip to content

Commit

Permalink
Setup quick measure functionality for intersecting objects and handle…
Browse files Browse the repository at this point in the history
… centerline cases for non intersecting objects. Add a dashed_line_with_pattern function that gives more granular control over dash_width and gap_width.
  • Loading branch information
singhutsav5502 committed Dec 21, 2024
1 parent d1adbe5 commit bb1477b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ impl OverlayContext {
self.render_context.line_to(end.x, end.y);
self.render_context.set_stroke_style_str(color.unwrap_or(COLOR_OVERLAY_BLUE));
self.render_context.stroke();

// Reset the dash pattern after drawing
self.render_context
.set_line_dash(&JsValue::from(js_sys::Array::new()))
.map_err(|error| log::warn!("Error drawing dashed line: {:?}", error))
Expand Down

0 comments on commit bb1477b

Please sign in to comment.