Code cleaning

This commit is contained in:
Luis Fernando Molina committed 2020-01-09 15:01:42 +01:00
1 parent 041f7c90e0
commit 027dea3441
6 files changed
+12 -34

No files matched your search

-1
View File
@@ -128,7 +128,6 @@ function newCanvas () {
/* Spcaces Drawing */
animation.addCallBackFunction('Floating Space Draw', thisObject.floatingSpace.draw)
animation.addCallBackFunction('Chart Space Background', thisObject.chartSpace.drawBackground)
animation.addCallBackFunction('Chart Space Draw', thisObject.chartSpace.draw)
animation.addCallBackFunction('Panels Space', thisObject.panelsSpace.draw)
animation.addCallBackFunction('ViewPort Animate', viewPort.animate)
-18
View File
@@ -371,8 +371,6 @@ function newTimeMachine () {
}
function drawBackground () {
thisBackground()
if (thisObject.container.frame.isInViewPort()) {
for (let i = 0; i < this.timelineCharts.length; i++) {
let chart = this.timelineCharts[i]
@@ -395,22 +393,6 @@ function newTimeMachine () {
}
}
function thisBackground () {
return
let params = {
cornerRadius: 15,
lineWidth: 5,
opacity: 1,
container: thisObject.container,
borderColor: UI_COLOR.RUSTED_RED,
backgroundColor: UI_COLOR.WHITE,
fitFunction: thisObject.fitFunction,
coordinateSystem: timeLineCoordinateSystem
}
roundedCornersBackground(params)
}
function recalculateScale () {
let minValue = {
x: MIN_PLOTABLE_DATE.valueOf(),
+1 -1
View File
@@ -26,7 +26,7 @@ function newRateScale () {
thisObject.container.isWheelable = true
thisObject.container.detectMouseOver = true
thisObject.container.frame.width = 190
thisObject.container.frame.width = 250
thisObject.container.frame.height = 30
let isMouseOver
+1 -1
View File
@@ -39,7 +39,7 @@ function newTimeFrameScale () {
thisObject.container.isWheelable = true
thisObject.container.detectMouseOver = true
thisObject.container.frame.width = 190
thisObject.container.frame.width = 250
thisObject.container.frame.height = 30
}
+1 -1
View File
@@ -25,7 +25,7 @@ function newTimeScale () {
thisObject.container.isWheelable = true
thisObject.container.detectMouseOver = true
thisObject.container.frame.width = 190
thisObject.container.frame.width = 250
thisObject.container.frame.height = 30
let isMouseOver
+9 -12
View File
@@ -23,7 +23,6 @@ function newChartSpace () {
fitIntoVisibleArea: fitIntoVisibleArea,
isThisPointVisible: isThisPointVisible,
physics: physics,
drawBackground: drawBackground,
draw: draw,
getContainer: getContainer, // returns the inner most container that holds the point received by parameter.
initialize: initialize,
@@ -281,9 +280,17 @@ function newChartSpace () {
}
}
function drawBackground () {
function draw () {
if (thisObject.visible !== true) { return }
drawBackground()
for (let i = 0; i < thisObject.timeMachines.length; i++) {
let timeMachine = thisObject.timeMachines[thisObject.timeMachines.length - i - 1]
timeMachine.draw()
}
}
function drawBackground () {
drawSpaceBackground()
for (let i = 0; i < thisObject.timeMachines.length; i++) {
@@ -291,7 +298,6 @@ function newChartSpace () {
timeMachine.drawBackground()
}
}
function drawSpaceBackground () {
let opacity = '1'
let fromPoint = {
@@ -310,13 +316,4 @@ function newChartSpace () {
browserCanvasContext.closePath()
browserCanvasContext.fill()
}
function draw () {
if (thisObject.visible !== true) { return }
for (let i = 0; i < thisObject.timeMachines.length; i++) {
let timeMachine = thisObject.timeMachines[thisObject.timeMachines.length - i - 1]
timeMachine.draw()
}
}
}