Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Custom Adornment size

$
0
0

@catface wrote:

hi,

not sure what I'm doing wrong here... but I'm trying to show a rectangle around steps... by doing this:

const $GO = go.GraphObject.make;
const adorn = <go.Adornment>$GO(go.Adornment, 'Spot',
    $GO(go.Panel, 'Auto'
        , $GO(go.Placeholder,{ padding: 5 })
        , $GO(go.Shape, { fill: null, stroke: '#E77A00', strokeWidth: 2, strokeDashArray: [3, 2] }))
    );
adorn.adornedObject = node;
node.addAdornment('bm', adorn);

where node is an go.Node..

but... the adornments come up like this:

and are not "encapsulating" the node as I would expect them to.

if I use the same adornment code as a selection template for the node it works perfectly...

any ideas how to fix them?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles