map working
This commit is contained in:
1 parent
842f7296f8
commit
38e9e83317
2 files changed
+8
-1
No files matched your search
@@ -1505,6 +1505,12 @@ function newUiObject () {
|
||||
let totalImageSize = additionalImageSize + thisObject.payload.floatingObject.currentImageSize
|
||||
if (canvas.floatingSpace.inMapMode === true) {
|
||||
totalImageSize = canvas.floatingSpace.transformImagesizeToMap(totalImageSize)
|
||||
let nodeDefinition = APP_SCHEMA_MAP.get(thisObject.payload.node.type)
|
||||
if (nodeDefinition !== undefined) {
|
||||
if (nodeDefinition.isHierarchyHead !== true) {
|
||||
totalImageSize = totalImageSize / 4
|
||||
}
|
||||
}
|
||||
}
|
||||
browserCanvasContext.drawImage(
|
||||
icon, position.x - totalImageSize / 2,
|
||||
|
||||
@@ -99,7 +99,7 @@ function newFloatingSpace () {
|
||||
}
|
||||
|
||||
function transformImagesizeToMap (imageSize) {
|
||||
const IMAGE_REDUCTION_FACTOR = 5
|
||||
const IMAGE_REDUCTION_FACTOR = 3
|
||||
return imageSize / IMAGE_REDUCTION_FACTOR
|
||||
}
|
||||
|
||||
@@ -126,6 +126,7 @@ function newFloatingSpace () {
|
||||
function isItFar (payload, dontCheckParent) {
|
||||
/* If for any reason the paylaod is undefined we return false */
|
||||
if (payload === undefined) { return false }
|
||||
if (thisObject.inMapMode === true) { return false }
|
||||
|
||||
let radarFactor = 2 // How big is the margin
|
||||
|
||||
|
||||
Reference in new issue
Block a user