2010-12-18 3 views
9

이벤트 함수에서 사각형의 속성을 얻으려면 어떻게해야합니까? 예를 들어 불투명도 값을 가져와야합니다. ATTR의 라파엘 문서를 확인, 자세한 내용은Raphael js 라이브러리 get 속성 값

j.attr('opacity'); 

:

var j = R.rect(position_x - 40, position_y - 285, 80, 50); 
     j.attr({'fill': '#654','stroke':'none'}); 
     j.rotate(20 * z, position_x, position_y); 
     j.mouseover(function (event) { 
      this.attr({opacity: "0.5"}); 
     }); 

답변