Open karolis-zukauskas opened 11 months ago
@raplemie
@ben-polinsky This would be an issue fixed within core-frontend DrawingViewState
which would need to hanle it correctly (Ensure that Min is at least equal to Max I guess).
For the "Maximum Window" error, throttling/debouncing of the error messages should be implemented either in the toolAdmin
, or in the ViewState.adjustViewDelta
which are also in core-frontend.
Describe the bug Opening
IModelViewportControl
with aDrawingViewState
whose "base model" is an emptyDrawingModel
results in semi-broken view port. In this case, the camera cannot be zoomed in/out and other view manipulation tools (like rotate view) no longer work.You can spot the troublesome code in
DrawingViewState
constructor where it assigns_modelLimits
(its used fordefaultExtentLimits
implementation):To Reproduce Can't suggest a good option for reproduction - create an empty
DrawingModel
and open a viewport to it (IModelViewportControl
).Expected behavior Viewport should be usable when viewing an empty
DrawingModel
(e.g. view manipulation tools should work).Screenshots Getting spammed with errors while trying to zoom in or out.![image](https://github.com/iTwin/itwinjs-core/assets/36916096/ffe6a955-8942-45ce-8aec-a09ac6bf96b6)
Desktop (please complete the applicable information):