All: fix zoomToBox to make use of grChipOffsetX/Y (tested on all chips)
This commit is contained in:
parent
a4ed7a9178
commit
8e799d6922
4
wires.js
4
wires.js
|
@ -204,8 +204,8 @@ function ctxDrawBox(ctx, xMin, yMin, xMax, yMax){
|
||||||
function zoomToBox(xmin,xmax,ymin,ymax){
|
function zoomToBox(xmin,xmax,ymin,ymax){
|
||||||
var xmid=(xmin+xmax)/2;
|
var xmid=(xmin+xmax)/2;
|
||||||
var ymid=(ymin+ymax)/2;
|
var ymid=(ymin+ymax)/2;
|
||||||
var x=(xmid+400)/grChipSize*600;
|
var x=(xmid+grChipOffsetX)/grChipSize*600;
|
||||||
var y=600-ymid/grChipSize*600;
|
var y=600-(ymid-grChipOffsetY)/grChipSize*600;
|
||||||
var zoom=5; // pending a more careful calculation
|
var zoom=5; // pending a more careful calculation
|
||||||
moveHere([x,y,zoom]);
|
moveHere([x,y,zoom]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue