do not prepend if already reloading#130
Open
kyrasteen wants to merge 2 commits intoeiriklv:masterfrom
Open
Conversation
84ab162 to
72383bd
Compare
kyrasteen
commented
Jun 19, 2018
| expect(secondElements[i].style.left).toEqual(secondPositions[i].left + 'px'); | ||
| expect(secondElements[i].style.top).toEqual(secondPositions[i].top + 'px'); | ||
| } | ||
| // done(); |
Author
There was a problem hiding this comment.
@eiriklv - I updated this test to account for masonry's default transitionDuration. I will look into it further, but there seems to be a timing issue when the done callback is utilized here (test fails).
Collaborator
|
Thanks for the PR @kyrasteen :-) |
|
Possible the oldest approved PR I've seen in a very very long time :D @afram lol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
I really appreciate the work done for this component, so thank you!
I found a positioning issue with a particular use case I have. I am prepending items to the masonry layout while maintaining the position/index of some existing items. I am not using the 'stamp' option of masonry in order to still utilize the layout/positioning logic for the 'stuck' items.
Here is a simplified example of the issue:
https://codesandbox.io/s/m5888np119
If you click 'prepend' you will see the positioning issue. The turquoise item should be kept in place. I would like the end result for the example to look like this after prepending one item:

If a child of the masonry layout has an image, I have seen the issue be resolved most of the time by the
layoutcall in the images loaded callback, but not always.Didn't see the need to prepend the new item(s) when items are already being reloaded before a layout call. Let me know what you think of the change. :)