File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 82
82
}
83
83
84
84
# infoBox {
85
+ text-align : right;
85
86
z-index : 10 ;
86
87
position : absolute;
87
88
right : 5px ;
93
94
text-shadow : none;
94
95
95
96
font-family : sans-serif;
97
+ font-size : 8pt ;
96
98
}
97
99
98
100
# description table {
@@ -231,7 +233,7 @@ <h1>The Mandelbrot Set</h1>
231
233
</ div >
232
234
233
235
< div id ="infoBox ">
234
- < small > < span id ="infoText "> </ span > </ small >
236
+ < span id ="infoText "> </ span >
235
237
</ div >
236
238
237
239
< script type ="text/javascript " src ="mandelbrot.js ">
Original file line number Diff line number Diff line change @@ -49,6 +49,19 @@ function updateHashTag(samples, iterations)
49
49
'colorScheme=' + scheme ;
50
50
}
51
51
52
+ /*
53
+ * Update small info box in lower right hand side
54
+ */
55
+ function updateInfoBox ( )
56
+ {
57
+ // Update infobox
58
+ $ ( 'infoBox' ) . innerHTML =
59
+ 'x<sub>0</sub>=' + xRange [ 0 ] + ' y<sub>0</sub>=' + yRange [ 0 ] + ' ' +
60
+ 'x<sub>1</sub>=' + xRange [ 1 ] + ' y<sub>1</sub>=' + yRange [ 1 ] + ' ' +
61
+ 'w⨯h=' + canvas . width + 'x' + canvas . height + ' '
62
+ + ( canvas . width * canvas . height / 1000000.0 ) . toFixed ( 1 ) + 'MP' ;
63
+ }
64
+
52
65
/*
53
66
* Parse URL hash tag, returns whether we should redraw.
54
67
*/
@@ -214,11 +227,7 @@ function draw(pickColor, superSamples)
214
227
var Ci_step = ( yRange [ 1 ] - yRange [ 0 ] ) / ( 0.5 + ( canvas . height - 1 ) ) ;
215
228
216
229
updateHashTag ( superSamples , steps ) ;
217
-
218
- // Update infobox
219
- $ ( 'infoBox' ) . innerHTML =
220
- 'x<sub>0</sub>=' + xRange [ 0 ] + ' y<sub>0</sub>=' + yRange [ 0 ] + ' ' +
221
- 'x<sub>1</sub>=' + xRange [ 1 ] + ' y<sub>1</sub>=' + yRange [ 1 ] ;
230
+ updateInfoBox ( ) ;
222
231
223
232
// Only enable one render at a time
224
233
renderId += 1 ;
You can’t perform that action at this time.
0 commit comments