Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
open-source
gridstack.js
Commits
37ee9883
Commit
37ee9883
authored
Nov 11, 2014
by
Pavel Reznikov
Browse files
add `auto` option
parent
3199fad5
Changes
1
Hide whitespace changes
Inline
Side-by-side
gridstack.js
View file @
37ee9883
...
...
@@ -169,7 +169,8 @@
placeholder_class
:
'
grid-stack-placeholder
'
,
handle
:
'
.grid-stack-item-content
'
,
cell_height
:
60
,
vertical_margin
:
20
vertical_margin
:
20
,
auto
:
true
});
this
.
grid
=
new
GridStackEngine
(
this
.
opts
.
width
,
function
(
nodes
)
{
...
...
@@ -182,9 +183,11 @@
});
});
this
.
container
.
find
(
'
.
'
+
this
.
opts
.
item_class
).
each
(
function
(
index
,
el
)
{
self
.
_prepare_element
(
el
);
});
if
(
this
.
opts
.
auto
)
{
this
.
container
.
find
(
'
.
'
+
this
.
opts
.
item_class
).
each
(
function
(
index
,
el
)
{
self
.
_prepare_element
(
el
);
});
}
this
.
placeholder
=
$
(
'
<div class="
'
+
this
.
opts
.
placeholder_class
+
'
'
+
this
.
opts
.
item_class
+
'
"><div class="placeholder-content" /></div>
'
).
hide
();
this
.
container
.
append
(
this
.
placeholder
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment