@pixerate/editor-svelte 0.130.2 → 0.130.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,9 +17,14 @@ export function useEffects(host, provider) {
|
|
|
17
17
|
export function effectDescriptionOf(provider, effect) {
|
|
18
18
|
let description = $state.raw(null);
|
|
19
19
|
let error = $state(null);
|
|
20
|
+
// Through deriveds, so the description reloads only when the provider or the id changes, not
|
|
21
|
+
// whenever an object the getters read from does (each edit of an effect layer replaces it, and
|
|
22
|
+
// clearing the description mid-drag takes the controls that need it off the page).
|
|
23
|
+
const currentProvider = $derived(provider());
|
|
24
|
+
const currentId = $derived(effect());
|
|
20
25
|
$effect(() => {
|
|
21
|
-
const p =
|
|
22
|
-
const id =
|
|
26
|
+
const p = currentProvider;
|
|
27
|
+
const id = currentId;
|
|
23
28
|
description = null;
|
|
24
29
|
error = null;
|
|
25
30
|
if (!p || !id)
|