Compare commits
55 Commits
@antv/x6-r
...
@antv/x6-r
Author | SHA1 | Date | |
---|---|---|---|
|
7bf4aa956b | ||
|
ac7d16370c | ||
|
e3c0452acc | ||
|
0ba4e0f20c | ||
|
a02791901b | ||
|
0f71b7ee06 | ||
|
23ddfa27c5 | ||
|
4dc8f56bfc | ||
|
b6d8ffa913 | ||
|
f241fadbcc | ||
|
1d4924a84a | ||
|
49f2162e61 | ||
|
39278f8b67 | ||
|
c018065a42 | ||
|
190d0978ef | ||
|
75fa88ec80 | ||
|
a02ca20f05 | ||
|
5c1dc137d5 | ||
|
b903dc0539 | ||
|
4c61c7f74d | ||
|
6f591418d2 | ||
|
b1ec2def7b | ||
|
8f57a63206 | ||
|
23120ffc65 | ||
|
daac3e5fdc | ||
|
cbb415fc19 | ||
|
75ef37b761 | ||
|
99e2bea2d8 | ||
|
bd72005ee2 | ||
|
0cc1d89eec | ||
|
1ebf0912d1 | ||
|
da41870afd | ||
|
db0c31deb0 | ||
|
a7720251ff | ||
|
1d64eb7673 | ||
|
4ebad79e25 | ||
|
322128bd8f | ||
|
0ce74d2df1 | ||
|
ab5d1c7c81 | ||
|
186e530480 | ||
|
a486446015 | ||
|
77d8a88878 | ||
|
4a89c2b82e | ||
|
f6d936e4a2 | ||
|
dfde26b305 | ||
|
750242ce92 | ||
|
b884b795a9 | ||
|
fad7bec85c | ||
|
7392a48585 | ||
|
7772e7ffe3 | ||
|
97e5adf6e9 | ||
|
04cd9de505 | ||
|
d3f6f24d92 | ||
|
cc13d80d76 | ||
|
d2e53e9b2f |
@@ -1,3 +1,36 @@
|
||||
## @antv/x6-example-features [1.0.1](https://github.com/antvis/X6/compare/@antv/x6-example-features@1.0.0...@antv/x6-example-features@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/X6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.1
|
||||
* **@antv/x6-plugin-clipboard:** upgraded to 1.0.3
|
||||
* **@antv/x6-plugin-dnd:** upgraded to 1.0.3
|
||||
* **@antv/x6-plugin-history:** upgraded to 1.0.3
|
||||
* **@antv/x6-plugin-keyboard:** upgraded to 1.0.3
|
||||
* **@antv/x6-plugin-minimap:** upgraded to 1.0.3
|
||||
* **@antv/x6-plugin-scroller:** upgraded to 1.1.1
|
||||
* **@antv/x6-plugin-selection:** upgraded to 1.0.3
|
||||
* **@antv/x6-plugin-snapline:** upgraded to 1.0.3
|
||||
* **@antv/x6-plugin-stencil:** upgraded to 1.0.3
|
||||
* **@antv/x6-plugin-transform:** upgraded to 1.0.3
|
||||
* **@antv/x6-plugin-export:** upgraded to 1.0.3
|
||||
* **@antv/x6-react-components:** upgraded to 1.1.1
|
||||
* **@antv/x6-react-shape:** upgraded to 1.0.3
|
||||
|
||||
# @antv/x6-example-features 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@antv/x6-example-features",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"scripts": {
|
||||
"start": "umi dev",
|
||||
"build": "umi build",
|
||||
@@ -9,20 +9,20 @@
|
||||
"precommit": "lint-staged"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/x6": "1.0.0",
|
||||
"@antv/x6-plugin-clipboard": "1.0.0",
|
||||
"@antv/x6-plugin-dnd": "1.0.0",
|
||||
"@antv/x6-plugin-history": "1.0.0",
|
||||
"@antv/x6-plugin-keyboard": "1.0.0",
|
||||
"@antv/x6-plugin-minimap": "1.0.0",
|
||||
"@antv/x6-plugin-scroller": "1.0.0",
|
||||
"@antv/x6-plugin-selection": "1.0.0",
|
||||
"@antv/x6-plugin-snapline": "1.0.0",
|
||||
"@antv/x6-plugin-stencil": "1.0.0",
|
||||
"@antv/x6-plugin-transform": "1.0.0",
|
||||
"@antv/x6-plugin-export": "1.0.0",
|
||||
"@antv/x6-react-components": "1.0.0",
|
||||
"@antv/x6-react-shape": "1.0.0",
|
||||
"@antv/x6": "1.1.1",
|
||||
"@antv/x6-plugin-clipboard": "1.0.3",
|
||||
"@antv/x6-plugin-dnd": "1.0.3",
|
||||
"@antv/x6-plugin-history": "1.0.3",
|
||||
"@antv/x6-plugin-keyboard": "1.0.3",
|
||||
"@antv/x6-plugin-minimap": "1.0.3",
|
||||
"@antv/x6-plugin-scroller": "1.1.1",
|
||||
"@antv/x6-plugin-selection": "1.0.3",
|
||||
"@antv/x6-plugin-snapline": "1.0.3",
|
||||
"@antv/x6-plugin-stencil": "1.0.3",
|
||||
"@antv/x6-plugin-transform": "1.0.3",
|
||||
"@antv/x6-plugin-export": "1.0.3",
|
||||
"@antv/x6-react-components": "1.1.1",
|
||||
"@antv/x6-react-shape": "1.0.3",
|
||||
"antd": "^4.4.2",
|
||||
"classnames": "^2.2.6",
|
||||
"dagre": "^0.8.5",
|
||||
|
@@ -38,7 +38,7 @@
|
||||
},
|
||||
"commitlint": {
|
||||
"extends": [
|
||||
"@commitlint/config-conventional"
|
||||
"@commitlint/config-angular"
|
||||
]
|
||||
},
|
||||
"pnpm": {
|
||||
@@ -67,6 +67,7 @@
|
||||
"@babel/core": "^7.19.6",
|
||||
"@babel/plugin-syntax-flow": "^7.18.6",
|
||||
"@babel/plugin-transform-react-jsx": "^7.19.0",
|
||||
"@commitlint/config-angular": "^17.2.0",
|
||||
"@commitlint/config-conventional": "^17.2.0",
|
||||
"@rollup/plugin-commonjs": "^23.0.2",
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
|
@@ -1,3 +1,34 @@
|
||||
## @antv/x6-common [1.1.1](https://github.com/antvis/x6/compare/@antv/x6-common@1.1.0...@antv/x6-common@1.1.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
# @antv/x6-common [1.1.0](https://github.com/antvis/x6/compare/@antv/x6-common@1.0.1...@antv/x6-common@1.1.0) (2022-11-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* sync some commit from v1 ([#2851](https://github.com/antvis/x6/issues/2851)) ([a772025](https://github.com/antvis/x6/commit/a7720251ff42f2892bff9c3cd5159932322362b1))
|
||||
|
||||
## @antv/x6-common [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-common@1.0.0...@antv/x6-common@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
# @antv/x6-common 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-common",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.1",
|
||||
"description": "Basic toolkit for X6",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@@ -6,4 +6,5 @@ export {
|
||||
sortBy,
|
||||
groupBy,
|
||||
difference,
|
||||
max
|
||||
} from 'lodash-es'
|
||||
|
@@ -1,7 +1,12 @@
|
||||
import { ns } from './elem'
|
||||
import { kebabCase } from '../string/format'
|
||||
|
||||
const CASE_SENSITIVE_ATTR = ['viewBox']
|
||||
export const CASE_SENSITIVE_ATTR = [
|
||||
'viewBox',
|
||||
'attributeName',
|
||||
'attributeType',
|
||||
'repeatCount',
|
||||
]
|
||||
|
||||
export type Attributes = { [key: string]: string | number | null | undefined }
|
||||
|
||||
|
@@ -1,56 +1,70 @@
|
||||
const ua = navigator.userAgent
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
let _IS_MAC = false
|
||||
let _IS_IOS = false
|
||||
let _IS_WINDOWS = false
|
||||
let _IS_IE = false
|
||||
let _IS_IE11 = false
|
||||
let _IS_EDGE = false
|
||||
let _IS_NETSCAPE = false
|
||||
let _IS_CHROME_APP = false
|
||||
let _IS_CHROME = false
|
||||
let _IS_OPERA = false
|
||||
let _IS_FIREFOX = false
|
||||
let _IS_SAFARI = false
|
||||
let _SUPPORT_TOUCH = false
|
||||
let _SUPPORT_POINTER = false
|
||||
let _SUPPORT_PASSIVE = false
|
||||
let _NO_FOREIGNOBJECT = false
|
||||
|
||||
export namespace Platform {
|
||||
export const IS_MAC = ua.indexOf('Macintosh') > 0
|
||||
export const IS_IOS = !!ua.match(/(iPad|iPhone|iPod)/g)
|
||||
export const IS_WINDOWS = ua.indexOf('Windows') > 0
|
||||
if (typeof navigator === 'object') {
|
||||
const ua = navigator.userAgent
|
||||
_IS_MAC = ua.indexOf('Macintosh') >= 0
|
||||
_IS_IOS = !!ua.match(/(iPad|iPhone|iPod)/g)
|
||||
_IS_WINDOWS = ua.indexOf('Windows') >= 0
|
||||
|
||||
export const IS_IE = ua.indexOf('MSIE') >= 0
|
||||
export const IS_IE11 = !!ua.match(/Trident\/7\./)
|
||||
export const IS_EDGE = !!ua.match(/Edge\//)
|
||||
_IS_IE = ua.indexOf('MSIE') >= 0
|
||||
_IS_IE11 = !!ua.match(/Trident\/7\./)
|
||||
_IS_EDGE = !!ua.match(/Edge\//)
|
||||
|
||||
/**
|
||||
* A flag indicating whether the browser is Netscape (including Firefox).
|
||||
*/
|
||||
export const IS_NETSCAPE =
|
||||
_IS_NETSCAPE =
|
||||
ua.indexOf('Mozilla/') >= 0 &&
|
||||
ua.indexOf('MSIE') < 0 &&
|
||||
ua.indexOf('Edge/') < 0
|
||||
|
||||
/**
|
||||
* A flag indicating whether the the this is running inside a Chrome App.
|
||||
*/
|
||||
export const IS_CHROME_APP =
|
||||
(window as any).chrome != null &&
|
||||
(window as any).chrome.app != null &&
|
||||
(window as any).chrome.app.runtime != null
|
||||
|
||||
export const IS_CHROME = ua.indexOf('Chrome/') >= 0 && ua.indexOf('Edge/') < 0
|
||||
export const IS_OPERA = ua.indexOf('Opera/') >= 0 || ua.indexOf('OPR/') >= 0
|
||||
export const IS_FIREFOX = ua.indexOf('Firefox/') >= 0
|
||||
export const IS_SAFARI =
|
||||
_IS_CHROME = ua.indexOf('Chrome/') >= 0 && ua.indexOf('Edge/') < 0
|
||||
_IS_OPERA = ua.indexOf('Opera/') >= 0 || ua.indexOf('OPR/') >= 0
|
||||
_IS_FIREFOX = ua.indexOf('Firefox/') >= 0
|
||||
_IS_SAFARI =
|
||||
ua.indexOf('AppleWebKit/') >= 0 &&
|
||||
ua.indexOf('Chrome/') < 0 &&
|
||||
ua.indexOf('Edge/') < 0
|
||||
|
||||
/**
|
||||
* A flag indicating whether this device supports touchstart/-move/-end
|
||||
* events (Apple iOS, Android, Chromebook and Chrome Browser on touch-enabled
|
||||
* devices).
|
||||
*/
|
||||
export const SUPPORT_TOUCH = 'ontouchstart' in document.documentElement
|
||||
if (typeof document === 'object') {
|
||||
_NO_FOREIGNOBJECT =
|
||||
!document.createElementNS ||
|
||||
`${document.createElementNS(
|
||||
'http://www.w3.org/2000/svg',
|
||||
'foreignObject',
|
||||
)}` !== '[object SVGForeignObjectElement]' ||
|
||||
ua.indexOf('Opera/') >= 0
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A flag indicating whether this device supports Microsoft pointer events.
|
||||
*/
|
||||
export const SUPPORT_POINTER = (window as any).PointerEvent != null && !IS_MAC
|
||||
if (typeof window === 'object') {
|
||||
_IS_CHROME_APP =
|
||||
(window as any).chrome != null &&
|
||||
(window as any).chrome.app != null &&
|
||||
(window as any).chrome.app.runtime != null
|
||||
_SUPPORT_POINTER = (window as any).PointerEvent != null && !_IS_MAC
|
||||
}
|
||||
|
||||
export let SUPPORT_PASSIVE = false // eslint-disable-line import/no-mutable-exports
|
||||
if (typeof document === 'object') {
|
||||
_SUPPORT_TOUCH = 'ontouchstart' in document.documentElement
|
||||
|
||||
try {
|
||||
const options = Object.defineProperty({}, 'passive', {
|
||||
get() {
|
||||
SUPPORT_PASSIVE = true
|
||||
_SUPPORT_PASSIVE = true
|
||||
},
|
||||
})
|
||||
const div = document.createElement('div')
|
||||
@@ -60,18 +74,50 @@ export namespace Platform {
|
||||
} catch (err) {
|
||||
// pass
|
||||
}
|
||||
}
|
||||
export namespace Platform {
|
||||
export const IS_MAC = _IS_MAC
|
||||
export const IS_IOS = _IS_IOS
|
||||
export const IS_WINDOWS = _IS_WINDOWS
|
||||
|
||||
export const IS_IE = _IS_IE
|
||||
export const IS_IE11 = _IS_IE11
|
||||
export const IS_EDGE = _IS_EDGE
|
||||
|
||||
/**
|
||||
* A flag indicating whether the browser is Netscape (including Firefox).
|
||||
*/
|
||||
export const IS_NETSCAPE = _IS_NETSCAPE
|
||||
|
||||
/**
|
||||
* A flag indicating whether the the this is running inside a Chrome App.
|
||||
*/
|
||||
export const IS_CHROME_APP = _IS_CHROME_APP
|
||||
|
||||
export const IS_CHROME = _IS_CHROME
|
||||
export const IS_OPERA = _IS_OPERA
|
||||
export const IS_FIREFOX = _IS_FIREFOX
|
||||
export const IS_SAFARI = _IS_SAFARI
|
||||
|
||||
/**
|
||||
* A flag indicating whether this device supports touchstart/-move/-end
|
||||
* events (Apple iOS, Android, Chromebook and Chrome Browser on touch-enabled
|
||||
* devices).
|
||||
*/
|
||||
export const SUPPORT_TOUCH = _SUPPORT_TOUCH
|
||||
|
||||
/**
|
||||
* A flag indicating whether this device supports Microsoft pointer events.
|
||||
*/
|
||||
export const SUPPORT_POINTER = _SUPPORT_POINTER
|
||||
|
||||
export const SUPPORT_PASSIVE = _SUPPORT_PASSIVE
|
||||
|
||||
/**
|
||||
* A flag indicating whether foreignObject support is not available. This
|
||||
* is the case for Opera, older SVG-based browsers and all versions of IE.
|
||||
*/
|
||||
export const NO_FOREIGNOBJECT =
|
||||
!document.createElementNS ||
|
||||
`${document.createElementNS(
|
||||
'http://www.w3.org/2000/svg',
|
||||
'foreignObject',
|
||||
)}` !== '[object SVGForeignObjectElement]' ||
|
||||
ua.indexOf('Opera/') >= 0
|
||||
export const NO_FOREIGNOBJECT = _NO_FOREIGNOBJECT
|
||||
|
||||
export const SUPPORT_FOREIGNOBJECT = !NO_FOREIGNOBJECT
|
||||
}
|
||||
|
@@ -1,3 +1,27 @@
|
||||
## @antv/x6-geometry [1.0.2](https://github.com/antvis/x6/compare/@antv/x6-geometry@1.0.1...@antv/x6-geometry@1.0.2) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
## @antv/x6-geometry [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-geometry@1.0.0...@antv/x6-geometry@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
# @antv/x6-geometry 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.2",
|
||||
"name": "@antv/x6-geometry",
|
||||
"description": "Geometry operations for X6",
|
||||
"main": "lib/index.js",
|
||||
|
@@ -1,3 +1,53 @@
|
||||
## @antv/x6-plugin-clipboard [1.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-clipboard@1.0.2...@antv/x6-plugin-clipboard@1.0.3) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.1
|
||||
|
||||
## @antv/x6-plugin-clipboard [1.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-clipboard@1.0.1...@antv/x6-plugin-clipboard@1.0.2) (2022-11-05)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.0
|
||||
|
||||
## @antv/x6-plugin-clipboard [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-clipboard@1.0.0...@antv/x6-plugin-clipboard@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6-plugin-clipboard 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-plugin-clipboard",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.3",
|
||||
"description": "clipboard plugin for X6",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -37,10 +37,10 @@
|
||||
"pretest": "rss"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"author": {
|
||||
"name": "bubkoo",
|
||||
|
@@ -1,3 +1,53 @@
|
||||
## @antv/x6-plugin-dnd [1.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-dnd@1.0.2...@antv/x6-plugin-dnd@1.0.3) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.1
|
||||
|
||||
## @antv/x6-plugin-dnd [1.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-dnd@1.0.1...@antv/x6-plugin-dnd@1.0.2) (2022-11-05)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.0
|
||||
|
||||
## @antv/x6-plugin-dnd [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-dnd@1.0.0...@antv/x6-plugin-dnd@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6-plugin-dnd 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-plugin-dnd",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.3",
|
||||
"description": "dnd plugin for X6",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -38,10 +38,10 @@
|
||||
"pretest": "rss"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"author": {
|
||||
"name": "bubkoo",
|
||||
|
@@ -1,3 +1,53 @@
|
||||
## @antv/x6-plugin-export [1.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-export@1.0.2...@antv/x6-plugin-export@1.0.3) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.1
|
||||
|
||||
## @antv/x6-plugin-export [1.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-export@1.0.1...@antv/x6-plugin-export@1.0.2) (2022-11-05)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.0
|
||||
|
||||
## @antv/x6-plugin-export [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-export@1.0.0...@antv/x6-plugin-export@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6-plugin-export 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-plugin-export",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.3",
|
||||
"description": "export plugin for X6.",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -36,10 +36,10 @@
|
||||
"pretest": "rss"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"author": {
|
||||
"name": "bubkoo",
|
||||
|
@@ -1,3 +1,53 @@
|
||||
## @antv/x6-plugin-history [1.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-history@1.0.2...@antv/x6-plugin-history@1.0.3) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.1
|
||||
|
||||
## @antv/x6-plugin-history [1.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-history@1.0.1...@antv/x6-plugin-history@1.0.2) (2022-11-05)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.0
|
||||
|
||||
## @antv/x6-plugin-history [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-history@1.0.0...@antv/x6-plugin-history@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6-plugin-history 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-plugin-history",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.3",
|
||||
"description": "history plugin for X6",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -37,10 +37,10 @@
|
||||
"pretest": "rss"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"author": {
|
||||
"name": "bubkoo",
|
||||
|
@@ -1,3 +1,53 @@
|
||||
## @antv/x6-plugin-keyboard [1.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-keyboard@1.0.2...@antv/x6-plugin-keyboard@1.0.3) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.1
|
||||
|
||||
## @antv/x6-plugin-keyboard [1.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-keyboard@1.0.1...@antv/x6-plugin-keyboard@1.0.2) (2022-11-05)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.0
|
||||
|
||||
## @antv/x6-plugin-keyboard [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-keyboard@1.0.0...@antv/x6-plugin-keyboard@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6-plugin-keyboard 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-plugin-keyboard",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.3",
|
||||
"description": "keyboard plugin for X6",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -40,10 +40,10 @@
|
||||
"mousetrap": "^1.6.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antv/x6": "1.0.0",
|
||||
"@antv/x6": "1.1.1",
|
||||
"@types/mousetrap": "^1.6.5"
|
||||
},
|
||||
"author": {
|
||||
|
@@ -1,3 +1,53 @@
|
||||
## @antv/x6-plugin-minimap [1.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-minimap@1.0.2...@antv/x6-plugin-minimap@1.0.3) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.1
|
||||
|
||||
## @antv/x6-plugin-minimap [1.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-minimap@1.0.1...@antv/x6-plugin-minimap@1.0.2) (2022-11-05)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.0
|
||||
|
||||
## @antv/x6-plugin-minimap [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-minimap@1.0.0...@antv/x6-plugin-minimap@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6-plugin-minimap 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-plugin-minimap",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.3",
|
||||
"description": "minimap plugin for X6",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -37,10 +37,10 @@
|
||||
"pretest": "rss"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"author": {
|
||||
"name": "bubkoo",
|
||||
|
@@ -1,3 +1,58 @@
|
||||
## @antv/x6-plugin-scroller [1.1.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-scroller@1.1.0...@antv/x6-plugin-scroller@1.1.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.1
|
||||
|
||||
# @antv/x6-plugin-scroller [1.1.0](https://github.com/antvis/x6/compare/@antv/x6-plugin-scroller@1.0.1...@antv/x6-plugin-scroller@1.1.0) (2022-11-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* sync some commit from v1 ([#2851](https://github.com/antvis/x6/issues/2851)) ([a772025](https://github.com/antvis/x6/commit/a7720251ff42f2892bff9c3cd5159932322362b1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.0
|
||||
|
||||
## @antv/x6-plugin-scroller [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-scroller@1.0.0...@antv/x6-plugin-scroller@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6-plugin-scroller 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-plugin-scroller",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.1",
|
||||
"description": "scroller plugin for X6",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -37,10 +37,10 @@
|
||||
"pretest": "rss"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"author": {
|
||||
"name": "bubkoo",
|
||||
|
@@ -305,6 +305,11 @@ export class ScrollerImpl extends View<ScrollerImpl.EventArgs> {
|
||||
const graphHeight = this.graph.options.height
|
||||
const pageWidth = this.options.pageWidth! * this.sx
|
||||
const pageHeight = this.options.pageHeight! * this.sy
|
||||
|
||||
if (pageWidth === 0 || pageHeight === 0) {
|
||||
return
|
||||
}
|
||||
|
||||
if (graphWidth > pageWidth || graphHeight > pageHeight) {
|
||||
let hasPageBreak = false
|
||||
const container = document.createElement('div')
|
||||
@@ -1140,15 +1145,11 @@ export namespace ScrollerImpl {
|
||||
| NumberExt.SideOptions
|
||||
| ((this: ScrollerImpl, scroller: ScrollerImpl) => NumberExt.SideOptions)
|
||||
autoResizeOptions?:
|
||||
| (TransformManager.FitToContentFullOptions & {
|
||||
direction: AutoResizeDirection | AutoResizeDirection[]
|
||||
})
|
||||
| TransformManager.FitToContentFullOptions
|
||||
| ((
|
||||
this: ScrollerImpl,
|
||||
scroller: ScrollerImpl,
|
||||
) => TransformManager.FitToContentFullOptions & {
|
||||
direction: AutoResizeDirection | AutoResizeDirection[]
|
||||
})
|
||||
) => TransformManager.FitToContentFullOptions)
|
||||
}
|
||||
|
||||
export interface Options extends CommonOptions {
|
||||
|
@@ -1,3 +1,53 @@
|
||||
## @antv/x6-plugin-selection [1.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-selection@1.0.2...@antv/x6-plugin-selection@1.0.3) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.1
|
||||
|
||||
## @antv/x6-plugin-selection [1.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-selection@1.0.1...@antv/x6-plugin-selection@1.0.2) (2022-11-05)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.0
|
||||
|
||||
## @antv/x6-plugin-selection [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-selection@1.0.0...@antv/x6-plugin-selection@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6-plugin-selection 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-plugin-selection",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.3",
|
||||
"description": "selection plugin for X6",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -37,10 +37,10 @@
|
||||
"pretest": "rss"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"author": {
|
||||
"name": "bubkoo",
|
||||
|
@@ -1,3 +1,53 @@
|
||||
## @antv/x6-plugin-snapline [1.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-snapline@1.0.2...@antv/x6-plugin-snapline@1.0.3) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.1
|
||||
|
||||
## @antv/x6-plugin-snapline [1.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-snapline@1.0.1...@antv/x6-plugin-snapline@1.0.2) (2022-11-05)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.0
|
||||
|
||||
## @antv/x6-plugin-snapline [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-snapline@1.0.0...@antv/x6-plugin-snapline@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6-plugin-snapline 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-plugin-snapline",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.3",
|
||||
"description": "snapline plugin for X6",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -37,10 +37,10 @@
|
||||
"pretest": "rss"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"author": {
|
||||
"name": "bubkoo",
|
||||
|
@@ -1,3 +1,56 @@
|
||||
## @antv/x6-plugin-stencil [1.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-stencil@1.0.2...@antv/x6-plugin-stencil@1.0.3) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.1
|
||||
* **@antv/x6-plugin-dnd:** upgraded to 1.0.3
|
||||
|
||||
## @antv/x6-plugin-stencil [1.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-stencil@1.0.1...@antv/x6-plugin-stencil@1.0.2) (2022-11-05)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.0
|
||||
* **@antv/x6-plugin-dnd:** upgraded to 1.0.2
|
||||
|
||||
## @antv/x6-plugin-stencil [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-stencil@1.0.0...@antv/x6-plugin-stencil@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.1
|
||||
* **@antv/x6-plugin-dnd:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6-plugin-stencil 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-plugin-stencil",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.3",
|
||||
"description": "stencil plugin for X6",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -37,12 +37,12 @@
|
||||
"pretest": "rss"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@antv/x6": "1.0.0",
|
||||
"@antv/x6-plugin-dnd": "1.0.0"
|
||||
"@antv/x6": "1.1.1",
|
||||
"@antv/x6-plugin-dnd": "1.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antv/x6": "1.0.0",
|
||||
"@antv/x6-plugin-dnd": "1.0.0"
|
||||
"@antv/x6": "1.1.1",
|
||||
"@antv/x6-plugin-dnd": "1.0.3"
|
||||
},
|
||||
"author": {
|
||||
"name": "bubkoo",
|
||||
|
@@ -1,3 +1,53 @@
|
||||
## @antv/x6-plugin-transform [1.0.3](https://github.com/antvis/x6/compare/@antv/x6-plugin-transform@1.0.2...@antv/x6-plugin-transform@1.0.3) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.1
|
||||
|
||||
## @antv/x6-plugin-transform [1.0.2](https://github.com/antvis/x6/compare/@antv/x6-plugin-transform@1.0.1...@antv/x6-plugin-transform@1.0.2) (2022-11-05)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.0
|
||||
|
||||
## @antv/x6-plugin-transform [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-plugin-transform@1.0.0...@antv/x6-plugin-transform@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6-plugin-transform 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-plugin-transform",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.3",
|
||||
"description": "transform plugin for X6",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -37,10 +37,10 @@
|
||||
"pretest": "rss"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antv/x6": "1.0.0"
|
||||
"@antv/x6": "1.1.1"
|
||||
},
|
||||
"author": {
|
||||
"name": "bubkoo",
|
||||
|
@@ -1,3 +1,34 @@
|
||||
## @antv/x6-react-components [1.1.1](https://github.com/antvis/x6/compare/@antv/x6-react-components@1.1.0...@antv/x6-react-components@1.1.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
# @antv/x6-react-components [1.1.0](https://github.com/antvis/x6/compare/@antv/x6-react-components@1.0.1...@antv/x6-react-components@1.1.0) (2022-11-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* sync some commit from v1 ([#2851](https://github.com/antvis/x6/issues/2851)) ([a772025](https://github.com/antvis/x6/commit/a7720251ff42f2892bff9c3cd5159932322362b1))
|
||||
|
||||
## @antv/x6-react-components [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-react-components@1.0.0...@antv/x6-react-components@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
# @antv/x6-react-components 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-react-components",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.1",
|
||||
"description": "React components for building x6 editors",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@@ -1,3 +1,33 @@
|
||||
## @antv/x6-react-shape [1.0.2](https://github.com/antvis/x6/compare/@antv/x6-react-shape@1.0.1...@antv/x6-react-shape@1.0.2) (2022-11-05)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.0
|
||||
|
||||
## @antv/x6-react-shape [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-react-shape@1.0.0...@antv/x6-react-shape@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6-react-shape 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-react-shape",
|
||||
"version": "1.0.0",
|
||||
"version": "2.0.0",
|
||||
"description": "X6 shape for rendering react components.",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -38,12 +38,12 @@
|
||||
"pretest": "rss"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@antv/x6": "1.0.0",
|
||||
"@antv/x6": "^2.x",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antv/x6": "1.0.0",
|
||||
"@antv/x6": "^2.0.x",
|
||||
"@types/react": "^18.0.0",
|
||||
"@types/react-dom": "^18.0.0",
|
||||
"react": "^18.0.0",
|
||||
|
@@ -1,3 +1,103 @@
|
||||
# @antv/x6-vue-shape [1.1.0](https://github.com/antvis/x6/compare/@antv/x6-vue-shape@1.0.1...@antv/x6-vue-shape@1.1.0) (2022-11-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* sync some commit from v1 ([#2851](https://github.com/antvis/x6/issues/2851)) ([a772025](https://github.com/antvis/x6/commit/a7720251ff42f2892bff9c3cd5159932322362b1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.1.0
|
||||
|
||||
## @antv/x6-vue-shape [1.0.1](https://github.com/antvis/x6/compare/@antv/x6-vue-shape@1.0.0...@antv/x6-vue-shape@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6-vue-shape 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 🐛 add primer for vue-shape ([#738](https://github.com/antvis/x6/issues/738)) ([9eaaab4](https://github.com/antvis/x6/commit/9eaaab4017b0915f64b9af650d1982ff94f75274))
|
||||
* 🐛 add unregister for react/vue shape ([b741a0d](https://github.com/antvis/x6/commit/b741a0d82ae4bb6e1579b8656086b4ff0173f845))
|
||||
* 🐛 change vue vm instance ([#1751](https://github.com/antvis/x6/issues/1751)) ([bcf1485](https://github.com/antvis/x6/commit/bcf148584e4dfa9d468033914aec4cc96e90e07c))
|
||||
* 🐛 missing global variable names ([8294209](https://github.com/antvis/x6/commit/8294209f1f1e47cf2cf331351c33ccbcd05867d5))
|
||||
* 🐛 missing vue module ([705c36f](https://github.com/antvis/x6/commit/705c36f1d70126a83d46e27119f4bdd64d2369ff))
|
||||
* 🐛 revert add unmont method ([#1125](https://github.com/antvis/x6/issues/1125)) ([0cd8a9f](https://github.com/antvis/x6/commit/0cd8a9fee5d5f2b0f4f6f7419ef41b40f9129340))
|
||||
* 🐛 type errors ([4973146](https://github.com/antvis/x6/commit/497314691543919bf0c1219f800e77aa54bb6694))
|
||||
* 🐛 unmount component when node unmount ([#1118](https://github.com/antvis/x6/issues/1118)) ([e029c7a](https://github.com/antvis/x6/commit/e029c7a6d281c727167a9076ba3217fed2a4d618))
|
||||
* bump rule ([c9559f2](https://github.com/antvis/x6/commit/c9559f2f30790857ff066be7d0ce99ed8933e20c))
|
||||
* fix error in vue shape when formJSON ([e91fb8a](https://github.com/antvis/x6/commit/e91fb8a1967e47ea324ee4733bdb7e835feb8372))
|
||||
* fix type error ([c5f14c4](https://github.com/antvis/x6/commit/c5f14c419f31abd7c6fe1113bf90b55724745828))
|
||||
* remove x6-common and x6-geometry deps ([#2830](https://github.com/antvis/x6/issues/2830)) ([5b5f5aa](https://github.com/antvis/x6/commit/5b5f5aa7ea6fded1b15abc79b9b5a5e2281b3ab9))
|
||||
* update dependencies and fix type errors ([#1103](https://github.com/antvis/x6/issues/1103)) ([49d4371](https://github.com/antvis/x6/commit/49d43716ada672e609e4e6d9c6fdca3f494b6f68))
|
||||
* **x6-vue-shape:** clear vue instance ([#1264](https://github.com/antvis/x6/issues/1264)) ([f8d874c](https://github.com/antvis/x6/commit/f8d874c4103e77df55b075cf5cd40a64945fe7f5)), closes [#1261](https://github.com/antvis/x6/issues/1261)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([94af7fa](https://github.com/antvis/x6/commit/94af7fa7ec96e3417db9aa5d245751507ae2671e))
|
||||
* bump to 2.0 ([ecffe1a](https://github.com/antvis/x6/commit/ecffe1a2a8bcf5538f027c3c54acaefc50215023))
|
||||
* release beta ([b5f3cfa](https://github.com/antvis/x6/commit/b5f3cfa2042f5196a995a38a8f41f140cabdce57))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* ✨ add html shape ([8d75504](https://github.com/antvis/x6/commit/8d7550413f9f6f3177eab9d0f7fef14c55949fb8))
|
||||
* ✨ add snapline plugin ([294672b](https://github.com/antvis/x6/commit/294672b3066b15ab834ce2a3172facc49004c950))
|
||||
* ✨ dispose components when unmount ([#1745](https://github.com/antvis/x6/issues/1745)) ([2bcd45f](https://github.com/antvis/x6/commit/2bcd45f818cfad5c19011660b30bbdd602787cd7))
|
||||
* ✨ dot not update peerDependencies with x6 publish ([6d13809](https://github.com/antvis/x6/commit/6d138097cfce1755164f166a5e0c44d05b399528))
|
||||
* ✨ use vue-demi manage vue3 and vue2 ([a96130d](https://github.com/antvis/x6/commit/a96130d12639c1e8d68adc2eea96ec1e6bbc99ce))
|
||||
* add scroller plugin ([#2580](https://github.com/antvis/x6/issues/2580)) ([5e0e2ac](https://github.com/antvis/x6/commit/5e0e2acde7d7e259ea27d001983e950878d0ecc8))
|
||||
* add x6-vue-shape ([4675975](https://github.com/antvis/x6/commit/4675975aa10395fc7c6827af4b08e6406eb4d93b))
|
||||
* adjust event source and package deps ([#2826](https://github.com/antvis/x6/issues/2826)) ([a1bdb18](https://github.com/antvis/x6/commit/a1bdb18b1d1e1967e8e27862fed2e4fe8787a8cb))
|
||||
* force release 2.0-beta ([6987d9c](https://github.com/antvis/x6/commit/6987d9ce64454cd76f697d33f96715dbdf56524a))
|
||||
* support mouseenter and mouseleave event ([#2559](https://github.com/antvis/x6/issues/2559)) ([ecfd426](https://github.com/antvis/x6/commit/ecfd4263b1266a128bf8651c4dd745ff8ab038b3))
|
||||
* support turbo ([1da55bf](https://github.com/antvis/x6/commit/1da55bfda73edaa96515998b5766e9ed5f241ee9))
|
||||
* sync code from master ([#2004](https://github.com/antvis/x6/issues/2004)) ([c681405](https://github.com/antvis/x6/commit/c68140504bd21f654870f3d2fc1ad2f16f1113c8)), closes [#1974](https://github.com/antvis/x6/issues/1974) [#1977](https://github.com/antvis/x6/issues/1977) [#1985](https://github.com/antvis/x6/issues/1985) [#1988](https://github.com/antvis/x6/issues/1988) [#1991](https://github.com/antvis/x6/issues/1991) [#1989](https://github.com/antvis/x6/issues/1989)
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* ⚡️ optimize node render performance ([6554959](https://github.com/antvis/x6/commit/65549599d2f82f8052d16776c8d36ce7ee2fba9b))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
* bump to 2.0
|
||||
* force release 2.0-beta
|
||||
* force release 2.0-beta
|
||||
* 2.0-beta
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6:** upgraded to 1.0.0
|
||||
|
||||
# @antv/x6-vue-shape 1.0.0 (2022-11-04)
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { NodeView } from '@antv/x6'
|
||||
import { NodeView, Dom } from '@antv/x6'
|
||||
import { isVue2, isVue3, createApp, h, Vue2 } from 'vue-demi'
|
||||
import { VueShape } from './node'
|
||||
import { shapeMaps } from './registry'
|
||||
@@ -71,6 +71,30 @@ export class VueShapeView extends NodeView<VueShape> {
|
||||
return root
|
||||
}
|
||||
|
||||
onMouseDown(e: Dom.MouseDownEvent, x: number, y: number) {
|
||||
const target = e.target as Element
|
||||
const tagName = target.tagName.toLowerCase()
|
||||
if (tagName === 'input') {
|
||||
const type = target.getAttribute('type')
|
||||
if (
|
||||
type == null ||
|
||||
[
|
||||
'text',
|
||||
'password',
|
||||
'number',
|
||||
'email',
|
||||
'search',
|
||||
'tel',
|
||||
'url',
|
||||
].includes(type)
|
||||
) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
super.onMouseDown(e, x, y)
|
||||
}
|
||||
|
||||
unmount() {
|
||||
if (isActive()) {
|
||||
disconnect(this.cell.id)
|
||||
|
@@ -1,3 +1,60 @@
|
||||
## @antv/x6 [1.1.1](https://github.com/antvis/x6/compare/@antv/x6@1.1.0...@antv/x6@1.1.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([a02ca20](https://github.com/antvis/x6/commit/a02ca20f054d2eada7806f76b0abe5ae51fb18d1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6-common:** upgraded to 1.1.1
|
||||
* **@antv/x6-geometry:** upgraded to 1.0.2
|
||||
|
||||
# @antv/x6 [1.1.0](https://github.com/antvis/x6/compare/@antv/x6@1.0.1...@antv/x6@1.1.0) (2022-11-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* sync some commit from v1 ([#2851](https://github.com/antvis/x6/issues/2851)) ([a772025](https://github.com/antvis/x6/commit/a7720251ff42f2892bff9c3cd5159932322362b1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6-common:** upgraded to 1.1.0
|
||||
|
||||
## @antv/x6 [1.0.1](https://github.com/antvis/x6/compare/@antv/x6@1.0.0...@antv/x6@1.0.1) (2022-11-05)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([04cd9de](https://github.com/antvis/x6/commit/04cd9de505bd92a70f33dbc0cfc75b4f9b8126c1))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* **@antv/x6-common:** upgraded to 1.0.1
|
||||
* **@antv/x6-geometry:** upgraded to 1.0.1
|
||||
|
||||
# @antv/x6 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.1",
|
||||
"description": "JavaScript diagramming library that uses SVG and HTML for rendering",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
@@ -44,8 +44,8 @@
|
||||
"pretest": "rss"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/x6-common": "1.0.0",
|
||||
"@antv/x6-geometry": "1.0.0",
|
||||
"@antv/x6-common": "1.1.1",
|
||||
"@antv/x6-geometry": "1.0.2",
|
||||
"utility-types": "^3.10.0"
|
||||
},
|
||||
"author": {
|
||||
|
@@ -113,27 +113,14 @@ export class MouseWheel extends Base {
|
||||
targetScale = NumberExt.clamp(targetScale, minScale, maxScale)
|
||||
|
||||
if (targetScale !== currentScale) {
|
||||
const scroller = this.graph.getPlugin<any>('scroller')
|
||||
if (scroller) {
|
||||
if (this.widgetOptions.zoomAtMousePosition) {
|
||||
const origin = this.graph.coord.clientToLocalPoint(this.startPos)
|
||||
scroller.zoom(targetScale, {
|
||||
absolute: true,
|
||||
center: origin.clone(),
|
||||
})
|
||||
} else {
|
||||
scroller.zoom(targetScale, { absolute: true })
|
||||
}
|
||||
if (this.widgetOptions.zoomAtMousePosition) {
|
||||
const origin = this.graph.coord.clientToLocalPoint(this.startPos)
|
||||
this.graph.zoom(targetScale, {
|
||||
absolute: true,
|
||||
center: origin.clone(),
|
||||
})
|
||||
} else {
|
||||
if (this.widgetOptions.zoomAtMousePosition) {
|
||||
const origin = this.graph.coord.clientToGraphPoint(this.startPos)
|
||||
this.graph.zoom(targetScale, {
|
||||
absolute: true,
|
||||
center: origin.clone(),
|
||||
})
|
||||
} else {
|
||||
this.graph.zoom(targetScale, { absolute: true })
|
||||
}
|
||||
this.graph.zoom(targetScale, { absolute: true })
|
||||
}
|
||||
}
|
||||
this.currentScale = null
|
||||
|
@@ -41,7 +41,9 @@ export namespace Options {
|
||||
clickThreshold: number
|
||||
magnetThreshold: number | 'onleave'
|
||||
preventDefaultDblClick: boolean
|
||||
preventDefaultContextMenu: boolean
|
||||
preventDefaultContextMenu:
|
||||
| boolean
|
||||
| ((this: Graph, { view }: { view: CellView | null }) => boolean)
|
||||
preventDefaultMouseDown: boolean
|
||||
preventDefaultBlankAction: boolean
|
||||
interacting: CellView.Interacting
|
||||
|
@@ -133,13 +133,27 @@ export class GraphView extends View {
|
||||
}
|
||||
}
|
||||
|
||||
protected isPreventDefaultContextMenu(view: CellView | null) {
|
||||
let preventDefaultContextMenu = this.options.preventDefaultContextMenu
|
||||
if (typeof preventDefaultContextMenu === 'function') {
|
||||
preventDefaultContextMenu = FunctionExt.call(
|
||||
preventDefaultContextMenu,
|
||||
this.graph,
|
||||
{ view },
|
||||
)
|
||||
}
|
||||
|
||||
return preventDefaultContextMenu
|
||||
}
|
||||
|
||||
protected onContextMenu(evt: Dom.ContextMenuEvent) {
|
||||
if (this.options.preventDefaultContextMenu) {
|
||||
const e = this.normalizeEvent(evt)
|
||||
const view = this.findView(e.target)
|
||||
|
||||
if (this.isPreventDefaultContextMenu(view)) {
|
||||
evt.preventDefault()
|
||||
}
|
||||
|
||||
const e = this.normalizeEvent(evt)
|
||||
const view = this.findView(e.target)
|
||||
if (this.guard(e, view)) {
|
||||
return
|
||||
}
|
||||
@@ -195,7 +209,10 @@ export class GraphView extends View {
|
||||
if (view) {
|
||||
view.onMouseDown(e, localPoint.x, localPoint.y)
|
||||
} else {
|
||||
if (this.options.preventDefaultBlankAction) {
|
||||
if (
|
||||
this.options.preventDefaultBlankAction &&
|
||||
['touchstart'].includes(e.type)
|
||||
) {
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
@@ -460,9 +477,11 @@ export class GraphView extends View {
|
||||
}
|
||||
|
||||
protected onMagnetContextMenu(e: Dom.ContextMenuEvent) {
|
||||
if (this.options.preventDefaultContextMenu) {
|
||||
const view = this.findView(e.target)
|
||||
if (this.isPreventDefaultContextMenu(view)) {
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
this.handleMagnetEvent(e, (view, e, magnet, x, y) => {
|
||||
view.onMagnetContextMenu(e, magnet, x, y)
|
||||
})
|
||||
|
@@ -947,7 +947,7 @@ export namespace Edge {
|
||||
port?: string
|
||||
}
|
||||
|
||||
export type TerminalData = TerminalPointData | TerminalCellData
|
||||
export type TerminalData = TerminalPointData | TerminalCellLooseData
|
||||
|
||||
export function equalTerminals(a: TerminalData, b: TerminalData) {
|
||||
const a1 = a as TerminalCellData
|
||||
|
@@ -157,27 +157,31 @@ export class Model extends Basecoat<Model.EventArgs> {
|
||||
|
||||
protected onEdgeTerminalChanged(edge: Edge, type: Edge.TerminalType) {
|
||||
const ref = type === 'source' ? this.outgoings : this.incomings
|
||||
const prev = edge.previous<Edge.TerminalCellData>(type)
|
||||
const prev = edge.previous<Edge.TerminalCellLooseData>(type)
|
||||
|
||||
if (prev && prev.cell) {
|
||||
const cache = ref[prev.cell]
|
||||
const cellId = Cell.isCell(prev.cell) ? prev.cell.id : prev.cell
|
||||
const cache = ref[cellId]
|
||||
const index = cache ? cache.indexOf(edge.id) : -1
|
||||
if (index >= 0) {
|
||||
cache.splice(index, 1)
|
||||
if (cache.length === 0) {
|
||||
delete ref[prev.cell]
|
||||
delete ref[cellId]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const terminal = edge.getTerminal(type) as Edge.TerminalCellData
|
||||
const terminal = edge.getTerminal(type) as Edge.TerminalCellLooseData
|
||||
if (terminal && terminal.cell) {
|
||||
const cache = ref[terminal.cell] || []
|
||||
const terminalId = Cell.isCell(terminal.cell)
|
||||
? terminal.cell.id
|
||||
: terminal.cell
|
||||
const cache = ref[terminalId] || []
|
||||
const index = cache.indexOf(edge.id)
|
||||
if (index === -1) {
|
||||
cache.push(edge.id)
|
||||
}
|
||||
ref[terminal.cell] = cache
|
||||
ref[terminalId] = cache
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -9,24 +9,44 @@ export const connection: Attr.Definition = {
|
||||
qualify: isEdgeView,
|
||||
set(val, args) {
|
||||
const view = args.view as EdgeView
|
||||
const reverse = ((val as any).reverse || false) as boolean
|
||||
const stubs = ((val as any).stubs || 0) as number
|
||||
let d
|
||||
if (Number.isFinite(stubs) && stubs !== 0) {
|
||||
let offset
|
||||
if (stubs < 0) {
|
||||
const len = view.getConnectionLength() || 0
|
||||
offset = (len + stubs) / 2
|
||||
} else {
|
||||
offset = stubs
|
||||
}
|
||||
|
||||
const path = view.getConnection()
|
||||
if (path) {
|
||||
const sourceParts = path.divideAtLength(offset)
|
||||
const targetParts = path.divideAtLength(-offset)
|
||||
if (sourceParts && targetParts) {
|
||||
d = `${sourceParts[0].serialize()} ${targetParts[1].serialize()}`
|
||||
if (!reverse) {
|
||||
let offset
|
||||
if (stubs < 0) {
|
||||
const len = view.getConnectionLength() || 0
|
||||
offset = (len + stubs) / 2
|
||||
} else {
|
||||
offset = stubs
|
||||
}
|
||||
|
||||
const path = view.getConnection()
|
||||
if (path) {
|
||||
const sourceParts = path.divideAtLength(offset)
|
||||
const targetParts = path.divideAtLength(-offset)
|
||||
if (sourceParts && targetParts) {
|
||||
d = `${sourceParts[0].serialize()} ${targetParts[1].serialize()}`
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let offset
|
||||
let length
|
||||
const len = view.getConnectionLength() || 0
|
||||
if (stubs < 0) {
|
||||
offset = (len + stubs) / 2
|
||||
length = -stubs
|
||||
} else {
|
||||
offset = stubs
|
||||
length = len - stubs * 2
|
||||
}
|
||||
|
||||
const path = view.getConnection()
|
||||
d = path
|
||||
?.divideAtLength(offset)?.[1]
|
||||
?.divideAtLength(length)?.[0]
|
||||
?.serialize()
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -75,9 +75,11 @@ 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 excAncestor = excludedAncestors.includes(node.id)
|
||||
const excHidden = options.excludeHiddenNodes && !node.isVisible()
|
||||
const excluded = excType || excTerminal || excAncestor || excHidden
|
||||
const excluded =
|
||||
excType || excTerminal || excNode || excAncestor || excHidden
|
||||
|
||||
if (!excluded) {
|
||||
const bbox = node.getBBox().moveAndExpand(options.paddingBox)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { NumberExt } from '@antv/x6-common'
|
||||
import { Point, Rectangle, Angle } from '@antv/x6-geometry'
|
||||
import { Edge } from '../../../model'
|
||||
import { Node, Edge } from '../../../model'
|
||||
import { EdgeView } from '../../../view'
|
||||
import { orth } from '../orth'
|
||||
import { Router } from '../index'
|
||||
@@ -51,6 +51,11 @@ export interface ResolvedOptions {
|
||||
*/
|
||||
excludeHiddenNodes: boolean
|
||||
|
||||
/**
|
||||
* Should certain nodes not be considered as obstacles?
|
||||
*/
|
||||
excludeNodes: Node[]
|
||||
|
||||
/**
|
||||
* Possible starting directions from a node.
|
||||
*/
|
||||
@@ -141,6 +146,7 @@ export const defaults: ManhattanRouterOptions = {
|
||||
perpendicular: true,
|
||||
excludeTerminals: [],
|
||||
excludeShapes: [], // ['text']
|
||||
excludeNodes: [],
|
||||
excludeHiddenNodes: false,
|
||||
startDirections: ['top', 'right', 'bottom', 'left'],
|
||||
endDirections: ['top', 'right', 'bottom', 'left'],
|
||||
@@ -221,7 +227,7 @@ export function resolveOptions(options: ManhattanRouterOptions) {
|
||||
|
||||
if (result.padding) {
|
||||
const sides = NumberExt.normalizeSides(result.padding)
|
||||
options.paddingBox = {
|
||||
result.paddingBox = {
|
||||
x: -sides.left,
|
||||
y: -sides.top,
|
||||
width: sides.left + sides.right,
|
||||
|
@@ -326,6 +326,9 @@ export const router: Router.Definition<ManhattanRouterOptions> = function (
|
||||
|
||||
// Cannot found the partial route.
|
||||
if (partialRoute === null) {
|
||||
// eslint-next-line
|
||||
console.warn(`Unable to execute manhattan algorithm, use orth instead`)
|
||||
|
||||
return FunctionExt.call(
|
||||
options.fallbackRouter,
|
||||
this,
|
||||
|
@@ -80,10 +80,12 @@ export class Button extends ToolsView.ToolItem<
|
||||
let tangent
|
||||
let position
|
||||
let angle
|
||||
if (NumberExt.isPercentage(distance)) {
|
||||
tangent = view.getTangentAtRatio(parseFloat(distance) / 100)
|
||||
|
||||
const d = NumberExt.normalizePercentage(distance, 1)
|
||||
if (d >= 0 && d <= 1) {
|
||||
tangent = view.getTangentAtRatio(d)
|
||||
} else {
|
||||
tangent = view.getTangentAtLength(distance)
|
||||
tangent = view.getTangentAtLength(d)
|
||||
}
|
||||
|
||||
if (tangent) {
|
||||
|
@@ -15,7 +15,7 @@ export class CellEditor extends ToolsView.ToolItem<
|
||||
|
||||
render() {
|
||||
this.createElement()
|
||||
this.update()
|
||||
this.updateEditor()
|
||||
this.autoFocus()
|
||||
this.delegateDocumentEvents(this.options.documentEvents!)
|
||||
|
||||
@@ -34,7 +34,7 @@ export class CellEditor extends ToolsView.ToolItem<
|
||||
this.container.appendChild(this.editor)
|
||||
}
|
||||
|
||||
update() {
|
||||
updateEditor() {
|
||||
const { graph, cell, editor } = this
|
||||
const style = editor.style
|
||||
|
||||
|
@@ -58,5 +58,6 @@ export namespace Base {
|
||||
}
|
||||
return others
|
||||
},
|
||||
visible: true,
|
||||
})
|
||||
}
|
||||
|
@@ -7,6 +7,7 @@
|
||||
.@{x6-prefix}-graph {
|
||||
position: relative;
|
||||
outline: none;
|
||||
touch-action: none;
|
||||
|
||||
&-background,
|
||||
&-grid,
|
||||
|
@@ -65,7 +65,9 @@ export class AttrManager {
|
||||
if (normal == null) {
|
||||
normal = {}
|
||||
}
|
||||
const normalName = StringExt.kebabCase(name)
|
||||
const normalName = Dom.CASE_SENSITIVE_ATTR.includes(name)
|
||||
? name
|
||||
: StringExt.kebabCase(name)
|
||||
normal[normalName] = val as Attr.SimpleAttrValue
|
||||
}
|
||||
})
|
||||
|
@@ -1975,14 +1975,24 @@ export class EdgeView<
|
||||
data: EventData.ArrowheadDragging,
|
||||
) {
|
||||
const graph = this.graph
|
||||
const snap = graph.options.connecting.snap
|
||||
const radius = (typeof snap === 'object' && snap.radius) || 50
|
||||
const views = graph.findViewsInArea({
|
||||
const { snap, allowEdge } = graph.options.connecting;
|
||||
const radius = (typeof snap === 'object' && snap.radius) || 50;
|
||||
|
||||
const findViewsOption = {
|
||||
x: x - radius,
|
||||
y: y - radius,
|
||||
width: 2 * radius,
|
||||
height: 2 * radius,
|
||||
})
|
||||
};
|
||||
|
||||
const views = graph.renderer.findViewsInArea(findViewsOption);
|
||||
|
||||
if (allowEdge) {
|
||||
const edgeViews = graph.renderer.findEdgeViewsInArea(findViewsOption).filter( view => {
|
||||
return view != this;
|
||||
});
|
||||
views.push(...edgeViews);
|
||||
}
|
||||
|
||||
const prevView = data.closestView || null
|
||||
const prevMagnet = data.closestMagnet || null
|
||||
|
@@ -294,6 +294,11 @@ export class NodeView<
|
||||
portContentElement,
|
||||
)
|
||||
|
||||
let portClass = 'x6-port'
|
||||
if (port.group) {
|
||||
portClass += ` x6-port-${port.group}`
|
||||
}
|
||||
Dom.addClass(portElement, portClass)
|
||||
Dom.addClass(portElement, 'x6-port')
|
||||
Dom.addClass(portContentElement, 'x6-port-body')
|
||||
portElement.appendChild(portContentElement)
|
||||
@@ -655,9 +660,18 @@ export class NodeView<
|
||||
|
||||
// Picks the node with the highest `z` index
|
||||
if (options.frontOnly) {
|
||||
candidates = candidates.slice(-1)
|
||||
if (candidates.length > 0) {
|
||||
const zIndexMap = ArrayExt.groupBy(candidates, 'zIndex')
|
||||
const maxZIndex = ArrayExt.max(Object.keys(zIndexMap))
|
||||
if (maxZIndex) {
|
||||
candidates = zIndexMap[maxZIndex]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Filter the nodes which is invisiable
|
||||
candidates = candidates.filter((candidate) => candidate.visible)
|
||||
|
||||
let newCandidateView = null
|
||||
const prevCandidateView = data.candidateEmbedView
|
||||
const validateEmbeding = options.validate
|
||||
@@ -713,6 +727,7 @@ export class NodeView<
|
||||
}
|
||||
|
||||
finalizeEmbedding(e: Dom.MouseUpEvent, data: EventData.MovingTargetNode) {
|
||||
this.graph.startBatch('embedding')
|
||||
const cell = data.cell || this.cell
|
||||
const graph = data.graph || this.graph
|
||||
const view = graph.findViewByCell(cell)
|
||||
@@ -733,9 +748,8 @@ export class NodeView<
|
||||
edge.updateParent({ ui: true })
|
||||
})
|
||||
|
||||
const localPoint = graph.snapToGrid(e.clientX, e.clientY)
|
||||
|
||||
if (view) {
|
||||
if (view && candidateView) {
|
||||
const localPoint = graph.snapToGrid(e.clientX, e.clientY)
|
||||
view.notify('node:embedded', {
|
||||
e,
|
||||
cell,
|
||||
@@ -747,6 +761,8 @@ export class NodeView<
|
||||
currentParent: cell.getParent(),
|
||||
})
|
||||
}
|
||||
|
||||
this.graph.stopBatch('embedding')
|
||||
}
|
||||
|
||||
getDelegatedView() {
|
||||
@@ -811,6 +827,9 @@ export class NodeView<
|
||||
})
|
||||
this.stopPropagation(e)
|
||||
} else {
|
||||
if (Dom.hasClass(magnet, 'x6-port-body') || !!magnet.closest('.x6-port-body')) {
|
||||
this.stopPropagation(e)
|
||||
}
|
||||
this.onMouseDown(e, x, y)
|
||||
}
|
||||
|
||||
|
62807
pnpm-lock.yaml
generated
62807
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
packages:
|
||||
- 'packages/*'
|
||||
- 'scripts/*'
|
||||
- 'examples/*'
|
||||
# - 'sites/*'
|
||||
- packages/*
|
||||
- scripts/*
|
||||
- examples/*
|
||||
# - sites/*
|
||||
|
24
scripts/x6-build-tools/CHANGELOG.md
Normal file
24
scripts/x6-build-tools/CHANGELOG.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# @antv/x6-build-tools 1.0.0 (2022-11-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* error -> ETXTBSY: text file is busy ([814e0dd](https://github.com/antvis/x6/commit/814e0dd137ab766b3f80e737bef9485d40a315f4))
|
||||
* unique cmd file name ([da18f12](https://github.com/antvis/x6/commit/da18f126ea3a9d09a2a3e6c2ff680bcd4d916845))
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* bump to 2.0 ([94af7fa](https://github.com/antvis/x6/commit/94af7fa7ec96e3417db9aa5d245751507ae2671e))
|
||||
* bump to 2.0 ([ecffe1a](https://github.com/antvis/x6/commit/ecffe1a2a8bcf5538f027c3c54acaefc50215023))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add rss command to run sharable scripts ([4a45fa7](https://github.com/antvis/x6/commit/4a45fa7d386dbb17ce60102cb406905d439a64bd))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* bump to 2.0
|
||||
* bump to 2.0
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@antv/x6-build-tools",
|
||||
"version": "2.0.0",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"rss": "./bin/rss.js",
|
||||
|
Reference in New Issue
Block a user