refactor(editor): unify resizable panes with SplitPane / MultiSplitPane components - #650
Open
boomwwww wants to merge 11 commits into
Open
refactor(editor): unify resizable panes with SplitPane / MultiSplitPane components#650boomwwww wants to merge 11 commits into
boomwwww wants to merge 11 commits into
Conversation
… asset panes resizable
Member
原版 @boomwwww
|
Member
Author
Member
Author
再改动(Editor)
同步改动(Template Editor)
|
Member
Author
再改动
|
Member
Author
再改动
|
…d scroll properly
Member
Author
再改动
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




概述
将游戏编辑器与模板编辑器中散落的多套手写拖拽调尺寸实现,统一重构为可复用的 SplitPane(两栏)/ MultiSplitPane(多段)分割面板组件,并接入所有编辑器布局(侧栏、调试器、预览区、资源区)。
背景与动机
此前每个面板的拖拽调宽/调高都是各自实现,存在重复与问题:
--sidebar-width,状态污染、跨实例共享改动内容
新增通用组件
value/onChange)与非受控(defaultSize+persistKey)、min/max钳制且不超容器、fixedPanel、折叠(collapsed)、分隔条样式定制、disablePointerOn防 iframe 穿透、onResize拖拽结束回调minSizes、受控回调、尺寸持久化(刷新后尺寸保持)游戏编辑器
--sidebar-width全局变量的旧拖拽任意宽高保持 16:9,变换覆盖层与 iframe 完全对齐
collapsed),支持折叠/展开,刷新后高度保持模板编辑器
测试