Toggle layers from URL param in iFrame

69 views
Skip to first unread message

Giacomo Manna

unread,
Nov 23, 2023, 3:40:43 AM11/23/23
to draw.io Q&A
Hello, 
Is there a way to export an iFrame of a Diagram so that only a subset of layers are shown? The idea is to have a layered diagram, embedded into several pages, each page showing a different layer. Is this possibile?
Thanks

draw.io Q&A

unread,
Nov 23, 2023, 3:55:35 AM11/23/23
to draw.io Q&A
You can use the layer-ids URL parameter with a space sepapared list of layer IDs. Unfortunately there is a bug in 22.1.3 and earlier that doesn't handle that space correctly. This will be fixed in the next release. Here is an example with one layer ID and here is the same example with two layers (currently not showing anything in 22.1.3 and earlier). The layers=1 URL parameter enables the layers control in the toolbar. You might want to remove that in your case.

Giacomo Manna

unread,
Nov 23, 2023, 4:46:40 AM11/23/23
to draw.io Q&A
This is exactly what i needed, thank you! 

--
You received this message because you are subscribed to a topic in the Google Groups "draw.io Q&A" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drawio/qlwqi2oWN98/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drawio+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/drawio/896b3901-b803-479b-9900-8fdf927e031en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages