拖放的最佳轻量级解决方案是什么?

What are the best light-weight solutions for Drag and Drop?(拖放的最佳轻量级解决方案是什么?)
本文介绍了拖放的最佳轻量级解决方案是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我非常喜欢并使用 jQuery,但我希望为特殊项目找到替代解决方案.

I love and use jQuery quite a lot, but I am hoping to find an alternate solution for a special project.

我正在创建一个书签,它将与我的应用程序交互,以允许用户更快地输入信息.目前我的应用程序中最大的痛苦之一是上传图像.用户(可以理解)讨厌以有组织的方式将图像下载到他们的计算机,然后将它们上传到应用程序的过程.

I am creating a bookmarklet which will interface with my application to allow users to enter information much quicker. One of the greatest pains in my application at the moment is uploading images. Users (understandly) hate the process of downloading images to their computers in an organized fashion, and then uploading them to the app.

我希望小书签做的是加载一个小的 div 叠加层,其中包含几个小控件,包括一个允许用户将图像从当前页面拖放到控件中的控件.然后,该脚本会收集这些 img 标签的 URI,并将它们与表单一起提交给应用程序,然后服务器会自动将它们下载到应用程序中.

What I would love the bookmarklet to do is load in a small div overlay with a couple small controls in it, including one which would allow the user to drag and drop images from the current page into the control. The script would then collect the URI's of those img tags and submit them along with the form to the app, and then they would automatically be downloaded by the server into the app.

因此,对于这项任务,每次单击书签时都将 jQuery 和 jQuery UI 加载到页面中似乎是一种非常笨拙的方法.

So, for this task, loading jQuery and jQuery UI into the page every time you click the bookmarklet seems like a very heavy-handed approach.

谁能推荐一个不错的、轻量级的 Javascript 工具包,只处理拖放功能而不是其他功能?

我很高兴看到新的 DragDealer 工具,它看起来很棒,就在今天ajaxian,但它似乎只处理拖动而不是放下"(即,不是目标)

I was excited to read about the new DragDealer tool, which looks awesome, just today on ajaxian but it seems that it is built to handle only dragging and not "dropping" (i.e., not targets)

推荐答案

我认为库可能不是最好的解决方案,只是尝试搜索一个功能/独立插件/小部件,它只是为您提供此功能,例如

I think a library might not be the best solution and just try searching for a function/stand alone plugin/widget that just delivers this functionality for you such as

  • http://www.webreference.com/programming/javascript/mk/column2/
  • http://luke.breuer.com/tutorial/javascript-drag-and-drop-tutorial.aspx
  • http://tool-man.org/examples/dragging.html

这篇关于拖放的最佳轻量级解决方案是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Update another component when Formik form changes(当Formik表单更改时更新另一个组件)
Formik validation isSubmitting / isValidating not getting set to true(Formik验证正在提交/isValiating未设置为True)
React Validation Max Range Using Formik(使用Formik的Reaction验证最大范围)
Validation using Yup to check string or number length(使用YUP检查字符串或数字长度的验证)
Updating initialValues prop on Formik Form does not update input value(更新Formik表单上的初始值属性不会更新输入值)
password validation with yup and formik(使用YUP和Formick进行密码验证)