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

go.Picture binding from element to property does not work

$
0
0

@Dominic.Lerbs wrote:

Hello,

I am trying to bind the go.Picture “element” property to a model property (the property contains the base64 encoded image).
However, the image is not displayed, even not when I call updateTargetBindings().

Should this work or is there some mistake?

let picture = new go.Picture();
picture.desiredSize = new go.Size(41, 41);
picture.bind(new go.Binding("element", ValueStreamItemProperty.IMAGE_CLASS, (base64Image: string, obj) => {
    let base64Icon = document.createElement("img");
    base64Icon.src = base64Image;
    return base64Icon;
  }));

goJs: 1.8.35

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles