From 1d5883bde1f97a57bcd0df6ee017a0dc10537edd Mon Sep 17 00:00:00 2001 From: sbehrends Date: Mon, 1 Apr 2013 20:29:30 +0300 Subject: [PATCH] Added disabled dragging init feature gridster.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In initial options you can disble draggin by adding disable_drag: true on options list at initialising gridster --- dist/jquery.gridster.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dist/jquery.gridster.js b/dist/jquery.gridster.js index b9de6356be..017be37159 100644 --- a/dist/jquery.gridster.js +++ b/dist/jquery.gridster.js @@ -732,7 +732,8 @@ draggable: { distance: 4, items: ".gs_w:not(.static)" - } + }, + disable_drag: false }; @@ -807,7 +808,9 @@ this.get_widgets_from_DOM(); this.set_dom_grid_height(); this.$wrapper.addClass('ready'); - this.draggable(); + if (!this.options.disable_drag) { + this.draggable(); + } $(window).bind( 'resize', throttle($.proxy(this.recalculate_faux_grid, this), 200));