diff --git a/ChartUtilities.js b/ChartUtilities.js index 6a2c91389..e7d29bd8a 100644 --- a/ChartUtilities.js +++ b/ChartUtilities.js @@ -139,4 +139,5 @@ function recalculatePeriod (zoomLevel) { if (zoomLevel <= -28) { return ONE_DAY_IN_MILISECONDS } + return ONE_DAY_IN_MILISECONDS } diff --git a/Globals.js b/Globals.js index 5bed76f40..30c706c36 100644 --- a/Globals.js +++ b/Globals.js @@ -35,7 +35,7 @@ UI_FONT = { SECONDARY: "Source Code Pro" }; -FONT_ASPECT_RATIO = 0.55; +FONT_ASPECT_RATIO = 0.45; const MIN_ZOOM_LEVEL = -28.25 const GET_CONTAINER_PURPOSE = { diff --git a/Scales/TimeScale.js b/Scales/TimeScale.js index aad7e229b..d994e99bc 100644 --- a/Scales/TimeScale.js +++ b/Scales/TimeScale.js @@ -14,7 +14,7 @@ function newTimeScale () { lenghtPercentage: undefined } - const LENGHT_PERCENTAGE_DEFAULT_VALUE = 50 + const LENGHT_PERCENTAGE_DEFAULT_VALUE = 5 const STEP_SIZE = 5 const MIN_HEIGHT = 50 diff --git a/TimelineChart.js b/TimelineChart.js index c34ff1916..bc42bb917 100644 --- a/TimelineChart.js +++ b/TimelineChart.js @@ -118,7 +118,7 @@ breakpointsBar = newBreakpointsBar() breakpointsBar.initialize(thisObject.container, timeLineCoordinateSystem) - moveToUserPosition(thisObject.container, timeLineCoordinateSystem, undefined, undefined, undefined, true) + // moveToUserPosition(thisObject.container, timeLineCoordinateSystem, undefined, undefined, undefined, true) timePeriod = INITIAL_TIME_PERIOD datetime = NEW_SESSION_INITIAL_DATE diff --git a/ViewPort.js b/ViewPort.js index 92dc7ac63..70d4aeae1 100644 --- a/ViewPort.js +++ b/ViewPort.js @@ -420,8 +420,15 @@ function newViewPort () { objectStorage = JSON.parse(objectStorageString) offset = objectStorage.offset thisObject.zoomLevel = objectStorage.zoomLevel - + thisObject.zoomTargetLevel = objectStorage.zoomLevel INITIAL_TIME_PERIOD = recalculatePeriod(thisObject.zoomLevel) + } else { // Setting default values for first session + offset = { + x: 0, + y: 0 + } + thisObject.zoomLevel = MIN_ZOOM_LEVEL + thisObject.zoomTargetLevel = MIN_ZOOM_LEVEL } } }