Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Packery
Commits
75b03b63
Commit
75b03b63
authored
12 years ago
by
David DeSandro
Browse files
Options
Download
Email Patches
Plain Diff
update getSize which returns zeroSpace for hiddens
fixes #13
parent
f32128d7
master
center-out-corner
pack-option
shift
v2.1.2
v2.1.1
v2.1.0
v2.0.0
v2.0.0-beta1
v1.4.3
v1.4.2
v1.4.1
v1.4.0
v1.3.2
v1.3.1
v1.3.0
v1.2.4
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.1.2
v1.1.1
v1.1.0
v1.0.6
v1.0.5
v1.0.4
v1.0.3
v1.0.2
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
component.json
+2
-2
component.json
js/packery.js
+1
-1
js/packery.js
test/hidden-items.js
+8
-0
test/hidden-items.js
test/index.html
+8
-0
test/index.html
test/test.css
+4
-0
test/test.css
with
23 additions
and
3 deletions
+23
-3
component.json
+
2
-
2
View file @
75b03b63
{
"name"
:
"packery"
,
"version"
:
"1.0.
1
"
,
"version"
:
"1.0.
2
"
,
"author"
:
"David DeSandro / Metafizzy"
,
"main"
:
[
"./js/rect.js"
,
...
...
@@ -13,7 +13,7 @@
"doc-ready"
:
"desandro/doc-ready#>=0.0.3"
,
"eventEmitter"
:
">=3"
,
"eventie"
:
"desandro/eventie"
,
"get-size"
:
"desandro/get-size#>=1.
0
.0"
,
"get-size"
:
"desandro/get-size#>=1.
1
.0"
,
"get-style-property"
:
"desandro/get-style-property"
,
"jquery-bridget"
:
"desandro/jquery-bridget#>=0.1.2"
,
"matches-selector"
:
"desandro/matches-selector#>=0.2.0"
...
...
This diff is collapsed.
Click to expand it.
js/packery.js
+
1
-
1
View file @
75b03b63
/*!
* Packery v1.0.
1
* Packery v1.0.
2
* bin-packing layout library
* http://packery.metafizzy.co
*
...
...
This diff is collapsed.
Click to expand it.
test/hidden-items.js
0 → 100644
+
8
-
0
View file @
75b03b63
test
(
'
hidden items
'
,
function
()
{
var
container
=
document
.
querySelector
(
'
#hidden-items
'
);
var
pckry
=
new
Packery
(
container
);
var
itemElem1
=
pckry
.
items
[
1
].
element
;
var
itemElem2
=
pckry
.
items
[
2
].
element
;
equal
(
itemElem1
.
style
.
left
,
'
0px
'
,
'
2nd item on left
'
);
equal
(
itemElem2
.
style
.
top
,
'
0px
'
,
'
3rd item on top
'
);
});
This diff is collapsed.
Click to expand it.
test/index.html
+
8
-
0
View file @
75b03b63
...
...
@@ -261,6 +261,13 @@
<div class="item h2"></div>
</div> -->
<div
id=
"hidden-items"
class=
"container"
>
<div
class=
"item w2 h2 hidden"
></div>
<div
class=
"item"
></div>
<div
class=
"item"
></div>
<div
class=
"item"
></div>
</div>
<script
src=
"../components/get-style-property/get-style-property.js"
></script>
<script
src=
"../components/get-size/get-size.js"
></script>
<script
src=
"../components/matches-selector/matches-selector.js"
></script>
...
...
@@ -296,6 +303,7 @@
<script
src=
"jquery-plugin.js"
></script>
<script
src=
"declarative.js"
></script>
<script
src=
"is-init-layout.js"
></script>
<script
src=
"hidden-items.js"
></script>
</body>
</html>
This diff is collapsed.
Click to expand it.
test/test.css
+
4
-
0
View file @
75b03b63
...
...
@@ -92,3 +92,7 @@ body {
position: absolute;
top: 0;
}*/
#hidden-items
.hidden
{
display
:
none
;
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help