Skip to content

Commit

Permalink
fix: state style restore for non-circle shapes;
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanyan-Wang committed Dec 1, 2020
1 parent 6d40332 commit 22ddadd
Show file tree
Hide file tree
Showing 19 changed files with 1,363 additions and 130 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ChangeLog

#### 4.0.3
- fix: state style restore for non-circle shapes;

#### 4.0.2
- fix: node and edge state style with update problem;
- fix: import lib problem;
Expand Down
4 changes: 2 additions & 2 deletions docs/api/graphFunc/stack.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ order: 13
## pushStack(action, data, stackType)
Push operation。

Implemented the undo function, refer to [here](https://github.com/antvis/G6/blob/timebar-0826/src/plugins/toolBar/index.ts#L182)
Implemented the undo function, refer to [here](https://github.com/antvis/G6/blob/master/src/plugins/toolBar/index.ts#L184)

Implemented the redo function, refer to[here](https://github.com/antvis/G6/blob/timebar-0826/src/plugins/toolBar/index.ts#L234)
Implemented the redo function, refer to[here](https://github.com/antvis/G6/blob/master/src/plugins/toolBar/index.ts#L271)

**参数**

Expand Down
4 changes: 2 additions & 2 deletions docs/api/graphFunc/stack.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ order: 13
## pushStack(action, data, stackType)
入栈操作。

实现 undo 功能,可参考[这里](https://github.com/antvis/G6/blob/timebar-0826/src/plugins/toolBar/index.ts#L182)
实现 undo 功能,可参考[这里](https://github.com/antvis/G6/blob/master/src/plugins/toolBar/index.ts#L184)

实现 redo 功能,可参考[这里](https://github.com/antvis/G6/blob/timebar-0826/src/plugins/toolBar/index.ts#L234)
实现 redo 功能,可参考[这里](https://github.com/antvis/G6/blob/master/src/plugins/toolBar/index.ts#L271)

**参数**

Expand Down
7 changes: 3 additions & 4 deletions examples/case/australiaFire/demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import insertCss from 'insert-css';
insertCss(`
#legendContainer{
position: absolute;
top: 50px;
left: 200px;
top: 92px;
left: 8px;
width: 100px;
height: 100px;
}
Expand Down Expand Up @@ -223,9 +223,8 @@ fetch('https://gw.alipayobjects.com/os/basement_prod/d676014a-0a11-4ea9-9af4-403
.then((res) => res.json())
.then((data) => {
const container = document.getElementById('container');
const width = document.getElementById('container').scrollWidth;
const height = document.getElementById('container').scrollHeight || 500;
container.style.backgroundColor = '#000';
container.style.textAlign = 'center';
const graph = new G6.TreeGraph({
container: 'container',
width: height < width ? height : width,
Expand Down
22 changes: 16 additions & 6 deletions examples/case/largeGraph/demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import insertCss from 'insert-css';
// 推荐将样式添加到自己的样式文件中
// 若拷贝官方代码,别忘了 npm install insert-css
insertCss(`
#container {
background-color: #2b2f33;
}
.g6-component-contextmenu {
position: absolute;
z-index: 2;
Expand Down Expand Up @@ -1375,6 +1372,8 @@ fetch('https://gw.alipayobjects.com/os/antvdemo/assets/data/relations.json')
descriptionDiv.style.marginTop = '8px';
container.appendChild(descriptionDiv);

container.style.backgroundColor = '#2b2f33';

CANVAS_WIDTH = container.scrollWidth;
CANVAS_HEIGHT = (container.scrollHeight || 500) - 30;

Expand Down Expand Up @@ -1532,13 +1531,24 @@ fetch('https://gw.alipayobjects.com/os/antvdemo/assets/data/relations.json')
groupByTypes: false,
modes: {
default: [
'drag-canvas',
'zoom-canvas',
{
type: 'drag-canvas',
enableOptimize: true
},
{
type: 'zoom-canvas',
enableOptimize: true,
optimizeZoom: 0.01
},
'drag-node',
'shortcuts-call'
],
lassoSelect: [
'zoom-canvas',
{
type: 'zoom-canvas',
enableOptimize: true,
optimizeZoom: 0.01
},
{
type: 'lasso-select',
selectedState: 'focus',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g6",
"version": "4.0.2",
"version": "4.0.3",
"description": "A Graph Visualization Framework in JavaScript",
"keywords": [
"antv",
Expand Down
Loading

0 comments on commit 22ddadd

Please sign in to comment.