improvement no ring
This commit is contained in:
1 parent
9cf9eab2a6
commit
c88b79cff5
2 files changed
+8
-3
No files matched your search
@@ -25,6 +25,8 @@ function newCircularProgressBar () {
|
||||
|
||||
let eventSubscriptionIdHeartbeat
|
||||
|
||||
let needToDrawRing = true
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize () {
|
||||
@@ -62,6 +64,7 @@ function newCircularProgressBar () {
|
||||
thisObject.payload.uiObject.setPercentage(message.event.percentage, 2000)
|
||||
}
|
||||
if (message.event.status !== undefined) {
|
||||
needToDrawRing = false
|
||||
thisObject.payload.uiObject.setStatus(message.event.status, 200000)
|
||||
}
|
||||
|
||||
@@ -95,6 +98,8 @@ function newCircularProgressBar () {
|
||||
|
||||
function drawBackground (pFloatingObject) {
|
||||
if (canvas.floatingSpace.inMapMode === true) { return }
|
||||
if (needToDrawRing !== true) { return }
|
||||
|
||||
const VISIBLE_RADIUS = thisObject.container.frame.radius * 2
|
||||
|
||||
let visiblePosition = {
|
||||
|
||||
@@ -751,7 +751,7 @@ function newUiObject () {
|
||||
thisObject.circularProgressBar.fitFunction = thisObject.fitFunction
|
||||
thisObject.circularProgressBar.container = thisObject.container
|
||||
|
||||
/* We will wait to hear the first onHeartBeat in order to confirm the execution was really started */
|
||||
/* We will wait to hear the Running event in order to confirm the execution was really started */
|
||||
let key = thisObject.payload.node.name + '-' + thisObject.payload.node.type + '-' + thisObject.payload.node.id
|
||||
systemEventHandler.listenToEvent(key, 'Running', undefined, 'UiObject', onResponse, onRunning)
|
||||
|
||||
@@ -1371,7 +1371,7 @@ function newUiObject () {
|
||||
position = canvas.floatingSpace.transformPointToMap(position)
|
||||
}
|
||||
|
||||
let radius = thisObject.container.frame.radius * 1.4
|
||||
let radius = thisObject.container.frame.radius * 0.9
|
||||
/* Label Text */
|
||||
let labelPoint
|
||||
let fontSize = thisObject.payload.floatingObject.currentFontSize * 6 / 4 / 2
|
||||
@@ -1389,7 +1389,7 @@ function newUiObject () {
|
||||
|
||||
labelPoint = {
|
||||
x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 10,
|
||||
y: position.y - radius * 7 / 5 + fontSize * FONT_ASPECT_RATIO + 15
|
||||
y: position.y + radius * 7 / 5 + fontSize * FONT_ASPECT_RATIO + 15
|
||||
}
|
||||
|
||||
browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY
|
||||
|
||||
Reference in new issue
Block a user