12-22-2015 03:45 AM
Hi,
What is the best way to change view when event occurs? I want to display different view when node is clicked.
Thanks.
12-22-2015 07:43 AM
Hi -
what did you mean by 'view'? Give me more details please
- Alex
12-22-2015 08:37 AM
I was trying to create view that would display something like "Click node to show info" and when node is clicked it would show node info, like id and name.
Basically something like this:
view: {
content: {
tag: 'h1',
content: 'Click node to show info'
}
}
would be replaced with:
view: {
content: [
{
tag: 'ul',
props: {
template: {
tag: 'li',
content: [
{
tag: 'p',
content: '{id}'
},
{
tag: 'p',
content: '{name}'
}
]
},
items: '{node}'
}
}
]
}
I'm not sure if I should create two separate views and somehow change between them when the click-event occurs or just replace the content.
I hope this clarifies.
12-22-2015 11:18 AM
Let me describe it just as I understand:
You have a topology; when you click on a node, a pop-up appears, which says 'Click on a node/something to display information'. And when you click it, the information reveals inside the pop-up.
Is that correct?
Alex
12-22-2015 12:03 PM
I have a topology and sidebar. Sidebar should say "Click node to display information" when page is loaded and change to node info when node is clicked.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide