Added space for unassigned pods when there are no master nodes

This commit is contained in:
Matthew Casperson
2019-01-08 07:40:36 +10:00
parent 5a1fa0f1c4
commit b7d1522ea1

View File

@@ -29,10 +29,11 @@ export default class Cluster extends PIXI.Graphics {
const left = 10
const top = 20
const padding = 5
const initialMasterHeight = 15
let masterX = left
let masterY = top
let masterWidth = 0
let masterHeight = 0
let masterHeight = initialMasterHeight
let workerX = left
let workerY = top
let workerWidth = 0
@@ -50,7 +51,7 @@ export default class Cluster extends PIXI.Graphics {
masterY += nodeBox.height + padding
masterHeight += nodeBox.height + padding
}
if (masterHeight == 0) {
if (masterHeight == initialMasterHeight) {
masterHeight = nodeBox.height + padding
}
nodeBox.x = masterX