IsExecuting Icon working
This commit is contained in:
1 parent
4fd842263d
commit
18081ba640
3 files changed
+18
-8
No files matched your search
@@ -41,8 +41,6 @@ function newRestartSimulation () {
|
||||
}
|
||||
|
||||
function initialize () {
|
||||
thisObject.container.frame.position.x = thisObject.container.parentContainer.frame.width * 80 / 100
|
||||
thisObject.container.frame.position.y = 6
|
||||
thisObject.container.frame.width = 250
|
||||
thisObject.container.frame.height = COCKPIT_SPACE_HEIGHT - 12
|
||||
|
||||
@@ -170,6 +168,13 @@ function newRestartSimulation () {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
positionPhysics()
|
||||
}
|
||||
|
||||
function positionPhysics () {
|
||||
thisObject.container.frame.position.x = thisObject.container.parentContainer.frame.width - thisObject.container.frame.width * 1.25
|
||||
thisObject.container.frame.position.y = 6
|
||||
}
|
||||
|
||||
function draw () {
|
||||
@@ -256,3 +261,4 @@ function newRestartSimulation () {
|
||||
browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ function newStrategyPart () {
|
||||
|
||||
function iconPhysics () {
|
||||
icon = canvas.strategySpace.iconByPartType.get(thisObject.payload.node.type)
|
||||
executingIcon = canvas.strategySpace.iconByPartType.get('attractive')
|
||||
executingIcon = canvas.strategySpace.iconCollection.get('attractive')
|
||||
}
|
||||
|
||||
function onFocus () {
|
||||
@@ -409,14 +409,17 @@ function newStrategyPart () {
|
||||
}
|
||||
}
|
||||
|
||||
if (thisObject.isExecuting === true) {
|
||||
let a = 1
|
||||
}
|
||||
if (executingIcon !== undefined) {
|
||||
if (icon.canDrawIcon === true) {
|
||||
if (thisObject.isExecuting) {
|
||||
const DISTANCE_FROM_CENTER = 40
|
||||
const EXECUTING_ICON_SIZE = 20
|
||||
if (executingIcon.canDrawIcon === true) {
|
||||
if (thisObject.isExecuting === true) {
|
||||
const DISTANCE_FROM_CENTER = thisObject.container.frame.radius / 3 + 50
|
||||
const EXECUTING_ICON_SIZE = 20 + thisObject.container.frame.radius / 6
|
||||
|
||||
browserCanvasContext.drawImage(
|
||||
icon, position.x - EXECUTING_ICON_SIZE / 2,
|
||||
executingIcon, position.x - EXECUTING_ICON_SIZE / 2,
|
||||
position.y - EXECUTING_ICON_SIZE / 2 - DISTANCE_FROM_CENTER,
|
||||
EXECUTING_ICON_SIZE,
|
||||
EXECUTING_ICON_SIZE)
|
||||
|
||||
@@ -64,6 +64,7 @@ function newStrategySpace () {
|
||||
'analysis-1',
|
||||
'approve',
|
||||
'attach',
|
||||
'attractive',
|
||||
'pyramid',
|
||||
'brainstorming',
|
||||
'broken-link',
|
||||
|
||||
Reference in new issue
Block a user