Commit graph

2382 commits

Author SHA1 Message Date
Haikal
c8ea9e05a6
Fix orphaned child layers left behind when a group is ungrouped or deleted (#1655)
* Fix Incomplete Deletion of Children Nodes in delete_layer Function

* delete debug message

* change variable name on iterator of child_layers
2024-03-09 17:09:30 +00:00
0HyperCube
b31e8f7b6d
Make menu lists searchable (#1499)
* Searchable font list

* Bug fixes and UX polish for edge cases

* More work, still more bugs to fix

* Don't update highlight when not open

* Bug fixes

* Additional bug fixes and code review

* Fix keyboard input being sent to backend

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-03-09 10:58:13 +00:00
milan-sedivy
4cbba3d92b
Allow cancellation of pivot drag in Select tool (#1658)
* Add Abort to SelectToolFsmState::DragginPivot state

* Remove trailing whitespace (rustfmt error)
2024-03-09 00:22:20 -08:00
Mohamed Osama
69c6f44373
Fix internal consistency of layer ordering when grouping (#1645)
* Internal consistency: Grouping layers preserve the order that they were sorted once those layers end up in the new group

* optimizations
2024-03-09 05:18:37 +00:00
Keavon Chambers
9f84661fac Switch Eyedropper/Fill tools from Rmb to Shift+Lmb 2024-03-08 20:33:53 -08:00
Elbert Ronnie
d780602ecd
Add auto-panning to the Artboard tool (#1652)
* Move panning functionality to auto_panning.rs

* Add auto-panning to Artboard tool

* Hide debug messages containing AnimationFrame
2024-03-08 20:32:46 -08:00
milan-sedivy
ea3f834b64
Create a history step when importing SVG files (#1656)
* Create a history step when importing SVG files

* Removed additional usvg::Tree::from_str call based on feedback, used DocumentHistoryBackward in case it fails
2024-03-08 14:44:49 -08:00
Keavon Chambers
7b7e5994b7
Avoid cargo-about failures by disabling failing API (#1653) 2024-03-07 01:13:36 -08:00
Karthik Prakash
0c60fd95fa
Remove remain alphabetical sorting enforcement macros (#1647)
remove `remain`

Co-authored-by: 0HyperCube <78500760+0HyperCube@users.noreply.github.com>
2024-03-06 16:43:51 +00:00
Haikal
a47fff905e
Change devcontainer image to Debian to support ARM platforms (#1636)
Change image devcontainer to base debian to provide arm based
2024-03-05 22:38:10 +00:00
Elbert Ronnie
2f44b156d1
Fix regression from #1630 for Layers panel blend modes missing labels (#1649)
Specify label instead of value
2024-03-05 04:10:57 +00:00
Keavon Chambers
379931a504 Update Rust dependencies (cargo update) 2024-03-04 19:51:21 -08:00
Tanmay Kumar
15ffdf73ca
Fix tool options bar number inputs not being applied before starting a drag with the tool (#1646)
Unfocus elements before control is passed to tool
2024-03-03 14:18:48 -08:00
Elbert Ronnie
9479abe114
Fix dropdown keyboard movement bug (#1630)
* Add a value to all `MenuListEntry`

* cargo fmt

* Make `value` as constructor in `MenuListEntry`

* Make `value` as constructor in `RadioEntryData`
2024-03-02 17:06:08 -08:00
Haikal
9090a0e6e9
Update Polygon tool to draw stars/ngons so they're tilted upright (#1640)
* Update angel of new polygon and star tool

* Math tidying up

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-03-02 23:53:51 +00:00
Mohamed Osama
a1f2a2b256
Fix layers losing their names upon being grouped (#1637)
* no message

* no message

* no message

* Make layers reserve their names when grouped

* remove redundancy

* replace String::from("") with String::new()

* Fix test

* Restore unrequested line break changes

* Avoid unwraps

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-03-02 23:34:25 +00:00
Haikal
128f76af7e Add clear artboards button to undo history (#1643) 2024-03-02 16:39:41 +00:00
Keavon Chambers
f02dd5c0f6 Launch the Alpha 3 release series 2024-02-29 23:47:11 -08:00
zhiyuan
5cf0b8893a
Fix Freehand tool extending after transforming the path (#1623)
Fix extending after transforming
2024-02-29 19:50:02 -08:00
Keavon Chambers
70dce1c230 Resolve most Clippy lint issues 2024-02-29 00:48:28 -08:00
Elbert Ronnie
8e769e37f6 Add auto-panning when pointer goes beyond viewport edge with Select tool (#1625)
* Add code to shift viewport if mouse is beyond edge

* Allow shifting viewport if mouse is stationary too

* Group all modifier keys into SelectToolPointerKeys

* Cleanup message ordering to remove shifting during resize

* Slow down shifting by half

* Clamp speed; code review cleanup

---------

Co-authored-by: 0hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-28 23:52:36 -08:00
Keavon Chambers
4405e01f55 Fix displayed ordering of keyboard shortcuts 2024-02-28 21:51:49 -08:00
Mohamed Osama
96e52c18eb Fix external consistency of grouping layers so they don't jump to the top of the hierarchy (#1627)
* Calculate insert_index when grouping multiple layers

* no message

* Fix wrong commits

* no message

* restore frontend/package-lock.json

* Fix formatting matches

* Code review to make it idiomatic

* remove wrong line

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-28 15:01:23 -08:00
Elbert Ronnie
39401f0be0
Fix point translation bug in Path tool (#1626)
Fix point translation bug
2024-02-25 14:50:30 +00:00
Keavon Chambers
f652d9096e Blog post: Graphite internships: announcing participation in GSoC 2024 2024-02-22 02:55:31 -08:00
Keavon Chambers
2437536316 Update GSoC project list and info 2024-02-21 04:48:26 -08:00
Keavon Chambers
a02b162e30
Consolidate and rename Graphene data types, and add many comments (#1620)
* Document ProtoNodeInput

* More comments

* Comment improvements

* Comment and split ProtoNodeInput::NodeLambda from ProtoNodeInput::Node

* Combine NodeImplementation into DocumentNodeImplementation

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2024-02-20 17:53:04 -08:00
Comeza
dc7de4d973
Save work periodically to reduce loss from crashes (#1580)
* Add auto saving

* Fix autosave dispatching message but not saving document

* Clamp set_timeout delay

* Auto save all documents instead of only the active

* Add with_editor to simplify code

* Update consts

* Simplify some more

* Fix typo

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-20 03:23:25 +00:00
Keavon Chambers
f265fa693e Website dev guide fixes for Code Structure page 2024-02-19 00:12:30 -08:00
0HyperCube
229b5dbb20
Use f64 not f32 throughout graph; add Vector2 value node (#1618)
* Use doubles in graph

* Format .graphite files onto one line

* Rename new node to Vector2

* No primary input

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-18 22:16:37 +00:00
0HyperCube
0e0e347435
Fix multiple dragged nodes snapping back sometimes (#1619)
Fix dragging a selection of nodes on one axis (in screen pixels) resetting the selection.

Fix dragging on one axis only
2024-02-18 13:56:40 -08:00
0HyperCube
6f6fb3bcd4
Upgrade several Rust dependencies (#1613)
`specta` from Hypercube's fork commit to latest upstream commit
`wasm-bindgen` 0.2.87 -> 0.2.91
`spirv-std` from 0.9 to not-yet-merged commit in https://github.com/EmbarkStudios/rust-gpu/pull/1115
`wgpu` 0.17 -> 0.19
`winit` 0.28.6 -> 0.29
`vello` and `vello_svg` from latest upstream commit to not-yet-merged commit in https://github.com/linebender/vello/pull/427
`resvg` 0.36.0 -> 0.39
`glam` 0.24 -> 0.25
`rustybuzz` 0.8.0 -> 0.10.0
`js-sys` and `web-sys` 0.3.55 -> 0.3.67
`usvg` 0.36.0 -> 0.39
`spirv` 0.2.0 -> 0.3

* Update a couple of dependencies

* More test fixing…

* Use upstream Specta instead of fork

* Update comments in Cargo.toml

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-17 15:02:41 -08:00
0HyperCube
80bffd39bf
Node graph box selection when dragging (#1616)
* Node box selection

* Cancel box selection on rmb
2024-02-17 14:24:53 -08:00
Ezbaze
a50b6b0a09
Fix Subtract Node from adding instead of subtracting (#1614) 2024-02-17 03:06:21 +00:00
Keavon Chambers
15931d06b1 Hacky performance fix for caching slow nodes in demo artwork until #1607 is done 2024-02-15 16:33:04 -08:00
Keavon Chambers
fc8b41914b
Fix anti-aliasing in overlays by aligning everything with the pixel grid (#1603) 2024-02-13 20:47:16 -08:00
Keavon Chambers
b18822b1b4 Improve clarity of some complex CSS logic 2024-02-13 16:48:42 -08:00
Keavon Chambers
7453fe01a3 Finalize GSoC 2024 project idea list 2024-02-11 21:20:00 -08:00
Keavon Chambers
1bf62d92c2 Automatically include all demo artwork in test 2024-02-08 01:15:32 -08:00
Keavon Chambers
9edd9233db Update website and add student project info 2024-02-06 09:22:26 -08:00
Keavon Chambers
12e16b9a4e Add Red Dress demo artwork 2024-02-05 14:41:07 -08:00
zhiyuan
e1735ddf84 Fix Select tool's broken undo (#1597)
Fix select tool undo
2024-02-05 14:40:27 -08:00
Keavon Chambers
7e5069f638 Copy to Points node: Add "Random Scale Bias" parameter 2024-02-05 05:31:28 -08:00
zhiyuan
9530e55ace
Split widget callbacks into update and commit so only the latter adds a history state (#1584)
* feat: split commit and update layout

* feat: add on_commit callback

* Code review

* fix: refactor

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-05 01:32:15 -08:00
Nikita-str
f25038067e
Path tool: sliding point insertion (#1581)
* #1578 sliding point works(1st approx)

TODO:
* don't move too close to the side points
* double click works incorrect?
* do we need to jump from segment to segment?

* #1578 disallow move slide point too close to side points

* fix double click + ctrl insertion

* #1578 select insertion point (except `ctrl` case)

* #1578 far depends on line width & more accurate seg finding

* #1578 insert point on most top suitable selected layer

* #1581 draw insertion point by overlay  + `Esc` abort

* #1581 sharp stay unchanged on double click

* #1581 fix incorrect handle of scaling

* #1581 `square` selection point & too close in px(instead of magic)

* #1581 bug fix: insertion point on unselection

* #1581 use `color: Option` instead of `SelectionType`

* Some code review, still need to review shape_editor.rs

* #1581 insert sharp point on a straight segment

Also correct insertion on quadratic segments

`ManipulatorGroup::have_handle` have such form because `handle = Some(self.anchor)` often used instead of `handle = None`

* Final code review pass

* Code review pass

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-05 08:45:25 +00:00
zhiyuan
a412a77062
Support for deleting points to break path (#1593)
* feat: break closed curve

* feat: update hotkeys and handles

* feat: break an open path

* feat: elegantly handle breaking at multi points in a subpath

* feat: handle break at end points

* feat: ctrl+delete to remove segments and break path

* fix: rm unused

* First code review pass

* fix: closed eclipse handles after breaking path

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-04 21:02:09 -08:00
zhiyuan
a4a2680ac4
Freehand tool: Allow extension of existing paths (#1594)
* feat: extend freehand path

* fix: rm logs

* fix: rename variable
2024-02-04 13:36:25 -08:00
zhiyuan
05b4582cd7
Properly handle pen tool undo and redo (#1587)
feat: properly handle pen tool undo and redo
2024-02-04 19:23:48 +00:00
0HyperCube
aed30d78b8
Fix floating point error with Poisson-disk points being sampled outside shape (#1596)
* Check opposite corner

* Commets and test

* Fix compiling

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-04 17:16:16 +00:00
0HyperCube
5f72a6a8a1
Bezier-rs: Use nonzero winding order for Poisson-disk insideness test (#1590)
* Proper winding order for poisson dist

* More robust cubic solving

* Fix test expecting roots in a different order

* Manual sort impl

* Code review nits

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-04 06:05:26 +00:00