Value at Angle Improvement

This commit is contained in:
Luis Fernando Molina committed 2021-06-03 20:59:53 +02:00
1 parent 60fdf78534
commit 8f50c4295b
9 files changed
+40 -30

No files matched your search

@@ -29,6 +29,7 @@ function newUiObject() {
hasWarning: undefined,
hasInfo: undefined,
valueAtAngle: true,
valueAngleOffset: 0,
run: run,
stop: stop,
heartBeat: heartBeat,
@@ -1827,8 +1828,8 @@ function newUiObject() {
x: position.x - getTextWidth(label) / 2,
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))
labelPoint.x = labelPoint.x + radius * 7 / 3 * Math.cos(toRadians(thisObject.payload.angle + thisObject.valueAngleOffset))
labelPoint.y = labelPoint.y + radius * 7 / 3 * Math.sin(toRadians(thisObject.payload.angle + thisObject.valueAngleOffset))
} else {
if (thisObject.isOnFocus === true) {
labelPoint = {