Stacking Time Frame Scales
This commit is contained in:
1 parent
d073e7497c
commit
ec521be7c2
2 files changed
+19
-1
No files matched your search
@@ -356,7 +356,7 @@ function newTimelineChart () {
|
||||
function drawChartsBackground () {
|
||||
/* We will paint some transparent background here. */
|
||||
|
||||
let opacity = '0.5'
|
||||
let opacity = '0.1'
|
||||
|
||||
let fromPoint = {
|
||||
x: 0,
|
||||
|
||||
@@ -111,6 +111,24 @@ function newTimeFrameScale () {
|
||||
upCorner = limitingContainer.fitFunction(upCorner, true)
|
||||
bottonCorner = limitingContainer.fitFunction(bottonCorner, true)
|
||||
|
||||
/* We will check if we need to change the bottom because of being one of many scales of the same type */
|
||||
let levelsUp = 0
|
||||
if (thisObject.payload.parentNode === undefined) { return } // This happens when in the process of deleting the scale, timeline chart or time machine.
|
||||
if (thisObject.payload.parentNode.type === 'Timeline Chart') {
|
||||
if (thisObject.payload.parentNode.payload.parentNode.timeFrameScale !== undefined) {
|
||||
levelsUp++
|
||||
}
|
||||
for (let i = 0; i < thisObject.payload.parentNode.payload.parentNode.timelineCharts.length; i++) {
|
||||
let timelineChart = thisObject.payload.parentNode.payload.parentNode.timelineCharts[i]
|
||||
if (thisObject.payload.node.id !== timelineChart.timeFrameScale.id) {
|
||||
levelsUp++
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
bottonCorner.y = bottonCorner.y - thisObject.container.frame.height * levelsUp
|
||||
|
||||
/* Positioning */
|
||||
timePoint = {
|
||||
x: 0,
|
||||
|
||||
Reference in new issue
Block a user