bootstrap-waterfall icon indicating copy to clipboard operation
bootstrap-waterfall copied to clipboard

Adding `addNewPins()` (or update) method.

Open andrei-gheorghiu opened this issue 7 years ago • 4 comments

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 avatar Apr 03 '17 10:04 andrei-gheorghiu

@andrei-gheorghiu Check this out: https://github.com/Mystist/bootstrap-waterfall/commit/4ae697195ead041f4f10de8af51f30d3b2383f35

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 avatar Apr 06 '17 11:04 mystist

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

mystist avatar Apr 06 '17 11:04 mystist

@Mystist Thanks for adding the method.

You rock, man. Keep it up!

andrei-gheorghiu avatar Apr 06 '17 15:04 andrei-gheorghiu

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

ZhuRuiHeng avatar Mar 07 '19 02:03 ZhuRuiHeng