Raphel image drag 拖动
来源:互联网 发布:企业数据防泄密体系 编辑:程序博客网 时间:2024/06/06 00:13
而你要拖动的可能是矩形和image,他的坐标不是cx cy 所以要把cx cy改成xy
window.onload = function () {
var R = Raphael(document.getElementById('canvas_container'),"1000", "1000");
// r = R.circle(100, 100, 50).attr({fill: "hsb(0, 1, 1)", stroke: "none", opacity: .5}),
//g = R.circle(210, 100, 50).attr({fill: "hsb(.3, 1, 1)", stroke: "none", opacity: .5}),
//b = R.circle(320, 100, 50).attr({fill: "hsb(.6, 1, 1)", stroke: "none", opacity: .5}),
//p = R.circle(430, 100, 50).attr({fill: "hsb(.8, 1, 1)", stroke: "none", opacity: .5});
var cc=R.image("host1.png",30,40,120,120).attr({
stroke: "none",
opacity: .5,
cursor:"pointer"
});
start = function () {
this.ox = this.attr("x");
this.oy = this.attr("y");
this.animate({r: 70, opacity: .25}, 500, ">");
},
move = function (dx, dy) {
this.attr({x: this.ox + dx, y: this.oy + dy});
},
up = function () {
this.animate({r: 50, opacity: .5}, 500, ">");
};
//R.image("host1.png", 800, 170, 72, 72).drag(move, start, up);
R.set(cc).drag(move, start, up);
};
- Raphel image drag 拖动
- 层拖动Drag Div
- C# 拖动 Drag
- Disable Firefox Image Drag
- web拖动Drag&Drop原理
- [前端] H5 drag drop 拖动
- Drag Validation - 拖动验证-解锁
- 即时方式测试拖动文件Drag
- web拖动Drag&Drop原理
- easyUI 拖动(Drag)和放置(Drop)Tree
- (jquery.drag) jquery拖动插件?方法
- 文件拖动Drag & Drop 全解析
- Android Launcher3(二) -- Drag拖动实现
- Drag---长按控件进行拖动
- Drag-and-Drop Image Vector——拖拽Image Vector
- 利用Dojo实现拖动(Drag and Drop)效果
- 文件拖动Drag & Drop 全解析
- 利用Dojo实现拖动(Drag and Drop)效果
- 相关开发ios所需的小知识
- LeetCode :: Pow(x, n)
- Ant打包
- Camera.ScreenToWorldPoint
- 自己写的一个伪ajax图片上传实现代码
- Raphel image drag 拖动
- Android中共享全局变量
- Struts2入门二-参数和类型转换
- 让组件悬浮所有页面之上
- JAVA调用小票打印机
- 学习Ant编译脚本
- tomcat设置debug调试方式
- java基础知识——继承
- MPlayer从模式说明