Values
This commit is contained in:
1 parent
ead6abde79
commit
5fc32f9afd
2 files changed
+13
-15
No files matched your search
@@ -68,6 +68,7 @@ function newCircularProgressBar() {
|
||||
if (thisObject.payload.uiObject === undefined) { return }
|
||||
opacityCounters[message.event.seconds] = 2000
|
||||
if (message.event.processingDate !== undefined) {
|
||||
thisObject.payload.uiObject.valueAtAngle = false
|
||||
thisObject.payload.uiObject.setValue(message.event.processingDate, 2000)
|
||||
}
|
||||
if (message.event.percentage !== undefined) {
|
||||
|
||||
+12
-15
@@ -26,6 +26,7 @@ function newUiObject() {
|
||||
hasError: undefined,
|
||||
hasWarning: undefined,
|
||||
hasInfo: undefined,
|
||||
valueAtAngle: true,
|
||||
run: run,
|
||||
stop: stop,
|
||||
heartBeat: heartBeat,
|
||||
@@ -1658,21 +1659,17 @@ function newUiObject() {
|
||||
fontSize = fontSize * 2 / 3
|
||||
}
|
||||
|
||||
labelPoint = {
|
||||
x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 10,
|
||||
y: position.y
|
||||
}
|
||||
|
||||
/* We will try to put this value according to the angle to the parent node*/
|
||||
if (thisObject.payload !== undefined) {
|
||||
if (thisObject.payload.angle !== undefined) {
|
||||
labelPoint.x = labelPoint.x + radius * 7 / 3 * Math.cos(toRadians(thisObject.payload.angle))
|
||||
labelPoint.y = labelPoint.y + radius * 7 / 3 * Math.sin(toRadians(thisObject.payload.angle))
|
||||
} else {
|
||||
labelPoint = {
|
||||
x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 10,
|
||||
y: position.y + radius * 7 / 5 + fontSize * FONT_ASPECT_RATIO + 15
|
||||
}
|
||||
if (thisObject.valueAtAngle === true && thisObject.payload.angle !== undefined) {
|
||||
labelPoint = {
|
||||
x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 10,
|
||||
y: position.y
|
||||
}
|
||||
labelPoint.x = labelPoint.x + radius * 7 / 3 * Math.cos(toRadians(thisObject.payload.angle))
|
||||
labelPoint.y = labelPoint.y + radius * 7 / 3 * Math.sin(toRadians(thisObject.payload.angle))
|
||||
} else {
|
||||
labelPoint = {
|
||||
x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 10,
|
||||
y: position.y + radius * 7 / 5 + fontSize * FONT_ASPECT_RATIO + 15
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user