Panels Dissapearing when zoomout
This commit is contained in:
1 parent
9e52d4bec3
commit
e8c54b17fb
3 files changed
+9
-5
No files matched your search
@@ -391,7 +391,7 @@ function newTimeMachine () {
|
||||
}
|
||||
|
||||
function panelPhysics () {
|
||||
if (thisObject.container.frame.isInViewPort()) {
|
||||
if (thisObject.container.frame.isInViewPort() && canvas.chartSpace.viewport.zoomTargetLevel > 10) {
|
||||
canvas.panelsSpace.makeVisible(thisObject.payload.node.id, 'Layers Panel')
|
||||
} else {
|
||||
canvas.panelsSpace.makeInvisible(thisObject.payload.node.id, 'Layers Panel')
|
||||
|
||||
@@ -213,7 +213,7 @@ function newViewport () {
|
||||
} else {
|
||||
newEvent.type = 'Zoom Out'
|
||||
}
|
||||
|
||||
console.log(thisObject.zoomTargetLevel)
|
||||
thisObject.eventHandler.raiseEvent('Zoom Changed', newEvent)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ function newPanelsSpace () {
|
||||
if (thisObject.panels !== undefined) {
|
||||
for (let i = 0; i < thisObject.panels.length; i++) {
|
||||
let panel = thisObject.panels[i]
|
||||
|
||||
if (panel.isVisible === false) { continue }
|
||||
/* setting the speed of the panel */
|
||||
if (panel.container.speed === undefined) {
|
||||
panel.container.speed = {
|
||||
@@ -319,7 +319,9 @@ function newPanelsSpace () {
|
||||
let panel = thisObject.panels[i]
|
||||
let owner = canvas.chartSpace.inViewport.get(panel.owner)
|
||||
if (owner !== undefined) {
|
||||
panel.draw()
|
||||
if (panel.isVisible === true) {
|
||||
panel.draw()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,7 +338,9 @@ function newPanelsSpace () {
|
||||
let panel = thisObject.panels[i]
|
||||
let owner = canvas.chartSpace.inViewport.get(panel.owner)
|
||||
if (owner !== undefined) {
|
||||
container = panel.getContainer(point)
|
||||
if (panel.isVisible === true) {
|
||||
container = panel.getContainer(point)
|
||||
}
|
||||
}
|
||||
if (container !== undefined) {
|
||||
return container
|
||||
|
||||
Reference in new issue
Block a user