committed by
Henning Jacobs
parent
b069d61ef7
commit
dcf1fcc2d4
@@ -498,7 +498,7 @@ export default class App {
|
||||
const status = this.clusterStatuses.get(cluster.id)
|
||||
let clusterBox = clusterComponentById[cluster.id]
|
||||
if (!clusterBox) {
|
||||
clusterBox = new Cluster(cluster, status, this.tooltip)
|
||||
clusterBox = new Cluster(cluster, status, this.tooltip, this.config)
|
||||
this.viewContainer.addChild(clusterBox)
|
||||
} else {
|
||||
clusterBox.cluster = cluster
|
||||
|
||||
@@ -4,11 +4,12 @@ import App from './app.js'
|
||||
const PIXI = require('pixi.js')
|
||||
|
||||
export default class Cluster extends PIXI.Graphics {
|
||||
constructor (cluster, status, tooltip) {
|
||||
constructor (cluster, status, tooltip, config) {
|
||||
super()
|
||||
this.cluster = cluster
|
||||
this.status = status
|
||||
this.tooltip = tooltip
|
||||
this.config = config
|
||||
}
|
||||
|
||||
destroy() {
|
||||
@@ -84,7 +85,7 @@ export default class Cluster extends PIXI.Graphics {
|
||||
Math.floor(this.podsPerRowMaster * App.current.sizeOfPodPx + App.current.heightOfTopHandlePx + (App.current.sizeOfPodPx * 2) + 2)
|
||||
)
|
||||
|
||||
const maxWidth = window.innerWidth - (this.heightOfWorkerNodePx * 1.2)
|
||||
const maxWidth = (window.innerWidth * (1/this.config.initialScale)) - (this.heightOfWorkerNodePx * 1.2)
|
||||
|
||||
for (const nodeName of Object.keys(this.cluster.nodes).sort()) {
|
||||
const node = this.cluster.nodes[nodeName]
|
||||
|
||||
Reference in New Issue
Block a user