src/js/utils.js
branchpopcorn-port
changeset 358 430c1a7a09de
parent 354 002c314cabbf
child 362 0b1bf06c28ed
equal deleted inserted replaced
357:6edf399cfa26 358:430c1a7a09de
    81     }
    81     }
    82 
    82 
    83     return count;
    83     return count;
    84 };
    84 };
    85 
    85 
       
    86 // conversion de couleur Decimal vers HexaDecimal || 000 si fff
       
    87 IriSP.DEC_HEXA_COLOR = function (dec) {
       
    88 	 var hexa='0123456789ABCDEF',hex='';
       
    89 	 var tmp;
       
    90 	 while (dec>15){
       
    91 		  tmp = dec-(Math.floor(dec/16))*16;
       
    92 		  hex = hexa.charAt(tmp)+hex;
       
    93 		  dec = Math.floor(dec/16);
       
    94 	 }
       
    95 	 hex = hexa.charAt(dec)+hex;
       
    96 	 if (hex == "FFCC00"){ hex="";/* by default color of Ldt annotation */ }
       
    97 	 return(hex);
       
    98 };
       
    99 
    86 /* for ie compatibility
   100 /* for ie compatibility
    87 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {
   101 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {
    88    Object.defineProperty=function(obj,prop,desc) {
   102    Object.defineProperty=function(obj,prop,desc) {
    89       if ("get" in desc) obj.__defineGetter__(prop,desc.get);
   103       if ("get" in desc) obj.__defineGetter__(prop,desc.get);
    90       if ("set" in desc) obj.__defineSetter__(prop,desc.set);
   104       if ("set" in desc) obj.__defineSetter__(prop,desc.set);