Does patchInitialised() always get called multiple times? #693
-
In my application, which is supposed to be embeddind just one Cables instance , when I run dev , I've noticed that function patchInitialized(patch: any) {
// implement callback function used by Cables op.callback
patch.config.interactionFromUI = function (params: string[]) {
$UI_StateArray[$CurrentPickedID].toggle();
$UI_StateArray = $UI_StateArray; // reactive assignment
};
// get all the variables from the Cables patch
$CablesParams = patch.getVars();
($ConsoleText = "Patch initialized"), Object.keys($CablesParams);
console.count("Patch initialized");
} Possible suspect is that call to |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I tried moving my patchLoaded functionality to onPatchLoaded: () => {},
onFinishedLoading: () => {
patchInitialized(get(CablesPatch));
patchFinishedLoading();
}
....
If I put |
Beta Was this translation helpful? Give feedback.
-
this event is called whenever cables "deserializes" content, i guess you are using subpatchops. then this event is called once per finished subpatchop. |
Beta Was this translation helpful? Give feedback.
this event is called whenever cables "deserializes" content, i guess you are using subpatchops. then this event is called once per finished subpatchop.