Time Machine Labeling implemented

This commit is contained in:
Luis Fernando Molina committed 2020-02-09 19:46:57 +01:00
1 parent a42bbb25c6
commit 0f0dbe4f0e
2 files changed
+27

No files matched your search

+26
View File
@@ -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)
}
}
}
+1
View File
@@ -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,