Scale boxes working again

This commit is contained in:
Luis Fernando Molina committed 2020-02-11 13:53:55 +01:00
1 parent 606e578b51
commit 41685949d7
2 files changed
+15 -8

No files matched your search

+7 -6
View File
@@ -20,7 +20,7 @@ function newEdgeEditor () {
thisObject.container.isDraggeable = true
thisObject.container.isClickeable = false
thisObject.container.isWheelable = false
thisObject.container.detectMouseOver = true
thisObject.container.detectMouseOver = false // The mouse over event will be detected by the Time Machine, and this container will get it because is connected to its parent.
let buttonUsedForDragging
let isMouseOver
@@ -69,7 +69,7 @@ function newEdgeEditor () {
}
}
function getContainer (event) {
function getContainer (event, purpose) {
if (thisObject.container.frame.isThisPointHere(event, undefined, undefined, -EDGE_SIZE) === true && event.shiftKey !== true) {
console.log('isThisPointHere ', true)
@@ -100,11 +100,12 @@ function newEdgeEditor () {
}
whereIsMouseOver = 'center'
return thisObject.container
} else {
isMouseOver = false
whereIsMouseOver = 'outside'
if (thisObject.container.isForThisPurpose(purpose) === true) {
return thisObject.container
}
}
isMouseOver = false
whereIsMouseOver = 'outside'
}
function physics () {
+8 -2
View File
@@ -153,7 +153,7 @@ function newTimeMachine () {
thisObject.edgeEditor = newEdgeEditor()
thisObject.edgeEditor.initialize()
thisObject.edgeEditor.container.connectToParent(thisObject.container, true, true, false, true)
thisObject.edgeEditor.container.connectToParent(thisObject.container, true, true, false, true, true, true)
callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE)
}
@@ -313,9 +313,15 @@ function newTimeMachine () {
}
}
container = thisObject.edgeEditor.getContainer(point)
container = thisObject.edgeEditor.getContainer(point, purpose)
if (container !== undefined) {
return container
} else {
if (thisObject.container.isForThisPurpose(purpose) === true) {
if (thisObject.container.frame.isThisPointHere(point) === true) {
return thisObject.container
}
}
}
}