@@ -19,12 +19,22 @@ class Topology extends Window{
1919
2020 this . SetupToolbar ( ) ;
2121
22- this . content . style . overflow = "auto" ;
23-
2422 this . startButton = this . AddToolbarButton ( "Start discovery" , "mono/play.svg?light" ) ;
2523 this . stopButton = this . AddToolbarButton ( "Stop" , "mono/stop.svg?light" ) ;
24+ this . stopButton . disabled = true ;
2625 this . AddToolbarSeparator ( ) ;
2726
27+ this . workspace = document . createElement ( "div" ) ;
28+ this . workspace . className = "topology-workspace" ;
29+ this . content . appendChild ( this . workspace ) ;
30+
31+ this . sideBar = document . createElement ( "div" ) ;
32+ this . sideBar . className = "topology-sidebar" ;
33+ this . content . appendChild ( this . sideBar ) ;
34+
35+ this . content . style . overflow = "auto" ;
36+ this . content . style . overflow = "auto" ;
37+
2838 this . content . onmousedown = ( ) => {
2939 if ( this . selected ) {
3040 this . selected . classList . remove ( "topology-selected" ) ;
@@ -72,8 +82,8 @@ class Topology extends Window{
7282 this . CreateDevice ( {
7383 file : device ,
7484 name : ip ,
75- left : 16 + ( count % 10 ) * 96 ,
76- top : 16 + Math . floor ( count / 10 ) * 96
85+ left : 16 + ( count % 10 ) * 112 ,
86+ top : 16 + Math . floor ( count / 10 ) * 112
7787 } ) ;
7888
7989 count ++ ;
@@ -86,10 +96,10 @@ class Topology extends Window{
8696 device . style . left = options . left + "px" ;
8797 device . style . top = options . top + "px" ;
8898 device . setAttribute ( "file" , options . file ) ;
89- this . content . appendChild ( device ) ;
99+ this . workspace . appendChild ( device ) ;
90100
91101 const icon = document . createElement ( "div" ) ;
92- icon . className = "topology-device-icon" ;
102+ icon . className = "topology-device-icon topology-pending " ;
93103 icon . style . maskImage = "url(mono/switch.svg?light)" ;
94104 device . appendChild ( icon ) ;
95105
@@ -256,7 +266,8 @@ class Topology extends Window{
256266 }
257267
258268 Stop ( ) {
259-
269+ this . startButton . disabled = false ;
270+ this . stopButton . disabled = true ;
260271 }
261272
262273}
0 commit comments