* 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>
* Add folder insert outline
* Fix typo
* Use v-bind for insert folder class
* Remove v-bind prefix
* Convert to using v-if for the insert marker
* Simplify Vue-based insertion lines with pseudo elements
Regression I caused: can't insert in bottom of folder listing
* Fix the insertion-at-bottom-of-folder bug
* Apply folder insertion to the layer not its row
* Convert to using an absolutly positioned marker
* Remove v-bind prefix
* Remove other v-bind prefix
* Cleanup css
* Little code review nitpicks
* Better name for closest
* Rename js constants
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add FrontendMouseCursor and DisplayMouseCursor
* Add update_cursor method to the Fsm trait and implement it for all tools
* Rename DisplayMouseCursor to UpdateMouseCursor
* Add 'To CSS Cursor Property' transform decorator and change the mouse cursor in the canvas based on the current tool and its state
* Implement update_cursor for Navigate tool properly
* Keep the cursor when dragging outside of the canvas
* Change the mouse cursor to 'zoom-in' when LMB dragging on canvas with Navigate tool
* Rename FrontendMouseCursor to MouseCursorIcon
* Rename 'event' to 'e' and replace v-on with @
* Change the definition of the MouseCursorIcon type in TS
* Replace switch with dictionary look-up
* Move the definition of MouseCursorIcon closer to where it's used
* 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>
* Resize panels
* Removing move_selection test pending #444 resolved
* Bind event listners and cursor to the document
* Fix flex grow on document being reset when drawing
* Call onresize when the boundry is dragged
* Add min panel size
* Add explicit function return types
* Dispatch resize event
* Lock pointer instead of setting cursor on document
Co-authored-by: otdavies <oliver@psyfer.io>
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>
* better decimal rounding in NumberInput
* - created function to reuse
- used math instead of string manipulation
* updated comment to be correct
* updated comment
* updated comment
Many large changes, including:
- TypeScript enums are now string unions throughout
- Strong type-checking throughout the TS and Vue codebase
- Vue component props now all specify `as PropType<...>`
- Usage of annotated return types on all functions
- Sorting of JS import statements
- Explicit usage of Vue bind attribute function call arguments (`@click="foo"` is now `@click=(e) => foo(e)`)
- Much improved code quality related to the color picker
- Consistent camelCase Vue bind and v-model attributes
- Consistent Vue HTML attribute strings with single quotes
- Bug fix and clarity improvement with incorrect hint class parameters
- Empty Vue component objects like `props: {}` and `components: {}` removed
* 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>
* 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