Commit Graph

160 Commits

Author SHA1 Message Date
Yanyan-Wang
fae55e69f2 chore: update version numbers 2023-09-10 23:27:15 +08:00
Yanyan Wang
ab461c1e27
feat: layout supports relayoutAtChangeData config to disable relayout… (#4796)
* feat: layout supports relayoutAtChangeData config to disable relayout while changeData of graph is called;

* chore: update build script
2023-08-07 16:13:36 +08:00
Yanyan Wang
f7f04cff5f
fix: parent combo size problem, closes: #4734 (#4750)
* fix: parent combo size problem, closes: #4734

* chore: update version num
2023-07-18 09:55:11 +08:00
Yanyan Wang
36708955bd
chore: unify the version num for sub packages (#4720) 2023-07-07 10:58:03 +08:00
Yanyan Wang
42a29b1310
fix: custom node with image shape, setting state makes the image lost, closes: #4707 (#4719)
* fix: custom node with image shape, setting state makes the image lost, closes: #4707;

* fix: custom node with uncache shape in shapeMap
2023-07-07 10:36:40 +08:00
Yanyan Wang
4b661b53d5
fix: scroll delta for old version of firefox; (#4641) 2023-06-13 21:05:33 +08:00
Yanyan Wang
08e955ea45
4.8.16 (#4636)
* fix: edge label is not draggable, closes: #4612; fix: error occurs while clicking back button on timebar when the slider is already on the start, closes: #4598; docs: scrollNode demo drag node problem, closes: #4626;

* chore: update layout version
2023-06-13 13:40:11 +08:00
Yanyan Wang
34f2265030
fix: combo animate is not activated with createCombo; (#4570)
* fix: combo animate is not activated with createCombo;

* Fix issue#4552, another 404 not found and  typo errors (#4554)

* fix: Fix the issue#4552 both in en-document and cn-document

* fix: Fix the 404 error in "/api/items/combo-methods" and "api/items/node-methods" and "/api/items/edge-methods" The demo URL of these pages is not valid. I added a "#" tag after URL

* fix: 文档中此处有错误,将此处的内置节点改为内置combo

* fix:文档此处有误,将此处的自定义节点改为自定义边

* fix: layout url (#4529)

---------

Co-authored-by: zqqcee <55946653+zqqcee@users.noreply.github.com>
2023-06-05 17:00:21 +08:00
Yanyan Wang
9a6b789b8f
chore: upgrade layout for umd (#4528) 2023-05-24 10:41:50 +08:00
Yanyan Wang
993f2ae018
chore: dependency (#4500) 2023-05-12 17:00:13 +08:00
Yanyan Wang
a5cf6867c8
fix: position animations; (#4457)
* fix: position animations;

* chore: update version nums

* fix: spiky donuts #3849 (#4452)

* docs: 修复文档表格展示错误问题 (#4454)

Co-authored-by: chenkun <ck01107787@antgroup.com>

* fix: remove label if no longer present (#4441)

* fix: remove label if no longer present

* fix: remove label background from shapeMap

* Update edge.ts (#4486)

自定义quadratic类型曲线是如传进去curvePosition,curveOffset,isArray判断应该为cfg

* fix: fix issue if set timebar in independent container on destroy (#4497)

* feat: timebar 新增putInGraphContainer属性决定是否将timebar置于graph container 中 (#4492)

* fix: fix issue if set timebar in independent container on destroy

* feat: timebar 新增putInGraphContainer属性决定是否将timebar置于graph container 中 (#4492)

---------

Co-authored-by: ensconced <joebarnett876@gmail.com>
Co-authored-by: OctKun <cainchen97@qq.com>
Co-authored-by: chenkun <ck01107787@antgroup.com>
Co-authored-by: H丶MF <723455362@qq.com>
Co-authored-by: Aaron <yoonagoddess@163.com>
2023-05-12 13:46:03 +08:00
Yanyan Wang
aab80cdc9c
fix: update layout from animate false to true; (#4453)
* fix: update layout from animate false to true;

* chore: update version nums
2023-04-23 11:43:08 +08:00
Yanyan Wang
a31c45d873
fix: type for draw function in elements, closes: #4395 (#4398)
* fix: type for draw function in elements, closes: #4395

* fix: force2 with webworker, closes: #4394

* fix: excludeInvisibles with collapse-expand behavior problem;

* chore: update version nums

* fix: tooltip top position error (#4411)

fix: tooltip top position error

---------

Co-authored-by: hipi <22478003+hipi@users.noreply.github.com>
2023-04-08 19:16:29 +08:00
Yanyan Wang
dcb27b013f
fix: preset layout with gpu layout; (#4346)
* fix: preset layout with gpu layout;

* fix: isBig must be number for use in path (#4306)

* fix: Fixed issue of nested child combo being rendered under parent, preventing interation with it (#4310)

* fix: Node dragging starting one event too late. (#4365)

* fix: large graph demo page (#4321)

* fix: Node dragging starting one event too late.

---------

Co-authored-by: Yanyan Wang <yanyanwang93@gmail.com>

* feat: tree graph layout with excludeInvisibles prop, closes: #4340; fix: type problems, closes: #4301;

* docs: update change log and site docs

* chore: refine

---------

Co-authored-by: ensconced <joe.barnett876@gmail.com>
Co-authored-by: Gary McGovern <gary.mcgovern@siren.io>
Co-authored-by: Kevin Fontanari <kevin.fontanari@gmail.com>
2023-03-21 17:55:58 +08:00
Yanyan Wang
0850433350
fix: loop edge position after node dragging; fix: handle drag-node in… (#4304)
* fix: loop edge position after node dragging; fix: handle drag-node interrupted by browser contextmenu and mouseup event outside the viewport;

* docs: typo
2023-02-21 19:07:46 +08:00
Yanyan Wang
561787310e
fix: loop edge position for custom rect node, closes: #4236; (#4240)
* fix: loop edge position for custom rect node, closes: #4236;

* fix: drag-node should be ended after data changed;

* chore: upgrade version num
2023-02-20 17:57:34 +08:00
Yanyan Wang
2081be59fd
fix: combo with size and fixSize setting; (#4234)
* fix: combo with size and fixSize setting; fix: active-relations with combo and clear states for destroyed virtual edges leads to unexpected error, closes: #4229; fix: applyCloneClip with uncliped image leads to unexpected error, closes: #4231;

* feat: resize combos when dragging contained elements (#4225)

* feat: drag-node and drag-combo support dynamically changes parent combos size while dragging the child items;

* chore: update tests

* chore: update version nums

---------

Co-authored-by: Fabio Tacchelli <fabio.tacchelli@gmail.com>
2023-01-31 18:30:14 +08:00
Yanyan Wang
7cdc01cfa6
fix: error edge link positions for circle combo with size config (#4216)
* fix: error edge link positions for circle combo with size config, closes: #4193;

* fix: indented layout with different node widths, closes: #4200; feat: indented layout with align config to tell the node drawing alignment;

* chore: update verison num

* chore: update tests
2023-01-30 11:36:14 +08:00
Yanyan Wang
57b11a93f7
fix: unexpected error occurs when points of a hull are all duplicated; (#4192) 2023-01-06 17:01:22 +08:00
Yanyan Wang
27cd01d156
perf: add updateShape function for donut node, closes: #4091; chore: … (#4178)
* perf: add updateShape function for donut node, closes: #4091; chore: refactor the implementation of donut node;

* feat: legend supports diamond, ellipse, triangle, star shape, closes: #3876;

* feat: add redo undo for TreeGraph, closes: #3664, #2414;

* chore: update version nums

* chore: refine
2023-01-03 11:09:01 +08:00
Yanyan Wang
84f592d6e3
perf: use simple router for polyline when there is no obstacles, the … (#4154)
* perf: use simple router for polyline when there is no obstacles, the performance is improved, closes: #2658; perf: improve the performance for polyline by improve the pathFind implementations; fix: unexpected backforward path caused by redundant controlPoints for polyline;

* fix: minimap viewport size problem when the graph have no width or height param, closes: #4152;

* fix: combo with fixSize has wrong link points for related edges, closes: #4153;

* chore: refine

* docs: update docs

* perf: layout without nodes at first time should not tweak at the second time;

* chore: refine

* chore: refine

* chore: update version num
2022-12-26 14:45:58 +08:00
Yanyan Wang
2d79ce989d
fix: destroy graph and call layout problem, closes: #4126; (#4142)
* fix: destroy graph and call layout problem, closes: #4126;

* remove duplicated event emit, closes: #4043; fix: mousedown on other DOMs and mouseup on canvas, click is triggered unexpectly, closes: #2922; fix: mousemove and mouseup are not triggered with drag and dragend, closes: #3086; fix: replace DOMMouseScroll and mousewheel with wheel event, closes: #3256; perf: refresh item when updateChild, updateChildren, addChild, removeChild for TreeGraph;

* chore: refine

* chore: update version num
2022-12-15 19:41:35 +08:00
Yanyan Wang
98b92a9a9f
fix: expandCombo and the edges of the children are not refreshed, clo… (#4132)
* fix: expandCombo and the edges of the children are not refreshed, closes: #3250;

* fix: edge update with destroyed end items, closes: #3925

* fix: the item param of the afterremoveitem for combo should be data;fix: add type to the parameter list of beforeremoveitem event; fix: edge update with destroyed end items, closes: #3925; perf: take the max value of padding array for circle combo, closes: #4113; feat: support top-center for rect combo label position, closes: #3750; feat: createCombo and uncombo support stack, closes: #3695, #3323;

* docs: update docs about shape name

* docs: update CHANGELOG
2022-12-15 11:28:28 +08:00
Yanyan Wang
c5cf67b7bb
feat: allowDragOnItem config for scroll-canvas; (#4093)
* feat: allowDragOnItem config for scroll-canvas;

* docs: add sequence graph demo to the site

* feat: allowDragOnItem config for scroll-canvas, closes: #3062;feat: hideEdge config for minimap to enhance the performance, closes: #3158;fix: minimap has incorrect shape zIndex with keyShape type and delegate type, closes: #3132;fix: minimap viewport dragging problem in firefox and safari, closes: #2939;

* feat: allow to setTextWaterMarker and setImageWaterMarker with an undefined parameter to remove the watermarker, closes: #3478; docs: add sequence demo to site, closes: #3027;perf: unify the formats of shouldBegin, shouldUpdate, and shouldEnd in behaviors, closes: #3028; perf: fitView and fitCenter according to the corner ndoes insead of getCanvasBBox to avoid maximum call stack size exceeded, closes: #2447; fix: treeGraph changeData with node properties lost, closes: #3215; fix: error occurs while calling updateLayout from gpu layout to a cpu layout, closes: #3272; fix: error occurs while calling changeData to remove a node in a combo, cloases: #3293;

* chore: refine
2022-11-29 11:03:33 +08:00
Yanyan Wang
d725a49c93
fix: dagre layout for collapsed combos; perf: give layout algorithm vedges; (#4092) 2022-11-25 15:16:57 +08:00
Yanyan Wang
9dfe146ab4
- fix: error occurs while dragging combo with drag-node behavior; (#4073) 2022-11-18 18:56:08 +08:00
Yanyan Wang
58ebfa95ec
docs: update the urls about vision to antgroup (#4072) 2022-11-17 18:23:41 +08:00
Yanyan Wang
525631c0b0
docs: update the website urls in readme to antgroup (#4068) 2022-11-17 10:50:27 +08:00
Yanyan Wang
142e9eaeb8
fix: unexpected move with fitCenter with animation; fix: update modelRect with rendering error, closes: #4041; (#4042) 2022-11-11 17:06:45 +08:00
Yanyan Wang
76da66324b
chore: upgrade version num (#4036)
* chore: upgrade version num

* Fix combos to inherit animation setting from graph (#3992)

* fix: createCombo didn't update the "comboTrees" correctly (#3993)

* Fix the comboTrees update in createCombo()

* Copy tests from core to pc

* Fix useless conditional

* Change variable name to not include verb

* Add some missing types

* docs: update traverseTree and traverseTreeUp doc

* fix: drag-canvas incorrectly stopped by right click; perf: improve the performance of setItemState and active-relations again;

* fix: setItemState on node, related edges linking positions are not refreshed; feat: graph supports optimizeThreshold to control the number threshold of nodes to enable the optimization on rendering and interaction, currently only affects the edges refresh while the related node state style changed;

* chore: update CHANGELOG

* chore: tests refine

* docs: update docs and demos for force2 on website

Co-authored-by: daniele-pini <daniele.pini@siren.io>
2022-11-09 21:16:52 +08:00
Yanyan Wang
3c73d17cd2
perf: improve the performance of setItemState and active-relations; perf: keyShape is hiden when a combo is collapsed with collapsedSubstituIcon; fix: drag-node incorrectly stopped by right click; fix: timebar plugin destroy problem, closes: #3998; fix: controllerCfg does not take effect in timebar with tick type, closes: #3843; feat: timebar plugin supports config the default time type; feat: timebar with play and pause API; chore: use addItem and removeItem instead of changeData in timebar; (#4033) 2022-11-08 11:14:22 +08:00
Yanyan Wang
d6d9a1f388
4.7.10 (#4017)
* perf: force layout with animation using graph refreshPositions instead positionsAnimate;

* perf: force layout with animation calls graph refreshPositions instead positionsAnimate while refreshing;
2022-10-27 15:01:27 +08:00
Yanyan Wang
55fee1e0ea
perf: init node positions when the node has no x and y in the origin data; (#4014) 2022-10-26 19:52:36 +08:00
Yanyan Wang
ce0dbae399
fix: image lost while updating the size for an image node, closes: #3938; (#3991)
* fix: image lost while updating the size for an image node, closes: #3938;

* chore: update version num

* 自环边样式 startPoint & endPoint 计算问题 #3974 (#3990)

* fix: 自环问题连接点问题修复

* feat: change var to halfOfWidth and halfOfHeight

* feat: 修改注释

* feat: 完善文档

* feat: 修改注释

* feat: 修改注释

* feat: add loop feat unit test

* feat: 删除空行

* feat: 修改名称

Co-authored-by: linjie <xinxinsong.sxx@alibaba-inc.com>

Co-authored-by: tulaoda <coderaxin@163.com>
Co-authored-by: linjie <xinxinsong.sxx@alibaba-inc.com>
2022-10-13 16:00:52 +08:00
Yanyan Wang
6561f296bd
feat: getPlaceholder for Annotation plugin; (#3989)
* feat: getPlacehoder for Annotation plugin;

* chore: refine

* chore: refine
2022-10-12 17:11:16 +08:00
Yanyan Wang
155afcbdf8
fix: Annotation readData with inexistent item; (#3985)
* chore: refine

* feat: performance tweaks (#3969)

* Don't set beforeDragNodes if stack ops are off

* Prevent clone if stack ops are off

* Reduce lookups

* Simplify condition

* chore: refine

* chore: refine

* doc: update CHANGELOG

Co-authored-by: Fabio Tacchelli <fabio.tacchelli@gmail.com>
2022-10-10 22:04:34 +08:00
Yanyan Wang
5fdb516db1
perf: Annotation support updating positions for outside cards by calling updateOutsideCards; (#3981)
* perf: Annotation support update positions for outside cards by calling updateOutsideCards;

* chore: refine

* doc: fix custom-layout url broken (#3967)

* docs: fix the wrong path (#3948)

* fix: .worker file contains non-worker code (#3956)

* feat: more descriptive stackchange events (#3970)

* doc: refine

* feat: add combo support in brush-select behavior (#3972)

* Add combo support in brush-select behavior

* Add common function for bbox center checking

Co-authored-by: nana7mi <zzyagg@gmail.com>
Co-authored-by: btea <2356281422@qq.com>
Co-authored-by: liao02x <liao02x@gmail.com>
Co-authored-by: Fabio Tacchelli <fabio.tacchelli@gmail.com>
Co-authored-by: daniele-pini <daniele.pini@siren.io>
2022-10-09 17:59:21 +08:00
Yanyan Wang
934661e6ed
perf: Annotation min-width and input width; (#3947)
* perf: Annotation min-width and input width;

* Fix build issue (#3934)

* fix: there is no dir named mobile

* fix: path-util is not marked as dependency of plugin, but actually it is

Co-authored-by: xiangyifeng <xiangyifeng@tencent.com>

Co-authored-by: fxiangyi <fxiangyi@gmail.com>
Co-authored-by: xiangyifeng <xiangyifeng@tencent.com>
2022-09-19 16:13:08 +08:00
Yanyan Wang
c0f6161355
feat: beforechangedata and afterchagnedata for graph changeData; feat… (#3932)
* feat: beforechangedata and afterchagnedata for graph changeData; feat: Annotation supports icon events callbacks; feat: Annotation supports defaultBegin position configuration for new annotation cards; perf: Annotation updated automatically when graph data changed and graph item visiblity changed;

* fix: Destroy legend canvas when the plugin is destroyed, closes: #3931; fix: unexpected console, closes: #3926
2022-09-09 17:18:03 +08:00
Yanyan Wang
8a4f7a5878
feat: Annotation plugin supports configuring behaviors for collapse a… (#3921)
* feat: Annotation plugin supports configuring behaviors for collapse and close icon; feat: Annotation plugin supports canvas annotation; fix: gForce layout has animation by default;

* fix: createCombo creates vedges asynchronously, closes: #3912; fix: strange polyline path edge related to combo, closes: #3913;

* chore: refine

* chore: refine
2022-09-08 00:10:38 +08:00
Yanyan Wang
63f43ce478
feat: Annotation plugin; fix: combo and drag-node with heap maximum p… (#3911)
* feat: Annotation plugin; fix: combo and drag-node with heap maximum problem, closes: #3886; fix: combo and graph re-read problem, closes: 3902; fix: d3 force layout with default animate; perf: bundling plugin ts problem, closes: #3904;

* chore: refine

* chore: refine
2022-09-05 18:21:40 +08:00
Yanyan Wang
594106e422
fix: combo collapsed edge problems, closes: #3839; (#3885)
* fix: combo collapsed edge problems, closes: #3839;

* feat: fitItems function (#3838)

* feat: fitItems function

* Add test

* Fix bbox lower boundary

* Refactor into focusItems

* chore: update version num

* fix:Add success call in layoutWithWorker (#3873)

Co-authored-by: Yuran Ou <yuran.ou@citrix.com>

Co-authored-by: Fabio Tacchelli <fabio.tacchelli@gmail.com>
Co-authored-by: Yuran Ou <50813733+ouyuran@users.noreply.github.com>
Co-authored-by: Yuran Ou <yuran.ou@citrix.com>
2022-08-23 12:51:29 +08:00
Yanyan Wang
1a52e3da05
feat: force2 from graphin-force; feat: preset for layout; feat: tweak… (#3853)
* feat: force2 from graphin-force; feat: preset for layout; feat: tweak incremental layout init for force like layouts;

* chore: update tests

* chore: upgrade version num

* chore: onLayoutEnd with nodes param
2022-08-19 17:40:10 +08:00
Yanyan Wang
915297d631
fix: legend changeData problem, closes: #3561; fix: redo and undo wit… (#3829)
* fix: legend changeData problem, closes: #3561; fix: redo and undo with an image node, closes: #3782;

* fix: call refreshPositions instead of positionsAnimate while there is no layout configuration;

* test: update test cases
2022-08-02 20:19:32 +08:00
Yanyan Wang
5407845e42
fix: wrong dropped position for drag-combo with enableDelegate, close… (#3821)
* fix: wrong dropped position for drag-combo with enableDelegate, closes: #3810; fix: stack for drag-combo with onlyChangeComboSize, closes: #3801; fix: stack updateLayout, closes: #3765; fix: drag-canvas and zoom-canvas with enableOptimize show a hiden shape which is controlled by state, closes: #3635;

* chore: refine CHANGELOG

* fix: only regenerate id when id is undefined (#3670)

* fix: only regenerate id when id is undefined

* feat: normalize id

* fix: findAllByState should not select hidden nodes (#3784)

* fix: findAllByState should not select hidden nodes

* clean up

* clean up

* update interface

* fix: react node typings inaccuracy (#3790)

* docs: react node match typings

* fix: react node optional `style` properties

* fix: react node `React 18` compatibility

* docs: fix a typo

* feat: rework animated fitView (#3796)

* Add lerpArray function

* Move getAnimateCfgWithCallback function

* Reimplement animated fitView

* Animated fitview rework

* Remove unused import

* Fix graph warp when hitting max/min zoom

* Avoid multiple transforms

* docs: update CHANGELOG (#3822)

* docs: update CHANGELOG

* chore: upgrade version num

Co-authored-by: AlbertAz <ziyuximing@163.com>
Co-authored-by: femiabdul <83455275+femiabdul@users.noreply.github.com>
Co-authored-by: MikalaiLappo <102466089+MikalaiLappo@users.noreply.github.com>
Co-authored-by: Fabio Tacchelli <fabio.tacchelli@gmail.com>
2022-08-01 16:10:53 +08:00
Yanyan Wang
5a7681c85f
perf: optimize the performance of combo graph; (#3769)
* perf: optimize the performance of combo graph;

* chore: upgrade license for g6-react-node

* chore: upgrade version nums

* docs: new demo for viewport animation
2022-07-04 10:02:47 +08:00
Yanyan Wang
27d980ee41
perf: optimize the performance of combo graph first rendering; (#3763) 2022-06-29 16:09:41 +08:00
Yanyan Wang
4fc7ad5ea7
fix: star node with leftBottom linkPoint show and hide problem; fix: … (#3760)
* fix: star node with leftBottom linkPoint show and hide problem; fix: relayout does not execute onAllLayoutEnd problem;

* fix: combo edge state update problem, closes: #3639;

* docs: add comboCombined demo for site

* docs: running arrow demo
2022-06-28 19:52:44 +08:00
Yanyan Wang
4512b10bcb
fix: custom layout warning and layout failed problem; (#3758)
* fix: custom layout warning and layout failed problem; fix: upgrade layout to fix DagreLayoutOptions type error; fix: upgrade layout to fix comboCombined with original node infomations problem;

* chore: tests refine

* Truncate node labels (#3690)

* Added maxLength property to LabelStyle

* Added unit test for label max length

* Added truncateLabelByLength util function

* Added safety checks for negative and non-number maxLength values

* Moved maxLength prop to labelCfg

* feat: maxLength for labelCfg;

* chore: upgrade version nums

Co-authored-by: Tony <51513780+TonyN96@users.noreply.github.com>
2022-06-28 14:44:14 +08:00
Yanyan Wang
778720cc89
fix: spelling error for nodeselectChange, closes: #3736; fix: update … (#3748)
* fix: spelling error for nodeselectChange, closes: #3736; fix: update node icon from show false to show true; feat: combo supports collapsedSubstituteIcon showing after collapsed; feat: remove animations while first rendering with (collapsed)combos;

* chore: refine

* chore: gitleaks pin to v1-6-0

* fix: afterrender should be emitted when the layout is not configured;

* fix: update combo edge at the same time onDrag (#3734)

* docs: docs refine (#3733)

* implement more efficient way of dragging combo

* clean up

* reslove conflicts

Co-authored-by: Yanyan Wang <yanyanwang93@gmail.com>

* fix: [tooltip plugin] wrap className in quotes when createDom to support multi classname (#3747)

* docs: docs refine (#3733)

* fix: [tooltip plugin] wrap className in quotes when createDom

Co-authored-by: Yanyan Wang <yanyanwang93@gmail.com>

* perf: spelling error in drag-combo

* fix: relayout while collapse-expand-combo

* refactor: 将 toolbar plugin 的默认操作函数抽离 (#3718)

* refactor: refactor plugin toolBar

Change-Id: I7862749924f7a100d93a1e380524aea3ee96cc3d

* docs: update doc

Change-Id: Ifbb32ea0f0f0791994eb4cb88f4bd3af9b29d587

* refactor: remote {

Change-Id: I20bea2426bb077fe51ec1309aca8545b65a5d0a5

* chore: update CHANGELOG

* chore: update version nums

* fix: collapsed combo with error size

Co-authored-by: femiabdul <83455275+femiabdul@users.noreply.github.com>
Co-authored-by: bjym <aaron.bjym1011@gmail.com>
Co-authored-by: 忽如寄 <594613537@qq.com>
2022-06-23 13:10:41 +08:00