Layers on Steroids?

227 views
Skip to first unread message

Bill Elliott

unread,
Aug 31, 2016, 5:38:57 PM8/31/16
to draw.io
Hello all...

I am doing VERY well with building flowcharts with Draw.IO, so thank you very much for such a great product.  I am quite a fan!  The diagrams I am building, I 'export' as HTML and have them posted on my company's intranet website and they depict the flow of the site, and underlying components on each page.

I've built one XML chart that has multiple layers (background, and say, Layer01, Layer02, Layer03, etc).  The 'background' layer contains all the common objects, and each of the other layers contain objects particular to that 'flavor' of the page/chart. Then, I hide all the layers except for the 'background' layer and one of the unique layers (say Layer01). I then export this layout as an HTML file (say, Page01).  Then, I hide Layer01, and show Layer 02, and perform the export again, but saving this one as Page02, say.  I then repeat this process for each 'layer'.  Therein, I end up with ONE 'master' design page (the actual XML page I edit inside Draw.IO)... but export each as their own HTML page.

BTW - I know that 'each' HTML exported page also includes a 'layer' toolbar, which allows users/viewers to toggle on/off each layer as they want... but, for the purposes of the larger flowchart of pages in this 'website', I want/need to make this a bit easier to maintain/manage (eliminate redundancy).  All that said...

What I Am Doing
In the 'parent' page, I have separate links/components that contain a 'link' to each of the respective HTML pages (for Page01, Page02, Page03, etc)

What I Want To Do
In the 'parent' page, I'd really RATHER have a 'link' to one page (the master 'layers' page, instead of Page01, Page02, Page03, etc) and include a parameter to hide/show respective layers.  Maybe a URL something like; http://TheDomainName.wow/PageAll?LayersOn=background,layer02.

That would land me on that master page, but only have the Background and Layer02 layers visible (on).

Question
Is there a way to turn on/off layers of a 'target' URL page (user clicks the link, and when they arrive on that page, certain layers are on/off based on values passed in through the link)?


In advance... thank you for considering this!

Gaudenz Alder

unread,
Sep 9, 2016, 11:00:10 AM9/9/16
to draw.io
Not via URL parameters, but for embedded HTML the data-mxgraph attribute of the DIV contains a JSON object where a layers property can be added as explained here: https://support.draw.io/pages/viewpage.action?pageId=12878123
Reply all
Reply to author
Forward
0 new messages