Skip to content

Commit 0051ab2

Browse files
committed
Fixes #11.
This commit fix the issue of restored dimension after config change.
1 parent 74707b2 commit 0051ab2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/angular-fusioncharts.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,19 @@
5555
'width': {
5656
ifExist: false,
5757
observer: function (newVal) {
58-
chart.resizeTo(scope.width, scope.height);
58+
if (newVal) {
59+
chartConfigObject.width = newVal;
60+
chart.resizeTo(scope.width, scope.height);
61+
}
5962
}
6063
},
6164
'height': {
6265
ifExist: false,
6366
observer: function (newVal) {
64-
chart.resizeTo(scope.width, scope.height);
67+
if (newVal){
68+
chartConfigObject.height = newVal;
69+
chart.resizeTo(scope.width, scope.height);
70+
}
6571
}
6672
},
6773
'chart': {

0 commit comments

Comments
 (0)