Skip to content

Change responses to use classes instead of interfaces #394

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

Merged
merged 21 commits into from
Dec 6, 2021
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
fe0164b
ability to mark an open document as unsaved
mfish33 Nov 20, 2021
aa7fecf
unsaved detection now being triggered based on layer tree height
mfish33 Nov 22, 2021
6a17839
Changed responses to use classes instead of interfaces
mfish33 Nov 22, 2021
5f6f2a1
Merge branch 'master' of https://github.com/GraphiteEditor/Graphite i…
mfish33 Nov 27, 2021
2a55d9d
Merge branch 'master' of https://github.com/GraphiteEditor/Graphite
mfish33 Nov 27, 2021
68f3dda
- rust implementation of unsaved markers
mfish33 Nov 28, 2021
6dbadc6
updated eslint in package.json
mfish33 Nov 28, 2021
be33308
- Renamed GetOpenDocumentsList -> UpdateOpenDocumentsList
mfish33 Nov 29, 2021
bdd6ded
changed hash to current identifier to better reflect its meaning
mfish33 Nov 30, 2021
4aebb76
resolve some merge conflicts
mfish33 Nov 30, 2021
8ca453b
Merge branch 'master' of https://github.com/GraphiteEditor/Graphite
mfish33 Nov 30, 2021
64125ac
removed console.log statement leftover from debuging
mfish33 Nov 30, 2021
8c6935a
Merge branch 'master' of https://github.com/GraphiteEditor/Graphite
mfish33 Nov 30, 2021
811c5ac
Merge branch 'master' into ResponseClasses
mfish33 Nov 30, 2021
e3b75ff
- changed Response to jsMessage
mfish33 Dec 5, 2021
bafd245
-remove path from UpdateLayer
mfish33 Dec 5, 2021
bfc59d0
- remove unused if statements
mfish33 Dec 5, 2021
dbce020
Merge branch 'master' of https://github.com/GraphiteEditor/Graphite i…
mfish33 Dec 5, 2021
3c56009
- comment for reflect-metadata
mfish33 Dec 6, 2021
210f939
- newOpacity -> transformer
mfish33 Dec 6, 2021
7491b69
MessageMaker -> messageMaker
mfish33 Dec 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions editor/src/document/document_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl DocumentMessageHandler {
}
self.layer_data(path).selected = true;
let data = self.layer_panel_entry(path.to_vec()).ok()?;
(!path.is_empty()).then(|| FrontendMessage::UpdateLayer { path: path.to_vec().into(), data }.into())
(!path.is_empty()).then(|| FrontendMessage::UpdateLayer { data }.into())
}

pub fn selected_layers_bounding_box(&self) -> Option<[DVec2; 2]> {
Expand Down Expand Up @@ -621,7 +621,7 @@ impl MessageHandler<DocumentMessage, &InputPreprocessor> for DocumentMessageHand
LayerChanged(path) => {
responses.extend(self.layer_panel_entry(path.clone()).ok().and_then(|entry| {
let overlay = self.graphene_document.layer(&path).unwrap().overlay;
(!overlay).then(|| FrontendMessage::UpdateLayer { path: path.into(), data: entry }.into())
(!overlay).then(|| FrontendMessage::UpdateLayer { data: entry }.into())
}));
}

Expand Down
4 changes: 2 additions & 2 deletions editor/src/frontend/frontend_message_handler.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::document::layer_panel::{LayerPanelEntry, Path, RawBuffer};
use crate::document::layer_panel::{LayerPanelEntry, RawBuffer};
use crate::message_prelude::*;
use crate::tool::tool_options::ToolOptions;
use crate::Color;
Expand All @@ -15,7 +15,7 @@ pub enum FrontendMessage {
DisplayPanic { panic_info: String, title: String, description: String },
DisplayConfirmationToCloseDocument { document_index: usize },
DisplayConfirmationToCloseAllDocuments,
UpdateLayer { path: Path, data: LayerPanelEntry },
UpdateLayer { data: LayerPanelEntry },
UpdateCanvas { document: String },
UpdateScrollbars { position: (f64, f64), size: (f64, f64), multiplier: (f64, f64) },
UpdateRulers { origin: (f64, f64), spacing: f64, interval: f64 },
Expand Down
Loading