Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.2k
Add properties panel entries for artboards#572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
da91c47932d93f50f23f6345b5268616c34cdd8a60420570b5bcea9e1221f1bf84152639bd68ac94edf2d1dd539e31986750aaffbb4b1f8637ff3170e64a9d600ef4774ce15298e8dc8File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"graphene_document":{"root":{"visible":true,"name":null,"data":{"Folder":{"next_assignment_id":919378319526168453,"layer_ids":[919378319526168452],"layers":[{"visible":true,"name":null,"data":{"Shape":{"path":[{"MoveTo":{"x":0.0,"y":0.0}},{"LineTo":{"x":1.0,"y":0.0}},{"LineTo":{"x":1.0,"y":1.0}},{"LineTo":{"x":0.0,"y":1.0}},"ClosePath"],"style":{"stroke":null,"fill":{"Solid":{"red":0.0,"green":0.0,"blue":0.0,"alpha":1.0}}},"render_index":1,"closed":true}},"transform":{"matrix2":[303.890625,0.0,-0.0,362.10546875],"translation":[-148.83984375,-235.8828125]},"blend_mode":"Normal","opacity":1.0}]}},"transform":{"matrix2":[1.0,0.0,0.0,1.0],"translation":[259.88359375,366.9]},"blend_mode":"Normal","opacity":1.0}},"saved_document_identifier":0,"name":"Untitled Document","layer_metadata":[[[919378319526168452],{"selected":true,"expanded":false}],[[],{"selected":false,"expanded":true}]],"layer_range_selection_reference":[919378319526168452],"movement_handler":{"pan":[-118.8,-45.60000000000001],"panning":false,"snap_tilt":false,"snap_tilt_released":false,"tilt":0.0,"tilting":false,"zoom":1.0,"zooming":false,"snap_zoom":false,"mouse_position":[0.0,0.0]},"artboard_message_handler":{"artboards_graphene_document":{"root":{"visible":true,"name":null,"data":{"Folder":{"next_assignment_id":0,"layer_ids":[],"layers":[]}},"transform":{"matrix2":[1.0,0.0,0.0,1.0],"translation":[259.88359375,366.9]},"blend_mode":"Normal","opacity":1.0}},"artboard_ids":[]},"properties_panel_message_handler":{"active_selection":[[919378319526168452],"Artwork"]},"overlays_visible":true,"snapping_enabled":true,"view_mode":"Normal","version":"0.0.5"} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -57,5 +57,5 @@ pub const FILE_EXPORT_SUFFIX: &str = ".svg"; | ||
| pub const COLOR_ACCENT: Color = Color::from_unsafe(0x00 as f32 / 255., 0xA8 as f32 / 255., 0xFF as f32 / 255.); | ||
| // Document | ||
| pub const GRAPHITE_DOCUMENT_VERSION: &str = "0.0.4"; | ||
| pub const GRAPHITE_DOCUMENT_VERSION: &str = "0.0.5"; | ||
0HyperCube marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| pub const VIEWPORT_ZOOM_TO_FIT_PADDING_SCALE_FACTOR: f32 = 1.05; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3,6 +3,7 @@ use crate::message_prelude::*; | ||
| use graphene::color::Color; | ||
| use graphene::document::Document as GrapheneDocument; | ||
| use graphene::layers::style::{self, Fill, ViewMode}; | ||
| use graphene::DocumentResponse; | ||
| use graphene::Operation as DocumentOperation; | ||
| use glam::DAffine2; | ||
| @@ -31,7 +32,18 @@ impl MessageHandler<ArtboardMessage, ()> for ArtboardMessageHandler { | ||
| // Sub-messages | ||
| #[remain::unsorted] | ||
| DispatchOperation(operation) => match self.artboards_graphene_document.handle_operation(*operation) { | ||
| Ok(_) => (), | ||
| Ok(Some(document_responses)) => { | ||
| for response in document_responses { | ||
| match &response { | ||
| DocumentResponse::LayerChanged { path } => responses.push_back(PropertiesPanelMessage::CheckSelectedWasUpdated { path: path.clone() }.into()), | ||
| DocumentResponse::DeletedLayer { path } => responses.push_back(PropertiesPanelMessage::CheckSelectedWasDeleted { path: path.clone() }.into()), | ||
| DocumentResponse::DocumentChanged => responses.push_back(ArtboardMessage::RenderArtboards.into()), | ||
| _ => {} | ||
| }; | ||
| responses.push_back(ToolMessage::DocumentIsDirty.into()); | ||
0HyperCube marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| } | ||
| Ok(None) => {} | ||
| Err(e) => log::error!("Artboard Error: {:?}", e), | ||
| }, | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.