Bugfix: absolute line segment dragging behavior offset was relative (#5571)

* Refactor: Use the named constant for 'endAbsolute' in more places

* Bugfix: lineTo was calculating relative distances instead of absolute

* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Adam Chalmers
2025-02-28 11:50:14 -06:00
committed by GitHub
parent 58167deda7
commit 1f1e996cfa
5 changed files with 10 additions and 8 deletions

View File

@ -24,6 +24,7 @@ import {
isBinaryExpression,
isLiteralValueNumber,
} from 'lang/util'
import { ARG_END_ABSOLUTE } from 'lang/std/sketch'
/**
* It does not create the startSketchOn and it does not create the startProfileAt.
@ -70,7 +71,7 @@ export const getRectangleCallExpressions = (
]),
createCallExpressionStdLibKw('line', null, [
createLabeledArg(
'endAbsolute',
ARG_END_ABSOLUTE,
createArrayExpression([
createCallExpressionStdLib('profileStartX', [createPipeSubstitution()]),
createCallExpressionStdLib('profileStartY', [createPipeSubstitution()]),