bug fixed when drag started

This commit is contained in:
Luis Fernando Molina committed 2020-04-02 12:16:32 +02:00
1 parent 29fe67a466
commit c74e5ef080
3 files changed
+6 -2

No files matched your search

+4
View File
@@ -186,24 +186,28 @@ function newEdgeEditor () {
const STEP = 10
if (event.shiftKey === false && event.ctrlKey === false && event.code === 'ArrowLeft') {
onDragStarted(event)
thisObject.container.frame.position.x = thisObject.container.frame.position.x + STEP
whatHappened = 'left or right arrow key pressed'
return
}
if (event.shiftKey === false && event.ctrlKey === false && event.code === 'ArrowRight') {
onDragStarted(event)
thisObject.container.frame.position.x = thisObject.container.frame.position.x - STEP
whatHappened = 'left or right arrow key pressed'
return
}
if (event.shiftKey === false && event.ctrlKey === false && event.code === 'ArrowUp') {
onDragStarted(event)
thisObject.container.frame.position.y = thisObject.container.frame.position.y + STEP
whatHappened = 'up or down arrow key pressed'
return
}
if (event.shiftKey === false && event.ctrlKey === false && event.code === 'ArrowDown') {
onDragStarted(event)
thisObject.container.frame.position.y = thisObject.container.frame.position.y - STEP
whatHappened = 'up or down arrow key pressed'
return
+1 -1
View File
@@ -1,7 +1,7 @@
function newContainer () {
let thisObject = {
id: Math.trunc(Math.random() * 10000000),
id: newUniqueId(),
type: 'Rectangle',
frame: undefined,
eventHandler: undefined,
+1 -1
View File
@@ -71,7 +71,7 @@ function newPanelsSpace () {
panel.owner = pOwner
thisObject.panels.push(panel)
panel.handle = Math.floor((Math.random() * 10000000) + 1)
panel.handle = newUniqueId()
return panel.handle
}