I have been using cytoscape on a project for some time, but want to do some custom edits to the visualization which the API doesn't support. I can do these with the native canvas methods. However, once I update the canvas, the changes are not reflected in the downloaded image (generated from the .png() method).
After the graph has rendered, I am editing the canvas like this:
var canvas = $("canvas")[0];
var ctx = canvas.getContext("2d");
ctx.fillText("hello world", 100, 100);
While "hello world" is now visible, subsequent calls to .png() generate an image with no extra text. How can I make my custom changes show up in the image?