Prevent double-click to constrain length on unsupported lines (#5938)

* WIP: Prevent length constraint creation on endAbsolute lines
Fixes #5937

* Typo

Thanks @franknoirot

Co-authored-by: Frank Noirot <frank@zoo.dev>

* length constraint stuff from @lrev-Dev

* Clean up

* Lint

* Add regression test for double click after sketch constraint

---------

Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
This commit is contained in:
Pierre Jacquier
2025-04-02 10:52:36 -04:00
committed by GitHub
parent d168ef94e9
commit 10c1f3a849
7 changed files with 116 additions and 65 deletions

View File

@ -1,7 +1,7 @@
import type { Models } from '@kittycad/lib'
import { DEV } from '@src/env'
import { angleLengthInfo } from '@src/components/Toolbar/setAngleLength'
import { angleLengthInfo } from '@src/components/Toolbar/angleLengthInfo'
import { getNodeFromPath } from '@src/lang/queryAst'
import { getVariableDeclaration } from '@src/lang/queryAst/getVariableDeclaration'
import { getNodePathFromSourceRange } from '@src/lang/queryAstNodePathUtils'