TBD: only show polygon button for enabled polygons
This commit is contained in:
parent
012076a3e9
commit
703e37f84c
@ -166,7 +166,13 @@ export const actionToggleLoopLock = register({
|
|||||||
if (
|
if (
|
||||||
selectedElements.length === 0 ||
|
selectedElements.length === 0 ||
|
||||||
selectedElements.some(
|
selectedElements.some(
|
||||||
(element) => !isLineElement(element) || element.points.length < 3,
|
(element) =>
|
||||||
|
!isLineElement(element) ||
|
||||||
|
// only show polygon button if every selected element is already
|
||||||
|
// a polygon, effectively showing this button only to allow for
|
||||||
|
// disabling the polygon state
|
||||||
|
!element.loopLock ||
|
||||||
|
element.points.length < 3,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user