[dev]add link to current pan+zoom

This commit is contained in:
BigEd 2010-10-01 16:56:14 +00:00
parent f3375f4c4b
commit 0b1af8d70e
2 changed files with 11 additions and 1 deletions

View File

@ -95,7 +95,12 @@ Enter your own program into the array of RAM
<form>
<input type="button" value="Hide Chip Layout" onclick="updateChipLayoutVisibility(false)" />
<input type="button" value="Clear Highlighting" onclick="clearHighlight()" />
Animate during simulation: <input type="checkbox" id="animateModeCheckbox" onchange="updateChipLayoutAnimation(this.checked)" />
<span style="border:thin solid;padding:2px;border-color:gray">
Animate during simulation:
<input type="checkbox" id="animateModeCheckbox" onchange="updateChipLayoutAnimation(this.checked)"
/></span>
&nbsp;
<a href="" style="padding:2px;" id="linkHere" >Link to this location</a>
</form>
</div>
<div id="expertControlPanel" style="display:none">

View File

@ -340,6 +340,7 @@ function recenter(){
top: top+'px',
left: left+'px',
});
document.getElementById('linkHere').href=location.pathname+"?"+whereAmIAsQuery();
}
function handleClick(e){
@ -440,6 +441,10 @@ function setupChipLayoutGraphics(){
}
// utility function to save graphics pan and zoom
function whereAmIAsQuery(){
var w=whereAmI();
return "panx="+w[0]+"&pany="+w[1]+"&zoom="+w[2]
}
function whereAmI(){
return [centerx, centery, zoom];
}