feature: URL can define labels and optional boxes

This commit is contained in:
BigEd 2010-12-20 19:30:49 +00:00
parent c88e0749cf
commit 167f93f836
1 changed files with 10 additions and 0 deletions

View File

@ -25,6 +25,7 @@ var zoom=1;
var dragMouseX, dragMouseY, moved;
var statbox;
var findThese;
var labelThese=[];
// Some constants for the graphics presentation
// the canvas is embedded in an 800x600 clipping div
@ -178,6 +179,10 @@ function setupParams(){
if(name=="find" && value.length>0){
findThese=value;
} else
// affix label with optional box to highlight an area of interest
if(name=="label" && value.length>0){
labelThese.push(value.split(","));
} else
// load a test program: Address, Data and Reset
if(name=="a" && parseInt(value,16)!=NaN){
userAddress=parseInt(value,16);
@ -555,6 +560,11 @@ function setupChipLayoutGraphics(){
// pre-pan and zoom if requested (will override any zoom-to-fit by hiliteNodeList)
if(moveHereFirst!=null)
moveHere(moveHereFirst);
// draw any URL-requested labels and boxes
if(labelThese.length>0) {
for(var i=0;i<labelThese.length;i+=1)
flashBoxLabel(labelThese[i]);
}
// grant focus to the chip display to enable zoom keys
chipsurround.focus();
chipsurround.onmousedown = function(e){mouseDown(e);};