alakim / grains

Automatically exported from code.google.com/p/grains
0 stars 0 forks source link

Ошибка в модул dwin #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
В модуле DWin.js вот в этой функции 
некорректный код:

            setopacity:function(targetobject, value){
                        if (!targetobject){ return; }
                        if (targetobject.filters && 
targetobject.filters[0]){
                                   if (typeof 
targetobject.filters[0].opacity=="number"){

targetobject.filters[0].opacity=value*100;
                                   }else{

targetobject.style.filter="alpha(opacity="+value*100+")";
                          }
                        }else if (typeof targetobject.style.MozOpacity!= 
’undefined’){
                                   targetobject.style.MozOpacity=value;
                        }else if (typeof targetobject.style.opacity!= 
’undefined’){
                                   targetobject.style.opacity=value;
                        }
            },

Должно быть так:

            setopacity:function(targetobject, value){
                        if (!targetobject){ return; }
                        if (typeof targetobject.style.filter!=’undefined’){

targetobject.style.filter="alpha(opacity="+value*100+")";
                        }else if (typeof targetobject.style.MozOpacity!= 
’undefined’){
                                   targetobject.style.MozOpacity=value;
                        }else if (typeof targetobject.style.opacity!= 
’undefined’){
                                   targetobject.style.opacity=value;
                        }
            },

Original issue reported on code.google.com by alva...@gmail.com on 5 Jun 2009 at 6:25

GoogleCodeExporter commented 9 years ago

Original comment by alva...@gmail.com on 5 Jun 2009 at 6:26

GoogleCodeExporter commented 9 years ago
Похоже, это было в какой-то старой версии. 
Сейчас это уже исправлено, и код 
соответствует тому, что здесь написано.

Original comment by alva...@gmail.com on 5 Jun 2009 at 7:59