Я использую rapahel версии 2.0.0, и по какой-то причине изображение не перетаскивается в IE8 (запуск и перемещение срабатывают, но изображение не движется), нет ни исключений, ни ошибок... и я попытался использовать версию 1.5. 2 это работает, но у меня нет методов onDragOver и snapTo, и мне нужны эти 2 метода!!!
У кого-нибудь есть такая же проблема и ее решение???
here is the code:
var start = function () {
this.onDragOver(function(event){
this.animate({"x":Raphael.snapTo(this.attr("x"), event.attr("x")
+3, 1), "y":Raphael.snapTo(this.attr("y"), event.attr("y")+3, 1)},
100);
if(event.data("bin") == 1){this.animate({"opacity": 0.1}, 1000,
function(){this.remove();});}
});
this.ox = this.type == "rect" || this.type == "image" ?
this.attr("x") : this.attr("cx");
this.oy = this.type == "rect" || this.type == "image" ?
this.attr("y") : this.attr("cy");
this.attr({cursor: "move"});
this.toFront();
};
var move = function (dx, dy) {
this.attr(this.type=="rect" || this.type == "image" ?{x: this.ox +
dx, y: this.oy + dy}:{cx: this.ox + dx, cy: this.oy + dy});
};
var end = function () {
//this.animate({"fill-opacity": 1}, 500);
};
var width = 800, height = 450;
var paper = Raphael("canvas", width, height);
var lbl1 = paper.image("img/label.png", 10, 40, 100, 22);
lbl1.drag(move, start, end);
Спасибо!