3006d4f393
style(jshint): add jshint config and setup grunt task
2015-04-16 20:26:19 +02:00
576b5ae3f0
fix(gridster): ensure coords instances are destroyed on widgets
...
…when removing a widget, or when destroying the gridster instance.
Before this change, if you called destroy without `remove` set to true,
coords instances was leaking jQuery data objects.
Also nullified the gridmap, and faux_grid arrays.
2015-04-16 20:26:19 +02:00
cda560f4f3
fix(gridster): resize_widget
also accepts HTMLElements
...
for consistency with the `remove_widget`
2015-04-16 20:26:18 +02:00
7de5bbabc0
feat(gridster): add config to set custom show/hide widget methods
...
by default jQuery’s `hide` and `show` methods are used. You could also
use fadeIn/fadeOut or write your own kind of jQuery plugin like
`$.fn.showInAFancyWay` and use `showInAFancyWay` as the value in the
show_method config option.
If you want to keep the previos behaviour, you need to set
`hide_method` option to `’fadeOut’`
Breaking Changes
`remove_widget` and `remove_all_widgets` methods not return a promise
instead of the gridster instance
2015-04-16 20:26:18 +02:00
e258d595b0
tests(gridster): add basic test suite for gridster
...
Tests are build with mocha + chai, and you can run them from the command line with `grunt karma` or opening `test/index.html` in your browser.
This is a first approach, there are hundreds of tests more that should be added.
I’ve ported some tests on PRs but more needs to be done.
2015-04-16 20:26:18 +02:00
2002c45595
feat(gridster.css): remove possible default pading
2015-04-16 20:26:18 +02:00
93cd01ecc3
chore(gridster): remove unused code
2015-04-16 20:26:18 +02:00
8080daccd1
docs(gridster): fixed a typo in Gridster class documentation
2015-04-16 20:26:18 +02:00
c6226306c2
fix(gridster): changed "instanceof jQuery" to "instanceof $"
...
Original code will break if jquery noconflict is applied, where $ and jQuery produces jQuery instance of different versions.
2015-04-16 20:26:18 +02:00
d947175257
fix(gridster): wrong addition solved in add_faux_rows/cols by adding parseInt
...
Closes #426 , #425
2015-04-16 20:26:18 +02:00
d3f25f3fbb
feat(draggable): autoscrolling
...
If the element being dragged is inside a scrollable container, keeping the
mouse in one of the sides of the container will trigger scroll.
2015-04-16 20:26:18 +02:00
43148b87e5
feat(gridster): browserify compatibility
2015-04-16 20:26:18 +02:00
446852a260
feat(gridster): Common.js support
...
Closes #434
2015-04-14 11:43:35 +02:00
ccbac1fcc3
chore: bump up jquery version to 2.1.3
2015-04-14 11:43:35 +02:00
b16293268c
fix(gridster): destroy resize_api
...
Call `resize_api.destroy()` to fix memory leak.
Closes #473
2015-04-14 11:43:23 +02:00
595a94f1bd
fix(gridster): ensure widget dimensions and coords are always ints
...
Thanks to @sogawa for reporting
2015-04-14 11:39:55 +02:00
314037471f
Release v0.5.6
2014-09-25 12:27:05 +02:00
79aff38c60
fix(draggable): namespace events with unique ids
...
Until now if you had multiple instances of Draggable in the same page,
when destroying one of them, all of the events binded to other
instances were also destroyed.
So, we are namespacing event names with unique id’s per instance to ensure
only that only the corresponding events are unbinded.
The other solution is to cache references to the event handlers, but most
of them are proxied or throttled which makes more mess...
2014-09-25 12:26:15 +02:00
1d06af1d5c
Release v0.5.5
2014-07-25 15:50:59 +02:00
9926ceff59
fix(gridster): fire positionschanged
when widget orig position changes
...
Until now `gridster:positionschanged` was being fired only if the widget
was moved up, but we also need to know if position is different when
`avoid_overlapped_widgets` is set to true (by default).
2014-07-25 15:49:14 +02:00
7640971905
Release v0.5.4
2014-07-16 20:29:47 +02:00
93df6cf690
fix(gridster): serialize returns an Array object, not a jQuery object
...
Fixes #394
2014-07-16 20:28:54 +02:00
e837ded844
Release v0.5.3
2014-07-04 19:04:54 +02:00
6bcfa6e16e
fix(gridster): custom ignore_dragging
overwrites the default value
2014-06-25 23:24:53 +02:00
21a294cf29
chore: add reference to defaults in constructors
2014-06-25 23:10:59 +02:00
a9c76d572b
feature(gridster): added auto_init
config option, default to true
...
Useful when using `positionschanged` event, fired before gridster
instance is cached.
2014-06-25 10:57:19 +02:00
589d7fd509
feat: make gridster AMD compatible
2014-06-25 10:54:21 +02:00
5c6d25cbbe
fix(gridster): sort widgets appropriately when reading them from DOM
2014-06-25 10:54:17 +02:00
8ec307b6f7
feat(gridster): move widget up when added if there is space available
2014-06-25 10:52:50 +02:00
aef185c5da
style: some formatting changes
2014-06-24 23:08:49 +02:00
b2323910ba
chore: move sorting methods in prototype to the constructor
...
Useful to use them when we there is no gridster instance, like sorting
a previously stored output from the serialize method.
2014-06-24 23:08:49 +02:00
c554aa89d8
Release 0.5.2
2014-06-16 19:03:21 +02:00
021a6c23e8
fix(draggable): handle both touch and click events
...
Fixes #207 , #236 , #329 , and #380
2014-06-16 18:45:50 +02:00
7d22e6c8b2
fix(gridster): fix add_widget to use correct size_y when adding rows
2014-06-16 17:03:00 +02:00
bb7463a324
fix(draggable): replaced scrollX/Y with scrollLeft/Top
...
window.scrollX/Y is only available in Chrome, not in IE
2014-06-16 17:03:00 +02:00
c726c4ad9c
fix(draggable): fix offset during drag
...
when the scrollX/Y is changed during drag (e.g. by the mousewheel)
the offset wasn't correct
2014-06-16 17:03:00 +02:00
93c46ff45e
fix(gridster): Removing previously added style tags before adding new one.
...
Hopefully fixes #211 and #294 .
2014-06-16 16:59:20 +02:00
dd6c742008
fix(draggable): bind drag events to $document
...
$body won't receive mouseup if the cursor is outside the browser window, $document does
2014-06-16 16:59:07 +02:00
a4f3baf38f
update dist
2014-03-26 12:38:25 +01:00
69fcfe4596
feat(draggable): allow ignore_dragging config option to be a function
2014-03-26 12:38:06 +01:00
f1ad03cc36
chore: update dist
2014-03-13 00:11:55 +01:00
03910df967
feat(draggable): option to not remove helper on drag stop
2014-03-13 00:11:29 +01:00
b84f364d4a
Release v0.5.1
2014-03-05 19:02:30 +01:00
dc09f191d8
feat(gridster): destroy element's data and optionally remove from DOM
2014-03-05 18:26:45 +01:00
04868a384d
feat(draggable): keep container position prop if different than static
2014-03-05 17:47:39 +01:00
6f22217f05
feat(coords): allow both (left/x1) and (top/y1) attr keys
2014-03-05 17:36:11 +01:00
fdeee4f636
feat(coords): add destroy method
2014-03-05 17:33:04 +01:00
720d487e39
feat(collision): overlapping region as a config option
2014-03-05 17:29:45 +01:00
967984f16b
Release v0.5.0
2014-02-14 13:13:39 +01:00
073fdc40e0
feat(draggable): Add toggle draggable method.
2014-02-14 13:09:03 +01:00