@catface wrote:
Hi, I'm using an external canvas to draw some charts... and I need them displayed on a goJS node... so I'm using this Picture element:
$GO(go.Picture, { alignment: go.Spot.Center, stretch: go.GraphObject.Fill, imageStretch: go.GraphObject.Fill, background: 'transparent' }, new go.Binding('element', '', (data: FlowStep, pict: go.Picture) => { const bounds = pict.naturalBounds; return data.getIconElement(bounds.width, bounds.height); }), new go.Binding('opacity', 'iconOpacity') )
problem is... when external canvas refreshes goJS doesn't pick it up until there is another event that would cause a visual refresh... like hovering a node, selecting etc...
also when the diagram initially loads the canvas contents is not displayed until such a refresh event happens.
that's probably because the chart is drawn async and is not there at the time when the canvas is set on the Picture element.I've seen the example with WebGL and that seems to work just fine... so... is there something I need to turn on for this to work?... or not turn off?... or anything that might affect/cause this behaviour in any way?
thanks,
CF
Posts: 4
Participants: 2