* 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>
* 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>
* 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