iTwin / appui

Monorepo for iTwin.js AppUi
MIT License
8 stars 2 forks source link

canFloat.defaultPosition ignored if initial widget state is WidgetState.Hidden #551

Closed arnoldas-v closed 9 months ago

arnoldas-v commented 10 months ago

Describe the bug canFloat.defaultPosition and canFloat.defaultSize ignored if initial default widget state is WidgetState.Hidden and later set to WidgetState.Floating. Widget always appears at constant small offset from top-left corner.

To Reproduce

Example widgetConfig:

{
    id: "wid", defaultState: WidgetState.Hidden, content: <div></div>,
    canFloat: { isResizable: true, defaultPosition: { x: 500, y: 500 }, defaultSize: { width: 500, height: 500 } }
}

Later make the widget floating like so: UiFramework.frontstages.activeFrontstageDef?.findWidgetDef("wid")?.setWidgetState(WidgetState.Floating);

Expected behavior Widget initially opens at specified location and size.

Desktop (please complete the applicable information):

raplemie commented 9 months ago

Hi @arnoldas-v, a fix for this was released today in AppUI 4.6.4, let us know if this fixes your issue!

GintV commented 9 months ago

@raplemie Seems to be fixed on 4.6.4, thanks!