Compare commits
5 Commits
@antv/x6@1
...
@antv/x6@1
Author | SHA1 | Date | |
---|---|---|---|
399ca71075 | |||
7c4e1b9272 | |||
b8330d164b | |||
d761f59789 | |||
a07be165f0 |
@ -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",
|
||||
|
@ -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)
|
||||
|
@ -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?
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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) 来指定边的默认标签样式。
|
||||
|
||||
| 名称 | 类型 | 是否必选 | 默认值 | 说明 |
|
||||
|-----------|----------------------------------|----------|-----------|-------------------------------------------|
|
||||
|
@ -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) 来指定边的默认标签样式。
|
||||
|
||||
| 名称 | 类型 | 是否必选 | 默认值 | 说明 |
|
||||
|-----------|----------------------------------|----------|-----------|-------------------------------------------|
|
||||
|
@ -494,7 +494,7 @@ function parseStringLabel(label: string): Label {
|
||||
|
||||
```ts
|
||||
Edge.config({
|
||||
defaultlabel: {
|
||||
defaultLabel: {
|
||||
markup: [
|
||||
{
|
||||
tagName: 'rect',
|
||||
|
@ -494,7 +494,7 @@ function parseStringLabel(label: string): Label {
|
||||
|
||||
```ts
|
||||
Edge.config({
|
||||
defaultlabel: {
|
||||
defaultLabel: {
|
||||
markup: [
|
||||
{
|
||||
tagName: 'rect',
|
||||
|
Reference in New Issue
Block a user