Commit Graph
24 Commits
Author SHA1 Message Date
Davide Callegari 233129b183 Bound leftover callbacks are one of the main causes of memory leaks, let's remove them inside the destroy method 2013-02-15 15:25:09 +01:00
Davide Callegari 36bec0bb14 Fixed a couple of errors in the methods definition
Added my own IDE filed in the .gitignore file
2013-02-15 14:29:54 +01:00
Philip Manavopoulosandvieron 552df22e1c Allow for an optional drag handle to be specified
When defining the gridster, you can now define a draggable.handle selector:

For example:

    $("#widgets").gridster({
        widget_margins: [10, 10],
        widget_base_dimensions: [565, 400],
		draggable: {
			stop: function(event, ui) {
				console.log('save new columns');
			},
			handle: '.title'
		}
    });

If handle is omitted (or left blank), it works as it did previously. If a value is specified, then dragging only starts if the element which was clicked matches the selector specified.

Added by @vieron:
Closes #29
2012-10-20 00:12:10 +02:00
vieron 5411836c88 events/onselectstart: Don't prevent default behaviour on form fields
Fixes #56.
2012-10-07 21:36:58 +02:00
vieron c6bd80be8e Fixed disable method, it didn't work well for multiple instances.
Previously, disabling gridster caused all the instances of Gridster running on the pages was disabled. Because Draggable class uses event delegation from the body to manage drag events.
2012-10-03 13:48:55 +02:00
vieron 81c96b92d5 fixed: drag api access from gridster and draggable.disable method.
Fixes #25. I broke this in the issue #17 and commit 8e7a5c.
2012-08-13 22:32:35 +02:00
vieron 8e7a5cec53 prevent selection when dragging 2012-08-13 00:35:28 +02:00
vieron d78bd254bd renamed jQuery adapter for Draggable class to $.fn.drag. Fixes #17.
Prevents name collisions with jQuery UI draggable module.
2012-08-08 23:33:31 +02:00
vieron ca7577950e don't start drag if <button> is clicked 2012-08-07 00:59:00 +02:00
vieron 1316a37e60 added touch support. Closes #12, closes #9 2012-08-05 12:39:51 +02:00
vieron 0e942677ec increased scroll area size and scroll speed 2012-08-05 11:00:08 +02:00
vieron 39a473cedf Doing form elements inside widgets clickable. Fixes #7. 2012-08-03 23:49:46 +02:00
vieron 9987989c8c Caching $(document.body) once document is ready. Fixes #10. 2012-08-03 16:45:49 +02:00
Jan Urbański f4e425ced2 switch to using the MIT license exclusively 2012-07-27 13:29:07 +02:00
vieron f12cebb33e increased the mouse area that triggers scroll 2012-07-24 17:05:07 +02:00
vieron 0016c99a61 offsetX is not needed 2012-07-24 16:55:53 +02:00
vieron 3460a436b2 scroll logic based on mouse position, not in items position 2012-07-24 16:25:43 +02:00
vieron b5a2a2c4cd scroll document when dragging up or down 2012-07-24 15:40:32 +02:00
vieron 443d0fbc29 jslinting 2012-07-24 10:34:12 +02:00
vieron 4eb679fb78 documentation fixes 2012-07-23 22:51:04 +02:00
vieron 7ae385ea05 some small documentation for draggable class 2012-07-23 21:49:53 +02:00
vieron 00e7c46b31 avoid calls to empty functions in defaults object 2012-07-23 21:48:25 +02:00
vieron bf2ee67450 only start drag with right click 2012-07-23 21:46:27 +02:00
vieron 288df54e86 basic jQuery draggable plugin 2012-07-23 11:01:48 +02:00