Performance Improvement on Charts

This commit is contained in:
Luis Fernando Molina committed 2020-03-14 15:51:43 +01:00
1 parent 61f41f396a
commit 868bad300c
14 files changed
+36 -38

No files matched your search

+4 -9
View File
@@ -61,11 +61,11 @@ function newAnimation () {
try {
if (window.canvasApp.visible === true) {
/* We set the canvas to its normal width and height */
browserCanvas.width = window.innerWidth
browserCanvas.height = window.innerHeight - CURRENT_TOP_MARGIN
// browserCanvas.width = window.innerWidth
// browserCanvas.height = window.innerHeight - CURRENT_TOP_MARGIN
/* First thing is to clear the actual canvas */
// clearBrowserCanvas()
clearBrowserCanvas()
/* We loop through the callback functions collections and execute them all. */
let performanceMap = new Map()
@@ -162,12 +162,7 @@ function newAnimation () {
}
function clearBrowserCanvas () {
browserCanvasContext.beginPath()
browserCanvasContext.rect(0, 0, browserCanvas.width, browserCanvas.height)
browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.WHITE + ', 1)'
browserCanvasContext.closePath()
browserCanvasContext.fill()
browserCanvasContext.clearRect(0, 0, browserCanvas.width, browserCanvas.height)
}
}