mirror of
https://github.com/trebonian/visual6502.git
synced 2024-12-22 12:29:20 +00:00
[dev]add link to current pan+zoom
This commit is contained in:
parent
f3375f4c4b
commit
0b1af8d70e
@ -95,7 +95,12 @@ Enter your own program into the array of RAM
|
|||||||
<form>
|
<form>
|
||||||
<input type="button" value="Hide Chip Layout" onclick="updateChipLayoutVisibility(false)" />
|
<input type="button" value="Hide Chip Layout" onclick="updateChipLayoutVisibility(false)" />
|
||||||
<input type="button" value="Clear Highlighting" onclick="clearHighlight()" />
|
<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>
|
||||||
|
|
||||||
|
<a href="" style="padding:2px;" id="linkHere" >Link to this location</a>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div id="expertControlPanel" style="display:none">
|
<div id="expertControlPanel" style="display:none">
|
||||||
|
5
wires.js
5
wires.js
@ -340,6 +340,7 @@ function recenter(){
|
|||||||
top: top+'px',
|
top: top+'px',
|
||||||
left: left+'px',
|
left: left+'px',
|
||||||
});
|
});
|
||||||
|
document.getElementById('linkHere').href=location.pathname+"?"+whereAmIAsQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleClick(e){
|
function handleClick(e){
|
||||||
@ -440,6 +441,10 @@ function setupChipLayoutGraphics(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// utility function to save graphics pan and zoom
|
// 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(){
|
function whereAmI(){
|
||||||
return [centerx, centery, zoom];
|
return [centerx, centery, zoom];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user