I'm setting both the initialWidth and initialHewight (600 and 400) to the Windows is large enough for the content, but it's not initially positioned at the center of the viewport when opened.
It displayed at the correct size, but it's too far to the right and too close to the bottom.
Any ideas why?
1 Answer, 1 is accepted
0
Vessy
Telerik team
answered on 20 Nov 2024, 09:06 AM
Hello,
In KendoReact, the position of a Window component depends on how its position properties (e.g., left, top) are calculated. If you're experiencing an issue where the window is not centered, it's likely due to how the initial position is being set (or not set). You can ensure that the initialTop and initialLeft are properly calculated to center the window in the viewport by calculating the center position dynamically: