Diagrams.net (ex draw.io) custom link - can’t hide one tag without have all other tags go hidden as well

809 views Asked by At

I’m creating a configurable diagram using the custom link feature in Diagrams.net. When I crest a button to show cells with a certain tag and hide cells with a different tag, it hides all cells. What am I doing wrong here?

2

There are 2 answers

0
Marija On

Is it working in other browsers and Incognito? If not, post a video showing performed steps and the result, please. Also, attach a diagram file so we could test it. If easier, you can submit all the details to the draw.io github issues page.

0
The Fabulous Cube On

Without knowing more, I can't be exactly sure what you're doing wrong, but I can show you what does work and some gotcha's around it.

I'm assuming you've labeled your tags correctly,

  • select each object and check the tag view
  • check containers, if you hide an outer container, all parts are hidden

If you're using the Create Custom Link tool, be sure to validate the link. You can build Actions for Show/Hide, but it's not the best way (anymore).

Update Every time I use this tool either there's something new or at least I didn't notice before.

At the bottom, the last option is Add Tags: Hidden: Visible:
This is the way to go! It works great for Tables! The show/hide method doesn't work well with individual table cells.

This will build a custom link like this:

data:action/json,{
  "actions": [
    {
      "tags": {
        "hidden": [
          "rectangular"
        ],
        "visible": [
          "round"
        ]
      }
    }
  ]
}

Just flip the tags around to do the opposite. This sounds like what you want.
At least, as long as you spell things the same as you did in your tags, it works fine. (I misspelled 'rectangular' and couldn't figure out why it didn't show/hide my rectangles.)