This commit is contained in:
Luis Fernando Molina committed 2019-12-01 13:17:32 +01:00
1 parent bd36806930
commit 8e0a47bf0a
3 files changed
+47 -9

No files matched your search

+21 -6
View File
@@ -216,22 +216,37 @@ function newCanvas () {
}
}
if (event.altKey === true && event.code === 'ArrowUp') {
if (event.shiftKey === true && event.altKey === true && event.ctrlKey === true && event.code === 'ArrowUp') {
thisObject.cockpitSpace.toTop()
return
}
if (event.altKey === true && event.code === 'ArrowDown') {
if (event.shiftKey === true && event.altKey === true && event.ctrlKey && event.code === 'ArrowDown') {
thisObject.cockpitSpace.toBottom()
return
}
if (event.shiftKey === true && event.code === 'ArrowLeft') {
if (event.shiftKey === true && event.altKey === true && event.ctrlKey && event.code === 'ArrowLeft' || event.altKey === true && event.code === 'ArrowRight') {
thisObject.cockpitSpace.toMiddle()
return
}
if (event.shiftKey === true && event.ctrlKey && event.code === 'ArrowUp') {
thisObject.cockpitSpace.moveUp()
return
}
if (event.shiftKey === true && event.ctrlKey && event.code === 'ArrowDown') {
thisObject.cockpitSpace.moveDown()
return
}
if (event.shiftKey === true && event.ctrlKey === false && event.code === 'ArrowLeft') {
canvas.chartSpace.oneScreenLeft()
return
}
if (event.shiftKey === true && event.code === 'ArrowRight') {
if (event.shiftKey === true && event.ctrlKey === false && event.code === 'ArrowRight') {
canvas.chartSpace.oneScreenRight()
return
}
@@ -246,7 +261,7 @@ function newCanvas () {
return
}
if ((event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowLeft') {
if ((event.ctrlKey === true || event.metaKey === true) && event.shiftKey === false && event.code === 'ArrowLeft') {
let displaceVector = canvas.floatingSpace.oneScreenLeft()
dragVector.downX = dragVector.downX + displaceVector.x
dragVector.downY = dragVector.downY + displaceVector.y
@@ -254,7 +269,7 @@ function newCanvas () {
return
}
if ((event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowRight') {
if ((event.ctrlKey === true || event.metaKey === true) && event.shiftKey === false && event.code === 'ArrowRight') {
let displaceVector = canvas.floatingSpace.oneScreenRight()
dragVector.downX = dragVector.downX + displaceVector.x
dragVector.downY = dragVector.downY + displaceVector.y
+5 -3
View File
@@ -160,9 +160,11 @@ function newWorkspace () {
let taskManager = networkNode.taskManagers[i]
for (k = 0; k < taskManager.tasks.length; k++) {
let task = taskManager.tasks[k]
if (task.bot.type === 'Trading Bot Instance') {
if (task.bot.payload.floatingObject.isCollapsed !== true) {
tradingBotInstances.push(task.bot)
if (task.bot !== undefined) {
if (task.bot.type === 'Trading Bot Instance') {
if (task.bot.payload.floatingObject.isCollapsed !== true) {
tradingBotInstances.push(task.bot)
}
}
}
}
+21
View File
@@ -9,6 +9,9 @@
fullscreen: undefined,
toTop: toTop,
toBottom: toBottom,
toMiddle: toMiddle,
moveUp: moveUp,
moveDown: moveDown,
draw: draw,
physics: physics,
getContainer: getContainer,
@@ -87,6 +90,24 @@
thisObject.container.frame.position.y = browserCanvas.height - COCKPIT_SPACE_HEIGHT
}
function toMiddle () {
thisObject.container.frame.position.y = browserCanvas.height / 2 - COCKPIT_SPACE_HEIGHT
}
function moveUp () {
thisObject.container.frame.position.y = thisObject.container.frame.position.y - browserCanvas.height / 10
if (thisObject.container.frame.position.y < 0) {
thisObject.container.frame.position.y = 0
}
}
function moveDown () {
thisObject.container.frame.position.y = thisObject.container.frame.position.y + browserCanvas.height / 10
if (thisObject.container.frame.position.y > browserCanvas.height - COCKPIT_SPACE_HEIGHT) {
thisObject.container.frame.position.y = browserCanvas.height - COCKPIT_SPACE_HEIGHT
}
}
function physics () {
thisObjectPhysics()
childrenPhysics()