Skip to content

Commit

Permalink
Merge pull request #25539 from default0/fix-slider-drawing-with-snap
Browse files Browse the repository at this point in the history
Fix freehand-drawn sliders with distance snap
  • Loading branch information
bdach committed Nov 27, 2023
2 parents d50aac8 + 95b1208 commit 63481e8
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ protected override bool OnDragStart(DragStartEvent e)
if (controlPointCount > 2 || (controlPointCount == 2 && HitObject.Path.ControlPoints.Last() != cursor))
return base.OnDragStart(e);

bSplineBuilder.AddLinearPoint(Vector2.Zero);
bSplineBuilder.AddLinearPoint(ToLocalSpace(e.ScreenSpaceMouseDownPosition) - HitObject.Position);
state = SliderPlacementState.Drawing;
return true;
Expand Down

0 comments on commit 63481e8

Please sign in to comment.