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

Server-side images of diagrams with pictures using PhantomJS

$
0
0

@Doogal wrote:

Hi

I've started from the sample here
http://gojs.net/latest/intro/serverSideImages.html

This works great except I am having trouble getting the images in our diagram out to the generated image. I've changed the node template in the sample to the following

  myDiagram.nodeTemplate =
    $(go.Node, "Auto",
      $(go.Shape, "RoundedRectangle",
        // Shape.fill is bound to Node.data.color
        new go.Binding("fill", "color")),
      $(go.Picture, {
        source: "about.png",
        width: 48, height: 48
      })
    );

I've run this in a web page and the images appear but when running in PhantomJS none of the images appear. I suspect this is due to cross origin issues but am not sure how to fix it in GoJS or PhantomJS. Is there an example of generating images of diagrams that contain an image?

Posts: 7

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles