Switched from object literal accessor definition to regular function, fixes #278

This commit is contained in:
Gion Kunz 2015-05-07 18:21:34 +02:00
parent 2a6f90e647
commit 34d303d576
2 changed files with 5 additions and 5 deletions

View File

@ -44,7 +44,7 @@
// Only re-created the chart if it has been initialized yet
if(!this.initializeTimeoutId) {
this.createChart(this.optionsProvider.currentOptions);
this.createChart(this.optionsProvider.getCurrentOptions());
}
// Return a reference to the chart object to chain up calls
@ -117,7 +117,7 @@
});
// Create the first chart
this.createChart(this.optionsProvider.currentOptions);
this.createChart(this.optionsProvider.getCurrentOptions());
// As chart is initialized from the event loop now we can reset our timeout reference
// This is important if the chart gets initialized on the same element twice

View File

@ -768,10 +768,10 @@ var Chartist = {
updateCurrentOptions(true);
return {
get currentOptions() {
removeMediaQueryListeners: removeMediaQueryListeners,
getCurrentOptions: function getCurrentOptions() {
return Chartist.extend({}, currentOptions);
},
removeMediaQueryListeners: removeMediaQueryListeners
}
};
};