Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding addNewPins() (or update) method. #4

Open
andrei-gheorghiu opened this issue Apr 3, 2017 · 4 comments
Open

Adding addNewPins() (or update) method. #4

andrei-gheorghiu opened this issue Apr 3, 2017 · 4 comments

Comments

@andrei-gheorghiu
Copy link

andrei-gheorghiu commented Apr 3, 2017

I like, appreciate and use the script.

On using it for this particular case I was looking for a method to add new pins after the initial calculation, without changing or affecting the ones that have already been parsed/placed. I toyed with it for a bit over an hour, trying to call the necessary internal functions but, in my case, the resulting pins were wider and not wrapping correctly. I eventually gave up.

Let me know if you ever end up adding such a method.
Thank you.

@andrei-gheorghiu andrei-gheorghiu changed the title Adding add new items (or update) method. Adding addNewPins() (or update) method. Apr 3, 2017
@mystist
Copy link
Owner

mystist commented Apr 6, 2017

@andrei-gheorghiu Check this out: 4ae6971

If you can run the demo locally, run $('.waterfall').data('mystist.waterfall').addPins($($('#another-template').html())) whenever you like to add new pins!
Newly added pins will shows up when you scrolled to the bottom of page.

Thanks for your contribution!

@mystist
Copy link
Owner

mystist commented Apr 6, 2017

Also, going to rewrite it with ES2015 and add more use cases!
Will be great if can have you on the way there!

@andrei-gheorghiu
Copy link
Author

@mystist Thanks for adding the method.

You rock, man. Keep it up!

@ZhuRuiHeng
Copy link

请问分页时候的数据怎么添加,我这样写$( “#另一个模板”)追加(informArr);另一种模板模板有数据,但不会更新到页面,一闪一闪的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants