Diagram.documentBounds:

Diagram.contentAlignment:



Diagram.position:

Diagram.scale:

Diagram.fixedBounds (x, y, width, height):

Diagram.padding (top, right, bottom, left):

Diagram.autoScale:



(but no greater than CommandHandler.defaultScale)

A Diagram's Diagram.contentAlignment property determines how parts are positioned when the Diagram.viewportBounds width or height is different than the Diagram.documentBounds width or height.


GoJS Features in this sample

HTML Interaction

GoJS Diagrams can be used alongside other HTML elements in a webapp. For custom Text Editors, Context Menus, and ToolTips, which are invoked and hidden via GoJS tool operations, it is best to use the HTMLInfo class.

More information can be found in the GoJS Intro.

Related samples