mouseup 이벤트시에 & 노을이 사라집니다. 문제는 사각형을 드래그하면 캔버스에 빛이 계속 나타납니다!오브젝트 드래그 중 광선 문제
는 여기에 명확성을 위해 내 코드입니다 : this
의 범위가 단지 사용할 수 있기 때문에 모든
window.onload = function(){
var paper = new Raphael("holder",500,500);
var myRect = paper.rect(200,200,200,100,10);
myRect.attr({
fill: "#999",
stroke: "#555",
'stroke-width': 5
});
myRect.mousedown(function(){
this.g = myRect.glow();
}
);
myRect.mouseup(function(){
this.g.remove();
});
var start = function(){
this.ox = this.attr('x');
this.oy = this.attr('y');
},
move = function(dx,dy){
var att = {x:this.ox+dx,y:this.ox+dy};
this.attr(att);
},
up = function(){
//
};
myRect.drag(move,start,up);
}
나는 wrt 포지셔닝 버그를 수정 하겠지만 내 버전보다 많이 개선되었지만 네모 난 부분이 이전 위치에 머물러 있다는 것을 알 수 있듯이 & nbsp 우리가 unclick 한 후에 만 사라진다. 나는 그것이 내 사각형과 함께 여행을 좀하고 싶다 ... 어쨌든 고마워 –