How to makeImage without the background

I set the diagram’s background on another layer with an image. Is that possible that I call:

myDiagram.makeImage()

and only generate an image without the background image?

Is your diagram background implemented by you as a Picture? If so, did you put the Part that is holding that Picture in the “Grid” Layer?

If you did not put that Picture in the “Grid” Layer, then perhaps you should, because by default Diagram | GoJS API has a showGrid option that is false by default, so you would not see anything in the “Grid” Layer.

when i’m using Grid layer for this part, why other parts (nodes and links)'s locations are changed?

They shouldn’t be – check their Part.location to see if they have changed.

But perhaps the diagram has scrolled – the value of Diagram.position has changed. It depends on what you’re doing differently.

why it’s automatically scrolling the diagram? I checked viewportBoundsChanged event and it’s constantly called like infinitely.

That’s odd – it should only be called when the diagram is scrolled or zoomed.