diff --git a/editor.js b/editor.js index dd49c24..2c8a129 100644 --- a/editor.js +++ b/editor.js @@ -221,18 +221,20 @@ function removeState(state) { * @returns The colour the given node should have. */ function getNodeColour(node) { + var standard = selectedActor.value === 'All Actors' || highlightedSources.includes(node.id) || highlightedTargets.includes(node.id) + var alpha = standard ? 'ff' : '55'; if (node.stateData && node.stateData.final !== 'False' && node.stateData.final !== '') { if (node.stateData.final === 'True' || node.stateData.final === 'ok') { - return selection === node ? '#a4eb34' : '#7fad36'; + return (selection === node ? '#a4eb34' : '#7fad36') + alpha; } else if (node.stateData.final === 'not-ok') { - return selection === node ? '#f77474' : '#f25050'; + return (selection === node ? '#f77474' : '#f25050') + alpha; } else { //console.log(node.stateData.final); } } else if (node.name === '@@INIT') { - return selection === node ? '#e8cd84' : '#d1ad4b'; + return (selection === node ? '#e8cd84' : '#d1ad4b') + alpha; } else { - return selection === node ? '#5fbad9' : '#4496b3'; + return (selection === node ? '#5fbad9' : '#4496b3') + alpha; } }