git-svn-id: http://xe-core.googlecode.com/svn/trunk@988 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-04-06 03:48:39 +00:00
parent aeb1d32bf2
commit 7b5e44ea20
14 changed files with 368 additions and 25 deletions

View file

@ -20,7 +20,7 @@ else if(navigator.vendor!='KDE' && document.all && xUA.indexOf('msie')!=-1){
xIE6=xUA.indexOf('msie 6')!=-1;
}
else if(document.layers){xNN4=true;}
xMac=xUA.indexOf('mac')!=-1;
var xMac=xUA.indexOf('mac')!=-1;
// (element, event(without 'on'), event listener(function name)[, caption])
function xAddEventListener(e,eT,eL,cap)
@ -313,7 +313,7 @@ function xHeight(e,h)
}
}
h-=(pt+pb+bt+bb);
if(isNaN(h)||h<0) return;
if(isNaN(h)||h<0) return null;
else e.style.height=h+'px';
}
h=e.offsetHeight;
@ -325,9 +325,10 @@ function xHeight(e,h)
return h;
}
function xHex(n, digits, prefix)
function xHex(sn, digits, prefix)
{
var p = '', n = Math.ceil(n);
var p = '';
var n = Math.ceil(sn);
if (prefix) p = prefix;
n = n.toString(16);
for (var i=0; i < digits - n.length; ++i) {
@ -449,18 +450,6 @@ function xParent(e, bNode)
return p;
}
function xParentChain(e,delim,bNode)
{
if (!(e=xGetElementById(e))) return;
var lim=100, s = "", d = delim || "\n";
while(e) {
s += xName(e) + ', ofsL:'+e.offsetLeft + ', ofsT:'+e.offsetTop + d;
e = xParent(e,bNode);
if (!lim--) break;
}
return s;
}
function xPreventDefault(e)
{
if (e && e.preventDefault) e.preventDefault()
@ -602,7 +591,7 @@ function xWidth(e,w)
}
}
w-=(pl+pr+bl+br);
if(isNaN(w)||w<0) return;
if(isNaN(w)||w<0) return null;
else e.style.width=w+'px';
}
w=e.offsetWidth;