-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: edge label is not draggable, closes: #4612; fix: error occurs while clicking back button on timebar when the slider is already on the start, closes: #4598; docs: scrollNode demo drag node problem, closes: #4626; * chore: update layout version
- Loading branch information
1 parent
4e13ecc
commit 08e955e
Showing
25 changed files
with
84 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import G6 from '@antv/g6-pc'; | ||
|
||
G6.version = '4.8.15'; | ||
G6.version = '4.8.16'; | ||
|
||
export * from '@antv/g6-pc'; | ||
export default G6; | ||
export const version = '4.8.15'; | ||
export const version = '4.8.16'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ interface Event { | |
} | ||
|
||
export const LayoutWorker = ( | ||
workerScriptURL: string = 'https://unpkg.com/@antv/[email protected].22/dist/layout.min.js', | ||
workerScriptURL: string = 'https://unpkg.com/@antv/[email protected].23/dist/layout.min.js', | ||
) => { | ||
function workerCode() { | ||
const LAYOUT_MESSAGE = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* Get current browser name. | ||
* @returns browser name | ||
*/ | ||
export const getBrowserName = (): string => { | ||
const userAgent = navigator.userAgent.toLowerCase(); | ||
if (userAgent.indexOf('firefox') > -1) return 'firefox'; | ||
if (userAgent.indexOf('safari') > -1) return 'safari'; | ||
if (userAgent.indexOf('opr') > -1) return 'opera'; | ||
if (userAgent.indexOf('chrome') > -1) return 'chrome'; | ||
if (userAgent.indexOf('trident') > -1) return 'ie 11'; | ||
if (userAgent.indexOf('ie') > -1) return 'ie'; | ||
return 'unknown'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import * as ColorUtil from './color'; | ||
import * as LayoutUtil from './layout'; | ||
import * as GpuUtil from './gpu'; | ||
import * as BrowserUtil from './browser'; | ||
import { Util } from '@antv/g6-core'; | ||
|
||
const G6Util = { ...Util, ...ColorUtil, ...LayoutUtil, ...GpuUtil } as any; | ||
const G6Util = { ...Util, ...ColorUtil, ...LayoutUtil, ...GpuUtil, ...BrowserUtil } as any; | ||
|
||
export default G6Util; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ The configurations of each layout algorithms are different. Please refer to corr | |
- If there are `x` and `y` in node data, the graph will render with these information; | ||
- If there is no positions information in node data, the graph will arrange nodes with Random Layout by default. | ||
|
||
If the worker is enabled, notice that worker will visit the latest online version of @antv/layout. If your application cannot reach the online resource, download and save the [layout script](https://unpkg.com/@antv/[email protected].22/dist/layout.min.js), and put it on an address which is visitable for your application. And then config `workerScriptURL` with the address in `layout`. | ||
If the worker is enabled, notice that worker will visit the latest online version of @antv/layout. If your application cannot reach the online resource, download and save the [layout script](https://unpkg.com/@antv/[email protected].23/dist/layout.min.js), and put it on an address which is visitable for your application. And then config `workerScriptURL` with the address in `layout`. | ||
|
||
|
||
## Instantiate Independently | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ const graph = new G6.Graph({ | |
- 若数据中节点有位置信息(`x` 和 `y`),则按照数据的位置信息进行绘制; | ||
- 若数据中节点没有位置信息,则默认使用 Random Layout 进行布局。 | ||
|
||
如果开启了 webworker,worker 使用的是 @antv/layout 线上的脚本,如果你的项目无法访问到线上资源,请保存 [layout 脚本](https://unpkg.com/@antv/[email protected].22/dist/layout.min.js),并放在可以访问到的地址上,将 layout 的 `workerScriptURL` 配置为该地址即可。 | ||
如果开启了 webworker,worker 使用的是 @antv/layout 线上的脚本,如果你的项目无法访问到线上资源,请保存 [layout 脚本](https://unpkg.com/@antv/[email protected].23/dist/layout.min.js),并放在可以访问到的地址上,将 layout 的 `workerScriptURL` 配置为该地址即可。 | ||
|
||
## 单独使用布局 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ Note: | |
|
||
- TreeGraph layouts do not support Web-Worker; | ||
- Sub-Graph layout mechanism do not support Web-Worker; | ||
- Worker will visit the latest online version of @antv/layout. If your application cannot reach the online resource, download and save the [layout script](https://unpkg.com/@antv/[email protected].22/dist/layout.min.js), and put it on an address which is visitable for your application. And then config `workerScriptURL` with the address in `layout`. | ||
- Worker will visit the latest online version of @antv/layout. If your application cannot reach the online resource, download and save the [layout script](https://unpkg.com/@antv/[email protected].23/dist/layout.min.js), and put it on an address which is visitable for your application. And then config `workerScriptURL` with the address in `layout`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,4 @@ const graph = new G6.Graph({ | |
|
||
- 树图不支持 Web-Worker 机制; | ||
- 子图布局机制暂不支持 Web-Worker 机制; | ||
- worker 使用的是 @antv/layout 线上的脚本,如果你的项目无法访问到线上资源,请保存 [layout 脚本](https://unpkg.com/@antv/[email protected].22/dist/layout.min.js),并放在可以访问到的地址上,将 layout 的 `workerScriptURL` 配置为该地址即可 | ||
- worker 使用的是 @antv/layout 线上的脚本,如果你的项目无法访问到线上资源,请保存 [layout 脚本](https://unpkg.com/@antv/[email protected].23/dist/layout.min.js),并放在可以访问到的地址上,将 layout 的 `workerScriptURL` 配置为该地址即可 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters