version 1.9, 2010/06/18 19:45:08
|
version 1.10, 2011/02/14 16:33:43
|
Line 178 function bestPicSize(elem, inset) {
|
Line 178 function bestPicSize(elem, inset) {
|
inset = 25; |
inset = 25; |
} |
} |
var ws = getWinSize(); |
var ws = getWinSize(); |
|
var wsold = ws.copy(); |
var es = getElementPosition(elem); |
var es = getElementPosition(elem); |
if (es) { |
if (es) { |
|
if ((es.x > ws.width)||(es.y > ws.height)) { |
|
alert("es="+es+" is outside ws="+ws+" fixing..."); |
|
ws.width = ws.width - inset; |
|
ws.height = ws.height - inset; |
|
} else { |
ws.width = ws.width - es.x - inset; |
ws.width = ws.width - es.x - inset; |
ws.height = ws.height - es.y - inset; |
ws.height = ws.height - es.y - inset; |
} |
} |
|
} |
|
alert("ws="+wsold+" es="+es+" -> ws="+ws); |
|
//alert("ws="+ws+"("+typeof(ws)+") es="+es); |
return ws; |
return ws; |
} |
} |
|
|