Hide the panel while the text is "" on the link

The problem is while the text is “”,there stil has a panel.So how can I hide the panel while the text is “”?thanks.

The Grafcet sample, http://gojs.net/latest/samples/grafcet.html, has an example of what you want – just a simple Binding of the visible property on the “text” property:

        $(go.TextBlock,  // only visible when there is text
          . . .,
          new go.Binding("visible", "text", function(t) { return t !== ""; }))