diff --git a/ChartsSpace/TimeMachine.js b/ChartsSpace/TimeMachine.js index 16c1b5cf6..a44a3c01a 100644 --- a/ChartsSpace/TimeMachine.js +++ b/ChartsSpace/TimeMachine.js @@ -578,6 +578,32 @@ function newTimeMachine () { lineDash: [1, 3] } thisObject.container.frame.draw(false, true, false, thisObject.fitFunction, style) + drawLabel() + } + } + + function drawLabel () { + /* Draw Title Above the Container */ + let position = { + x: 0, + y: 0 + } + let imageSize = 25 + let fontSize = 25 + let opacity = 1 + let icon = canvas.designerSpace.iconByUiObjectType.get(thisObject.payload.node.type) + + position = transformThisPoint(position, thisObject.container) + printLabel(thisObject.payload.node.name, position.x + 30, position.y - 10, opacity, fontSize) + + if (icon !== undefined) { + if (icon.canDrawIcon === true) { + browserCanvasContext.drawImage( + icon, position.x - 0, + position.y - 30, + imageSize, + imageSize) + } } } diff --git a/Utilities/RoundedCornersBackground.js b/Utilities/RoundedCornersBackground.js index f534964ca..7ce98884c 100644 --- a/Utilities/RoundedCornersBackground.js +++ b/Utilities/RoundedCornersBackground.js @@ -131,6 +131,7 @@ function drawIcon (icon, xFactor, yFactor, xOffset, yOffset, imageSize, containe } imagePosition = container.frame.frameThisPoint(imagePosition) + browserCanvasContext.drawImage( icon, imagePosition.x, imagePosition.y,