mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-26 06:48:12 +08:00
Fix the Eyedropper tool (#1440)
* Fix eyedropper * Remove dead code --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
54745e210a
commit
2feef62f23
@@ -13,7 +13,6 @@ import {
|
||||
UpdateWorkingColorsLayout,
|
||||
UpdateGraphViewOverlayButtonLayout,
|
||||
UpdateNodeGraphBarLayout,
|
||||
UpdateDocumentTransform,
|
||||
TriggerGraphViewOverlay,
|
||||
} from "@graphite/wasm-communication/messages";
|
||||
|
||||
@@ -30,8 +29,6 @@ export function createDocumentState(editor: Editor) {
|
||||
nodeGraphBarLayout: defaultWidgetLayout(),
|
||||
// Graph view overlay
|
||||
graphViewOverlayOpen: false,
|
||||
// CSS transform property to be applied to artwork
|
||||
artworkTransform: "",
|
||||
});
|
||||
const { subscribe, update } = state;
|
||||
|
||||
@@ -106,14 +103,6 @@ export function createDocumentState(editor: Editor) {
|
||||
// Request a resize event so the viewport gets measured now that the canvas is populated and positioned correctly
|
||||
window.dispatchEvent(new CustomEvent("resize"));
|
||||
});
|
||||
editor.subscriptions.subscribeJsMessage(UpdateDocumentTransform, async (data) => {
|
||||
await tick();
|
||||
|
||||
update((state) => {
|
||||
state.artworkTransform = data.transform;
|
||||
return state;
|
||||
});
|
||||
});
|
||||
// Show or hide the graph view overlay
|
||||
editor.subscriptions.subscribeJsMessage(TriggerGraphViewOverlay, (triggerGraphViewOverlay) => {
|
||||
update((state) => {
|
||||
|
||||
Reference in New Issue
Block a user