mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
updated doc and dist
This commit is contained in:
42
dist/jquery.gridster.js
vendored
42
dist/jquery.gridster.js
vendored
@@ -409,6 +409,7 @@
|
|||||||
this.set_dom_grid_height();
|
this.set_dom_grid_height();
|
||||||
this.$wrapper.addClass('ready');
|
this.$wrapper.addClass('ready');
|
||||||
this.draggable();
|
this.draggable();
|
||||||
|
this.next_position(2, 2);
|
||||||
|
|
||||||
$(window).bind(
|
$(window).bind(
|
||||||
'resize', throttle($.proxy(this.recalculate_faux_grid, this), 200));
|
'resize', throttle($.proxy(this.recalculate_faux_grid, this), 200));
|
||||||
@@ -446,6 +447,47 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the most left column below to add a new widget.
|
||||||
|
*
|
||||||
|
* @method next_position
|
||||||
|
* @param {Number} size_x The nº of rows the widget occupies horizontally.
|
||||||
|
* @param {Number} size_y The nº of columns the widget occupies vertically.
|
||||||
|
* @return {Object} Returns a grid coords object representing the future
|
||||||
|
* widget coords.
|
||||||
|
*/
|
||||||
|
fn.next_position = function(size_x, size_y) {
|
||||||
|
var ga = this.gridmap;
|
||||||
|
var cols_l = ga.length;
|
||||||
|
var valid_pos = [];
|
||||||
|
|
||||||
|
for (var c = 1; c < cols_l; c++) {
|
||||||
|
var rows_l = ga[c].length;
|
||||||
|
for (var r = 1; r <= rows_l; r++) {
|
||||||
|
var can_move_to = this.can_move_to({
|
||||||
|
size_x: size_x,
|
||||||
|
size_y: size_y
|
||||||
|
}, c, r);
|
||||||
|
|
||||||
|
if (can_move_to) {
|
||||||
|
valid_pos.push({
|
||||||
|
col: c,
|
||||||
|
row: r,
|
||||||
|
size_y: size_y,
|
||||||
|
size_x: size_x
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (valid_pos.length) {
|
||||||
|
this.next_position = this.sort_by_row_asc(valid_pos)[0];
|
||||||
|
return this.next_position;
|
||||||
|
};
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a widget from the grid.
|
* Remove a widget from the grid.
|
||||||
*
|
*
|
||||||
|
2
dist/jquery.gridster.min.js
vendored
2
dist/jquery.gridster.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -693,6 +693,13 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="index-item method">
|
||||||
|
<a href="#method_next_position">next_position</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="index-item method">
|
<li class="index-item method">
|
||||||
@@ -925,7 +932,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1829"><code>src/jquery.gridster.js:1829</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1871"><code>src/jquery.gridster.js:1871</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -1035,7 +1042,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l293"><code>src/jquery.gridster.js:293</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l335"><code>src/jquery.gridster.js:335</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -1168,7 +1175,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l140"><code>src/jquery.gridster.js:140</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l141"><code>src/jquery.gridster.js:141</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -1303,7 +1310,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l925"><code>src/jquery.gridster.js:925</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l967"><code>src/jquery.gridster.js:967</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -1421,7 +1428,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1332"><code>src/jquery.gridster.js:1332</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1374"><code>src/jquery.gridster.js:1374</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -1558,7 +1565,7 @@ upper row possible.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l974"><code>src/jquery.gridster.js:974</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1016"><code>src/jquery.gridster.js:1016</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -1676,7 +1683,7 @@ upper row possible.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1504"><code>src/jquery.gridster.js:1504</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1546"><code>src/jquery.gridster.js:1546</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -1803,7 +1810,7 @@ into account the dimensions (<code>size_y</code> and <code>size_x</code> attrs.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l315"><code>src/jquery.gridster.js:315</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l357"><code>src/jquery.gridster.js:357</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -1874,7 +1881,7 @@ into account the dimensions (<code>size_y</code> and <code>size_x</code> attrs.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1467"><code>src/jquery.gridster.js:1467</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1509"><code>src/jquery.gridster.js:1509</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -1961,7 +1968,7 @@ into account the dimensions (<code>size_y</code> and <code>size_x</code> attrs.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1602"><code>src/jquery.gridster.js:1602</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1644"><code>src/jquery.gridster.js:1644</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -2089,7 +2096,7 @@ each one.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1623"><code>src/jquery.gridster.js:1623</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1665"><code>src/jquery.gridster.js:1665</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -2217,7 +2224,7 @@ each one.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1642"><code>src/jquery.gridster.js:1642</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1684"><code>src/jquery.gridster.js:1684</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -2350,7 +2357,7 @@ each one.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1708"><code>src/jquery.gridster.js:1708</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1750"><code>src/jquery.gridster.js:1750</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -2497,7 +2504,7 @@ iteration. The value of <code>this</code> inside the function is the jQuery wrap
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1724"><code>src/jquery.gridster.js:1724</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1766"><code>src/jquery.gridster.js:1766</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -2638,7 +2645,7 @@ iteration. The value of <code>this</code> inside the function is the jQuery wrap
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1852"><code>src/jquery.gridster.js:1852</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1894"><code>src/jquery.gridster.js:1894</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -2748,7 +2755,7 @@ detect row or column that we want to go.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1926"><code>src/jquery.gridster.js:1926</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1968"><code>src/jquery.gridster.js:1968</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -2836,7 +2843,7 @@ detect row or column that we want to go.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1785"><code>src/jquery.gridster.js:1785</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1827"><code>src/jquery.gridster.js:1827</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -2955,7 +2962,7 @@ detect row or column that we want to go.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1574"><code>src/jquery.gridster.js:1574</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1616"><code>src/jquery.gridster.js:1616</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -3049,7 +3056,7 @@ detect row or column that we want to go.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1740"><code>src/jquery.gridster.js:1740</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1782"><code>src/jquery.gridster.js:1782</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -3130,7 +3137,7 @@ detect row or column that we want to go.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1539"><code>src/jquery.gridster.js:1539</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1581"><code>src/jquery.gridster.js:1581</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -3235,7 +3242,7 @@ detect row or column that we want to go.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1557"><code>src/jquery.gridster.js:1557</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1599"><code>src/jquery.gridster.js:1599</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -3352,7 +3359,7 @@ detect row or column that we want to go.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1025"><code>src/jquery.gridster.js:1025</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1067"><code>src/jquery.gridster.js:1067</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -3480,7 +3487,7 @@ the</code>upper<em>rows<code>array. Iteration starts from row specified in</code
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1912"><code>src/jquery.gridster.js:1912</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1954"><code>src/jquery.gridster.js:1954</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -3551,7 +3558,7 @@ the</code>upper<em>rows<code>array. Iteration starts from row specified in</code
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1103"><code>src/jquery.gridster.js:1103</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1145"><code>src/jquery.gridster.js:1145</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -3622,7 +3629,7 @@ the</code>upper<em>rows<code>array. Iteration starts from row specified in</code
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l861"><code>src/jquery.gridster.js:861</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l903"><code>src/jquery.gridster.js:903</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -3709,7 +3716,7 @@ the</code>upper<em>rows<code>array. Iteration starts from row specified in</code
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l780"><code>src/jquery.gridster.js:780</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l822"><code>src/jquery.gridster.js:822</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -3834,7 +3841,7 @@ the</code>upper<em>rows<code>array. Iteration starts from row specified in</code
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l799"><code>src/jquery.gridster.js:799</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l841"><code>src/jquery.gridster.js:841</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -3959,7 +3966,7 @@ the</code>upper<em>rows<code>array. Iteration starts from row specified in</code
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l754"><code>src/jquery.gridster.js:754</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l796"><code>src/jquery.gridster.js:796</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -4078,7 +4085,7 @@ the</code>upper<em>rows<code>array. Iteration starts from row specified in</code
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l768"><code>src/jquery.gridster.js:768</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l810"><code>src/jquery.gridster.js:810</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -4188,7 +4195,7 @@ the</code>upper<em>rows<code>array. Iteration starts from row specified in</code
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l722"><code>src/jquery.gridster.js:722</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l764"><code>src/jquery.gridster.js:764</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -4316,7 +4323,7 @@ HTMLElements.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l739"><code>src/jquery.gridster.js:739</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l781"><code>src/jquery.gridster.js:781</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -4442,7 +4449,7 @@ and col given.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l819"><code>src/jquery.gridster.js:819</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l861"><code>src/jquery.gridster.js:861</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -4568,7 +4575,7 @@ else returns the jQuery HTMLElement
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l844"><code>src/jquery.gridster.js:844</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l886"><code>src/jquery.gridster.js:886</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -4700,7 +4707,7 @@ params and if this is under the widget that is being dragged.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l676"><code>src/jquery.gridster.js:676</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l718"><code>src/jquery.gridster.js:718</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -4842,7 +4849,7 @@ each widget) in descending way.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1287"><code>src/jquery.gridster.js:1287</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1329"><code>src/jquery.gridster.js:1329</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -4961,7 +4968,7 @@ each widget) in descending way.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1198"><code>src/jquery.gridster.js:1198</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1240"><code>src/jquery.gridster.js:1240</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -5073,7 +5080,7 @@ if they can.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1241"><code>src/jquery.gridster.js:1241</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1283"><code>src/jquery.gridster.js:1283</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -5144,6 +5151,132 @@ if they can.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="method_next_position" class="method item">
|
||||||
|
<h3 class="name"><code>next_position</code></h3>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="args">
|
||||||
|
<span class="paren">(</span><ul class="args-list inline commas">
|
||||||
|
|
||||||
|
<li class="arg">
|
||||||
|
|
||||||
|
<code>size_x</code>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="arg">
|
||||||
|
|
||||||
|
<code>size_y</code>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul><span class="paren">)</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<span class="returns-inline">
|
||||||
|
<span class="type">Object</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="meta">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
|
Defined in
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../files/src_jquery.gridster.js.html#l172"><code>src/jquery.gridster.js:172</code></a>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
<p>Get the most left column below to add a new widget.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="params">
|
||||||
|
<h4>Parameters:</h4>
|
||||||
|
|
||||||
|
<ul class="params-list">
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name">size_x</code>
|
||||||
|
<span class="type">Number</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
<p>The nº of rows the widget occupies horizontally.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="param">
|
||||||
|
|
||||||
|
<code class="param-name">size_y</code>
|
||||||
|
<span class="type">Number</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-description">
|
||||||
|
<p>The nº of columns the widget occupies vertically.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="returns">
|
||||||
|
<h4>Returns:</h4>
|
||||||
|
|
||||||
|
<div class="returns-description">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="type">Object</span>:
|
||||||
|
|
||||||
|
Returns a grid coords object representing the future
|
||||||
|
widget coords.
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -5195,7 +5328,7 @@ if they can.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l395"><code>src/jquery.gridster.js:395</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l437"><code>src/jquery.gridster.js:437</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -5308,7 +5441,7 @@ if they can.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l472"><code>src/jquery.gridster.js:472</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l514"><code>src/jquery.gridster.js:514</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -5436,7 +5569,7 @@ overlapped or stops being overlapped.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l512"><code>src/jquery.gridster.js:512</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l554"><code>src/jquery.gridster.js:554</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -5560,7 +5693,7 @@ overlapped or stops being overlapped.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l346"><code>src/jquery.gridster.js:346</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l388"><code>src/jquery.gridster.js:388</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -5667,7 +5800,7 @@ overlapped or stops being overlapped.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1136"><code>src/jquery.gridster.js:1136</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1178"><code>src/jquery.gridster.js:1178</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -5771,7 +5904,7 @@ overlapped or stops being overlapped.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1148"><code>src/jquery.gridster.js:1148</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1190"><code>src/jquery.gridster.js:1190</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -5877,7 +6010,7 @@ overlapped or stops being overlapped.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l421"><code>src/jquery.gridster.js:421</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l463"><code>src/jquery.gridster.js:463</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -5984,7 +6117,7 @@ overlapped or stops being overlapped.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1160"><code>src/jquery.gridster.js:1160</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1202"><code>src/jquery.gridster.js:1202</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -6088,7 +6221,7 @@ overlapped or stops being overlapped.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1178"><code>src/jquery.gridster.js:1178</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1220"><code>src/jquery.gridster.js:1220</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -6182,7 +6315,7 @@ overlapped or stops being overlapped.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1888"><code>src/jquery.gridster.js:1888</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1930"><code>src/jquery.gridster.js:1930</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -6254,7 +6387,7 @@ the browser is resized.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l231"><code>src/jquery.gridster.js:231</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l273"><code>src/jquery.gridster.js:273</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -6336,7 +6469,7 @@ mapped array of positions.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l280"><code>src/jquery.gridster.js:280</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l322"><code>src/jquery.gridster.js:322</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -6441,7 +6574,7 @@ mapped array of positions.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l171"><code>src/jquery.gridster.js:171</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l213"><code>src/jquery.gridster.js:213</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -6545,7 +6678,7 @@ mapped array of positions.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l197"><code>src/jquery.gridster.js:197</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l239"><code>src/jquery.gridster.js:239</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -6643,7 +6776,7 @@ mapped array of positions.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l219"><code>src/jquery.gridster.js:219</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l261"><code>src/jquery.gridster.js:261</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -6731,7 +6864,7 @@ mapped array of positions.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1450"><code>src/jquery.gridster.js:1450</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1492"><code>src/jquery.gridster.js:1492</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -6840,7 +6973,7 @@ mapped array of positions.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1772"><code>src/jquery.gridster.js:1772</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1814"><code>src/jquery.gridster.js:1814</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -6927,7 +7060,7 @@ mapped array of positions.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l883"><code>src/jquery.gridster.js:883</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l925"><code>src/jquery.gridster.js:925</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -7054,7 +7187,7 @@ mapped array of positions.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l548"><code>src/jquery.gridster.js:548</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l590"><code>src/jquery.gridster.js:590</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -7175,7 +7308,7 @@ mapped array of positions.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l637"><code>src/jquery.gridster.js:637</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l679"><code>src/jquery.gridster.js:679</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -7280,7 +7413,7 @@ each widget) in ascending way.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l657"><code>src/jquery.gridster.js:657</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l699"><code>src/jquery.gridster.js:699</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -7391,7 +7524,7 @@ each widget) in descending way.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l259"><code>src/jquery.gridster.js:259</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l301"><code>src/jquery.gridster.js:301</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -7514,7 +7647,7 @@ the grid coords object passed in the <code>grid_data</code> param.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l1421"><code>src/jquery.gridster.js:1421</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l1463"><code>src/jquery.gridster.js:1463</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -7618,7 +7751,7 @@ the grid coords object passed in the <code>grid_data</code> param.</p>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="../files/src_jquery.gridster.js.html#l601"><code>src/jquery.gridster.js:601</code></a>
|
<a href="../files/src_jquery.gridster.js.html#l643"><code>src/jquery.gridster.js:643</code></a>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
146
docs/data.json
146
docs/data.json
@@ -215,7 +215,7 @@
|
|||||||
"classitems": [
|
"classitems": [
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 140,
|
"line": 141,
|
||||||
"description": "Add a new widget to the grid.",
|
"description": "Add a new widget to the grid.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "add_widget",
|
"name": "add_widget",
|
||||||
@@ -244,7 +244,31 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 171,
|
"line": 172,
|
||||||
|
"description": "Get the most left column below to add a new widget.",
|
||||||
|
"itemtype": "method",
|
||||||
|
"name": "next_position",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "size_x",
|
||||||
|
"description": "The nº of rows the widget occupies horizontally.",
|
||||||
|
"type": "Number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "size_y",
|
||||||
|
"description": "The nº of columns the widget occupies vertically.",
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"return": {
|
||||||
|
"description": "Returns a grid coords object representing the future\n widget coords.",
|
||||||
|
"type": "Object"
|
||||||
|
},
|
||||||
|
"class": "Gridster"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"file": "src/jquery.gridster.js",
|
||||||
|
"line": 213,
|
||||||
"description": "Remove a widget from the grid.",
|
"description": "Remove a widget from the grid.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "remove_widget",
|
"name": "remove_widget",
|
||||||
@@ -263,7 +287,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 197,
|
"line": 239,
|
||||||
"description": "Returns a serialized array of the widgets in the grid.",
|
"description": "Returns a serialized array of the widgets in the grid.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "serialize",
|
"name": "serialize",
|
||||||
@@ -283,7 +307,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 219,
|
"line": 261,
|
||||||
"description": "Returns a serialized array of the widgets that have changed their position.",
|
"description": "Returns a serialized array of the widgets that have changed their position.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "serialize_changed",
|
"name": "serialize_changed",
|
||||||
@@ -295,7 +319,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 231,
|
"line": 273,
|
||||||
"description": "Creates the grid coords object representing the widget a add it to the\nmapped array of positions.",
|
"description": "Creates the grid coords object representing the widget a add it to the\nmapped array of positions.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "register_widget",
|
"name": "register_widget",
|
||||||
@@ -307,7 +331,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 259,
|
"line": 301,
|
||||||
"description": "Update in the mapped array of positions the value of cells represented by\nthe grid coords object passed in the `grid_data` param.",
|
"description": "Update in the mapped array of positions the value of cells represented by\nthe grid coords object passed in the `grid_data` param.",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
@@ -331,7 +355,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 280,
|
"line": 322,
|
||||||
"description": "Remove a widget from the mapped array of positions.",
|
"description": "Remove a widget from the mapped array of positions.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "remove_from_gridmap",
|
"name": "remove_from_gridmap",
|
||||||
@@ -350,7 +374,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 293,
|
"line": 335,
|
||||||
"description": "Add a widget to the mapped array of positions.",
|
"description": "Add a widget to the mapped array of positions.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "add_to_gridmap",
|
"name": "add_to_gridmap",
|
||||||
@@ -374,7 +398,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 315,
|
"line": 357,
|
||||||
"description": "Make widgets draggable. It Wraps the jQuery UI Draggable Plugin.",
|
"description": "Make widgets draggable. It Wraps the jQuery UI Draggable Plugin.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "draggable",
|
"name": "draggable",
|
||||||
@@ -386,7 +410,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 346,
|
"line": 388,
|
||||||
"description": "This function is executed when the player begins to be dragged.",
|
"description": "This function is executed when the player begins to be dragged.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "on_start_drag",
|
"name": "on_start_drag",
|
||||||
@@ -406,7 +430,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 395,
|
"line": 437,
|
||||||
"description": "This function is executed when the player is being dragged.",
|
"description": "This function is executed when the player is being dragged.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "on_drag",
|
"name": "on_drag",
|
||||||
@@ -426,7 +450,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 421,
|
"line": 463,
|
||||||
"description": "This function is executed when the player stops being dragged.",
|
"description": "This function is executed when the player stops being dragged.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "on_stop_drag",
|
"name": "on_stop_drag",
|
||||||
@@ -446,7 +470,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 472,
|
"line": 514,
|
||||||
"description": "Executes the callbacks passed as arguments when a column begins to be\noverlapped or stops being overlapped.",
|
"description": "Executes the callbacks passed as arguments when a column begins to be\noverlapped or stops being overlapped.",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
@@ -470,7 +494,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 512,
|
"line": 554,
|
||||||
"description": "Executes the callbacks passed as arguments when a row starts to be\noverlapped or stops being overlapped.",
|
"description": "Executes the callbacks passed as arguments when a row starts to be\noverlapped or stops being overlapped.",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
@@ -494,7 +518,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 548,
|
"line": 590,
|
||||||
"description": "Sets the current position of the player",
|
"description": "Sets the current position of the player",
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
@@ -518,7 +542,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 601,
|
"line": 643,
|
||||||
"description": "See which of the widgets in the $widgets param collection can go to\na upper row and which not.",
|
"description": "See which of the widgets in the $widgets param collection can go to\na upper row and which not.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "widgets_contraints",
|
"name": "widgets_contraints",
|
||||||
@@ -537,7 +561,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 637,
|
"line": 679,
|
||||||
"description": "Sorts an Array of grid coords objects (representing the grid coords of\neach widget) in ascending way.",
|
"description": "Sorts an Array of grid coords objects (representing the grid coords of\neach widget) in ascending way.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "sort_by_row_asc",
|
"name": "sort_by_row_asc",
|
||||||
@@ -556,7 +580,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 657,
|
"line": 699,
|
||||||
"description": "Sorts an Array of grid coords objects (representing the grid coords of\neach widget) in descending way.",
|
"description": "Sorts an Array of grid coords objects (representing the grid coords of\neach widget) in descending way.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "sort_by_row_desc",
|
"name": "sort_by_row_desc",
|
||||||
@@ -575,7 +599,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 676,
|
"line": 718,
|
||||||
"description": "Sorts an Array of grid coords objects (representing the grid coords of\neach widget) in descending way.",
|
"description": "Sorts an Array of grid coords objects (representing the grid coords of\neach widget) in descending way.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "manage_movements",
|
"name": "manage_movements",
|
||||||
@@ -604,7 +628,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 722,
|
"line": 764,
|
||||||
"description": "Determines if there is a widget in the row and col given. Or if the\nHTMLElement passed as first argument is the player.",
|
"description": "Determines if there is a widget in the row and col given. Or if the\nHTMLElement passed as first argument is the player.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "is_player",
|
"name": "is_player",
|
||||||
@@ -629,7 +653,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 739,
|
"line": 781,
|
||||||
"description": "Determines if the widget that is being dragged is currently over the row\nand col given.",
|
"description": "Determines if the widget that is being dragged is currently over the row\nand col given.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "is_player_in",
|
"name": "is_player_in",
|
||||||
@@ -653,7 +677,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 754,
|
"line": 796,
|
||||||
"description": "Determines if the placeholder is currently over the row and col given.",
|
"description": "Determines if the placeholder is currently over the row and col given.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "is_placeholder_in",
|
"name": "is_placeholder_in",
|
||||||
@@ -677,7 +701,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 768,
|
"line": 810,
|
||||||
"description": "Determines if the placeholder is currently over the column given.",
|
"description": "Determines if the placeholder is currently over the column given.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "is_placeholder_in_col",
|
"name": "is_placeholder_in_col",
|
||||||
@@ -696,7 +720,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 780,
|
"line": 822,
|
||||||
"description": "Determines if the cell represented by col and row params is empty.",
|
"description": "Determines if the cell represented by col and row params is empty.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "is_empty",
|
"name": "is_empty",
|
||||||
@@ -720,7 +744,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 799,
|
"line": 841,
|
||||||
"description": "Determines if the cell represented by col and row params is occupied.",
|
"description": "Determines if the cell represented by col and row params is occupied.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "is_occupied",
|
"name": "is_occupied",
|
||||||
@@ -744,7 +768,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 819,
|
"line": 861,
|
||||||
"description": "Determines if there is a widget in the cell represented by col/row params.",
|
"description": "Determines if there is a widget in the cell represented by col/row params.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "is_widget",
|
"name": "is_widget",
|
||||||
@@ -768,7 +792,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 844,
|
"line": 886,
|
||||||
"description": "Determines if there is a widget in the cell represented by col/row\nparams and if this is under the widget that is being dragged.",
|
"description": "Determines if there is a widget in the cell represented by col/row\nparams and if this is under the widget that is being dragged.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "is_widget_under_player",
|
"name": "is_widget_under_player",
|
||||||
@@ -792,7 +816,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 861,
|
"line": 903,
|
||||||
"description": "Get widgets overlapping with the player.",
|
"description": "Get widgets overlapping with the player.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "get_widgets_under_player",
|
"name": "get_widgets_under_player",
|
||||||
@@ -804,7 +828,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 883,
|
"line": 925,
|
||||||
"description": "Put placeholder at the row and column specified.",
|
"description": "Put placeholder at the row and column specified.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "set_placeholder",
|
"name": "set_placeholder",
|
||||||
@@ -828,7 +852,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 925,
|
"line": 967,
|
||||||
"description": "Determines whether the player can move to a position above.",
|
"description": "Determines whether the player can move to a position above.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "can_go_player_up",
|
"name": "can_go_player_up",
|
||||||
@@ -847,7 +871,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 974,
|
"line": 1016,
|
||||||
"description": "Determines whether a widget can move to a position above.",
|
"description": "Determines whether a widget can move to a position above.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "can_go_widget_up",
|
"name": "can_go_widget_up",
|
||||||
@@ -866,7 +890,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1025,
|
"line": 1067,
|
||||||
"description": "Search a valid row for the widget represented by `widget_grid_data' in\nthe `upper_rows` array. Iteration starts from row specified in `min_row`.",
|
"description": "Search a valid row for the widget represented by `widget_grid_data' in\nthe `upper_rows` array. Iteration starts from row specified in `min_row`.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "get_valid_rows",
|
"name": "get_valid_rows",
|
||||||
@@ -895,7 +919,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1103,
|
"line": 1145,
|
||||||
"description": "Get widgets overlapping with the player.",
|
"description": "Get widgets overlapping with the player.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "get_widgets_overlapped",
|
"name": "get_widgets_overlapped",
|
||||||
@@ -907,7 +931,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1136,
|
"line": 1178,
|
||||||
"description": "This callback is executed when the player begins to collide with a column.",
|
"description": "This callback is executed when the player begins to collide with a column.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "on_start_overlapping_column",
|
"name": "on_start_overlapping_column",
|
||||||
@@ -926,7 +950,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1148,
|
"line": 1190,
|
||||||
"description": "A callback executed when the player begins to collide with a row.",
|
"description": "A callback executed when the player begins to collide with a row.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "on_start_overlapping_row",
|
"name": "on_start_overlapping_row",
|
||||||
@@ -945,7 +969,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1160,
|
"line": 1202,
|
||||||
"description": "A callback executed when the the player ends to collide with a column.",
|
"description": "A callback executed when the the player ends to collide with a column.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "on_stop_overlapping_column",
|
"name": "on_stop_overlapping_column",
|
||||||
@@ -964,7 +988,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1178,
|
"line": 1220,
|
||||||
"description": "This callback is executed when the player ends to collide with a row.",
|
"description": "This callback is executed when the player ends to collide with a row.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "on_stop_overlapping_row",
|
"name": "on_stop_overlapping_row",
|
||||||
@@ -983,7 +1007,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1198,
|
"line": 1240,
|
||||||
"description": "Move a widget to a specific row. The cell or cells must be empty.\nIf the widget has widgets below, all of these widgets will be moved also\nif they can.",
|
"description": "Move a widget to a specific row. The cell or cells must be empty.\nIf the widget has widgets below, all of these widgets will be moved also\nif they can.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "move_widget_to",
|
"name": "move_widget_to",
|
||||||
@@ -1002,7 +1026,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1241,
|
"line": 1283,
|
||||||
"description": "Move up the specified widget and all below it.",
|
"description": "Move up the specified widget and all below it.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "move_widget_up",
|
"name": "move_widget_up",
|
||||||
@@ -1027,7 +1051,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1287,
|
"line": 1329,
|
||||||
"description": "Move down the specified widget and all below it.",
|
"description": "Move down the specified widget and all below it.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "move_widget_down",
|
"name": "move_widget_down",
|
||||||
@@ -1051,7 +1075,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1332,
|
"line": 1374,
|
||||||
"description": "Check if the widget can move to the specified row, else returns the\nupper row possible.",
|
"description": "Check if the widget can move to the specified row, else returns the\nupper row possible.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "can_go_up_to_row",
|
"name": "can_go_up_to_row",
|
||||||
@@ -1080,7 +1104,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1421,
|
"line": 1463,
|
||||||
"description": "Get widgets below a widget.",
|
"description": "Get widgets below a widget.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "widgets_below",
|
"name": "widgets_below",
|
||||||
@@ -1099,7 +1123,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1450,
|
"line": 1492,
|
||||||
"description": "Update the array of mapped positions with the new player position.",
|
"description": "Update the array of mapped positions with the new player position.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "set_cells_player_occupies",
|
"name": "set_cells_player_occupies",
|
||||||
@@ -1123,7 +1147,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1467,
|
"line": 1509,
|
||||||
"description": "Remove from the array of mapped positions the reference to the player.",
|
"description": "Remove from the array of mapped positions the reference to the player.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "empty_cells_player_occupies",
|
"name": "empty_cells_player_occupies",
|
||||||
@@ -1135,7 +1159,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1504,
|
"line": 1546,
|
||||||
"description": "Check if it's possible to move a widget to a specific col/row. It takes\ninto account the dimensions (`size_y` and `size_x` attrs. of the grid coords\n object) the widget occupies.",
|
"description": "Check if it's possible to move a widget to a specific col/row. It takes\ninto account the dimensions (`size_y` and `size_x` attrs. of the grid coords\n object) the widget occupies.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "can_move_to",
|
"name": "can_move_to",
|
||||||
@@ -1164,7 +1188,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1539,
|
"line": 1581,
|
||||||
"description": "Given the leftmost column returns all columns that are overlapping with the player.",
|
"description": "Given the leftmost column returns all columns that are overlapping with the player.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "get_targeted_columns",
|
"name": "get_targeted_columns",
|
||||||
@@ -1184,7 +1208,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1557,
|
"line": 1599,
|
||||||
"description": "Given the upper row returns all rows that are overlapping with the player.",
|
"description": "Given the upper row returns all rows that are overlapping with the player.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "get_targeted_rows",
|
"name": "get_targeted_rows",
|
||||||
@@ -1204,7 +1228,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1574,
|
"line": 1616,
|
||||||
"description": "Get all columns and rows that a widget occupies.",
|
"description": "Get all columns and rows that a widget occupies.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "get_cells_occupied",
|
"name": "get_cells_occupied",
|
||||||
@@ -1223,7 +1247,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1602,
|
"line": 1644,
|
||||||
"description": "Iterate over the cells occupied by a widget executing a function for\neach one.",
|
"description": "Iterate over the cells occupied by a widget executing a function for\neach one.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "for_each_cell_occupied",
|
"name": "for_each_cell_occupied",
|
||||||
@@ -1247,7 +1271,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1623,
|
"line": 1665,
|
||||||
"description": "Iterate over the columns occupied by a widget executing a function for\neach one.",
|
"description": "Iterate over the columns occupied by a widget executing a function for\neach one.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "for_each_column_occupied",
|
"name": "for_each_column_occupied",
|
||||||
@@ -1271,7 +1295,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1642,
|
"line": 1684,
|
||||||
"description": "Iterate over the rows occupied by a widget executing a function for\neach one.",
|
"description": "Iterate over the rows occupied by a widget executing a function for\neach one.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "for_each_row_occupied",
|
"name": "for_each_row_occupied",
|
||||||
@@ -1295,7 +1319,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1708,
|
"line": 1750,
|
||||||
"description": "Iterate over each widget above the column and row specified.",
|
"description": "Iterate over each widget above the column and row specified.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "for_each_widget_above",
|
"name": "for_each_widget_above",
|
||||||
@@ -1324,7 +1348,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1724,
|
"line": 1766,
|
||||||
"description": "Iterate over each widget below the column and row specified.",
|
"description": "Iterate over each widget below the column and row specified.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "for_each_widget_below",
|
"name": "for_each_widget_below",
|
||||||
@@ -1353,7 +1377,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1740,
|
"line": 1782,
|
||||||
"description": "Returns the highest occupied cell in the grid.",
|
"description": "Returns the highest occupied cell in the grid.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "get_highest_occupied_cell",
|
"name": "get_highest_occupied_cell",
|
||||||
@@ -1365,7 +1389,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1772,
|
"line": 1814,
|
||||||
"description": "Set the current height of the parent grid.",
|
"description": "Set the current height of the parent grid.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "set_dom_grid_height",
|
"name": "set_dom_grid_height",
|
||||||
@@ -1377,7 +1401,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1785,
|
"line": 1827,
|
||||||
"description": "It generates the neccessary styles to position the widgets.",
|
"description": "It generates the neccessary styles to position the widgets.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "generate_stylesheet",
|
"name": "generate_stylesheet",
|
||||||
@@ -1401,7 +1425,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1829,
|
"line": 1871,
|
||||||
"description": "Injects the given CSS as string to the head of the document.",
|
"description": "Injects the given CSS as string to the head of the document.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "add_style_tag",
|
"name": "add_style_tag",
|
||||||
@@ -1420,7 +1444,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1852,
|
"line": 1894,
|
||||||
"description": "Generates a faux grid to collide with it when a widget is dragged and\ndetect row or column that we want to go.",
|
"description": "Generates a faux grid to collide with it when a widget is dragged and\ndetect row or column that we want to go.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "generate_faux_grid",
|
"name": "generate_faux_grid",
|
||||||
@@ -1444,7 +1468,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1888,
|
"line": 1930,
|
||||||
"description": "Recalculates the offsets for the faux grid. You need to use it when\nthe browser is resized.",
|
"description": "Recalculates the offsets for the faux grid. You need to use it when\nthe browser is resized.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "recalculate_faux_grid",
|
"name": "recalculate_faux_grid",
|
||||||
@@ -1456,7 +1480,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1912,
|
"line": 1954,
|
||||||
"description": "Get all widgets in the DOM and register them.",
|
"description": "Get all widgets in the DOM and register them.",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "get_widgets_from_DOM",
|
"name": "get_widgets_from_DOM",
|
||||||
@@ -1468,7 +1492,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"file": "src/jquery.gridster.js",
|
"file": "src/jquery.gridster.js",
|
||||||
"line": 1926,
|
"line": 1968,
|
||||||
"description": "Calculate columns and rows to be set based on the configuration\n parameters, grid dimensions, etc ...",
|
"description": "Calculate columns and rows to be set based on the configuration\n parameters, grid dimensions, etc ...",
|
||||||
"itemtype": "method",
|
"itemtype": "method",
|
||||||
"name": "generate_grid_and_stylesheet",
|
"name": "generate_grid_and_stylesheet",
|
||||||
|
@@ -224,6 +224,7 @@
|
|||||||
this.set_dom_grid_height();
|
this.set_dom_grid_height();
|
||||||
this.$wrapper.addClass('ready');
|
this.$wrapper.addClass('ready');
|
||||||
this.draggable();
|
this.draggable();
|
||||||
|
this.next_position(2, 2);
|
||||||
|
|
||||||
$(window).bind(
|
$(window).bind(
|
||||||
'resize', throttle($.proxy(this.recalculate_faux_grid, this), 200));
|
'resize', throttle($.proxy(this.recalculate_faux_grid, this), 200));
|
||||||
@@ -261,6 +262,47 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the most left column below to add a new widget.
|
||||||
|
*
|
||||||
|
* @method next_position
|
||||||
|
* @param {Number} size_x The nº of rows the widget occupies horizontally.
|
||||||
|
* @param {Number} size_y The nº of columns the widget occupies vertically.
|
||||||
|
* @return {Object} Returns a grid coords object representing the future
|
||||||
|
* widget coords.
|
||||||
|
*/
|
||||||
|
fn.next_position = function(size_x, size_y) {
|
||||||
|
var ga = this.gridmap;
|
||||||
|
var cols_l = ga.length;
|
||||||
|
var valid_pos = [];
|
||||||
|
|
||||||
|
for (var c = 1; c < cols_l; c++) {
|
||||||
|
var rows_l = ga[c].length;
|
||||||
|
for (var r = 1; r <= rows_l; r++) {
|
||||||
|
var can_move_to = this.can_move_to({
|
||||||
|
size_x: size_x,
|
||||||
|
size_y: size_y
|
||||||
|
}, c, r);
|
||||||
|
|
||||||
|
if (can_move_to) {
|
||||||
|
valid_pos.push({
|
||||||
|
col: c,
|
||||||
|
row: r,
|
||||||
|
size_y: size_y,
|
||||||
|
size_x: size_x
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (valid_pos.length) {
|
||||||
|
this.next_position = this.sort_by_row_asc(valid_pos)[0];
|
||||||
|
return this.next_position;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a widget from the grid.
|
* Remove a widget from the grid.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user