Allow toggling smooth/sharp angle from the path tool options bar (#1415)

* menu in option

* smoothing controls work

* fixed type error

* fix flipping behavior

* silence warning

* consolidate selection state

* update positions options

* blinking logic fixed, smoothing logic implemented

* fixed arbitrary looping when flipping from sharp to smooth

* remove warning

* Tidying up

* refactor manipulator smoothing code, remove bitflags, rename

* Make the point smooth/sharp support mixed better

* Code review tweaks

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
mobile-bungalow 2023-09-11 17:36:08 -07:00 committed by GitHub
parent 88bdf9580f
commit 9667e5173b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 326 additions and 93 deletions

View file

@ -27,6 +27,7 @@
{#each entries as entry, index (index)}
<button
class:active={index === selectedIndex}
class:mixed={selectedIndex === undefined}
class:disabled
class:sharp-right-corners={index === entries.length - 1 && sharpRightCorners}
on:click={() => handleEntryClick(entry)}
@ -57,6 +58,10 @@
align-items: center;
justify-content: center;
&.mixed {
background: var(--color-4-dimgray);
}
&:hover {
background: var(--color-6-lowergray);
color: var(--color-f-white);