yookoala / dragdrop-components Goto Github PK
View Code? Open in Web Editor NEWWeb Components for Simple Drag and Drop Operations
License: MIT License
Web Components for Simple Drag and Drop Operations
License: MIT License
Should cover
Need a way to assist state management of apps (e.g. Vue, Svelte) that works with both mouse event and touch event.
Currently, multiple touch-dragging multiple items around is very messy. The drag shadows are moved along correctly, but the dropping by "touchend" is unspecified and chaotic.
DragDropContainer.getDraggedElement()
to find the dragged element. This is not ideal because it doesn't really trackdown the touch / mouse event dragged target. The method only find the dragged element by attributes.TouchEvent.targetEvents
attribute.event.target
attribute do not always identify the mouse dragged target. That was why DragDropContainer.getDraggedElement()
was written in the first place.event.detail.target
should be accurate. Use it.DragDropContainer.getDraggedElement()
instead (?) (using "getDraggedElement()" will have issue when user simultaneously use mouse and touch). Or find a way to stably identify the drag target.Reference: https://github.com/pbakaus/domvas
The computation to create that shadow would be significantly higher (especially when need to do deep clone and computedStyle to a huge nested DOM element). Should make this optional through attribute.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.