Warm up Floating Layer when a workspace is dropped
This commit is contained in:
1 parent
b082a32902
commit
69918eff2b
3 files changed
+17
-4
No files matched your search
@@ -205,6 +205,7 @@ function newWorkspace () {
|
||||
if (droppedNode.type === 'Workspace') {
|
||||
stopAllRunningTasks()
|
||||
functionLibraryNodeDeleter.deleteWorkspace(thisObject.workspaceNode, thisObject.workspaceNode.rootNodes)
|
||||
canvas.floatingSpace.warmUp()
|
||||
thisObject.workspaceNode = droppedNode
|
||||
functionLibraryUiObjectsFromNodes.recreateWorkspace(thisObject.workspaceNode)
|
||||
return
|
||||
|
||||
@@ -18,9 +18,6 @@ function newUiObjectConstructor () {
|
||||
|
||||
function finalize () {
|
||||
floatingLayer = undefined
|
||||
|
||||
payload.uiObject.finalize()
|
||||
payload.uiObject = undefined
|
||||
}
|
||||
|
||||
function initialize (pFloatingLayer) {
|
||||
|
||||
+16
-1
@@ -21,6 +21,7 @@ function newFloatingSpace () {
|
||||
fitIntoVisibleArea: fitIntoVisibleArea,
|
||||
isThisPointVisible: isThisPointVisible,
|
||||
isItFar: isItFar,
|
||||
warmUp: warmUp,
|
||||
makeVisible: makeVisible,
|
||||
makeInvisible: makeInvisible,
|
||||
draw: draw,
|
||||
@@ -50,14 +51,24 @@ function newFloatingSpace () {
|
||||
let warmingUpCounter = 0
|
||||
|
||||
const PERCENTAGE_OF_SCREEN_FOR_DISPLACEMENT = 25
|
||||
let eventSubscriptionId
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize () {
|
||||
thisObject.container.eventHandler.stopListening(eventSubscriptionId)
|
||||
|
||||
thisObject.floatingLayer.finalize()
|
||||
thisObject.profileBalls.finalize()
|
||||
thisObject.uiObjectConstructor.finalize()
|
||||
thisObject.noteSets.finalize()
|
||||
thisObject.container.finalize()
|
||||
|
||||
thisObject.floatingLayer = undefined
|
||||
thisObject.profileBalls = undefined
|
||||
thisObject.uiObjectConstructor = undefined
|
||||
thisObject.noteSets = undefined
|
||||
thisObject.container = undefined
|
||||
}
|
||||
|
||||
function initialize (callBackFunction) {
|
||||
@@ -73,7 +84,11 @@ function newFloatingSpace () {
|
||||
thisObject.uiObjectConstructor = newUiObjectConstructor()
|
||||
thisObject.uiObjectConstructor.initialize(thisObject.floatingLayer)
|
||||
|
||||
thisObject.container.eventHandler.listenToEvent('onMouseWheel', onMouseWheel)
|
||||
eventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseWheel', onMouseWheel)
|
||||
}
|
||||
|
||||
function warmUp () {
|
||||
warmingUpCounter = 0
|
||||
}
|
||||
|
||||
function isItFar (payload, dontCheckParent) {
|
||||
|
||||
Reference in new issue
Block a user