Loading Workspace Working

This commit is contained in:
Luis Fernando Molina committed 2020-05-14 16:34:08 +02:00
1 parent 599e48062f
commit 6fbb82272e
3 files changed
+36 -6

No files matched your search

+5 -1
View File
@@ -19,6 +19,7 @@ function newListItem () {
thisObject.container.isDraggeable = false
thisObject.container.isWheelable = false
thisObject.container.detectMouseOver = true
thisObject.container.isClickeable = true
thisObject.container.frame.width = SIDE_PANEL_WIDTH * 0.75
thisObject.container.frame.height = SIDE_PANEL_WIDTH * 0.75
@@ -27,6 +28,7 @@ function newListItem () {
let onMouseOverEventSubscriptionId
let onMouseNotOverEventSubscriptionId
let onMouseClickEventSubscriptionId
let isMouseOver = false
return thisObject
@@ -34,6 +36,7 @@ function newListItem () {
function finalize () {
thisObject.container.eventHandler.stopListening(onMouseOverEventSubscriptionId)
thisObject.container.eventHandler.stopListening(onMouseNotOverEventSubscriptionId)
thisObject.container.eventHandler.stopListening(onMouseClickEventSubscriptionId)
thisObject.container.finalize()
thisObject.container = undefined
@@ -46,6 +49,7 @@ function newListItem () {
onMouseOverEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseOver', onMouseOver)
onMouseNotOverEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseNotOver', onMouseNotOver)
onMouseClickEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseClick', onMouseClick)
}
function getContainer (point) {
@@ -63,7 +67,7 @@ function newListItem () {
}
function onMouseClick (event) {
canvas.designSpace.workspace.replaceWorkspaceByLoadingOne(name)
}
function physics () {