Skip to content

Commit 1d5883b

Browse files
committed
Added disabled dragging init feature gridster.js
In initial options you can disble draggin by adding disable_drag: true on options list at initialising gridster
1 parent ac8894d commit 1d5883b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dist/jquery.gridster.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,8 @@
732732
draggable: {
733733
distance: 4,
734734
items: ".gs_w:not(.static)"
735-
}
735+
},
736+
disable_drag: false
736737
};
737738

738739

@@ -807,7 +808,9 @@
807808
this.get_widgets_from_DOM();
808809
this.set_dom_grid_height();
809810
this.$wrapper.addClass('ready');
810-
this.draggable();
811+
if (!this.options.disable_drag) {
812+
this.draggable();
813+
}
811814

812815
$(window).bind(
813816
'resize', throttle($.proxy(this.recalculate_faux_grid, this), 200));

0 commit comments

Comments
 (0)