호버 설정 이벤트에 호버 이벤트를 넣으면 모든 경로에 efect가 적용됩니다. 따라서 경로를 지나갈 때, 전체 경로의 채우기가 동시에 변경되지 않고 단일 경로의 채우기가 변경됩니다.경로 집합에서 Raphael의 호버 이벤트 적용
예를 들어,이지도에서 마우스로 캐나다를 통과하면 본토의 색이 바뀌지 만 모든 얼음 섬은 같은 색으로 유지됩니다.
이것은 내 코드입니다.
drawSets: function(){
for (country in this.setsArr){
var setset= R.set();
var zone = this.setsArr[country];
for (group in zone){
var path = R.path(this.setsArr[country][group].path);
setset.push(
path
);
}
var attri = this.options.attributes;
setset.attr(attri);
var x = this.setsArr[country].translate.x;
var y = this.setsArr[country].translate.y;
setset.translate(x,y);
setset.hover(function(){
this.animate({
fill: '#000'
}, 300);
}, function(){
this.animate({
fill: attributes.fill
}, 300);
});
}
},
저는 Raphaels 애니메이션 방식을 사용하고 있습니다.
이 문제를 어떻게 해결할 수 있습니까? 여기
여기http://www.megaupload.com/?d=GHQ5HATI
그리고
이 하나를 포함하는 또 다른 질문입니다 ... 전체 응용 프로그램의 파일입니다.Can someone clarify Raphael's documentation? (or know a place in which someone already has done it)
우리가 문제를 직접 볼 수 있도록 코드를 피들 (jsfiddle.net)에 넣을 수 있습니까? – amadan
좋아, jsfiddle.net 멋지다,하지만 난 전체 애플 리케이션을 가지고 (물론, 진행중인 작품입니다) http://www.megaupload.com/?d=GHQ5HATI – limoragni