Zoom is not working if I set the diagram.autoScale to "go.Diagram.Uniform"

Zoom is not working on my diagram if I set the diagram.autoscale to go.diagram.uniform;
I need to use autoscale because when the browser is resized, the diagram should be scaled automatically.
I tried to use initialAutoScale. Zoom works fine with this. But it won’t scale automatically when the browser is resized.
Please suggest me any alternatives.

Yes, that is the intended behavior when Diagram.autoScale is set to Uniform – the Diagram.scale is supposed to be calculated and set automatically as the Diagram.documentBounds changes or as the size of the DIV is known to have changed.

So, I assume you want users to be able to zoom in or out. But when the size of the HTMLDivElement changes, what do you want to have happen? If you want to rescale to fit the viewport, you could call Diagram.zoomToFit or Diagram.zoomToRect.

The size of the HTMLDivElement changes when the user resizes the browser window. When the user resizes the browser, the floorplanner should adjust automatically and fit into mydiagramdiv. This is working fine if I use diagram.autoscale with uniform property.

But I cannot zoom-in beyond the viewport div. Still I can zoom out. I was unable to figure out this issue.

Have you tried what I suggested? Don’t set Diagram.autoScale and call Diagram.zoomToFit when the DIV changes size, which from your description seems like in a window 'resize' event listener.

When the div changes, if I use diagram.ZoomToFit, the diagram fits to the div. This is working well. But still unable to zoom in or out.