Skip to content

Commit 9d077da

Browse files
author
Donald Adams
committed
fix(gridster): preventing gridster from adding extra resize handles
1 parent d5bf56c commit 9d077da

7 files changed

+19
-14
lines changed

dist/jquery.gridster.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! gridster.js - v0.6.5 - 2015-04-06
1+
/*! gridster.js - v0.6.5 - 2015-04-14
22
* http://gridster.net/
33
* Copyright (c) 2015 decksterteam; Licensed */
44

dist/jquery.gridster.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! gridster.js - v0.6.5 - 2015-04-06
1+
/*! gridster.js - v0.6.5 - 2015-04-14
22
* http://gridster.net/
33
* Copyright (c) 2015 decksterteam; Licensed */
44

@@ -1295,7 +1295,7 @@
12951295
fn.add_resize_handle = function($w) {
12961296
var append_to = this.options.resize.handle_append_to;
12971297
$(this.resize_handle_tpl).appendTo( append_to ? $(append_to, $w) : $w);
1298-
1298+
$w.data('resizeEquipped', true);
12991299
return this;
13001300
};
13011301

@@ -1948,7 +1948,8 @@
19481948

19491949
this.add_to_gridmap(wgd, $el);
19501950

1951-
this.options.resize.enabled && this.add_resize_handle($el);
1951+
if(this.options.resize.enabled && !$el.data('resizeEquipped'))
1952+
this.add_resize_handle($el);
19521953

19531954
return posChanged;
19541955
};

dist/jquery.gridster.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery.gridster.min.js

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery.gridster.with-extras.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! gridster.js - v0.6.5 - 2015-04-06
1+
/*! gridster.js - v0.6.5 - 2015-04-14
22
* http://gridster.net/
33
* Copyright (c) 2015 decksterteam; Licensed */
44

@@ -1295,7 +1295,7 @@
12951295
fn.add_resize_handle = function($w) {
12961296
var append_to = this.options.resize.handle_append_to;
12971297
$(this.resize_handle_tpl).appendTo( append_to ? $(append_to, $w) : $w);
1298-
1298+
$w.data('resizeEquipped', true);
12991299
return this;
13001300
};
13011301

@@ -1948,7 +1948,8 @@
19481948

19491949
this.add_to_gridmap(wgd, $el);
19501950

1951-
this.options.resize.enabled && this.add_resize_handle($el);
1951+
if(this.options.resize.enabled && !$el.data('resizeEquipped'))
1952+
this.add_resize_handle($el);
19521953

19531954
return posChanged;
19541955
};

dist/jquery.gridster.with-extras.min.js

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jquery.gridster.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@
448448
fn.add_resize_handle = function($w) {
449449
var append_to = this.options.resize.handle_append_to;
450450
$(this.resize_handle_tpl).appendTo( append_to ? $(append_to, $w) : $w);
451-
451+
$w.data('resizeEquipped', true);
452452
return this;
453453
};
454454

@@ -1101,7 +1101,8 @@
11011101

11021102
this.add_to_gridmap(wgd, $el);
11031103

1104-
this.options.resize.enabled && this.add_resize_handle($el);
1104+
if(this.options.resize.enabled && !$el.data('resizeEquipped'))
1105+
this.add_resize_handle($el);
11051106

11061107
return posChanged;
11071108
};

0 commit comments

Comments
 (0)