拖动时将 raphaelJS 对象对齐到 div
嘿,我有一个 Raphael 对象和一个我希望它“捕捉”到的 div。我使用拖动事件来拖动对象,但是如果我释放该对象,则不会向浏览器发送任何内容。有没有办法让它“捕捉”到div?
Hay, i have a Raphael object, and a div which i want it to "snap" to. I'm using the drag event to drag an object around, but if i released the object, nothing is sent to the browser. Is there anyway to make it "snap" to a div?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Raphäel 对象是 SVG,div 是 HTML 元素。您必须将 div 坐标和大小传输到 Raphäel 并在那里处理这些尺寸。它们都有一个 DOM Base,但随后进入不同的领域。就像鱼和鸟一样。
The Raphäel object is SVG and the div is a HTML element. You would have to transfer the divs coordinates and size to Raphäel and work with those dimensions there. They both have a DOM Base but then go off into different realms. Like fishes and birds.