|
|
@ -940,14 +940,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons |
|
|
|
var fns = exps.slice(); |
|
|
|
var fns = exps.slice(); |
|
|
|
var complete = false, |
|
|
|
var complete = false, |
|
|
|
running = false; |
|
|
|
running = false; |
|
|
|
var callback = function callback(index) { |
|
|
|
var callback = function callback(index, newValue, oldValue) { |
|
|
|
if (complete === true) { |
|
|
|
if (complete === true) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
fns[index] = true; |
|
|
|
fns[index] = true; |
|
|
|
if (runBinaryFunction(fns)) { |
|
|
|
if (runBinaryFunction(fns)) { |
|
|
|
complete = true; |
|
|
|
complete = true; |
|
|
|
cb(); |
|
|
|
cb(newValue, oldValue, index); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!running) { |
|
|
|
if (!running) { |
|
|
|
running = true; |
|
|
|
running = true; |
|
|
@ -985,8 +985,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons |
|
|
|
var w = new Watcher(model, function () { |
|
|
|
var w = new Watcher(model, function () { |
|
|
|
dep.depend(); |
|
|
|
dep.depend(); |
|
|
|
return NaN; |
|
|
|
return NaN; |
|
|
|
}, function () { |
|
|
|
}, function (newValue, oldValue) { |
|
|
|
callback(i); |
|
|
|
callback(i, newValue, oldValue); |
|
|
|
}); |
|
|
|
}); |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
w.teardown(); |
|
|
|
w.teardown(); |
|
|
@ -1026,8 +1026,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons |
|
|
|
var _w = new Watcher(currentModel, function () { |
|
|
|
var _w = new Watcher(currentModel, function () { |
|
|
|
_dep.depend(); |
|
|
|
_dep.depend(); |
|
|
|
return NaN; |
|
|
|
return NaN; |
|
|
|
}, function () { |
|
|
|
}, function (newValue, oldValue) { |
|
|
|
callback(i); |
|
|
|
callback(i, newValue, oldValue); |
|
|
|
}); |
|
|
|
}); |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
_w.teardown(); |
|
|
|
_w.teardown(); |
|
|
@ -1035,8 +1035,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
var watcher = new Watcher(model, exp, function () { |
|
|
|
var watcher = new Watcher(model, exp, function (newValue, oldValue) { |
|
|
|
callback(i); |
|
|
|
callback(i, newValue, oldValue); |
|
|
|
}, options); |
|
|
|
}, options); |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
watcher.teardown(); |
|
|
|
watcher.teardown(); |
|
|
|