Time Machine Labeling implemented
This commit is contained in:
1 parent
a42bbb25c6
commit
0f0dbe4f0e
2 files changed
+27
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user