vscode-elements / elements

Web component library for developing Visual Studio Code extensions
https://vscode-elements.github.io
MIT License
156 stars 28 forks source link

fix: call _initPosition if split attribute changes value. #211

Closed RedGlow closed 4 weeks ago

RedGlow commented 4 weeks ago

If the attribute "split" changes its value from horizontal to vertical or vice-versa, the component changes its behavior but does not update the position attributes of the start and end containers, producing an inconsistent visual state.

This patch forces a call to _initPosition whenever "split" changes its value, and extends _initPosition so that it cleans up a potential previous state.

bendera commented 4 weeks ago

Wow, nice catch! Thanks!