Skip to content

Multiple canvases which change based on user selection #175

Answered by prevwong
real-ashwin asked this question in Q&A
Discussion options

You must be logged in to vote

I'm assuming you want to be able to modify the number of columns after you've dropped the component?

If so, you just need to know the Id of that element and add/remove its child node. Ie:

// When the user decreases the number of columns
const children = query.node(id).descendants();
if ( children.length > 1 ) {
    const lastChildId = children[children.length - 1];
   actions.delete(lastChildId);
}

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@real-ashwin
Comment options

@prevwong
Comment options

@real-ashwin
Comment options

@prevwong
Comment options

@real-ashwin
Comment options

Answer selected by prevwong
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants