-
Notifications
You must be signed in to change notification settings - Fork 143
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:修复浮窗位置的初始化逻辑 #186
fix:修复浮窗位置的初始化逻辑 #186
Conversation
审核者指南由 Sourcery 提供此 PR 通过在设置初始坐标之前更新视图大小并改进安全坐标的日志记录,修复了浮动窗口位置的初始化逻辑。它还包括文档中的版本更新,并在演示应用中添加了位置保存实现。 浮动窗口初始化的序列图sequenceDiagram
participant User
participant FxViewLocationHelper
participant Config
participant BasicView
User->>FxViewLocationHelper: onInit()
FxViewLocationHelper->>FxViewLocationHelper: updateViewSize()
FxViewLocationHelper->>Config: check enableSaveDirection
Config-->>FxViewLocationHelper: hasHistory
alt hasHistory
FxViewLocationHelper->>FxViewLocationHelper: getHistoryXY()
else
FxViewLocationHelper->>FxViewLocationHelper: getDefaultXY()
end
FxViewLocationHelper->>FxViewLocationHelper: safeX(defaultX), safeY(defaultY)
FxViewLocationHelper->>BasicView: updateXY(safeX, safeY)
FxViewLocationHelper->>Config: log initLocation with safeX, safeY
更新后的 FxViewLocationHelper 类图classDiagram
class FxViewLocationHelper {
+onInit()
+onSizeChanged(w: Int, h: Int, oldW: Int, oldH: Int)
-updateViewSize()
-safeX(defaultX: Int)
-safeY(defaultY: Int)
}
class FxViewBasicHelper
FxViewLocationHelper --|> FxViewBasicHelper
class Config {
+enableSaveDirection: Boolean
+iFxConfigStorage: IFxConfigStorage
+fxLog: FxLog
}
class BasicView {
+updateXY(x: Int, y: Int)
}
class IFxConfigStorage {
+hasConfig(): Boolean
}
class FxLog {
+d(message: String)
}
文件级更改
可能相关的问题
提示和命令与 Sourcery 互动
自定义您的体验访问您的仪表板以:
获取帮助Original review guide in EnglishReviewer's Guide by SourceryThis PR fixes the initialization logic of floating window positions by updating the view size before setting initial coordinates and improving the logging of safe coordinates. It also includes version updates in documentation and adds position saving implementation in the demo app. Sequence diagram for floating window initializationsequenceDiagram
participant User
participant FxViewLocationHelper
participant Config
participant BasicView
User->>FxViewLocationHelper: onInit()
FxViewLocationHelper->>FxViewLocationHelper: updateViewSize()
FxViewLocationHelper->>Config: check enableSaveDirection
Config-->>FxViewLocationHelper: hasHistory
alt hasHistory
FxViewLocationHelper->>FxViewLocationHelper: getHistoryXY()
else
FxViewLocationHelper->>FxViewLocationHelper: getDefaultXY()
end
FxViewLocationHelper->>FxViewLocationHelper: safeX(defaultX), safeY(defaultY)
FxViewLocationHelper->>BasicView: updateXY(safeX, safeY)
FxViewLocationHelper->>Config: log initLocation with safeX, safeY
Updated class diagram for FxViewLocationHelperclassDiagram
class FxViewLocationHelper {
+onInit()
+onSizeChanged(w: Int, h: Int, oldW: Int, oldH: Int)
-updateViewSize()
-safeX(defaultX: Int)
-safeY(defaultY: Int)
}
class FxViewBasicHelper
FxViewLocationHelper --|> FxViewBasicHelper
class Config {
+enableSaveDirection: Boolean
+iFxConfigStorage: IFxConfigStorage
+fxLog: FxLog
}
class BasicView {
+updateXY(x: Int, y: Int)
}
class IFxConfigStorage {
+hasConfig(): Boolean
}
class FxLog {
+d(message: String)
}
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
嗨 @Petterpx - 我已经审查了你的更改,它们看起来很棒!
这是我在审查期间查看的内容
- 🟢 一般问题:一切看起来都很好
- 🟢 安全性:一切看起来都很好
- 🟢 测试:一切看起来都很好
- 🟢 复杂性:一切看起来都很好
- 🟢 文档:一切看起来都很好
帮助我变得更有用!请在每条评论上点击 👍 或 👎,我将使用反馈来改进你的审查。
Original comment in English
Hey @Petterpx - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
通过确保在设置坐标之前更新视图大小,修复浮动窗口位置的初始化逻辑。更新文档以反映最新的库版本。
错误修复:
文档:
Original summary in English
Summary by Sourcery
Fix the initialization logic for the floating window position by ensuring the view size is updated before setting coordinates. Update documentation to reflect the latest library version.
Bug Fixes:
Documentation: