diff --git a/platform/features/timeline/res/templates/timeline.html b/platform/features/timeline/res/templates/timeline.html index 41a1c67a87..fc2e779a36 100644 --- a/platform/features/timeline/res/templates/timeline.html +++ b/platform/features/timeline/res/templates/timeline.html @@ -104,14 +104,14 @@
X Y diff --git a/platform/features/timeline/src/controllers/TimelineZoomController.js b/platform/features/timeline/src/controllers/TimelineZoomController.js index 4c8acd0061..4208a7465c 100644 --- a/platform/features/timeline/src/controllers/TimelineZoomController.js +++ b/platform/features/timeline/src/controllers/TimelineZoomController.js @@ -80,11 +80,13 @@ define( * @returns {number} current zoom level (as the size of a * major tick mark, in pixels) */ - zoom: function (amount) { + zoom: function (amount, bounds) { // Update the zoom level if called with an argument if (arguments.length > 0 && !isNaN(amount)) { + var center = this.toMillis(bounds.x + bounds.width / 2); setZoomLevel(zoomIndex + amount); storeZoom(zoomIndex); + bounds.x = this.toPixels(center) - bounds.width / 2; } return zoomLevels[zoomIndex]; },