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

feat(region-filter): add geometry life circle, after draw animate #2879

Merged
merged 4 commits into from
Sep 30, 2020

Conversation

hustcc
Copy link
Member

@hustcc hustcc commented Sep 29, 2020

@hustcc hustcc force-pushed the fix-annotation-update branch from f759c5a to f25df10 Compare September 29, 2020 08:23
@hustcc
Copy link
Member Author

hustcc commented Sep 29, 2020

动画导致的吗

是的,regionFilter 在 after render 时候时候 copy shape,但是这个是动画前的 shape,如果有动画,那么 regionFilter 和实际 element 中的 shape 就有差距。

@hustcc hustcc requested review from simaQ, lessmost and visiky September 29, 2020 08:47
...cfg,
callback: () => {
isFunction(cfg.callback) && cfg.callback();
this.geometry?.emit(GEOMETRY_LIFE_CIRCLE.AFTER_DRAW_ANIMATE);
Copy link
Contributor

Choose a reason for hiding this comment

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

这个是 element 没执行完一次动画就发射了啊。

这个是不是应该是在 view 层发射动画结束的事件更合适?我记得 G 里面是有几个标识位的:

image

Copy link
Member Author

Choose a reason for hiding this comment

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

我想过了,不冲突。

view 里面做动画是否结束,需要看他的 geometry 还是子 view 的 geometry,太难了啊,还没有想清楚,如果要做 view 上的,肯定是组合他下面的 geometry 的动画结束事件,然后发送一个 view 的动画结束事件。

所以现在 geometry 上做掉,解决一部分问题。

@simaQ simaQ merged commit 2738acb into master Sep 30, 2020
@simaQ simaQ deleted the fix-annotation-update branch September 30, 2020 01:40
hustcc added a commit that referenced this pull request Oct 30, 2020
* fix: 修复数据为空时 slider 报错的问题 (#2855)

* feat: improve interval label position (#2869)

* Fix typos (#2872)

* fix(typos): correct spelling

* fix(typos): spelling

* chore: relase 4.1.0-beta.10 (#2876)

* feat(region-filter): add geometry life circle, after draw animate (#2879)

* feat(region-filter): add geometry life circle, after draw animate

* test(geometry): add test case for geometry life circle

* fix: lint error

* chore: fix test

* refactor(legend): legend update and render with same logic (#2890)

* fix(types): add legend option (#2892)

related to #2891

* fix(pie-demo): typo, fixed #2884 (#2897)

* feat(legend): set default maxItemWidth = 200 (#2889)

* feat(legend): set default maxItemWidth = 200

* test: make ci works

* chore: v4.1.0-beta.11 (#2898)

* fix: 漏斗图 label position 可生效 (#2909)

* docs: marker单词拼写错误修正 (#2911)

Co-authored-by: amin.jin <amin.jin>

* fix(issue-2541): state 状态依然存在时,但由于changeSize, changeData 等重绘后丢失 (#2871)

* fix(issue-2541): state 状态依然存在时,但由于changeSize, changeData 等重绘后丢失

在 eleemnt update 的时候,递归处理 state

close: #2541

* feat(sync-shape-style): sync style with states style

Co-authored-by: xinming <xinming.lxj@antfin.com>
Co-authored-by: hustcc <i@hust.cc>

* docs: modify some descriptions (#2917)

* docs: correct binsWidth to binWidth

* docs: unified legendCfg to legendOption according to source code

Co-authored-by: 羽熙 <yuxi.lx@antfin.com>

* fix(issue-2905): 自定义 shape 的默认样式设置 (#2906)

* refactor: 类型定义完善

* fix(issue-2905): 修复自定义 shape 获取不到默认样式

Co-authored-by: xinming <xinming.lxj@antfin.com>

* feat(annotation): add support for mean / median  (#2922)

* feat(stat): add stat utils

* refactor(annotation): refactor getNormalizedValue, add support for mean

* fix: lint

* fix: 修复 adjust-color label layout 对一些颜色不生效的问题 (#2919)

* fix: fix adjust color label layout not work with rgb and css color names

* fix: add unit test for color util

* fix: median typo (#2925)

* fix(annotation): text annotation re-render will be hidden (#2916)

* fix(annotation): text annotation re-render will be hidden

* refactor(annotation): fixed #2014

* fix: lint

* fix: typo

* chore: v4.1.0-beta.13 (#2926)

* feat: G2 层支持 custom annotation html annotation (#2934)

* feat: support custom shape annotation and html annotation

* fix: correct componenet related types

* fix: shape annotation render

* fix(#2905): 无需传入 color,color 必须来源于字段映射 (#2945)

* chore: 4.1.0-beta.14 (#2947)

* feat(line-style): default use round style (#2953)

Co-authored-by: SimaQ <sima.zhang1990@gmail.com>
Co-authored-by: GeorgeZou <zousongqi@foxmail.com>
Co-authored-by: hustcc <i@hust.cc>
Co-authored-by: Michael Li <xiaoyu.tamu@gmail.com>
Co-authored-by: aminwangaa <42959482+aminwangaa@users.noreply.github.com>
Co-authored-by: Kasmine <736929286@qq.com>
Co-authored-by: xinming <xinming.lxj@antfin.com>
Co-authored-by: xi li <35586469+BBSQQ@users.noreply.github.com>
Co-authored-by: 羽熙 <yuxi.lx@antfin.com>
hustcc added a commit that referenced this pull request Nov 9, 2020
* docs(about): update about-g2 in manual (#2866)

* docs(about): update about-g2 in manual

add h2 Online Demo, Grammar of Graphics, Grammar of Interactions

* docs(mannual): update chart && data

add chart demo && data operation

* docs: init structure (#2873)

Co-authored-by: 羽熙 <yuxi.lx@antfin.com>

* docs: move common to docs folder (#2874)

Co-authored-by: 羽熙 <yuxi.lx@antfin.com>

* chore: run PR preview on pull_request (#2882)

Co-authored-by: 羽熙 <yuxi.lx@antfin.com>

* docs: update chart, data, get-started. add demo playground (#2885)

* docs: update chart, data, get-started. add demo playground

* docs: update get started

Co-authored-by: 羽熙 <yuxi.lx@antfin.com>

* feat(lint): add lint-md for docs lint (#2894)

* docs(view): add docs for view (#2896)

* docs(view): add docs for view

* fix: add rid for playground

* docs(facet): improve facet docs (#2901)

* docs(facet): imporve facet docs

improve content and merge part of facet tutorial into the API docs

* style(region): rename Region to region

* style(facet): change code comment style

* docs(facet): add live demo and change code style

* docs(interaction): add docs for grammar of interaction (#2895)

* docs(interaction): add docs for grammar of interaction

* fix: translate to ZH

* docs(interaction): add live demo for example

* docs: update by cr

* docs(theme): add theme doc (#2927)

* feat(docs): add event document (#2931)

* 文档: 图形语法 (#2932)

* feat(docs-g2): 添加图形语法文档

* fix: 修改cr建议,文件重命名

Co-authored-by: xinming <xinming.lxj@antfin.com>

* New docs adjust (#2936)

* chore(docs): add adjust concept documents

* chore(docs): add adjust api documents

Co-authored-by: xunyi.ch <xunyi.ch@alibaba-inc.com>

* docs: add shape attrs (#2935)

* docs:add shape attrs api docs

* docs: remove shape attrs demo

* docs: resolve some problem

* docs: modify some attr describe

* docs: add pattern

* docs(component): add docs for components (#2938)

* feat: coordinate docs (#2942)

Co-authored-by: aiyin.lzy <nadia.lzy@antfin.com>

* docs: geometry (#2937)

* docs(geometry): 直接将旧的 geometry 文档迁移

* fix(docs): 修改 cr 建议, 文案大小写统一

Co-authored-by: xinming <xinming.lxj@antfin.com>

* docs: 文档补充 (#2949)

* docs: 文档补充

* fix: alternative image

Co-authored-by: liufu.lf <liufu.lf@antfin.com>

* docs: unified types hightlight to sign code (#2951)

* docs: add docs for slider/scrollbar/annotation (#2955)

* docs: event & interaction API (#2957)

* docs: add interaction api

* docs: update event api

* fix: add area, polygon element

* fix: typo

* fix: catalogue of docs (#2958)

* chore: upgrade gatsby theme preview (#2960)

* docs(component): migrate components manaul and add scrollbar manual (#2962)

* docs(component): migrate components manaul and add scrollbar manual

* docs(component): add scrollbar/slider playground

* New docs merge master (#2964)

* fix: 修复数据为空时 slider 报错的问题 (#2855)

* feat: improve interval label position (#2869)

* Fix typos (#2872)

* fix(typos): correct spelling

* fix(typos): spelling

* chore: relase 4.1.0-beta.10 (#2876)

* feat(region-filter): add geometry life circle, after draw animate (#2879)

* feat(region-filter): add geometry life circle, after draw animate

* test(geometry): add test case for geometry life circle

* fix: lint error

* chore: fix test

* refactor(legend): legend update and render with same logic (#2890)

* fix(types): add legend option (#2892)

related to #2891

* fix(pie-demo): typo, fixed #2884 (#2897)

* feat(legend): set default maxItemWidth = 200 (#2889)

* feat(legend): set default maxItemWidth = 200

* test: make ci works

* chore: v4.1.0-beta.11 (#2898)

* fix: 漏斗图 label position 可生效 (#2909)

* docs: marker单词拼写错误修正 (#2911)

Co-authored-by: amin.jin <amin.jin>

* fix(issue-2541): state 状态依然存在时,但由于changeSize, changeData 等重绘后丢失 (#2871)

* fix(issue-2541): state 状态依然存在时,但由于changeSize, changeData 等重绘后丢失

在 eleemnt update 的时候,递归处理 state

close: #2541

* feat(sync-shape-style): sync style with states style

Co-authored-by: xinming <xinming.lxj@antfin.com>
Co-authored-by: hustcc <i@hust.cc>

* docs: modify some descriptions (#2917)

* docs: correct binsWidth to binWidth

* docs: unified legendCfg to legendOption according to source code

Co-authored-by: 羽熙 <yuxi.lx@antfin.com>

* fix(issue-2905): 自定义 shape 的默认样式设置 (#2906)

* refactor: 类型定义完善

* fix(issue-2905): 修复自定义 shape 获取不到默认样式

Co-authored-by: xinming <xinming.lxj@antfin.com>

* feat(annotation): add support for mean / median  (#2922)

* feat(stat): add stat utils

* refactor(annotation): refactor getNormalizedValue, add support for mean

* fix: lint

* fix: 修复 adjust-color label layout 对一些颜色不生效的问题 (#2919)

* fix: fix adjust color label layout not work with rgb and css color names

* fix: add unit test for color util

* fix: median typo (#2925)

* fix(annotation): text annotation re-render will be hidden (#2916)

* fix(annotation): text annotation re-render will be hidden

* refactor(annotation): fixed #2014

* fix: lint

* fix: typo

* chore: v4.1.0-beta.13 (#2926)

* feat: G2 层支持 custom annotation html annotation (#2934)

* feat: support custom shape annotation and html annotation

* fix: correct componenet related types

* fix: shape annotation render

* fix(#2905): 无需传入 color,color 必须来源于字段映射 (#2945)

* chore: 4.1.0-beta.14 (#2947)

* feat(line-style): default use round style (#2953)

Co-authored-by: SimaQ <sima.zhang1990@gmail.com>
Co-authored-by: GeorgeZou <zousongqi@foxmail.com>
Co-authored-by: hustcc <i@hust.cc>
Co-authored-by: Michael Li <xiaoyu.tamu@gmail.com>
Co-authored-by: aminwangaa <42959482+aminwangaa@users.noreply.github.com>
Co-authored-by: Kasmine <736929286@qq.com>
Co-authored-by: xinming <xinming.lxj@antfin.com>
Co-authored-by: xi li <35586469+BBSQQ@users.noreply.github.com>
Co-authored-by: 羽熙 <yuxi.lx@antfin.com>

* docs: advances (#2965)

* docs: add advance docs

* fix: docs lint

* docs: scale docs (#2966)

* feat: add scale doc file

* feat: copy master scale doc content

* feat: copy master data-and-scale content

* feat: add scale doc content

* feat: add en file content

* feat(docs): 添加 label 图表组件 (#2967)

Co-authored-by: xinming <xinming.lxj@antfin.com>

* docs: upgrade gatsby theme & format docs (#2969)

* fix: catalogue of docs

* docs: upgrade gatsby theme

* chore: update gatsby theme

* docs: update reference CR

* chore: remove docs-cache

* docs: 补齐英文占位文件

Co-authored-by: DarrenPei <42288791+DarrenPei@users.noreply.github.com>
Co-authored-by: xi li <35586469+BBSQQ@users.noreply.github.com>
Co-authored-by: 羽熙 <yuxi.lx@antfin.com>
Co-authored-by: pd <15177000+pddpd@users.noreply.github.com>
Co-authored-by: Kasmine <736929286@qq.com>
Co-authored-by: xinming <xinming.lxj@antfin.com>
Co-authored-by: Chen Hao <823147833@qq.com>
Co-authored-by: xunyi.ch <xunyi.ch@alibaba-inc.com>
Co-authored-by: 于向前 <1062888640@qq.com>
Co-authored-by: zqlu <zqlu.cn@gmail.com>
Co-authored-by: 刘珍莹 <1803275951@qq.com>
Co-authored-by: aiyin.lzy <nadia.lzy@antfin.com>
Co-authored-by: 柯南 <31396322+lxfu1@users.noreply.github.com>
Co-authored-by: liufu.lf <liufu.lf@antfin.com>
Co-authored-by: SimaQ <sima.zhang1990@gmail.com>
Co-authored-by: GeorgeZou <zousongqi@foxmail.com>
Co-authored-by: Michael Li <xiaoyu.tamu@gmail.com>
Co-authored-by: aminwangaa <42959482+aminwangaa@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

changeData不触发annotation更新
3 participants