Skip to content

Commit f9ffd11

Browse files
committed
Added build files
1 parent 3dddb1e commit f9ffd11

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

dist/angular-fusioncharts.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,10 @@
198198
return {
199199
scope: scope,
200200
link: function(scope, element, attrs) {
201-
function updateData(key, data) {
202-
if (key) {
203-
scope.datasourceDt.key = data;
204-
chart.setJSONData(scope.datasourceDt);
205-
}
201+
function updateData() {
202+
// no need to check for key. datasourceDt is 2 way binded.
203+
// also scope.datasourceDt.key = data; is logically wrong.
204+
chart.setJSONData(scope.datasourceDt);
206205
}
207206

208207
function createWatchersForAttrs(datasource) {
@@ -212,7 +211,7 @@
212211
scope.$watch(
213212
'datasourceDt.' + key,
214213
function(newData, oldData) {
215-
if (newData !== oldData && isDeep) updateData(key, newData);
214+
if (newData !== oldData && isDeep) updateData();
216215
},
217216
isDeep
218217
);
@@ -747,11 +746,13 @@
747746
scope.$watch(
748747
'datasourceDt.data',
749748
function(newData, oldData) {
750-
if (newData !== oldData) updateData(newData, 'data');
749+
if (newData !== oldData) updateData();
751750
},
752751
false
753752
);
754753
createWatchersForAttrs(scope.datasourceDt);
754+
// set the data anyway, initially.
755+
chart.setJSONData(scope.datasourceDt);
755756
} else if (scope.datasourceDt) {
756757
attrs.datasourceDt = scope.datasourceDt;
757758
chartConfigObject.dataSource = scope.datasourceDt;

dist/angular-fusioncharts.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)