When zooming in and panning the Viewport while a Selection is active, if a bucket fill or stroke operation is used, only the visible area of the Selection is filled.
This should be updated to fill the full area, even the out of visual bounds area.
This changeset also fixes an issue where stroke width would be applied differently at different zoom levels.
Working with selections on touch screen devices (especially phones) is very cumbersome to get right.
This changeset introduces corner handles for rectangular selections. Once a selection is created, each corner has a handle from which the selection can be resized.
This also addresses a state history bug when stepping through changes to selections.
When the DRAG tool is active while there is an active selection, when dragging starts, the contents of the selection should be cut from the currently active Layer and be pasted as a new Layer, which will continue the drag.
Split `definitions/document.ts` into unique files per actor type.
Create `model` folder to store the above types, their factories and the state changing actions.
When merging a layer down / flattening the layers in a Timeline Document, it is more logical if this is done for the currently active Tile group, instead of the whole Document.
Tiles in a timeline cannot be reordered after creation, which can be a little cumbersome.
Implement draggable tiles allowing the user to reorder tiles at any moment.
Long overdue.
State history would only work for the active Document. When opening a new Document (without closing the existing one), the state history would be flushed and initiated anew for every change made in the currently focused Document.
This changeset introduces a state history unique to the Document, meaning you can switch between open Documents and maintain the history associated with your changes.
Simple copy/cut/paste operations were not supported for selected Layers. Further more, only a single selected Layer at a time was supported.
We now support multi select using shift + click. Copy pasting content now also works across timeline tiles for easier editing.
### Motivation
In order to be more useful as a spritesheet editor, BitMappery now contains a timeline view, a mode where content can be sub grouped into tiles, where each subsequent tile can be traced over the previous one. Each tile can have multiple layers of content for ease of editing.
### Changes
* Introduced Document types `default` and `timeline`
* Introduced LayerRef types (allow grouping Layers)
* Introduced Timeline view for tile based drawing and tracing
* Introduced Document background color (omits need to create background layer for each tile in a timeline)
* Cleaned up some legacy overrides made superfluous by newer dependencies
* Added document presets to document creation flow
### Commits
* Add rel to Layer structure
* Add Document type
* Initial scaffold for timeline view.
* Added initial utility to manage timelines
* Added action to clone all Layers in a tile group
* Moved Layer cloning to layer-util
* Converted zoom tool option panel to TypeScript
* Added action to add a new tile and layer to the Document
* Added action to remove a tile and its layers from the Document
* Added Layer grouping property to Document structure
* Update type check for test
* Initial timeline panel outline
* Created tiles now match Document dimensions
* Added tile cache
* Allow showing a semi transparent carbon copy trace of the previous tile
* Add animation preview window
* Add fps control to animation preview
* Store metadata property inside Documents (allows storing timeline framerate)
* Optimise mobile view for timeline
* Keep thumbnail ratios when previewing tiles and animations
* Button and animation preview window styling
* use RAF-based animation timing in animation preview
* Changes made to layer content now trigger a re-render of the Group tile
* Update Layer reordering logic to also work with subsets
* Optimised animated GIF export, updated pixel art definitions to be more sensible
* Code cleanups
* Added background color to Documents, omitting the need for a background layer on each animation tile
* Removing temp code, updating renderer factory test
* Update layer styling, added tooltip on drag behaviour
* Added document DPI and size unit to meta data
* Refactored deprecated event property from modal key handler
* Remove unused properties from animation preview window
* Update unit test for renderer factory
* Fix bug where closing modals would trigger click on canvas
* Add presets for all Document types
* Added setting to automatically choose appropriate anti-alias setting
* Invalidate tile and thumbnail caches on resize and crop functions. Adjust spritesheet export behaviour
### Motivation
It'd be great if we could see a small thumbnail preview in the layers panel to more easily distinguish between layers visually.
In this changeset we introduce the thumbnail cache. When enabled, each layer is represented by a thumbnail which can be requested from multiple subscribed consumers (currently only the layer panel).
Thumbnail updates are deferred to keep CPU usage low and performance high.
* Allow merging and subtracting of selections
* Support selections with more than one other shape
* Allow subtraction using alt key
* Fix issue where stepping through selection state history would not restore merges and subtractions
* Preserve selection when switching between selection type tools
* Cleaner control of subtraction operation
* Implemented new commit layer effects and transforms action
* Moved all actions out of the application menu component
* Grid to layer slicing moved out of component
* Unified all layer filter toggling into single action
* Moved all layer panel history interactions to separate action files
* Moved mirror, rotation, later addition and document resize state actions to separate files
* Adjust behaviour of layer addition action
* Moved canvas resizing history action to separate file
* Move interaction pane selection logic into separate files
* Move layer positioning utilities to separate actions
* Use correct event variable in ZoomableCanvas
* Zoom tool now responds to clicks and alt+clicks when zoom is selected
* Restructure and rename actor/renderers
* Rename cache flushing functions to reflect their scope
* Move canvas instance management to dedicated service
* Type resize-canvas-window Vue file