MCPcopy Create free account
hub / github.com/core7s/react-design-editor / watcher

Function watcher

src/views/DesignEditor/components/Toolbox/Text.tsx:72–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70
71 React.useEffect(() => {
72 let watcher = async () => {
73 if (activeObject && activeObject.type === "StaticText") {
74 const textProperties = getTextProperties(activeObject, SAMPLE_FONTS)
75 setState({ ...state, ...textProperties })
76 }
77 }
78 if (editor) {
79 editor.on("history:changed", watcher)
80 }

Callers

nothing calls this directly

Calls 1

getTextPropertiesFunction · 0.90

Tested by

no test coverage detected