mirror of
https://github.com/trebonian/visual6502.git
synced 2025-01-05 10:30:07 +00:00
add "find" mechanism to URL
This commit is contained in:
parent
4967b58e7f
commit
fc46e50289
@ -24,6 +24,7 @@ var centerx=300, centery=300;
|
|||||||
var zoom=1;
|
var zoom=1;
|
||||||
var dragMouseX, dragMouseY, moved;
|
var dragMouseX, dragMouseY, moved;
|
||||||
var statbox;
|
var statbox;
|
||||||
|
var findThese;
|
||||||
|
|
||||||
// Some constants for the graphics presentation
|
// Some constants for the graphics presentation
|
||||||
// the canvas is embedded in an 800x600 clipping div
|
// the canvas is embedded in an 800x600 clipping div
|
||||||
@ -113,6 +114,9 @@ function setup_part4(){
|
|||||||
document.getElementById('stop').style.visibility = 'hidden';
|
document.getElementById('stop').style.visibility = 'hidden';
|
||||||
go();
|
go();
|
||||||
}
|
}
|
||||||
|
// perform any user-specified search for nodes or transistors
|
||||||
|
if(chipLayoutIsVisible)
|
||||||
|
hiliteNodeList();
|
||||||
}
|
}
|
||||||
|
|
||||||
function detectOldBrowser(){
|
function detectOldBrowser(){
|
||||||
@ -173,6 +177,10 @@ function setupParams(){
|
|||||||
} else if(name=="zoom" && parseInt(value)!=NaN){
|
} else if(name=="zoom" && parseInt(value)!=NaN){
|
||||||
zoom=parseInt(value);
|
zoom=parseInt(value);
|
||||||
} else
|
} else
|
||||||
|
// perform a search, highlight and zoom to object(s)
|
||||||
|
if(name=="find" && value.length>0){
|
||||||
|
findThese=value;
|
||||||
|
} else
|
||||||
// load a test program: Address, Data and Reset
|
// load a test program: Address, Data and Reset
|
||||||
if(name=="a" && parseInt(value,16)!=NaN){
|
if(name=="a" && parseInt(value,16)!=NaN){
|
||||||
userAddress=parseInt(value,16);
|
userAddress=parseInt(value,16);
|
||||||
@ -440,6 +448,10 @@ function setupChipLayoutGraphics(){
|
|||||||
refresh();
|
refresh();
|
||||||
document.getElementById('waiting').style.display = 'none';
|
document.getElementById('waiting').style.display = 'none';
|
||||||
setStatus('Ready!'); // would prefer chipStatus but it's not idempotent
|
setStatus('Ready!'); // would prefer chipStatus but it's not idempotent
|
||||||
|
// pre-fill the Find box if parameters supplied
|
||||||
|
if(typeof findThese != "undefined")
|
||||||
|
document.getElementById('HighlightThese').value = findThese;
|
||||||
|
// pre-pan and zoom if requested
|
||||||
if(moveHereFirst!=null)
|
if(moveHereFirst!=null)
|
||||||
moveHere(moveHereFirst);
|
moveHere(moveHereFirst);
|
||||||
// grant focus to the chip display to enable zoom keys
|
// grant focus to the chip display to enable zoom keys
|
||||||
|
Loading…
Reference in New Issue
Block a user