|
|
@ -35343,14 +35343,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, newValue, oldValue, options) { |
|
|
|
var callback = function callback(index, newValue, oldValue, attrs) { |
|
|
|
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(newValue, oldValue, options); |
|
|
|
cb(newValue, oldValue, attrs); |
|
|
|
} |
|
|
|
} |
|
|
|
if (options && options.sync) { |
|
|
|
if (options && options.sync) { |
|
|
|
complete = false; |
|
|
|
complete = false; |
|
|
@ -35394,8 +35394,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 (newValue, oldValue, opt) { |
|
|
|
}, function (newValue, oldValue, attrs) { |
|
|
|
callback(i, newValue, oldValue, _.extend({ index: i }, opt)); |
|
|
|
callback(i, newValue, oldValue, _.extend({ index: i }, attrs)); |
|
|
|
}, options); |
|
|
|
}, options); |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
w.teardown(); |
|
|
|
w.teardown(); |
|
|
@ -35435,8 +35435,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 (newValue, oldValue, opt) { |
|
|
|
}, function (newValue, oldValue, attrs) { |
|
|
|
callback(i, newValue, oldValue, _.extend({ index: i }, opt)); |
|
|
|
callback(i, newValue, oldValue, _.extend({ index: i }, attrs)); |
|
|
|
}, options); |
|
|
|
}, options); |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
_w.teardown(); |
|
|
|
_w.teardown(); |
|
|
@ -35444,8 +35444,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
var watcher = new Watcher(model, exp, function (newValue, oldValue, opt) { |
|
|
|
var watcher = new Watcher(model, exp, function (newValue, oldValue, attrs) { |
|
|
|
callback(i, newValue, oldValue, _.extend({ index: i }, opt)); |
|
|
|
callback(i, newValue, oldValue, _.extend({ index: i }, attrs)); |
|
|
|
}, options); |
|
|
|
}, options); |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
watcher.teardown(); |
|
|
|
watcher.teardown(); |
|
|
|