Skip to content

Commit

Permalink
Merge pull request didi#749 from towersxu/master
Browse files Browse the repository at this point in the history
release 1.1.26
  • Loading branch information
xinxin93 authored Aug 27, 2022
2 parents de4915f + 4c26282 commit 565f2bb
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/guide/basic/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ lf.render({

从上面的代码,可以看到,在自定义一个节点的时候,我们需要定义节点的`model``view`。这是因为由于LogicFlow基于MVVM模式,所有自定义节点和连线的时候,我们需要自定义`view``model`。大多数情况下,需要通过重写定义`model`上获取样式相关的方法和重写`view`上的`getShape`来定义更复杂的节点外观。

::: tip
::: tip 提示

LogicFlow为了开发的时候将开发体验和现在前端流行的开发体验对齐,也为了在代码层面更好的理解,让更多的人可以参与进来,我们基于preact、mobx以MVVM模式进行开发。如果大家熟悉react开发的话,可以直接阅读我们的源码,你们可以发现整个项目阅读起来难度和你自己开发的项目差不多。**我们欢迎大家一起参与进来。**

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/extension/component-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class MyGroupModel extends GroupNode.model {
}
```

::: tip
::: tip 提示
在节点不被允许添加到分组中时,节点仍然会显示在用户放的位置,只是这个节点不属于分组。如果你希望添加的节点被删除,可以监听`group:not-allowed`事件,然后手动删除这个节点。
:::

Expand Down
4 changes: 4 additions & 0 deletions docs/guide/extension/extension-node-resize.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ export default {

```

::: tip 提示
对于继承`HtmlResize`的节点,自定义`view`请继续使用自定义HTML节点的`view``setHtml`方法。
:::

## 事件

节点缩放后抛出事件`node:resize`,抛出数据包括节点缩放前后的节点位置、节点大小信息, 数据为{oldNodeSize, newNodeSize}, 详细字段如下。
Expand Down
8 changes: 8 additions & 0 deletions docs/release/1.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
- 1.1版本对插件进行规范,现在要求所有的插件必须使用class的方式实现。然后插件的方法可以通过`lf.extension.插件名称.插件方法`来调用。原来的`lf.插件方法`仍然可用,后续版本将废弃。
- `MiniMap` api不兼容更新。`MiniMap.show()` -> `lf.extension.miniMap.show()`; `MiniMap.hide()` -> `lf.extension.miniMap.hide()`

### 1.1.26

> 发布事件: 2022/08/27
- features
- 增加 edgeGenerator 选项, 可自定义连边规则 [#739](https://github.com/didi/LogicFlow/pull/740) [@oe](https://github.com/oe)
- 修正 BaseEdgeModel 构造函数属性初始化顺序 [#740](https://github.com/didi/LogicFlow/pull/740) [@oe](https://github.com/oe)

### 1.1.25

> 发版事件:2022/08/21
Expand Down
8 changes: 8 additions & 0 deletions examples/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.1.26](https://github.com/didi/LogicFlow/compare/examples@1.1.25...examples@1.1.26) (2022-08-27)

**Note:** Version bump only for package examples





## [1.1.25](https://github.com/didi/LogicFlow/compare/examples@1.1.24...examples@1.1.25) (2022-08-21)

**Note:** Version bump only for package examples
Expand Down
6 changes: 3 additions & 3 deletions examples/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "examples",
"version": "1.1.25",
"version": "1.1.26",
"private": true,
"dependencies": {
"@ant-design/icons": "^4.3.0",
"@babel/core": "7.12.3",
"@logicflow/core": "^1.1.25",
"@logicflow/extension": "^1.1.25",
"@logicflow/core": "^1.1.26",
"@logicflow/extension": "^1.1.26",
"@pmmmwh/react-refresh-webpack-plugin": "0.4.2",
"@svgr/webpack": "5.4.0",
"@testing-library/jest-dom": "^5.11.4",
Expand Down
16 changes: 16 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.1.26](https://github.com/didi/LogicFlow/compare/@logicflow/core@1.1.25...@logicflow/core@1.1.26) (2022-08-27)


### Bug Fixes

* 修正 BaseEdgeModel 构造函数属性初始化顺序 ([b4f8f3a](https://github.com/didi/LogicFlow/commit/b4f8f3a0066f6cb0b95c79c4b5febbcf833a7386))


### Features

* 增加 edgeGenerator 选项, 可自定义连边规则 ([a9aff50](https://github.com/didi/LogicFlow/commit/a9aff50b87559c9549d2eb6943797a75e09d62a3))





## [1.1.25](https://github.com/didi/LogicFlow/compare/@logicflow/core@1.1.24...@logicflow/core@1.1.25) (2022-08-21)


Expand Down
9 changes: 7 additions & 2 deletions packages/core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,13 @@
},
grid: true,
edgeTextDraggable: true,
edgeType: 'animationEdge',
// edgeType: 'bezier',
// 全局自定义id
edgeGenerator: (sourceNode, targetNode, currentEdge) => {
// 起始节点类型 rect 时使用 自定义的边 custom-edge
if (sourceNode.type === 'rect') return 'bezier'
return 'polyline'
},
idGenerator(type) {
return type + '_' + Math.random()
}
Expand Down Expand Up @@ -553,7 +558,7 @@
}
}
);
lf.setDefaultEdgeType('connection');
lf.setDefaultEdgeType('polyline');
}
</script>

Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@logicflow/core",
"version": "1.1.25",
"version": "1.1.26",
"description": "LogicFlow core, to quickly build flowchart editor",
"main": "dist/entry.js",
"module": "dist/logic-flow.js",
Expand Down
8 changes: 8 additions & 0 deletions packages/extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.1.26](https://github.com/didi/LogicFlow/compare/@logicflow/extension@1.1.25...@logicflow/extension@1.1.26) (2022-08-27)

**Note:** Version bump only for package @logicflow/extension





## [1.1.25](https://github.com/didi/LogicFlow/compare/@logicflow/extension@1.1.24...@logicflow/extension@1.1.25) (2022-08-21)


Expand Down
2 changes: 1 addition & 1 deletion packages/extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@logicflow/extension",
"version": "1.1.25",
"version": "1.1.26",
"description": "LogicFlow extension",
"main": "cjs/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -32,7 +32,7 @@
"readme.md"
],
"dependencies": {
"@logicflow/core": "^1.1.25",
"@logicflow/core": "^1.1.26",
"ids": "^1.0.0",
"preact": "^10.4.8"
},
Expand Down

0 comments on commit 565f2bb

Please sign in to comment.