Filtered view with autolayout #285
-
I have some groups for components and I want to show them independently in filtered views. Everything works, except when you have a large number of components, the autolayout only applies on the original view, not the filtered. So it can leave large white space/blanks in the canvas. Is there any way to address this? See example of my problem here: workspace {
model {
a = softwareSystem "A" {
tags "Tag 1"
c1 = container "C1" {
group1 = group "Group 1" {
comp1 = component "comp1" {
tags "group1"
}
comp11 = component "comp11" {
tags "group1"
}
comp111 = component "comp111" {
tags "group1"
}
comp1111 = component "comp1111" {
tags "group1"
}
comp11111 = component "comp11111" {
tags "group1"
}
}
group2 = group "Group 2" {
comp2 = component "comp2" {
tags "group2"
}
comp22 = component "comp22" {
tags "group2"
}
comp222 = component "comp222" {
tags "group2"
}
comp2222 = component "comp2222" {
tags "group2"
}
comp22222 = component "comp22222" {
tags "group2"
}
}
}
database = container "DB" {
tags "Database"
}
}
comp1 -> database
comp11 -> database
comp111 -> database
comp1111 -> database
comp11111 -> database
comp2 -> database
comp22 -> database
comp222 -> database
comp2222 -> database
comp22222 -> database
}
views {
systemContext a "sys" {
include *
autolayout
}
container a "a" {
include *
autolayout
}
component c1 "c1" {
include *
autolayout
}
filtered "c1" include "group1,Database,Relationship" "c11"
filtered "c1" include "group2,Database,Relationship" "c12"
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Filtered views are designed to share a layout, so this is working as expected -> https://docs.structurizr.com/ui/diagrams/filtered-view Perhaps just use a regular component view with |
Beta Was this translation helpful? Give feedback.
Filtered views are designed to share a layout, so this is working as expected -> https://docs.structurizr.com/ui/diagrams/filtered-view
Perhaps just use a regular component view with
include "element.tag==group1"
instead? (see https://docs.structurizr.com/dsl/expressions for more).