Fix Shift Click which broke in performance improvement changes

This commit is contained in:
Barry Silverman 2010-12-19 10:37:51 -05:00
parent c04f37a3df
commit 4f7930eef3
2 changed files with 8 additions and 2 deletions

View File

@ -384,7 +384,10 @@ function handleClick(e){
}
// we have a node, but maybe we clicked over a transistor
var nodelist=[w];
if(e.shiftKey) nodelist=getNodeGroup(w);
if(e.shiftKey) {
getNodeGroup(w);
nodelist = group;
}
// match the coordinate against transistor gate bounding boxes
x=cx-400;
y=grChipSize-cy;

View File

@ -169,7 +169,10 @@ function handleClick(e){
var x = localx(hilite, e.clientX)/zoom;
var y = localy(hilite, e.clientY)/zoom;
var w = findNodeNumber(x,y);
if(e.shiftKey) hiliteNode(getNodeGroup(w));
if(e.shiftKey) {
getNodeGroup(w);
hiliteNode(group);
}
else {var a=new Array(); a.push(w); hiliteNode(a);}
var cx = Math.round(x*grChipSize/600);
var cy = Math.round(y*grChipSize/600);