mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 08:28:12 +08:00
merge onto master
This commit is contained in:
@@ -24,7 +24,7 @@ import {
|
||||
UpdateNodeGraphWires,
|
||||
UpdateNodeGraphSelection,
|
||||
UpdateNodeGraphTransform,
|
||||
UpdateNodeThumbnail,
|
||||
UpdateThumbnails,
|
||||
UpdateWirePathInProgress,
|
||||
} from "@graphite/messages";
|
||||
|
||||
@@ -168,9 +168,14 @@ export function createNodeGraphState(editor: Editor) {
|
||||
return state;
|
||||
});
|
||||
});
|
||||
editor.subscriptions.subscribeJsMessage(UpdateNodeThumbnail, (updateNodeThumbnail) => {
|
||||
editor.subscriptions.subscribeJsMessage(UpdateThumbnails, (updateThumbnail) => {
|
||||
update((state) => {
|
||||
state.thumbnails.set(updateNodeThumbnail.id, updateNodeThumbnail.value);
|
||||
for (const [id, value] of updateThumbnail.add) {
|
||||
state.thumbnails.set(id, value);
|
||||
}
|
||||
for (const id of updateThumbnail.clear) {
|
||||
state.thumbnails.set(id, "");
|
||||
}
|
||||
return state;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user