Skip to content
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: improve global contextMenu in activity bar #200

Merged
merged 3 commits into from
Jun 24, 2021
Merged

Conversation

mortalYoung
Copy link
Collaborator

简介

  • 优化 activityBar 中 global item 点击唤起菜单的方式和最顶部的 menuBar 不一样的问题。menuBar 是通过 DropDown 组件来唤醒,会去计算位置,由于点击唤起菜单和右键点击唤起菜单不同,所以这里选择也用 DropDown 的方式

主要变更

  • 优化 activityBarItem 中的点击事件
  • 优化 DropDown 中的 placement 的类型,新增 rightBottom 表示支持居右并底部对齐

src/common/dom.ts Outdated Show resolved Hide resolved
@wewoor wewoor merged commit 7ad58ab into main Jun 24, 2021
@wewoor wewoor deleted the fix/activityBar branch June 24, 2021 09:30
@@ -122,8 +125,10 @@ export function getPositionByPlacement(
y = domRect.y + domRect.height;
} else if (placement === 'left') {
x = domRect.x - domRect.width;
} else if (placement === 'rightBottom') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} else if (placement === 'rightBottom') {
} else if (placement === 'bottomRight') {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants