@@ -10,14 +10,19 @@ window.addEventListener("DOMContentLoaded", () => {
10
10
var elements = document . getElementsByClassName ( "documentableElement" )
11
11
if ( elements ) {
12
12
for ( i = 0 ; i < elements . length ; i ++ ) {
13
- elements [ i ] . onclick = function ( e ) {
14
- if ( ! $ ( e . target ) . is ( "a" ) && e . fromSnippet !== true )
13
+ elements [ i ] . onclick = function ( e ) {
14
+ if ( ! $ ( e . target ) . is ( "a" ) && e . fromSnippet !== true )
15
15
this . classList . toggle ( "expand" )
16
16
}
17
17
}
18
18
}
19
19
20
- $ ( ".side-menu span" ) . on ( 'click' , function ( ) {
20
+ $ ( ".icon-button.hamburger" ) . on ( 'click' , function ( ) {
21
+ $ ( "#hamburger-dropdown" ) . toggleClass ( "expanded" )
22
+ $ ( this ) . toggleClass ( "selected" )
23
+ } ) ;
24
+
25
+ $ ( ".side-menu span" ) . on ( 'click' , function ( ) {
21
26
$ ( this ) . parent ( ) . toggleClass ( "expanded" )
22
27
} ) ;
23
28
@@ -39,7 +44,7 @@ window.addEventListener("DOMContentLoaded", () => {
39
44
40
45
document . querySelectorAll ( ".side-menu a" ) . forEach ( elem => elem . addEventListener ( 'click' , e => e . stopPropagation ( ) ) )
41
46
42
- $ ( '.names .tab' ) . on ( 'click' , function ( ) {
47
+ $ ( '.names .tab' ) . on ( 'click' , function ( ) {
43
48
parent = $ ( this ) . parents ( ".tabs" ) . first ( )
44
49
shown = $ ( this ) . hasClass ( 'selected' )
45
50
single = parent . hasClass ( "single" )
@@ -51,7 +56,7 @@ window.addEventListener("DOMContentLoaded", () => {
51
56
if ( ! shown ) { myTab . addClass ( 'selected' ) }
52
57
if ( shown && ! single ) myTab . removeClass ( 'selected' )
53
58
54
- if ( ! shown && $ ( this ) . filter ( ".showGraph" ) . length > 0 ) {
59
+ if ( ! shown && $ ( this ) . filter ( ".showGraph" ) . length > 0 ) {
55
60
showGraph ( )
56
61
$ ( this ) . find ( ".showGraph" ) . removeClass ( "showGraph" )
57
62
}
@@ -71,7 +76,7 @@ window.addEventListener("DOMContentLoaded", () => {
71
76
72
77
var logo = document . getElementById ( "logo" ) ;
73
78
if ( logo ) {
74
- logo . onclick = function ( ) {
79
+ logo . onclick = function ( ) {
75
80
window . location = pathToRoot ; // global variable pathToRoot is created by the html renderer
76
81
} ;
77
82
}
@@ -136,7 +141,7 @@ var transform;
136
141
function showGraph ( ) {
137
142
if ( $ ( "svg#graph" ) . children ( ) . length == 0 ) {
138
143
var dotNode = document . querySelector ( "#dot" )
139
- if ( dotNode ) {
144
+ if ( dotNode ) {
140
145
var svg = d3 . select ( "#graph" ) ;
141
146
var radialGradient = svg . append ( "defs" ) . append ( "radialGradient" ) . attr ( "id" , "Gradient" ) ;
142
147
radialGradient . append ( "stop" ) . attr ( "stop-color" , "var(--aureole)" ) . attr ( "offset" , "20%" ) ;
@@ -146,7 +151,7 @@ function showGraph() {
146
151
147
152
// Set up zoom support
148
153
zoom = d3 . zoom ( )
149
- . on ( "zoom" , function ( { transform} ) {
154
+ . on ( "zoom" , function ( { transform } ) {
150
155
inner . attr ( "transform" , transform ) ;
151
156
} ) ;
152
157
svg . call ( zoom ) ;
@@ -168,7 +173,7 @@ function showGraph() {
168
173
} ) ;
169
174
g . setParent ( "node0" , "node0Cluster" ) ;
170
175
171
- g . edges ( ) . forEach ( function ( v ) {
176
+ g . edges ( ) . forEach ( function ( v ) {
172
177
g . setEdge ( v , {
173
178
arrowhead : "vee"
174
179
} ) ;
@@ -179,11 +184,11 @@ function showGraph() {
179
184
var bounds = svg . node ( ) . getBBox ( ) ;
180
185
var parent = svg . node ( ) . parentElement ;
181
186
var fullWidth = parent . clientWidth || parent . parentNode . clientWidth ,
182
- fullHeight = parent . clientHeight || parent . parentNode . clientHeight ;
187
+ fullHeight = parent . clientHeight || parent . parentNode . clientHeight ;
183
188
var width = bounds . width ,
184
- height = bounds . height ;
189
+ height = bounds . height ;
185
190
var midX = bounds . x + width / 2 ,
186
- midY = bounds . y + height / 2 ;
191
+ midY = bounds . y + height / 2 ;
187
192
if ( width == 0 || height == 0 ) return ; // nothing to fit
188
193
var scale = Math . min ( fullWidth / width , fullHeight / height ) * 0.99 ; // 0.99 to make a little padding
189
194
var translate = [ fullWidth / 2 - scale * midX , fullHeight / 2 - scale * midY ] ;
0 commit comments