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

Request functionality : insert items into the wall #232

Open
llavayssiere opened this issue Sep 8, 2016 · 3 comments
Open

Request functionality : insert items into the wall #232

llavayssiere opened this issue Sep 8, 2016 · 3 comments

Comments

@llavayssiere
Copy link

It is possible to append or prepend items but i would want to insert items into the wall, at the right, at the left, above or below of a given item of the wall. All the items of the wall must be automatically rearranged after items insertion.

@mord4z
Copy link

mord4z commented Nov 25, 2016

wall.appendBlock(yourDataHere);
wall.prependBlock(yourDataHere);

@llavayssiere
Copy link
Author

Thank you for your reply but i don't want to add blocks at the end or at the beginning of the already diplayed blocks of the wall. I need to insert blocks INTO the wall after or before an existing given block displayed into the wall.

New functions could be like that :
wall.appendBlock(blockID, yourDataHere); to insert new blocks into the wall after the block with ID BlockID
wall.prependBlock(blockID, yourDataHere); to insert new blocks into the wall before the block with ID BlockID

For example, if my wall is composed with 6 blocks with ID 1, 2, 3, 4, 5 and 6, and i want to insert 2 new blocks with ID 7 and 8 after or before the block 3, the result of function wall.appendBlock(3, yourDataHere); would be 1, 2, 3, 7, 8, 4, 5, 6 and the result of function wall.prependBlock(3, yourDataHere); would be 1, 2, 7, 8, 3, 4, 5, 6.

It seems possible to add these new functionnalities ?

@kombai
Copy link
Owner

kombai commented Nov 26, 2016

Hi llavayssiere,
Please insert your block in to DOM by use jQuery first, then use freewall later.
http://api.jquery.com/insertafter/
But for performance, freewall will auto assign id for each block.
Best

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