-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix widget details #1307
Fix widget details #1307
Conversation
nighca
commented
Feb 7, 2025
•
edited
Loading
edited
- Fix auto-selection for widgets
- Fix border-radius for stage panel
Skipping CI for Draft Pull Request. |
@@ -114,7 +114,6 @@ export class Stage extends Disposable { | |||
if (!this.widgetsZorder.includes(widget.id)) { | |||
this.widgetsZorder = [...this.widgetsZorder, widget.id] | |||
} | |||
this.autoSelectWidget() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个改动是 #1289 引入的:
Resolve auto-selection issues for widgets in the
WidgetsEditor
.
这会导致初始化项目(如果项目中存在 widget,load project 时会调用 stage.addWidget
添加进来)时自动选中 widget;当用户再点击右下角 stage panel 选中舞台时,舞台编辑器打开后会自动切换到 Widgets 而不是 Code,因为发现当前存在选中的 widget 项
实际上按照 sprites 等的处理惯例,应该在真的“用户添加”时才去 auto-select,即上方的
const addMonitor = useAddMonitor(true)
这里的 useAddMonitor
中已经封装了 auto-select 的逻辑
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
This PR has been deployed to the preview environment. You can explore it using the preview URL. Warning Please note that deployments in the preview environment are temporary and will be automatically cleaned up after a certain period. Make sure to explore it before it is removed. For any questions, contact the Go+ Builder team. |