* Renamed VectorAnchor, VectorShape and VectorControlPoint. Also fixed other naming inconsistencies.
* Renamed messages relating to vector and updated naming in several tools
* Renamed comments + caught a few areas I had missed.
* Caught a few more incorrect names
* Code review pass
* Review changes
* Fixed warning
* Additional review feedback
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Dissolve Points from path
* Add handling for removing the first anchor
* Add function to turn handles into bez_paths
* Created overlay manager, wip
* WIP Refactor of VectorShape / Overlays / ShapeEditor
* WIP stripping vector shape, anchor, point.
* WIP Removed kurbo deps from vector shape, anchor, point
* WIP Further work to make vector shapes / anchors / points more standalone.
* WIP more pruning
* WIP Progress on overlay_renderer
* WIP more overlay_renderer work
* WIP more pruning, cleared warnings
* WIP decided ShapeRenderer wasn't an accurate name, ShapeAdapter now. Error squashing continues.
* WIP squashed more errors, now need to decide if anchors should have unique IDs
* WIP Errors squashed, now to actually make it work.
* WIP Moved vector structs to graphene, beginning to remove bezpath from shape_layer
* Refactoring: disentangle kurbo from apply_affine
* Refactor internal shape and remove reliance on Kurbo (PR #617) - Disentangle Kurbo (#619)
* Refactoring: disentangle kurbo from apply_affine
* Broke boolean operations, refactor in state which compiles
* "fixed" boolean operation refactor related errors
* fixed apply_affine, which would not have applied any type of affine
* Small Cleanup, readability
* Fix issue with overlay styles no longer showing selection state.
* Resolved error with point option
* WIP, figuring out how to have one source of truth for VectorShape. Trying to avoid cloning.
* WIP work on single source of truth vectorshapes
* More steps toward single source of truth VectorShape
* Continued wip on making VectorShapes mutably accessible without cloning
* Wip using paths to reference vectorshapes instead, need to restructure ShapeEditor
* Decided to allow temporary copies of vectorshapes.
* Removed HashSet for selected shape indices
* Added @TrueDoctor's id_storage.rs with some heavy modification. Added it to VectorShape. Isn't yet used for folders.
* Integrated UniqueElements<T> with VectorShape to store VectorAnchors
* Improved storage_id.rs perf and cleaned up it's interface
* Iterator Implementations and fixes (#637)
* Refactoring: disentangle kurbo from apply_affine
* Broke boolean operations, refactor in state which compiles
* "fixed" boolean operation refactor related errors
* fixed apply_affine, which would not have applied any type of affine
* implemented transforms for VectorAnchors
implemented Not for VectorControlPointType
* started adding Vector Shape implementations of shape prototypes
* added several useful implemtations to UniqueElements
* added another implemnation for UniqueElements to make working with iterators easier, fixed vector-shape errors
* package-lock.json
* clean up rebase, added back Layer paths
* added deref implementation for VectorShape
* unnecesary variable
* simplify code by removing levels of indirection
* fixed errors
* merge cleanup
* removed package-lock.json
* Removed .selected from VectorShape, it isn't needed as layers are selected not shapes specifically.
* Removed transform and layer_path from VectorShape
* Auto-saving tentitively working. Work toward Overlay transform issues.
* Overlays properly hiding and caching. Not clearing cache yet and some tool switching issues remain, but progress.
* Putting layers in folders changes their unique ID. This is problematic. Assumed this was not the case.
* Removed need for closed bool, changed VectorShape to a tuple struct.
* WIP Switched to layer paths as opposed to VectorShapes. Next up add messages for changing VectorShapes.
* Added initial messages to edit VectorShape points.
* DeleteSelectedPoints messages implemented, selection isn't working currently though.
* Selection messages arriving in document, but transform is wrong.
* Selection, Deselection working, delete working for first point.
* Working towards moving points again
* Removed extra vec from UniqueElements, attempting to squash ordering bug. Still appears to occur though.
* Delete more stable, clean up, renamed to HandleIn, HandleOut
* Further vec_unique cleanup
* Further cleanup
* Removed Deref / DerefMut from VectorShape
* Document version++, will likely revert before merge into master
* Seleting / deleting handles tentitively working again.
* Version number bump, fixed tests.
* Fixed comment in VecUnique
* Improved VecUnique descriptor comment
* Renamed VecUnique to IdBackedVec to further clarify usage.
* Resolved formatting.
* WIP Fixing dragging points
* Fixed an instance where an OverlayMessage could be sent to the main document incorrectly.
* Deleting all of a shapes points now gracefully deletes the layer instead of crashing.
* Fixed handle configurations that would panic on deletion
* Single anchor dragging restored with multi-dragging next plus handles
* sides.into()
* Handle and Multi-point dragging working
* WIP Handle symmetry working again
* Handle mirroring functional again.
* Cleaned up warnings
* Fixed overlay outline not matching shape
* Git branch fix of compatibility with new master
* Fixed closed shape bug, replaced kurbo ellipse
* Removed unused func, updated comments
* Deleting points can undo, multiple shape selection deletes now working
* Removed AddOverlay* operations
* Partial fix for select drift, added helpers
* Don't snap against dragging points
* Properly cleanup path outline with multiple shapes
* Clear all points in other selected shapes
* Actually don't snap against dragging points
* Fix path tool & add snap angle and break handle
* Fix handle being set to NaN causing render issues
* Fix cached overlays not showing line -> curve
* Add operations for modifying paths
* Remove kurbo from pen tool
* Do not snap against handles when anchor selected
* Fix overlays not being cleaned up on path tool
* Fix handle position after dragging
* Use `Anchor` for text & no kurbo in operations
* Replace kurbo to_svg function
* Ngon no longer center scales by default, still some weird behaviour when holding alt
* Cleanup overlays
* Fix render and bounding box doctests
* Fix fun to_svg error
* Fix compile error
* Some code review
* Remove legacy `SelectPoint` on doubleclick
* Remove font from test document
* Fix the pen tool selection changed
* Reorder imports
Co-authored-by: Dennis <dennis@kobert.dev>
Co-authored-by: Caleb Dennis <caleb.dennis429@gmail.com>
Co-authored-by: caleb <56044292+caleb-ad@users.noreply.github.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: 0hypercube <0hypercube@gmail.com>
Co-authored-by: 0HyperCube <78500760+0HyperCube@users.noreply.github.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>
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>
* 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>
* changed path_intersection structure
* comment
* Removed do_if!
* Create project website with near-complete home page
* Added support for undoing
- i gotta say the undo system is quite nice
* Website responsive resizing improvements
* Add newsletter signup to website
* Pen tool fixes (#563)
Resolves 3 known bugs with the pen tool.
* Fixed crash pointed out by @caleb-ad
* Fixed issue with final path segment losing handle data
* Replace curves with lines when under a drag threshold, improves usability.
* Readability improvements, improved comments
* Color Input (#565)
* initial working prototype
* clean up component
* Fix alignment
* Code review tweaks
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Made the non-inclusive end of a pathseg less inclusive
Fixed Bug: When doing a closepath it is possible that the current and beginning edge are both None
Fixed Numerous other things
* changed how closepath works
modified how overlapping_curve_intersections is working
* Add "New Folder"/"Delete Selected" buttons to layer panel
Closes#532
* Update npm dependencies
* Set text color based on its fill when it's being edited
* Reorder tool icons, update favicon and logo, and other icon cleanup
* Bug Fix: Line-Line intersect origin wasn't being preserved
* Bug Fix: proper assignment of t_values in overlapping_curve_intersections
* Honestly, i don't even know what I was thinking when i wrote the logic for splitting a subcurve at endpoints, but it was wrong.
* Feature: overlapping rectangles behave properly, (except when intersections aren't found correctly)
* Remake node type icons (closes#483); color picker cleanup
* Change tool shelf icon colors to use classes not style
* Add Image node icon and rename node from Path to Shape
* Bug Fix: proper intersection construction in partial overlap case
* cleaned up log statements
* Add website revisions and many new pages
* Add features page and fixes to website
* Fix clippy lints and update packages (#568)
* Fix type error in Brave browser (#569)
* Small website text improvements
* Various website fixes
* Adjusted constants
Rearranged intersection algorithm
* Changed BooleanOperation::SubtractBack to use SubtractFront
Added composite_boolean_operation for operations with more than one shape
* Add node graph mockup to website
* Differentiate between scale and dimensions (#570)
* Differentiate between scale and dimensions
* Fix layout and naming of properties
* Add embedable images (#564)
* Add embedable bitmaps
* Initial work on blob urls
* Finish implementing data url
* Fix some bugs
* Rename bitmap to image
* Fix loading image on document load
* Add transform properties for image
* Remove some logging
* Add image dimensions
* Implement system copy and paste
* Fix pasting images
* Fix test
* Address code review
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Bump minimist from 1.2.5 to 1.2.6 in /frontend (#571)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)
---
updated-dependencies:
- dependency-name: minimist
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix panic dialogue when handling a message (#573)
* Fix panic dialogue when handling a message
* Fix indents for github reporting
* More whitespace improvements
* Save: line_intersection
* Add documentation to many parts of the Rust codebase (#552)
* add lots of doccomments
* add conversion traits from layerdatatypes to layers
* add suggested doc improvements
* Code review changes
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add additional stroke properties (#582)
* Add aditional stroke properties
* Add comment explaining clones for closure
* Improve labels
* Fix doc test
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Bug Fix: .y not .x
* Expand upon the "Announcing Graphite alpha" blog post
* All shapes now have a Fill in the properties panel; color inputs are now optional (#583)
* Add aditional stroke properties
* Make the colour input optional
* Fix fmt
* Apply code review changes
* Code review nitpicks
* Fix recursion
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* New blog post: "Distributed computing with the Graphene runtime"
* Fix gradient transformation (#588)
* Fix with perfect circle
* Actually fix rotated gradient
* Gradient transform & fix on rotated canvas
* Cleanup & remove logging
* Add properties panel entries for artboards (#572)
* Artboards can have properties
* fix crash when renaming artboards
* moved target document to utility types
* moved import and added test for file version information
* fixed missing import
* fix error from merging
* - typed properties message handler data
- removed name from WidgetRow
* clippy warnings
* artboards have seperate properties section
* - color input can be forced to have selection
- crop tool shows on switch
- select tool shows on switch
* variable renamed
* change to use PropType<boolean> instead of PropType<Boolean>
* Add an artboard icon
* Add the "Delete Artboard" hint
* fix unselect glitch
* even better
* Remove the Transform properties group
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Bug Fix: boolean union on multiple shapes
* Font selection for text layers (#585)
* Add font dropdown
* Add fonts
* Font tool options
* Fix tests
* Replace http with https
* Add variant selection
* Do not embed default font
* Use proxied font list API
* Change default font to Merriweather
* Remove outdated comment
* Specify font once & load font into foreignobject
* Fix tests
* Rename variant to font_style
* Change TextAreaInput to use FieldInput (WIP, breaks functionality)
* Fix textarea functionality
* Fix types
* Add weight name mapping
* Change labeling of "Italic"
* Remove commented HTML node
* Rename font "name" to "font_family" and "file" "font_file"
* Fix errors
* Fix fmt
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Improvements to the layer transform cage UX (#589)
* Allow input system to handle mousedown while dragging
* Fix abort
* Add apsect ratio
* Make comment more explicit
* Fix abort when dragging
* Constrain when dragging edge
* Rename Crop tool to Artboard tool
* Stop pointerdown event from properties panel (#600)
* Change stroke weight from ints to floats (#601)
Also rename stroke "width" to "weight" in some places. Closes#587
* Change stroke weight from ints to floats
* "miter_limit" -> "line_join_miter_limit"
* Bump file format version
* cargo update
Prevent iterating beyond list bounds
* Bug fix: proper composite intersection behavior
* fix warnings
* Improved ray casting and common intersection cases
Finding intersections near path segment endpoints was previously unreliable
because of imprecision, and the necessity of avoiding double counting any
intersections. And, because of snapping, intersections on the endpoints
of path segments are a common case.
This also improved the ray casting use case, which previously used a "fudge factor"
to mitigate the common problem of casting a ray into line endpoints.
* fixed warnings
* Fix properties deselect (#606)
* Fix properties panel deselect
* Fix arrow cursors on select tool
* Fix drag from UI to document causing mouse down
* Fix tests
* Cleanup
* cleanup messages
* Draw the outlines of shapes on hover and selection (#609)
* Add hover outline overlay
* Increase selection tolerance
* Increase weight
* Only check if top intersection is selected
* Outline selected paths
* Reduce outline weight
* Increase path tool outline thickness to match hover
* Update to use unreachable! instead of panic!
* Upgrade vue-cli to version 5 (#594)
* Upgrade to Vue CLI 5 (fails to compile)
* Upgrade versions with last few weeks of changes
* Updated to fork-ts-checker-webpack-plugin 7.2.3
* Remove package.json overrides in lieu of the fixed fork-ts-checker-webpack-plugin@6.5.1
* Fix svg importing
* Comments
* For debugging only: added infrastructureLogging to vue.config.js
* Now works on Windows, waiting on fork-ts-checker-webpack-plugin backport if possible
* Switch to the fixed fork-ts-checker-webpack-plugin@6.5.2
* Fix license checker build compilation
Co-authored-by: 0hypercube <0hypercube@gmail.com>
* Tidy up the full frontend codebase and use optional chaining where possible (#620)
* Tidy up the full frontend codebase and use optional chaining where possible
* Code review changes
* Add a hotkey to select a random primary color (#622)
* Add shortcut to select a random primary color (#549)
* Rename random primary color message and reduce the number of calls to
generate_uuid
* Add documentation for SelectRandomPrimaryColor message
* Set the alpha value to 255 instead of a random value #622
Co-authored-by: Florent Collin <florentcollin23@gmail.com>
* Move the Layer Tree panel's New Folder and Delete icons into the options bar
* Migrate dialogs to Rust and add a New File dialog (#623)
* Migrate coming soon and about dialog to Rust
* Migrate confirm close and close all
* Migrate dialog error
* Improve keyboard navigation throughout UI
* Cleanup and fix panic dialog
* Reduce css spacing to better match old dialogs
* Add new document modal
* Fix crash when generating default name
* Populate rust about graphite data on startup
* Code review changes
* Move one more :focus CSS rule into App.vue
* Add a dialog message and move dialogs
* Split out keyboard input navigation from this branch
* Improvements including simplifying panic dialog code
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Snapping system improvements and refactor (#621)
* Snap to points and refactor
* Improve dot position on bounds
* Add snap matrix
* Cleanup
* Code review
* Half axis fade rather than increase it
* Fix fmt
* Hide snap to point overlay when active
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add the File > Export dialog and PNG/JPG downloading (#629)
* Add export dialog
* Code review changes
* More code review feedback
* Fix compilation on stable Rust
* Fixes to problems
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Code review
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Oliver Davies <oliver@psyfer.io>
Co-authored-by: mfish33 <32677537+mfish33@users.noreply.github.com>
Co-authored-by: 0HyperCube <78500760+0HyperCube@users.noreply.github.com>
Co-authored-by: TrueDoctor <dennis@kobert.dev>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alaska <simon.wuelker@arcor.de>
Co-authored-by: 0hypercube <0hypercube@gmail.com>
Co-authored-by: FlorentCollin <florentcollinpro@gmail.com>
Co-authored-by: Florent Collin <florentcollin23@gmail.com>
Also rename stroke "width" to "weight" in some places. Closes#587
* Change stroke weight from ints to floats
* "miter_limit" -> "line_join_miter_limit"
* Bump file format version
* Add font dropdown
* Add fonts
* Font tool options
* Fix tests
* Replace http with https
* Add variant selection
* Do not embed default font
* Use proxied font list API
* Change default font to Merriweather
* Remove outdated comment
* Specify font once & load font into foreignobject
* Fix tests
* Rename variant to font_style
* Change TextAreaInput to use FieldInput (WIP, breaks functionality)
* Fix textarea functionality
* Fix types
* Add weight name mapping
* Change labeling of "Italic"
* Remove commented HTML node
* Rename font "name" to "font_family" and "file" "font_file"
* Fix errors
* Fix fmt
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Can set stroke and fill on text and shapes
* resend layout on failed update
* text input properly resets on bad input
* support modifying gradients
* can modify gradients in the properties panel
* updated labels
* remove heap allocation in favor of RC
* removed redundent line
* oops
* added BooleanUnion message for select tool, which is sent by the BooleanUnion button
* select to dispatches a BooleanUnion message
- as far as I can tell the selected layers aren't stored anywhere
* Added neccesary messages and functions for boolean operation
* Intersection code, as yet untested
does not compile
* Updated intersection algorithm
* Fixed shapes_as_seen
- should not be effected by root transform, should be effected by the shape transform
Working line intercepts
* updated intersection algorithm
* added SubCurve struct, to reduce creation of new PathSegs and more efficiently calculate bounding boxes
* intersection algorithm modifications
* changed sub_curve to do less copying
* intersection algorithm working for ellipses
- idk why though, the algorithm isn't finding close, but nearby intersections
* Code for the sub-shape identification pieces of boolean operation algorithm
* cycle direction calculations
boolean_operation code
* final touches (a.k.a. the very begining touches before the debugging)
* removed intersection testing code to draw intersects
added code to add new shapes to document
* Bug Fix: Cycle needs to track egde origin
Bug Fix: vertex markers
Working for simple shapes
* Bug Fix: multiple intersections in same PathSeg
* Bug Fix: compare the absolute value of area magnitudes
* Bug Fix: subdivision algorithm
* cargo fmt
* comments
* Bug Fix: Difference and Subtraction operations
* simplified overlap
* changed shapes_as_seen to transformed_shapes
- modified function to use existing code for multiplying transforms and traversing layer tree
removed shape_as_seen, helper function to shapes_as_seen
* Bug Fix: selected layers must be sorted
* Changed SubFront to SubtractFront and SubBack to SubtractBack
* moved F64PRECISION to graphene::consts
* Best practices changes
intersection algorithm changes
* Added BooleanOperationError
* modified intersection algorithm to use more dynamic thresholds
* intersection algorithm modification
* Added "do_if"
* Bug Fix: properly subdivide segments with multiple intersections
* Added tests for intersection algorithm
* restructured flow control in intersection algorithm
restructured intersection algorithm to modify single vector
- should have done this yeeeaars ago
* Shapes will have the pathstyle of alpha
* collect_shapes now uses closure
* BugFix: fixed PathGraph:get_cycles, prevent multicounting cycles
* Added boolean_ops::reverse_path function
* Curves are now reversed before intersections are found
* cleanup
* BugFix: subfront and subback chose wrong shape pathstyle
BugFix: path concat should remove internal movetos and closepaths
* BugFix: prevent movetos from being added due to intersect imprecision
* Changed intersection quality threshhold to CURVE_FIDELITY
* Added functions for cubic/quadratic roots
!Does not compile!
* Added special case algorithms for line-curve intersections
Added tests for cubic root algorithm
* changed line_curve_intersections structure
* Handle intersecting shape without curve intersection case
* Behavior for SubtratFront, SubtractBack, Union, and Intersection for the no-intersect cases
* reformatted PathGraph::add_edges_from_path
Fixed bugs involving closepaths and subpaths
* Bug fix: fix refactoring error
* Bug fix: don't consider 0 length cycles
Bug Fix: dummy vertices are not intersections
* the function document_message_handler::sort_layers sorts the layers from bottom to top
- we want the reverse
* Bug Fix: ClosePath must be appended to shapes constructed from cycle
- By default PathGraph edges are not closed.
- When the input shape was not closed there would be multiple unclosed paths in the resulting shape, causing bugs
* close_path now closes all subpaths in a path
- if a shape has any subpath which is not closed boolean operations are undefined
(Also PathGraph::add_edges_from_path breaks when the path isn't closed)
* clean up
* removed unused function "intersectoin_candidates"
* comments
* removed duplicate check for valid intersection in horizontal_ray_cast
* Temporary fix for ray casting
* it wouldn't build cause one of these ->' pesky things was hanging around in the wrong neighborhood
* ignoring intersection test cases because they do exact fp comparison
* Some spelling fixes and abbreviation burnination (more needed)
* spelling fixes
close_path bug
* Fixed: local extrema were not being properly filtered out for subcurves
Fixed: reversing PathSeg removes any closepaths
* spelling
* Code review pass
* partial implementation overlapping identical curves
* Untested implementation for test for overlapping curves
- Test is not yet used in intersection algorithm
* -Removed PathGraph::intersect()
* readability improvements
changed line_t_value to be more forgiving to error
* Bug Fix: match_control_polygon didn't properly compare different degree polygons
* Added colinear() function
Added projection_on_line() function
* BugFix project_onto_line
* removed extra log
* rust fmt
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: TrueDoctor <dennis@kobert.dev>
* First steps toward pen tool, similar to spline tool currently.
* Broken WIP
* Progress, but still glitchy
* Improvements, a little farther
* Pen tool functioning as expected
* Merged master
* Fixed commit bug and overlay flashing
* Reordered import statements
TODO: Resolve issue with last segment losing its handle position on confirm
* First pass cleanup omw to handles
* Handles dragging with anchors, handles still not draggable and some bugs
* Dragging single side of handle works, need to create mirror case
* In progress addition of improved anchor / handle representation
* partially working
* Handle dragging working for non-end points, normal anchor drag bugged
* Fixed corner cases, fixed anchors without handles bug
* Add snapping
* Change path tool selection by clicking on shape
* Fixed path close point being draggable
* Variable length handle, firstpass of alt to stop mirroring
* Alt improved, not done. Only update structures when needed. Added snapping for selected shapes
* Can now undo path edits
* Do not maintain angle between non-mirrored handles
* Replaced segment based overlay setup with anchor based setup
* Cleanup, handle angle comparison bug remains. Investigating.
* Added OverlayPooler. May closely associate overlays to VectorManipulatorAnchors instead.
* Moved anchor / segment creation logic out of document_message_handler
* Overlays are now managed by VectorManipulatorShapes
* Fixed inconsistent handle mirroring.
* Clearly shows which point you have selected
* Removed OverlayPooler system
* Added more comments
* Removed all clones of the vector structures. A little uglier but better.
* Resolved Text path initialization bug with a workaround.
* Cleaned up comments
* More comment cleanup
* Fixed issue with quad handle dragging unwanted behavior, renamed VectorShapeManipulator
* In progress refactor to allow multi-selection
* In progress dragging multiple points, selection works, transform still has issues
* Added Multiselect, major refactor
* Commented out progress for selection change, bug with hop back on multiple shapes
* Removed debug og
* Resolved issue with merge
* Minor cleanup, added a few comments
* Review changes
* Resolved unclear comment
* Fixed snap back for now
* Add todo comment for future snap back fix
* Working situations where curve paths do not close. Thanks for points it out @pkupper
* Tweaked selection size
* Fix curve start point dragability, renames, cleanup
* Separated into multiple files, applied @TrueDoctor review feedback
* Resolved tests failing due to doc generation
* Re-added closed, added concept of distance mirroring
* Added shift distance mirroring, removed debounce from anchor
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Thank you for the reviews @TrueDoctor and @pkupper
* Always set shape property 'closed' on fill
* Remove closed property on Shape
* Make color mandatory in Fill
* Fix intersection for filled but open shapes
* Code style tweak
* Add TODO note to rework ClosePath check
* Fix firefox text input
* Fix descenders below bounding box
* Fix chromium empty text
* Descenders back below baseline
* Fix trailing newline on chromium
* Reinstate correct baseline height
* Fix highlighted new line on empty text
* Add comment for trailing new line removal
* Extract cleanupTextInput to a separate file
* Function import simplification
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add text tool
* Double click with the select tool to edit text
* Fix (I think?) transitioning to select tool
* Commit and abort text editing
* Transition to a contenteditable div and autosize
* Fix right click blocking
* Cleanup hints
* Ctrl + enter leaves text edit mode
* Render indervidual bounding boxes for text
* Re-format space indents
* Reflect font size in the textarea
* Fix change tool behaviour
* Remove starting text
* Populate the cache (caused doc load bug)
* Remove console log
* Chrome display the flashing text entry cursor
* Update overlay on input
* Cleanup input.ts
* Fix bounding boxes
* Apply review feedback
* Remove manual test
* Remove svg from gitignore
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Modify all message enum data to use named struct values, not tuples (#479)
* Massively reorganize and clean up the whole Rust codebase
* Modify all message enum data to use named struct values, not tuples
* Do not transform layers when transforming parent
* Reduce complexity to O(nlogn)
* Add TODO comment about performance
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Dennis <dennis@kobert.dev>
* #82 path-tool: WIP selecting control point working
* Fix bug where duplication with Ctrl+D doesn't properly duplicate (#423)
* bug fix: duplication didn't properly duplicate
* cargo fmt
* changed the formatting slightly for readability
* Small cleanups, changed color of handles upon selection
* Fix changes from merge
* Remove duplicate anchor points on top of one another
* Fix possible issues with thumbnails not being updated from Graphene operations
* path-tool: attempt to move control points on click
* Add dragging for control points
* Editing shape anchors functional. Handles next.
* Comment cleanup & slight cleanup of closest_anchor(..)
* Removing conflict with master
* Tiny code tweaks
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: caleb <56044292+caleb-ad@users.noreply.github.com>
Co-authored-by: otdavies <oliver@psyfer.io>
Co-authored-by: Dennis <dennis@kobert.dev>
* WIP handling corner cases, like ungrouping subfolders
* Resolved hanging
* Fix recursive ungrouping
* Functional, corner case free Ungroup. Small Undo issue & warnings
* Update layertree upon undo
* Also update layerdata upon redo
* Add some polish
* Resolved TODOs
* Oops didn't save all after rename, ha.
Co-authored-by: Dennis <dennis@kobert.dev>
* WIP fix of folder crash / indent
* Fixed most crashes
* Known cases of crash / incorrect behavior resolved
* Removed todo & readability tweak
* Removed left over test
* Resolved clippy issue resulting from merging master
* Replace recursive tree traversal with prefix matching
* Reverted changes for #453 and added undo functionality to Paste
* Make uuid generator thread local for tests
* Maintain layer order, test still failing 50% of the time
* Reverting back to known working with the knowledge we can optimize later.
This reverts commit 1aaf5c0d7dbe67cd9f4ba8b536a4771a2cef6439.
* Revert "Make uuid generator thread local for tests"
This reverts commit d68e3b9c4ebf639c4b2ecae43f5ad3d060dcb12b.
* Revert "Reverted changes for #453 and added undo functionality to Paste"
This reverts commit d66992ac9440f244d461a6a815ae2a08eede47d7.
* Revert "Replace recursive tree traversal with prefix matching"
This reverts commit 6bcbb9f82f62b1f9aa00287110fbce64e1d2f0db.
* Reverted to working state and added comment back to optimized commit hash
* Re-removed the changes involving #453
Co-authored-by: Dennis <dennis@kobert.dev>
* New overlay system that reimplements how overlays are drawn
* Fix overlay message declaration
* Fix small mistake
* WIP (broken) changes to plumb the overlay document
* Fix confusion over messaging system architecture
* Removed log
* Overlay system working
* (broken) WIP overlay association
* Finish the overlay system (except test failure)
* Change back IDs in test
* Fixed test, but stilled fails due to revealed real problem with layer reordering selection
* Disable broken test that has a bug in issue #444
Co-authored-by: Dennis <dennis@kobert.dev>
Co-authored-by: otdavies <oliver@psyfer.io>
* Populate layer entry cache
* Serialize the DocumentMessageHandler
* Fix restoring of collapsed/expanded state, add iter impl for Layer, and clean up layer_data() functions
* Fixed bug with CreateEmptyLayer revealed by test
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: otdavies <oliver@psyfer.io>