Compare commits

..

5 Commits

Author SHA1 Message Date
399ca71075 chore(release): 🚀 publish
- @antv/x6@1.34.11
2023-02-21 23:33:13 +08:00
7c4e1b9272 fix: 🐛 cannot use this here 2023-02-21 22:30:34 +08:00
b8330d164b docs: fix typo about ‘defaultLabel’ (v1) (#3263)
docs: fix typo in labels.zh.md (v1)
2023-02-21 18:13:47 +08:00
d761f59789 chore(release): 🚀 publish
- @antv/x6@1.34.10
2023-02-03 10:35:20 +08:00
a07be165f0 fix: 🐛 change execludeNodes typo (#3199) 2023-02-02 18:08:58 +08:00
8 changed files with 14 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@antv/x6",
"version": "1.34.9",
"version": "1.34.11",
"description": "JavaScript diagramming library that uses SVG and HTML for rendering.",
"main": "lib/index.js",
"module": "es/index.js",

View File

@ -76,11 +76,16 @@ export class ObstacleMap {
const excludeShapes = options.excludeShapes
const excType = shape ? excludeShapes.includes(shape) : false
const excTerminal = excludedTerminals.some((cell) => cell.id === node.id)
const excNode = options.excludeNodes.includes(node)
const excludedNode = options.excludeNodes.some((item) => {
if (typeof item === 'string') {
return node.id === item
}
return item === node
})
const excAncestor = excludedAncestors.includes(node.id)
const excHidden = options.excludeHiddenNodes && !node.isVisible()
const excluded =
excType || excTerminal || excNode || excAncestor || excHidden
excType || excTerminal || excludedNode || excAncestor || excHidden
if (!excluded) {
const bbox = node.getBBox().moveAndExpand(options.paddingBox)

View File

@ -49,7 +49,7 @@ export interface ResolvedOptions {
/**
* Should certain nodes not be considered as obstacles?
*/
excludeNodes: Node[]
excludeNodes: (Node | string)[]
/**
* Should certain hidden nodes not be considered as obstacles?

View File

@ -421,7 +421,7 @@ export namespace ToolsView {
return this
}
protected stamp(elem: Element = this.container) {
protected stamp(elem: Element) {
if (elem) {
elem.setAttribute('data-cell-id', this.cellView.cell.id)
}

View File

@ -29,7 +29,7 @@ class Edge extends BaseEdge {
#### 第二步:配置
调用继承的静态方法 `config(options)` 来配置[边选项](/en/docs/tutorial/basic/edge/#选项)的默认值、[自定义选项](/en/docs/tutorial/basic/cell#自定义选项)和[自定义属性](),例如通过 [markup](/en/docs/tutorial/basic/cell#markup) 来指定边默认的 SVG/HTML 结构,通过 [attrs](/en/docs/tutorial/basic/cell#attrs-1) 来指定边的默认属性样式,通过 [defaultlabel](/en/docs/tutorial/basic/edge#defaultlabel) 来指定边的默认标签样式。
调用继承的静态方法 `config(options)` 来配置[边选项](/en/docs/tutorial/basic/edge/#选项)的默认值、[自定义选项](/en/docs/tutorial/basic/cell#自定义选项)和[自定义属性](),例如通过 [markup](/en/docs/tutorial/basic/cell#markup) 来指定边默认的 SVG/HTML 结构,通过 [attrs](/en/docs/tutorial/basic/cell#attrs-1) 来指定边的默认属性样式,通过 [defaultLabel](/en/docs/tutorial/basic/edge#defaultlabel) 来指定边的默认标签样式。
| 名称 | 类型 | 是否必选 | 默认值 | 说明 |
|-----------|----------------------------------|----------|-----------|-------------------------------------------|

View File

@ -29,7 +29,7 @@ class Edge extends BaseEdge {
#### 第二步:配置
调用继承的静态方法 `config(options)` 来配置[边选项](/zh/docs/tutorial/basic/edge/#选项)的默认值、[自定义选项](/zh/docs/tutorial/basic/cell#自定义选项)和[自定义属性](),例如通过 [markup](/zh/docs/tutorial/basic/cell#markup) 来指定边默认的 SVG/HTML 结构,通过 [attrs](/zh/docs/tutorial/basic/cell#attrs-1) 来指定边的默认属性样式,通过 [defaultlabel](/zh/docs/tutorial/basic/edge#defaultlabel) 来指定边的默认标签样式。
调用继承的静态方法 `config(options)` 来配置[边选项](/zh/docs/tutorial/basic/edge/#选项)的默认值、[自定义选项](/zh/docs/tutorial/basic/cell#自定义选项)和[自定义属性](),例如通过 [markup](/zh/docs/tutorial/basic/cell#markup) 来指定边默认的 SVG/HTML 结构,通过 [attrs](/zh/docs/tutorial/basic/cell#attrs-1) 来指定边的默认属性样式,通过 [defaultLabel](/zh/docs/tutorial/basic/edge#defaultlabel) 来指定边的默认标签样式。
| 名称 | 类型 | 是否必选 | 默认值 | 说明 |
|-----------|----------------------------------|----------|-----------|-------------------------------------------|

View File

@ -494,7 +494,7 @@ function parseStringLabel(label: string): Label {
```ts
Edge.config({
defaultlabel: {
defaultLabel: {
markup: [
{
tagName: 'rect',

View File

@ -494,7 +494,7 @@ function parseStringLabel(label: string): Label {
```ts
Edge.config({
defaultlabel: {
defaultLabel: {
markup: [
{
tagName: 'rect',