* Implement backend of extrema in bezier-rs
* Added extrema frontend
* Added extrema interface
* Wrapped extrema in filter function to remove points not on the curve
* Saved intermediate results while computing extrema
* Fixed extrema bug when a in cubic formula is 0
* Removed extra prints
* Fixed quadratic extrema regression
* Moved helper functions to utils file
* Fixed bug in solve linear
* Stylistic changes per review
* Sentence comments
Co-authored-by: Linda Zheng <thelindazheng@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* UI section for the projection function
* added bezier project impl
* Fix project function and add test for it
* Search method
* Re-use comptued distances
* Update comments
* rebase project changes
* clean up tests and library code
* use built-in functions and destructure syntax
* Remove redundant project implementation
* Fix typo, add lut size as parameter and add constant
* address comments
Co-authored-by: Thomas Cheng <contact.chengthomas@gmail.com>
* Image and text bugfixes
* Mark only the required layer types as dirty
* Fix doctest
* Disable selection if empty
* Cleanup naming
* Simplify cache deleting on export
* Minor css style change
* Nit
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Implement quadratic and cubic from points
* Catch edge cases and integrate `t` slider
* Add 2 sliders for cubic
* Create utils file for bezier-rs and address other PR comments
* Rename variable and remove unnecessary ids
* Update rustdoc comments and rename variables
* Remove unnecessary file and refactor options for drawing beziers
* Address PR comments
* Update quadratic_through_points description
* Add wasm-pack to dependencies and change from spaces to tabs for indents
* Change strut to midpoint_separation, adjust sliders and section name
* Minor refactor
* Added split implementation and UI
Co-authored-by: Thomas Cheng <Androxium@users.noreply.github.com>
* Added bezier split impl
* Adjust struct traits
* Implement trim and adjust FE code to handle multiple sliders per feature
Co-authored-by: Thomas Cheng <contact.chengthomas@gmail.com>
Co-authored-by: Rob Nadal <robnadal44@gmail.com>
* Fix edge case in trim and add rust doc comments
* Stylistic changes per review
* More stylistic changes per review
* replaced last explicit color usages
Co-authored-by: Robert Nadal <Robnadal44@gmail.com>
Co-authored-by: Thomas Cheng <Androxium@users.noreply.github.com>
Co-authored-by: Thomas Cheng <contact.chengthomas@gmail.com>
* Added test case of layer delete bug
* Fixed crash in `PenTool`
Updated the document `MessageHandler` to cancel all active tools if the
layer is deleted. This prevents the tools from crashing due to the
layer being pulled from under them.
* Moved Abort into pre-graphene DeleteLayer message
* Renamed test case for clarity
* Moved tool crash tests to the `tools` module
* Added `test-case` to the dev dependencies
* Added crash test case for all tools
* Ran cargo fmt
Co-authored-by: otdavies <oliver@psyfer.io>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* added ui for derivative impl
* Add derivative computation for bezier-rs library
* integrate devivative ui with library
* Add implementation for the normal function
* Update rustdoc comments
* Rename handles and getters, add tangent function
* Rename variables, address nits
Co-authored-by: Rob Nadal <robnadal44@gmail.com>
Co-authored-by: Thomas Cheng <contact.chengthomas@gmail.com>
Co-authored-by: ll2zheng <Linda Zheng>
Co-authored-by: Thomas Cheng <35661641+Androxium@users.noreply.github.com>
Co-authored-by: Robert Nadal <Robnadal44@gmail.com>
Co-authored-by: ll2zheng <ll2zheng@uwaterloo.ca>
* Keyboard menu navigation
* Fix dropdown keyboard navigation
* Fix merge error
* Some code review
* Interactive dropdowns
* Query by data attr not class name
* Add locking behaviour
* Add font prieviews
* Remove blank line in css
* Use default for interactive in struct
* Use menulist for fontinput
* Polish
* Rename state -> manager
* Code review
* Cleanup fontinput
* More cleanup
* Make fonts.ts an empty state
* Fix regression
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Fix Issue#610
Fix Issue#610 by reversing the direction of the copy buffer entry vector. This will preserve the layer ordering and match the behaviour of PasteIntoFolder.
* Keyboard menu navigation
* Fix dropdown keyboard navigation
* Fix merge error
* Some code review
* Interactive dropdowns
* Query by data attr not class name
* Add locking behaviour
* Change query selector style
* Change query selector style (again)
* Code review feedback
* Fix highlighted entry regression
* Styling and disabling checkbox tabindex in MenuLists
* Don't redirect space off canvas to backend
* Do not emit update if value same
* Escape closes all floating menus
* Close dropdowns on blur
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add SVG string generator for radial gradients
* Add the UI for the linear vs radial radio inputs
* Initial radial gradient support for gradient tool
* Enabled click and drag support for radial gradients
* Refactor code for gradient in properties panel
* Added gradient type to gradient struct
* Finish refactor to use gradient_type instead of fill
* Fix lint issue
* Combine LinearGradient and RadialGradient in Fill enum
* Add label to properties panel and fix bug
Co-authored-by: Robert Nadal <Robnadal44@gmail.com>
Co-authored-by: Oliver Davies <oliver@psyfer.io>
* Fix two-axis scrollbars in scrollable regions on Firefox
* Move Document Mode dropdown to the backend; and related code cleanup
* Port the Layer Tree options bar layout to the backend
* Port the tool shelf to the backend
* Clean up initialization and wasm wrapper
* Fix crash
* Fix missing document bar
* Remove unused functions in api.rs
* Code review
* Tool initalisation
* Remove some frontend functions
* Initalise -> Init so en-US/GB doesn't have to matter :)
* Remove blend_mode and opacity from LayerPanelEntry
Co-authored-by: 0hypercube <0hypercube@gmail.com>
* Build the node graph frontend
* Graph pan and zoom
* Graph's dot grid now pans/zooms also
* Interactive horisontal to vertical curves
* Data types and zooming on wires
* Icon definitions code beautification
* Add a visibility toggle
Co-authored-by: 0hypercube <0hypercube@gmail.com>