From 167f93f8364035e5ea03d25ca8ea8ef5d1a15b8a Mon Sep 17 00:00:00 2001 From: BigEd Date: Mon, 20 Dec 2010 19:30:49 +0000 Subject: [PATCH] feature: URL can define labels and optional boxes --- expertWires.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/expertWires.js b/expertWires.js index f4c8cad..2504761 100644 --- a/expertWires.js +++ b/expertWires.js @@ -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