Rounded Rectangle "parameter1" not working without an invisible dummy shape

Hi, please help regarding inconsistent behavior of gojs Rounded Rectangle “parameter1” property (used for specifying border-radius). We cannot get a border radius working on our rectangle without creating an invisible shape (first shape in code). The small invisible/placeholder diagram results in radius which is small no matter what value we give to it, and even that takes effect only on smaller rectangles. Having a larger invisible diagram allows us to make a larger radius on a larger rectangle but with a side effect which is the spacing between badges and rectangle/button. So please suggest a workaround to remove the gaps or even better if we could get rid of the invisible/placeholder diagram altogether :).

Here’s the code snippet:

What result are you getting, and what do you want instead? Small screenshots and sketches are worth a thousand words…

Hi, thanks for your response: here’s the results

result with small invisible diagram:

result with large invisible diagram (current code shown above):

So what precisely is your question? I can’t tell from looking at both screenshots.

The shape in question is three dotted rectangle with “parameter1” property (or you can suggest anything else) to adjust border-radius. We cannot get a border radius working on our rectangle without creating an invisible shape (first shape in code). The small invisible/placeholder diagram results in radius which is small no matter what value we give to it, and even that takes effect only on smaller rectangles. Having a larger invisible diagram allows us to make a larger radius on a larger rectangle but with a side effect which is the spacing between badges and rectangle/button. So please suggest a workaround to remove the gaps or even better if we could get rid of the invisible/placeholder diagram altogether :).

I don’t understand the structure of the code that you quoted. What type of Panel is this all in? Is the Panel bound to some data Array? In that case won’t all of those three Shapes and Picture all disappear, replaced by copies of the itemTemplate? The code does not seem to be formatted and indented correctly, so it’s hard for me to tell. It starts with a curly brace but ends with a close parenthesis.

Hi, yes, shapes are created using item template from an array of items based on certain conditions. I have replaced old code snippet with full panel code in the original question. Thanks.

Oh, I see, all of those Shapes are part of the itemTemplate. But all of those Bindings of “visible” make it so complicated. Why not use two different itemTemplates – one for the circled stars and one for the dots in the rounded rectangle? GoJS Template Maps -- Northwoods Software

A more serious problem is that your binding conversion function is modifying some of the objects in the node. Conversion functions are required not to have any side effects.

Changing objects in a conversion function is a bad idea because there’s no way to ensure that it happens at a time when it would make sense. It’s better to have one or more Bindings directly on the objects whose properties you want to affect.

Hi, thank you so much. Separate Item templates did the trick.