kbjr / dragdrop Goto Github PK
View Code? Open in Web Editor NEWA JavaScript micro-framework for adding drag-and-drop functionality to elements for advanced UI development
Home Page: http://kbjr.github.io/DragDrop/index.html
License: Other
A JavaScript micro-framework for adding drag-and-drop functionality to elements for advanced UI development
Home Page: http://kbjr.github.io/DragDrop/index.html
License: Other
I know the "body" is a property of document object, can use it as a method?
Neither the README nor the GitHub hosted site have any hint of a demo.
Would be convenient if you do a release bump that includes the jquery plugin. I'm using bower to download and unless I point to the commit it downloads the 0.3.0 release which doesn't include the jquery wrapper. Would also be appreciate if you added the library to bower.
Thanks!
The reference to the bounding box is to the version in options, so it can not be set outside of the options object in the constructor. Change the reference to the binding object so it can be set.
https://gist.github.com/4019617
Thanks
If I attempt to make multiple elements draggable, only the last one actually moves. This is clearly a bug. Are you aware of it? If I wanted to fix it, where would I start?
calling DragDrop.unbind crashes with 'binding is not defined'
https://github.com/kbjr/DragDrop/blob/master/drag-drop.js#L284
When an element has position: relative
set, using the "offsetParent" bounding box option does not work correctly. The bounding box is calculated from the element starting position instead of offset parent position.
In Firefox Nightly 10.0a1 (2011-10-30) the drag class is not being removed properly so I drag an element multiple times, I'll end up with a drag class for each drag.
I am using your library for a project where I need the dragable elements to align at the bottom when the page loads, and when the user drags they stick to thier new positions
There is a problem with this: as soon as i start dragging the div gets pulled to the top and then drags along. which is odd and unnatural
am i doing something wrong or is this real issue, please help me out here is my code to recreate this problem
HTML:
<html>
<head>
<title>
Test drag drop
</title>
<script type = "text/javascript" src = "dragdrop.min.js"></script>
<script type = "text/javascript" src = "my.js"></script>
</head>
<body>
<div id = "dad" style = "width: 100%; height: 100%; position: relative;background-color: green;"></div>
<!-- <div id = "mom" style = "width: 200px; height: 200px; position: relative;background-color: gray;"></div> -->
</body>
</html>
window.onload = function () {
var dragMe = document.createElement('div');
dragMe.setAttribute('style','width: 140px;height:100;position:fixed;bottom:0px;background-color: red;');
var withMe = document.createElement('div');
withMe.setAttribute('style','width: 140px;height:100;position: absolute;background-color: blue;');
var dad = document.getElementById('dad');
dad.appendChild(dragMe);
DragDrop.bind(dragMe);
};
Hi,
A new version was pushed and the use has changed. DragDrop refuse to work with position:static
elements, which is the basic position value of an element. So, how does it work now?
Regards
Just tried your demo on my iphone 4 with iOS7....doesn't work
I have saw the source code here .
I just confuse about the body() , Under what circumstances can this code work and give what return .
Did you want to get the document.height at document.compatMode at BackCompat such as the code below
function body(){
return (document.compatMode == "CSS1Compat") ?
window.document.documentElement :
window.document.body || null;
};
thanks.
It would be nice to offer an easy way to attach functions to these events, to add additional functionality to drag/drop.
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.