m
This commit is contained in:
1 parent
38b443e9e9
commit
1a4d84b088
2 files changed
+14
-1
No files matched your search
@@ -256,6 +256,10 @@ function newCanvas () {
|
||||
canvas.floatingSpace.exitMapMode()
|
||||
}
|
||||
|
||||
if (event.key === 'M' || event.key === 'm') {
|
||||
canvas.floatingSpace.toggleMapMode()
|
||||
}
|
||||
|
||||
let nodeOnFocus = canvas.designSpace.workspace.getNodeThatIsOnFocus()
|
||||
if (nodeOnFocus !== undefined) {
|
||||
if (nodeOnFocus.payload.uiObject.codeEditor !== undefined) {
|
||||
|
||||
+10
-1
@@ -12,6 +12,7 @@ function newFloatingSpace () {
|
||||
uiObjectConstructor: undefined,
|
||||
container: undefined,
|
||||
inMapMode: false,
|
||||
toggleMapMode: toggleMapMode,
|
||||
exitMapMode: exitMapMode,
|
||||
transformPointToMap: transformPointToMap,
|
||||
transformRadiusToMap: transformRadiusToMap,
|
||||
@@ -114,13 +115,21 @@ function newFloatingSpace () {
|
||||
doubleClickCounter = 0
|
||||
}
|
||||
|
||||
function toggleMapMode () {
|
||||
if (thisObject.inMapMode === false) {
|
||||
thisObject.inMapMode = true
|
||||
} else {
|
||||
exitMapMode()
|
||||
}
|
||||
}
|
||||
|
||||
function onDragStarted (event) {
|
||||
if (thisObject.inMapMode === false) {
|
||||
if (doubleClickCounter > 0) {
|
||||
onDoubleClick()
|
||||
return
|
||||
} else {
|
||||
doubleClickCounter = 10
|
||||
doubleClickCounter = 8
|
||||
}
|
||||
} else {
|
||||
thisObject.container.frame.position.x = -event.x / browserCanvas.width * SPACE_SIZE + browserCanvas.width / 2
|
||||
|
||||
Reference in new issue
Block a user