Rigth Scale added
This commit is contained in:
1 parent
fde86df7d4
commit
594e4851d8
4 files changed
+32
-13
No files matched your search
+3
-4
@@ -19,13 +19,10 @@
|
||||
container.isDraggeable = false
|
||||
container.isClickeable = true
|
||||
|
||||
let rigthScale
|
||||
|
||||
return thisObject
|
||||
|
||||
function initialize () {
|
||||
rigthScale = newRigthScale()
|
||||
rigthScale.initialize()
|
||||
|
||||
}
|
||||
|
||||
function getContainer (point) {
|
||||
@@ -47,6 +44,8 @@
|
||||
}
|
||||
|
||||
function draw (container, timeLineCoordinateSystem) {
|
||||
return // not for now
|
||||
|
||||
rightScaleBackground()
|
||||
leftScaleBackground()
|
||||
|
||||
|
||||
@@ -52,6 +52,23 @@
|
||||
}
|
||||
|
||||
function draw () {
|
||||
drawBackground()
|
||||
}
|
||||
|
||||
function drawBackground () {
|
||||
const RIGHT_MARGIN = 50
|
||||
|
||||
/* We will paint some transparent background here. */
|
||||
|
||||
let opacity = '0.95'
|
||||
|
||||
browserCanvasContext.beginPath()
|
||||
|
||||
browserCanvasContext.rect(viewPort.visibleArea.topRight.x, viewPort.visibleArea.topRight.y, RIGHT_MARGIN, viewPort.visibleArea.bottomRight.y - viewPort.visibleArea.topRight.y)
|
||||
browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.WHITE + ', ' + opacity + ')'
|
||||
|
||||
browserCanvasContext.closePath()
|
||||
|
||||
browserCanvasContext.fill()
|
||||
}
|
||||
}
|
||||
+8
-9
@@ -16,19 +16,18 @@ function newTimeScale () {
|
||||
|
||||
const RIGHT_MARGIN = 50
|
||||
|
||||
let container = newContainer()
|
||||
container.initialize(MODULE_NAME)
|
||||
thisObject.container = container
|
||||
thisObject.container = newContainer()
|
||||
thisObject.container.initialize(MODULE_NAME)
|
||||
|
||||
thisObject.container.frame.width = viewPort.visibleArea.bottomRight.x - viewPort.visibleArea.topLeft.x
|
||||
thisObject.container.frame.height = 100
|
||||
|
||||
container.frame.position.x = viewPort.visibleArea.bottomRight.x
|
||||
container.frame.position.y = TOP_SPACE_HEIGHT
|
||||
thisObject.container.frame.position.x = viewPort.visibleArea.bottomRight.x
|
||||
thisObject.container.frame.position.y = TOP_SPACE_HEIGHT
|
||||
|
||||
container.isDraggeable = false
|
||||
container.isClickeable = false
|
||||
container.isWheelable = true
|
||||
thisObject.container.isDraggeable = false
|
||||
thisObject.container.isClickeable = false
|
||||
thisObject.container.isWheelable = true
|
||||
|
||||
return thisObject
|
||||
|
||||
@@ -55,7 +54,7 @@ function newTimeScale () {
|
||||
/* First we check if this point is inside this object UI. */
|
||||
|
||||
if (thisObject.container.frame.isThisPointHere(point, undefined, true) === true) {
|
||||
return this.container
|
||||
return thisObject.container
|
||||
} else {
|
||||
/* This point does not belong to this space. */
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ function newTimeMachine () {
|
||||
const SEPARATION_BETWEEN_TIMELINE_CHARTS = 1.5
|
||||
|
||||
let timeScale
|
||||
let rigthScale
|
||||
|
||||
return thisObject
|
||||
|
||||
@@ -71,6 +72,9 @@ function newTimeMachine () {
|
||||
timeScale = newTimeScale()
|
||||
timeScale.initialize()
|
||||
|
||||
rigthScale = newRigthScale()
|
||||
rigthScale.initialize()
|
||||
|
||||
timeScale.container.eventHandler.listenToEvent('Lenght Percentage Changed', function (event) {
|
||||
thisObject.container.frame.width = TIME_MACHINE_WIDTH * event.lenghtPercentage / 100
|
||||
thisObject.container.eventHandler.raiseEvent('Dimmensions Changed', event)
|
||||
|
||||
Reference in new issue
Block a user