Bug fixed

This commit is contained in:
Luis Fernando Molina committed 2020-02-12 19:15:04 +01:00
1 parent 1cef961f24
commit 2fc39c76e8
7 files changed
+48 -36

No files matched your search

+31 -22
View File
@@ -884,36 +884,45 @@ function newCanvas () {
y: dragVector.upY - dragVector.downY
}
if (viewPortBeingDragged) {
canvas.chartSpace.viewport.displace(displaceVector)
}
canvas.chartSpace.viewport.displace(displaceVector)
}
if (containerDragStarted) {
if (containerBeingDragged !== undefined) {
let downCopy = {
x: dragVector.downX,
y: dragVector.downY
}
if (containerBeingDragged.space === 'Charting Space') {
let downCopy = {
x: dragVector.downX,
y: dragVector.downY
}
let downNoZoom
downNoZoom = canvas.chartSpace.viewport.unTransformThisPoint(downCopy)
let downNoZoom
downNoZoom = canvas.chartSpace.viewport.unTransformThisPoint(downCopy)
let upCopy = {
x: dragVector.upX,
y: dragVector.upY
}
let upCopy = {
x: dragVector.upX,
y: dragVector.upY
}
let upNoZoom
upNoZoom = canvas.chartSpace.viewport.unTransformThisPoint(upCopy)
let upNoZoom
upNoZoom = canvas.chartSpace.viewport.unTransformThisPoint(upCopy)
displaceVector = {
x: upNoZoom.x - downNoZoom.x,
y: upNoZoom.y - downNoZoom.y
}
displaceVector = {
x: upNoZoom.x - downNoZoom.x,
y: upNoZoom.y - downNoZoom.y
}
let moveSucceed = containerBeingDragged.displace(displaceVector)
if (moveSucceed === false) {
deactivateDragging(event)
let moveSucceed = containerBeingDragged.displace(displaceVector)
if (moveSucceed === false) {
deactivateDragging(event)
}
} else {
let displaceVector = {
x: dragVector.upX - dragVector.downX,
y: dragVector.upY - dragVector.downY
}
let moveSucceed = containerBeingDragged.displace(displaceVector)
if (moveSucceed === false) {
deactivateDragging(event)
}
}
}
}
+5 -1
View File
@@ -142,9 +142,13 @@ function newChartSpace () {
}
}
}
if (containerFound !== undefined) { return containerFound }
if (containerFound !== undefined) {
containerFound.space = 'Charting Space'
return containerFound
}
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
thisObject.container.space = 'Charting Space'
return thisObject.container
} else {
return undefined
+1
View File
@@ -173,6 +173,7 @@
// if (container !== undefined) { return container }
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
thisObject.container.space = 'Cockpit Space'
return thisObject.container
} else {
return undefined
+4 -1
View File
@@ -280,7 +280,10 @@ function newDesignerSpace () {
if (thisObject.sidePanel !== undefined) {
container = thisObject.sidePanel.getContainer(point)
if (container !== undefined) { return container }
if (container !== undefined) {
container.space = 'Designer Space'
return container
}
}
return
+5 -1
View File
@@ -237,9 +237,13 @@ function newFloatingSpace () {
let container
container = thisObject.floatingLayer.getContainer(point)
if (container !== undefined) { return container }
if (container !== undefined) {
container.space = 'Floating Space'
return container
}
if (visible === true) {
thisObject.container.space = 'Floating Space'
return thisObject.container
}
}
+2
View File
@@ -343,9 +343,11 @@ function newPanelsSpace () {
}
}
if (container !== undefined) {
container.space = 'Panels Space'
return container
}
}
thisObject.container.space = 'Panels Space'
return thisObject.container
}
}
-11
View File
@@ -50,18 +50,7 @@ function newTopSpace () {
}
function getContainer (point) {
let container
return
container = thisObject.currentEvent.getContainer(point)
if (container !== undefined) { return container }
container = thisObject.login.getContainer(point)
if (container !== undefined) { return container }
/* The point does not belong to any inner container, so we return the current container. */
return thisObject.container
}
function draw () {