Shadows on complex nodes

Hi there

I am trying to add shadows to some of my nodes, specifically when they are selected. The problem I have, is that the actual visible content of the nodes are not the same as the node area itself. In other words, the size of the node is, for example, 200x50, with a shape in the center. The node itself has a transparent background color, so only the shape in the center is visible. I cannot figure out how to apply a shadow to that shape in the center of the node.

Can anybody perhaps help me with this.


Right now the transparent background color of the node disallows you from having a shadow on the piece inside the Node.

Nodes try to be “clever” about shadows and since the background is the largest piece, that’s the piece that gets the shadow, not its inner contents, otherwise you might have a shadow that sits “on top” of the background of the node, which (in cases where there’s no transparency) might not look good.

We are considering adding more fine-grained control for shadows starting in GoJS 1.6, but have not reached a consensus yet.