time machine size gets dynamic
This commit is contained in:
1 parent
5a80e7e737
commit
4563d41bcf
3 files changed
+6
-6
No files matched your search
@@ -71,8 +71,8 @@ function newTimeMachine () {
|
||||
thisObject.container.insideViewport = true
|
||||
thisObject.container.detectMouseOver = true
|
||||
|
||||
thisObject.container.frame.width = TIME_MACHINE_WIDTH
|
||||
thisObject.container.frame.height = TIME_MACHINE_HEIGHT
|
||||
thisObject.container.frame.width = browserCanvas.width / TIME_MACHINE_WIDTH
|
||||
thisObject.container.frame.height = (browserCanvas.height - TOP_SPACE_HEIGHT - COCKPIT_SPACE_HEIGHT) / TIME_MACHINE_HEIGHT
|
||||
}
|
||||
|
||||
function finalize () {
|
||||
|
||||
+2
-2
@@ -222,8 +222,8 @@ const PERIOD_01_MIN = "01-min";
|
||||
We define here the size of the chartingSpace. It has to bee enough big in order to accomodate all the charts we expect to display in this space.
|
||||
*/
|
||||
|
||||
const TIME_MACHINE_WIDTH = 250;
|
||||
const TIME_MACHINE_HEIGHT = 120;
|
||||
const TIME_MACHINE_WIDTH = 8;
|
||||
const TIME_MACHINE_HEIGHT = 8;
|
||||
|
||||
let mediaRecorder // to downloadText canvas animation as a mediaRecorder
|
||||
let areWeRecording = false
|
||||
|
||||
@@ -332,8 +332,8 @@ function newChartingSpace () {
|
||||
timeMachine.payload.uiObject.setValue('Loading...')
|
||||
|
||||
/* Setting up the new time machine. */
|
||||
timeMachine.container.frame.position.x = browserCanvas.width / 2 - TIME_MACHINE_WIDTH / 2
|
||||
timeMachine.container.frame.position.y = browserCanvas.height / 2 - TIME_MACHINE_HEIGHT / 2
|
||||
timeMachine.container.frame.position.x = browserCanvas.width / 2 - browserCanvas.width / TIME_MACHINE_WIDTH / 2
|
||||
timeMachine.container.frame.position.y = browserCanvas.height / 2 - (browserCanvas.height - TOP_SPACE_HEIGHT - COCKPIT_SPACE_HEIGHT) / TIME_MACHINE_HEIGHT / 2
|
||||
timeMachine.initialize(onTimeMachineInitialized)
|
||||
|
||||
function onTimeMachineInitialized () {
|
||||
|
||||
Reference in new issue
Block a user