Skip to content
This repository was archived by the owner on Feb 9, 2020. It is now read-only.

Commit 78a8437

Browse files
committed
v0.8.6
1 parent 1304979 commit 78a8437

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

dist/hint.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,7 @@ function decorateRootScope($delegate, $parse) {
18051805
var scopes = {},
18061806
watching = {};
18071807

1808-
var debouncedEmitModelChange = debounceOn(emitModelChange, 10, byScopeId);
1808+
var debouncedEmitModelChange = debounceOn(emitModelChange, 10);
18091809

18101810
hint.watch = function (scopeId, path) {
18111811
path = typeof path === 'string' ? path.split('.') : path;
@@ -1987,7 +1987,7 @@ function decorateRootScope($delegate, $parse) {
19871987
var ret = _apply.apply(this, arguments);
19881988
// var end = perf.now();
19891989
// hint.emit('scope:apply', { id: this.$id, time: end - start });
1990-
debouncedEmitModelChange(this);
1990+
debouncedEmitModelChange();
19911991
return ret;
19921992
};
19931993

@@ -2004,23 +2004,22 @@ function decorateRootScope($delegate, $parse) {
20042004
};
20052005
}
20062006

2007-
function emitModelChange (scope) {
2008-
var scopeId = scope.$id;
2009-
if (watching[scopeId]) {
2007+
function emitModelChange () {
2008+
Object.keys(watching).forEach(function (scopeId) {
20102009
Object.keys(watching[scopeId]).forEach(function (path) {
20112010
var model = watching[scopeId][path];
20122011
var value = summarize(model.get());
20132012
if (value !== model.value) {
20142013
hint.emit('model:change', {
2015-
id: scope.$id,
2014+
id: (angular.version.minor < 3) ? scopeId : parseInt(scopeId),
20162015
path: path,
20172016
oldValue: model.value,
20182017
value: value
20192018
});
20202019
model.value = value;
20212020
}
20222021
});
2023-
}
2022+
});
20242023
}
20252024

20262025
hint.emit('scope:new', {
@@ -2085,11 +2084,10 @@ function scopeDescriptor (elt, scope) {
20852084
}
20862085
}
20872086

2088-
function byScopeId (scope) {
2089-
return scope.$id;
2090-
}
2091-
20922087
function humanReadableWatchExpression (fn) {
2088+
if (fn == null) {
2089+
return null;
2090+
}
20932091
if (fn.exp) {
20942092
fn = fn.exp;
20952093
} else if (fn.name) {

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "AngularJS Batarang",
3-
"version": "0.8.5",
3+
"version": "0.8.6",
44
"description": "Extends the Developer Tools, adding tools for debugging and profiling AngularJS applications.",
55
"devtools_page": "devtoolsBackground.html",
66
"manifest_version": 2,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angularjs-batarang",
3-
"version": "0.8.5",
3+
"version": "0.8.6",
44
"description": "chrome extension for inspecting angular apps",
55
"main": "hint.js",
66
"devDependencies": {

0 commit comments

Comments
 (0)