0
我剛開始接觸拉斐爾JS,我有點堅持在這裏:http://jsfiddle.net/wC9hX/50/禁用文本鼠標懸停在拉斐爾JS
我不想讓鼠標懸停事件是文本標籤上活動,因爲它是造成文字消失/隨機出現。這個問題已經被問到,建議的解決方案是使用集合。
我嘗試過使用集合,但它不能解決我的問題。請幫助我!謝謝!
這是我正在創建的集:
var group = paper.set();
group.push(chevron);
group.push(text);
group.push(description);
這是mouseout
功能:
group.mouseout(function() {
description.animate({
opacity: 0
}, 250, 'linear');
chevron.animate({
path: "M 5 250 l 200 25 l 200 -25 l 0 50 l -200 25 l -200 -25 z",
fill: '#000'
}, 500, 'linear');
text.animate({
fill: '#fff'
}, 500, 'linear');
});