Skip to content

Commit

Permalink
Improve bugfix #7067
Browse files Browse the repository at this point in the history
  • Loading branch information
cosycode authored and TorsteinHonsi committed May 29, 2018
1 parent 75fb1dd commit 2989cdb
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions js/parts/Navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -2164,33 +2164,27 @@ addEvent(Chart, 'update', function (e) {
var newOptions = (e.options.navigator || {}),
options = (this.options.navigator || {});

if (this.navigator ||
this.scroller ||
!newOptions.enabled ||
newOptions.enabled !== true
if (!this.navigator &&
!this.scroller &&
newOptions.enabled === true
) {
return;
merge(true, options, newOptions);
}

merge(true, options, newOptions);

});

// Initiate navigator, if no scrolling exists yet
addEvent(Chart, 'afterUpdate', function (e) {

var newOptions = (e.options.navigator || {});

if (this.navigator ||
this.scroller ||
!newOptions.enabled ||
newOptions.enabled !== true
if (!this.navigator &&
!this.scroller &&
newOptions.enabled === true
) {
return;
this.scroller = this.navigator = new Navigator(this);
}

this.scroller = this.navigator = new Navigator(this);

});

// Pick up badly formatted point options to addPoint
Expand Down

0 comments on commit 2989cdb

Please sign in to comment.