mirror of
https://github.com/trebonian/visual6502.git
synced 2025-01-27 18:34:29 +00:00
feature: URL can define labels and optional boxes
This commit is contained in:
parent
c88e0749cf
commit
167f93f836
@ -25,6 +25,7 @@ var zoom=1;
|
|||||||
var dragMouseX, dragMouseY, moved;
|
var dragMouseX, dragMouseY, moved;
|
||||||
var statbox;
|
var statbox;
|
||||||
var findThese;
|
var findThese;
|
||||||
|
var labelThese=[];
|
||||||
|
|
||||||
// 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
|
||||||
@ -178,6 +179,10 @@ function setupParams(){
|
|||||||
if(name=="find" && value.length>0){
|
if(name=="find" && value.length>0){
|
||||||
findThese=value;
|
findThese=value;
|
||||||
} else
|
} 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
|
// 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);
|
||||||
@ -555,6 +560,11 @@ function setupChipLayoutGraphics(){
|
|||||||
// pre-pan and zoom if requested (will override any zoom-to-fit by hiliteNodeList)
|
// pre-pan and zoom if requested (will override any zoom-to-fit by hiliteNodeList)
|
||||||
if(moveHereFirst!=null)
|
if(moveHereFirst!=null)
|
||||||
moveHere(moveHereFirst);
|
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
|
// grant focus to the chip display to enable zoom keys
|
||||||
chipsurround.focus();
|
chipsurround.focus();
|
||||||
chipsurround.onmousedown = function(e){mouseDown(e);};
|
chipsurround.onmousedown = function(e){mouseDown(e);};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user