gtramontina / draggable.js Goto Github PK
View Code? Open in Web Editor NEWMake your DOM elements draggable easily
Home Page: http://gtramontina.github.com/draggable.js/
Make your DOM elements draggable easily
Home Page: http://gtramontina.github.com/draggable.js/
in firefox ,the value seems same as offset left.crhome works as expect give the final value from stylesheet.
the season I've found seems like while a fixed width element horizontal center,stylesheet like margin-left:auto;margin-right:auto;left:0
,the firefox gives the offset left value to left
,chrome gitves the value to magin-left
.
firefox version:41,42
chrome version:45.0.2454.101 (64-bit)
This is literally the only plugin I could find that would work for dragging my input box which I thank you for. However, I am trying to drag my input box on a scaled div and it is extremely skewed.
Could anyone help me with this?
Here is a jsfiddle: http://jsfiddle.net/Lzn4vLeq/1/
EDIT:
I used a forked version for the pull request and it works a little better. Except the mouse is still somewhat off.
Here is my jsfiddle: http://jsfiddle.net/Lzn4vLeq/2/
This fixes a problem with incorrect location calculations due to the possibility that the viewport does not have the same dimensions as the window.
Hey, Guilherme.
What about some custom event handlers?
Like onStart, onDrag, onDrop.
I can see some benefits of adding these options to be used as callbacks.
It's also fairly simple to implement.
I'll fork your repo and send some code soon :)
Hello,
I was trying the lib, which looks very nice and scrolled while dragging an element. This doesn't move the element and thus display it at a wrong position.
You may need a mouse to reproduce it.
Regards
PS: Ignore this if the lib is not mantained, I'm just trying to help :)
I like the simplicity and functionality of this library! Thanks also for the online demos - they're really well prepared and necessary.
I wonder whether this could be efficiently used also for long lists (thousands of items) wherease one would be free to select multiple items and then drag them all at once.
Any suggestions?
Seems that the newer Phantomjs version is breaking our test.
https://travis-ci.org/gtramontina/draggable.js/builds/162889192
Hi,
Its not an issue, but maybe not implemented?
Today I tried your draggable.js and I only want to dragndrop it when I press the left mousebutton. I have tried with an if and asked for mouseEvent.button === 0 but it drags it by left mouse, middle and right. And other solution?
Regards
Chris
Well, just that. What license is draggable.js subject to?
When viewing http://gtramontina.github.io/draggable.js using Chrome 25, most of the unit tests are failing (undefined variable).
Can you make a stable branch for this?
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.