Skip to content

Commit

Permalink
Merge pull request ChartsOrg#2396 from feosuna1/run-view-port-jobs-af…
Browse files Browse the repository at this point in the history
…terwards

Run view port jobs afterwards (Fixes ChartsOrg#2395)
  • Loading branch information
danielgindi authored May 1, 2017
2 parents 0d0de3a + e26c354 commit 238c842
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/Charts/Charts/ChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -912,14 +912,16 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
{
_viewPortHandler.setChartDimens(width: bounds.size.width, height: bounds.size.height)

// This may cause the chart view to mutate properties affecting the view port -- lets do this
// before we try to run any pending jobs on the view port itself
notifyDataSetChanged()

// Finish any pending viewport changes
while (!_viewportJobs.isEmpty)
{
let job = _viewportJobs.remove(at: 0)
job.doJob()
}

notifyDataSetChanged()
}
}
}
Expand Down

0 comments on commit 238c842

Please sign in to comment.