【问题标题】:Raphael.js 2.0.0 drag&drop image in IE8 not working(vml)IE8 中的 Raphael.js 2.0.0 拖放图像不起作用(vml)
【发布时间】:2011-11-02 00:21:46
【问题描述】:

我使用的是 rapahel 版本 2.0.0,由于某种原因,图像是 没有在 IE8 中被拖动(启动和移动被触发但图像不是 移动)没有例外也没有错误...... 我尝试使用 1.5.2 它可以工作,但我没有 onDragOver 和 snapTo 方法,我需要这两种方法!!!

有没有人有同样的问题和解决方法???

代码如下:

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);

谢谢!

【问题讨论】:

  • 已修复,只需获取 raphael.js v2beta 的新副本...Dmitry 已更新!

标签: svg raphael vml


【解决方案1】:

已修复,只需获取 raphael.js v2beta 的新副本...Dmitry 已更新! https://github.com/DmitryBaranovskiy/raphael/tree/2.0

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-03
    • 1970-01-01
    • 2015-08-07
    • 1970-01-01
    相关资源
    最近更新 更多