* 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>
* 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>
* 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>
* 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>
* initial layout system with tool options
* cargo fmt
* cargo fmt again
* document bar defined on the backend
* cargo fmt
* removed RC<RefCell>
* cargo fmt
* - fix increment behavior
- removed hashmap from layout message handler
- removed no op message from layoutMessage
* cargo fmt
* only send documentBar when zoom or rotation is updated
* ctrl-0 changes zoom properly
* Code review changes
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>
* Snap zoom
* Navigate zoom from centre
* Ctrl to snap zoom in navigate
* Use ctrl for global snap rotate
* Fix the rotation input on snap rotate
* Update hint to use ctrl
* Fix mouse centre on drag
* Click to zoom in
* Clean up centre zoom
* Update user input hints; tweak some variable names for clarity and standardization
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* 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>
* removed all use of document indicies
* -add u64 support for wasm bridge
* fixed rust formating
* Cleaned up FrontendDocumentState in js-messages
* Tiny tweaks from code review
* - moved more of closeDocumentWithConfirmation to rust
- updated serde_wasm_bindgen to add feature flag
* working initial auto save impl
* auto save is a lifetime file
* - cargo fmt
- fixc error message
- move document version constant
* code review round 1
* generate seed for uuid in js when wasm is initialized
* Resolve PR feedback
* Further address PR feedback
* Fix failing test
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: otdavies <oliver@psyfer.io>
* removed all use of document indicies
* -add u64 support for wasm bridge
* fixed rust formating
* Cleaned up FrontendDocumentState in js-messages
* Tiny tweaks from code review
* - moved more of closeDocumentWithConfirmation to rust
- updated serde_wasm_bindgen to add feature flag
* changed to upsteam version of serde_wasm_bindgen
* cargo fmt
* -fix event propigation on delete
- Js message change class extention to typedef
* changed another typedef
* cargo fmt
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Created wasm binding to action's of the radio buttons which control the view mode
Added entry to DocumentMessage Enum
* draw in wireframe mode by changing parameters on each shape
added functions/changed behavior to do as above
not working yet
- newly added shapes should be drawn in wireframe
- setting fill to "none" on a path does not only draw an outline
- maybe the stroke width is 0?
* Wire frame view mostly functional for ellipses
- Need to implement for all shapes
- BUG: shapes don't immediatley update upon changing view-mode
* Fixed: active document now updates after view mode swap
* The Pros:
- wire frame mode effects all shapes correctly
The Cons:
- wire frame mode effects everything, including things that maybe shouldn't be, like select boxes and pen lines
* wire frame view no longer effects overlay layers
* Fixed: While in wireframe view the pen tool will draw regular thickness lines.
* some commenting
* Fixed potential bug:
In layer/file system with a Folder layer with a sub-layer that is also
a Folder cache_dirty must be set in order for all shapes to update properly
* refactored code to use ViewMode enum names throughout
* Changed: All wireframe lines are blank
cargo fmt
* Wireframe thickness doesn't change as a result of zooming
- Added DocumentMessage::ReRenderDocument, which marks layers as dirty and renders with the updated render-string
- All "zoom" messages in the movement_handler send a re-render message
- while in wireframe view, the "render-transform" of all shapes includes the root layer transform
Added getter/setter methods for graphene::Document::view_mode
* cargo fmt
* wireframe now has proper thickness after "Zoom Canvas to Fit all" action
* Refactored
- Changed FrontendMessage::UpdateCanvas to RenderDocument message to allow for lazy evaluation
- Created DocumentOperation::SetViewMode to be more consistent with existing code
- removed log statement
- Added constants for empty fill and thin-black stroke
* cargo fmt
* Removed ReRenderDocument message
* cargo fmt
* Fixes as suggested by TrueDoctor
* clean up merge
cargo fmt
* Refactor:
moved view_mode to DocumentMessageHandler
* Polishing
* changed those two comments
* Remove unknown todo comment
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Hook up user input hints to display in the frontend status bar
Closes#171
* MVP hint system based on tool FSM
* Fix hints for Fill and Eyedropper tools
* Add icons for keyboard shortcuts
* Fix hints for Pen Tool
* Cleanup
* Add vue selectLayer(layer, ctrl, shift)
* Individual selection working, range fill next
* Frontend package-lock.json seems apparently needs to be pushed. Weird.
* Selection working with ctrl, shift from editor. Still some bugs to sqaush with folder nesting.
* WIP resolving nesting folders issues
* Changed comparison approach, handling corner cases now
* Fully working selection.
* Reverted changes to package-lock.json
* Removed unused code
* Resolved ctrl click not behaving similar to windows
* Slight comment clarification
* Double checked a windows behavior and corrected. Changed last_selected name.
* Simplified if statement slightly.
* Made the naming clearer regarding UUIDs versus indices
* Clarified comments further
* Minor comment fixup
* Implemented suggestions, clarified comments
* Resolved todo regarding clearing selection when ctrl not pressed
* Ensure we only push responses when needed
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Reviewed by: @TrueDoctor <3