Tyding up Floating Space
This commit is contained in:
1 parent
f668675165
commit
cce96c9a90
5 files changed
+21
-25
No files matched your search
@@ -23,7 +23,8 @@ function newNoteSets () {
|
||||
let thisObject = {
|
||||
createNoteSet: createNoteSet,
|
||||
destroyNoteSet: destroyNoteSet,
|
||||
initialize: initialize
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
let noteSets = []
|
||||
@@ -35,6 +36,11 @@ function newNoteSets () {
|
||||
floatingLayer = pFloatingLayer
|
||||
}
|
||||
|
||||
function finalize () {
|
||||
floatingLayer.finalize()
|
||||
floatingLayer = undefined
|
||||
}
|
||||
|
||||
function createNoteSet (pPayload, pEventHandler, callBackFunction) {
|
||||
try {
|
||||
/*
|
||||
|
||||
@@ -25,20 +25,15 @@ function newProfileBalls () {
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize () {
|
||||
try {
|
||||
if (INFO_LOG === true) { logger.write('[INFO] finalize -> Entering function.') }
|
||||
|
||||
floatingLayer.finalize()
|
||||
} catch (err) {
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] finalize -> err = ' + err.stack) }
|
||||
}
|
||||
}
|
||||
|
||||
function initialize (pFloatingLayer) {
|
||||
floatingLayer = pFloatingLayer
|
||||
}
|
||||
|
||||
function finalize () {
|
||||
floatingLayer.finalize()
|
||||
floatingLayer = undefined
|
||||
}
|
||||
|
||||
function createNewProfileBall (pPayload, callBackFunction) {
|
||||
let floatingObject = newFloatingObject()
|
||||
floatingObject.initialize('Profile Ball', '', floatingLayer, onInitialized)
|
||||
|
||||
@@ -39,7 +39,7 @@ function newStrategyPart () {
|
||||
angle: 60
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
label: 'Delete This Strategy',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/trash.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
@@ -164,7 +164,7 @@ function newStrategyPart () {
|
||||
angle: 20 * 1
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
label: 'Delete This Phase',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/trash.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
@@ -189,7 +189,7 @@ function newStrategyPart () {
|
||||
angle: 60
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
label: 'Delete This Situation',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/trash.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
@@ -214,7 +214,7 @@ function newStrategyPart () {
|
||||
angle: 60
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
label: 'Delete This Condition',
|
||||
visible: false,
|
||||
imagePathOn: 'Images/icons/style-01/trash.png',
|
||||
imagePathOff: 'Images/icons/style-01/target.png',
|
||||
|
||||
@@ -26,6 +26,7 @@ function newStrategyParts () {
|
||||
|
||||
function finalize () {
|
||||
floatingLayer.finalize()
|
||||
floatingLayer = undefined
|
||||
}
|
||||
|
||||
function initialize (pFloatingLayer) {
|
||||
|
||||
+4
-10
@@ -1,7 +1,6 @@
|
||||
|
||||
function newFloatingSpace () {
|
||||
const MODULE_NAME = 'Floating Space'
|
||||
const INFO_LOG = false
|
||||
const ERROR_LOG = true
|
||||
/*
|
||||
The Floating Space is the place where floating elements like floatingObjects, live and are rendered.
|
||||
@@ -20,15 +19,10 @@ function newFloatingSpace () {
|
||||
return thisObject
|
||||
|
||||
function finalize () {
|
||||
try {
|
||||
if (INFO_LOG === true) { logger.write('[INFO] finalize -> Entering function.') }
|
||||
|
||||
thisObject.floatingLayer.finalize()
|
||||
thisObject.profileBalls.finalize()
|
||||
thisObject.strategyParts.finalize()
|
||||
} catch (err) {
|
||||
if (ERROR_LOG === true) { logger.write('[ERROR] finalize -> err = ' + err.stack) }
|
||||
}
|
||||
thisObject.floatingLayer.finalize()
|
||||
thisObject.profileBalls.finalize()
|
||||
thisObject.strategyParts.finalize()
|
||||
thisObject.noteSets.finalize()
|
||||
}
|
||||
|
||||
function initialize (callBackFunction) {
|
||||
|
||||
Reference in new issue
Block a user