Skip to content

refactor(slider): update UI & add brush interaction.#290

Merged
pepper-nice merged 2 commits intomasterfrom
refactor/slider
Feb 15, 2023
Merged

refactor(slider): update UI & add brush interaction.#290
pepper-nice merged 2 commits intomasterfrom
refactor/slider

Conversation

@pepper-nice
Copy link
Copy Markdown
Contributor

@pepper-nice pepper-nice commented Feb 14, 2023

设计稿:https://done.alibaba-inc.com/share/file/UnfMwBa6RLfSgFTQ?pageId=FB673644-9B49-4E46-A95F-CBB4C8DBD077&aid=9538D5EF-0A95-47FC-800B-FA116006ABA8&m=SPECS

功能点

Brush Interaction

iShot_2023-02-14_10 56 02

  • 背景区域支持 Brush Interaction
  • 选中区域 foreground 更新为三部分:
    • 上 3/5:Brush Interaction
    • 下 2/5:Move Interaction
    • 下方新增 Bar:Move Interaction

UI更新

  • handler 更新为小方块
  • Trend 更新颜色,添加面积区域
  • foreground 增加外边框

文字超长换行检测

  • 检测为日期型文字时,通过空格截断,两行显示:

image

  • 普通文本换行显示,超长时省略:

image

@visiky
Copy link
Copy Markdown
Member

visiky commented Feb 14, 2023

ci 问题是d3-xxx 带来的,可能需要处理下

@zhangjunjie-loki zhangjunjie-loki force-pushed the refactor/slider branch 2 times, most recently from d99fab5 to fbde86b Compare February 14, 2023 11:30
@pepper-nice pepper-nice merged commit a7fddd2 into master Feb 15, 2023
@pepper-nice pepper-nice deleted the refactor/slider branch February 15, 2023 01:22
export function getCurrentPoint(e: Event) {
const event = e.originalEvent as MouseEvent;
return {
x: get(event, 'touches.0.pageX', event.pageX),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

这个方法是在哪里使用的~ event.touches 应该是在 Touch 事件下?PC 端的是在 pointEvent 下?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

这个方法本来之前多个地方使用,所以我抽象出来了。但是忘记在slider中替换了,我也下个PR一起改掉!

zhangjunjie-loki pushed a commit that referenced this pull request May 4, 2023
* feat(slider): add brush interaction

* feat(slider): update foreground ui
hustcc pushed a commit that referenced this pull request Oct 7, 2023
* fix(legend-item): update attributes

* fix: cr
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