comparison web/views/top.tpl @ 249:c490de0cf17e

scaled zooming works
author Matt Johnston <matt@ucc.asn.au>
date Wed, 27 May 2015 22:37:43 +0800
parents a19496c95be5
children 141948a400a6
comparison
equal deleted inserted replaced
248:317a1738f15c 249:c490de0cf17e
12 12
13 span.codelink { 13 span.codelink {
14 font-size: 70%; 14 font-size: 70%;
15 text-align: right; 15 text-align: right;
16 } 16 }
17
18 #mainimage {
19 width: 100%;
20 max-width: {{graphwidth}}px;
21 }
17 //--> 22 //-->
18 </style> 23 </style>
19 <title></title> 24 <title></title>
20 </head> 25 </head>
26 <script type="text/javascript">
27 function updatewidth() {
28 var width_input = document.getElementById("scaledwidth");
29 width_input.value = document.getElementById("mainimage").clientWidth;
30 }
31
32 </script>
21 <body> 33 <body>
22 <form action="" method="get"> 34 <form action="" method="get">
23 <span class="no_selection"><input type="image" style="width: 100%; max-width: {{graphwidth}}px" src="{{graphdata}}"/></span> 35 <span class="no_selection"><input type="image" id="mainimage" src="{{graphdata}}" onclick="updatewidth();"/></span>
24 <input type="hidden" name="length" value="{{length}}"/> 36 <input type="hidden" name="length" value="{{length}}"/>
25 <input type="hidden" name="end" value="{{end}}"/> 37 <input type="hidden" name="end" value="{{end}}"/>
26 <input type="hidden" name="zoom" value="yeah"/> 38 <input type="hidden" name="zoom" value="yeah"/>
39 <input type="hidden" name="scaledwidth" id="scaledwidth" value="-1"/>
27 </form> 40 </form>
28 <span class="codelink">Click to zoom in, click the left axis to zoom out. <a href="https://secure.ucc.asn.au/hg/templog/file/tip">Source code</a> for the Raspberry Pi controller and this web interface</a>. <a href="set">Adjustments</a> by phone.</span> 41 <span class="codelink">Click to zoom in, click the left axis to zoom out. <a href="https://secure.ucc.asn.au/hg/templog/file/tip">Source code</a> for the Raspberry Pi controller and this web interface</a>. <a href="set">Adjustments</a> by phone.</span>
29 </body> 42 </body>
30 </html> 43 </html>