Timemachine Background
This commit is contained in:
1 parent
39d9cfe716
commit
2488756d15
3 files changed
+30
-28
No files matched your search
@@ -468,6 +468,7 @@ function newTimeMachine () {
|
||||
}
|
||||
|
||||
function drawBackground () {
|
||||
drawChartsBackground()
|
||||
if (thisObject.container.frame.isInViewPort()) {
|
||||
for (let i = 0; i < thisObject.timelineCharts.length; i++) {
|
||||
let timelineChart = thisObject.timelineCharts[thisObject.timelineCharts.length - i - 1]
|
||||
@@ -476,6 +477,10 @@ function newTimeMachine () {
|
||||
}
|
||||
}
|
||||
|
||||
function drawChartsBackground () {
|
||||
drawContainerBackground(thisObject.container, UI_COLOR.WHITE, 0.5, thisObject.fitFunction)
|
||||
}
|
||||
|
||||
function draw () {
|
||||
if (thisObject.container.frame.isInViewPort()) {
|
||||
for (let i = 0; i < thisObject.timelineCharts.length; i++) {
|
||||
|
||||
@@ -417,34 +417,7 @@ function newTimelineChart () {
|
||||
}
|
||||
|
||||
function drawChartsBackground () {
|
||||
/* We will paint some transparent background here. */
|
||||
|
||||
let opacity = '0.0'
|
||||
|
||||
let fromPoint = {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
|
||||
let toPoint = {
|
||||
x: thisObject.container.frame.width,
|
||||
y: thisObject.container.frame.height
|
||||
}
|
||||
|
||||
fromPoint = transformThisPoint(fromPoint, thisObject.container)
|
||||
toPoint = transformThisPoint(toPoint, thisObject.container)
|
||||
|
||||
fromPoint = thisObject.fitFunction(fromPoint)
|
||||
toPoint = thisObject.fitFunction(toPoint)
|
||||
|
||||
browserCanvasContext.beginPath()
|
||||
|
||||
browserCanvasContext.rect(fromPoint.x, fromPoint.y, toPoint.x - fromPoint.x, toPoint.y - fromPoint.y)
|
||||
browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.WHITE + ', ' + opacity + ')'
|
||||
|
||||
browserCanvasContext.closePath()
|
||||
|
||||
browserCanvasContext.fill()
|
||||
drawContainerBackground(thisObject.container, UI_COLOR.WHITE, 0, thisObject.fitFunction)
|
||||
}
|
||||
|
||||
function recalculateCoordinateSystem () {
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
function drawContainerBackground (container, color, opacity, fitFunction) {
|
||||
let fromPoint = {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
|
||||
let toPoint = {
|
||||
x: container.frame.width,
|
||||
y: container.frame.height
|
||||
}
|
||||
|
||||
fromPoint = transformThisPoint(fromPoint, container)
|
||||
toPoint = transformThisPoint(toPoint, container)
|
||||
|
||||
fromPoint = fitFunction(fromPoint)
|
||||
toPoint = fitFunction(toPoint)
|
||||
|
||||
browserCanvasContext.beginPath()
|
||||
browserCanvasContext.rect(fromPoint.x, fromPoint.y, toPoint.x - fromPoint.x, toPoint.y - fromPoint.y)
|
||||
browserCanvasContext.fillStyle = 'rgba(' + color + ', ' + opacity + ')'
|
||||
browserCanvasContext.closePath()
|
||||
browserCanvasContext.fill()
|
||||
}
|
||||
|
||||
function savePropertyAtNodeConfig (payload, propertyName, value) {
|
||||
try {
|
||||
let code = JSON.parse(payload.node.code)
|
||||
|
||||
Reference in new issue
Block a user