@calcit/procs
Advanced tools
Comparing version 0.2.37 to 0.2.38
@@ -34,3 +34,2 @@ var _a; | ||
this.listeners = new Map(); | ||
this.triggering = false; | ||
} | ||
@@ -633,14 +632,8 @@ toString() { | ||
} | ||
if (a.triggering) { | ||
return; // already set trigger, skip | ||
let prev = a.value; | ||
a.value = v; | ||
for (let [k, f] of a.listeners) { | ||
f(v, prev); | ||
} | ||
a.triggering = true; | ||
setTimeout(() => { | ||
let prev = a.value; | ||
a.value = v; | ||
for (let [k, f] of a.listeners) { | ||
f(v, prev); | ||
} | ||
a.triggering = false; | ||
}); | ||
return null; | ||
}; | ||
@@ -647,0 +640,0 @@ export let add_DASH_watch = (a, k, f) => { |
@@ -68,4 +68,2 @@ import { | ||
cachedHash: Hash; | ||
/** it's changed, will trigger listener */ | ||
triggering: boolean; | ||
constructor(x: CrDataValue, path: string) { | ||
@@ -75,3 +73,2 @@ this.value = x; | ||
this.listeners = new Map(); | ||
this.triggering = false; | ||
} | ||
@@ -744,14 +741,8 @@ toString(): string { | ||
} | ||
if (a.triggering) { | ||
return; // already set trigger, skip | ||
let prev = a.value; | ||
a.value = v; | ||
for (let [k, f] of a.listeners) { | ||
f(v, prev); | ||
} | ||
a.triggering = true; | ||
setTimeout(() => { | ||
let prev = a.value; | ||
a.value = v; | ||
for (let [k, f] of a.listeners) { | ||
f(v, prev); | ||
} | ||
a.triggering = false; | ||
}); | ||
return null; | ||
}; | ||
@@ -758,0 +749,0 @@ |
{ | ||
"name": "@calcit/procs", | ||
"version": "0.2.37", | ||
"version": "0.2.38", | ||
"main": "./lib/calcit.procs.js", | ||
@@ -5,0 +5,0 @@ "devDependencies": { |
88464
3342