@antv/g6-core
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -50,3 +50,3 @@ var subjectColor = 'rgb(95, 149, 255)'; | ||
export default { | ||
version: '0.0.8', | ||
version: '0.0.9', | ||
rootContainerClassName: 'root-container', | ||
@@ -53,0 +53,0 @@ nodeContainerClassName: 'node-container', |
@@ -1,2 +0,2 @@ | ||
/// <reference types="gl-matrix" /> | ||
/// <reference types="_gl-matrix@3.3.0@gl-matrix" /> | ||
import AbstractGraph from './graph/graph'; | ||
@@ -3,0 +3,0 @@ import Shape, { Arrow, Marker } from './element'; |
@@ -289,3 +289,3 @@ import EventEmitter from '@antv/event-emitter'; | ||
*/ | ||
updateBehavior: (behavior: string, newCfg: object, modes: string | string[]) => Graph; | ||
updateBehavior: (behavior: string, newCfg: object, mode?: string) => Graph; | ||
/** | ||
@@ -292,0 +292,0 @@ * 清除画布元素 |
@@ -285,3 +285,3 @@ import { IGroup, Point } from '@antv/g-base'; | ||
*/ | ||
removeNode: (node: string | INode) => boolean; | ||
removeNode: (node: INode) => boolean; | ||
} |
import { ICombo, INode } from '../interface/item'; | ||
import Node from './node'; | ||
import { ComboConfig, IBBox } from '../types'; | ||
import { IBBox, ModelConfig } from '../types'; | ||
export default class Combo extends Node implements ICombo { | ||
@@ -11,3 +11,3 @@ getDefaultCfg(): { | ||
}; | ||
getShapeCfg(model: ComboConfig): ComboConfig; | ||
getShapeCfg(model: ModelConfig): ModelConfig; | ||
/** | ||
@@ -14,0 +14,0 @@ * 根据 keyshape 计算包围盒 |
import { IEdge, INode } from '../interface/item'; | ||
import { IPoint, NodeConfig } from '../types'; | ||
import { IPoint, ModelConfig } from '../types'; | ||
import Item from './item'; | ||
@@ -68,3 +68,3 @@ export default class Node extends Item implements INode { | ||
*/ | ||
isOnlyMove(cfg: NodeConfig): boolean; | ||
isOnlyMove(cfg: ModelConfig): boolean; | ||
} |
@@ -1,2 +0,2 @@ | ||
/// <reference types="gl-matrix" /> | ||
/// <reference types="_gl-matrix@3.3.0@gl-matrix" /> | ||
import * as MathUtil from './math'; | ||
@@ -3,0 +3,0 @@ import { ext, mat3 } from '@antv/matrix-util'; |
@@ -39,3 +39,3 @@ import { mat3, vec3, ext } from '@antv/matrix-util'; | ||
export var getLineIntersect = function getLineIntersect(p0, p1, p2, p3) { | ||
var tolerance = 0.001; | ||
var tolerance = 0.0001; | ||
var E = { | ||
@@ -55,2 +55,3 @@ x: p2.x - p0.x, | ||
var sqrKross = kross * kross; | ||
var invertKross = 1 / kross; | ||
var sqrLen0 = D0.x * D0.x + D0.y * D0.y; | ||
@@ -61,4 +62,4 @@ var sqrLen1 = D1.x * D1.x + D1.y * D1.y; | ||
if (sqrKross > tolerance * sqrLen0 * sqrLen1) { | ||
var s = (E.x * D1.y - E.y * D1.x) / kross; | ||
var t = (E.x * D0.y - E.y * D0.x) / kross; | ||
var s = (E.x * D1.y - E.y * D1.x) * invertKross; | ||
var t = (E.x * D0.y - E.y * D0.x) * invertKross; | ||
@@ -65,0 +66,0 @@ if (isBetween(s, 0, 1) && isBetween(t, 0, 1)) { |
@@ -56,3 +56,3 @@ "use strict"; | ||
var _default = { | ||
version: '0.0.8', | ||
version: '0.0.9', | ||
rootContainerClassName: 'root-container', | ||
@@ -59,0 +59,0 @@ nodeContainerClassName: 'node-container', |
@@ -1,2 +0,2 @@ | ||
/// <reference types="gl-matrix" /> | ||
/// <reference types="_gl-matrix@3.3.0@gl-matrix" /> | ||
import AbstractGraph from './graph/graph'; | ||
@@ -3,0 +3,0 @@ import Shape, { Arrow, Marker } from './element'; |
@@ -289,3 +289,3 @@ import EventEmitter from '@antv/event-emitter'; | ||
*/ | ||
updateBehavior: (behavior: string, newCfg: object, modes: string | string[]) => Graph; | ||
updateBehavior: (behavior: string, newCfg: object, mode?: string) => Graph; | ||
/** | ||
@@ -292,0 +292,0 @@ * 清除画布元素 |
@@ -285,3 +285,3 @@ import { IGroup, Point } from '@antv/g-base'; | ||
*/ | ||
removeNode: (node: string | INode) => boolean; | ||
removeNode: (node: INode) => boolean; | ||
} |
import { ICombo, INode } from '../interface/item'; | ||
import Node from './node'; | ||
import { ComboConfig, IBBox } from '../types'; | ||
import { IBBox, ModelConfig } from '../types'; | ||
export default class Combo extends Node implements ICombo { | ||
@@ -11,3 +11,3 @@ getDefaultCfg(): { | ||
}; | ||
getShapeCfg(model: ComboConfig): ComboConfig; | ||
getShapeCfg(model: ModelConfig): ModelConfig; | ||
/** | ||
@@ -14,0 +14,0 @@ * 根据 keyshape 计算包围盒 |
import { IEdge, INode } from '../interface/item'; | ||
import { IPoint, NodeConfig } from '../types'; | ||
import { IPoint, ModelConfig } from '../types'; | ||
import Item from './item'; | ||
@@ -68,3 +68,3 @@ export default class Node extends Item implements INode { | ||
*/ | ||
isOnlyMove(cfg: NodeConfig): boolean; | ||
isOnlyMove(cfg: ModelConfig): boolean; | ||
} |
@@ -1,2 +0,2 @@ | ||
/// <reference types="gl-matrix" /> | ||
/// <reference types="_gl-matrix@3.3.0@gl-matrix" /> | ||
import * as MathUtil from './math'; | ||
@@ -3,0 +3,0 @@ import { ext, mat3 } from '@antv/matrix-util'; |
@@ -51,3 +51,3 @@ "use strict"; | ||
var getLineIntersect = function getLineIntersect(p0, p1, p2, p3) { | ||
var tolerance = 0.001; | ||
var tolerance = 0.0001; | ||
var E = { | ||
@@ -67,2 +67,3 @@ x: p2.x - p0.x, | ||
var sqrKross = kross * kross; | ||
var invertKross = 1 / kross; | ||
var sqrLen0 = D0.x * D0.x + D0.y * D0.y; | ||
@@ -73,4 +74,4 @@ var sqrLen1 = D1.x * D1.x + D1.y * D1.y; | ||
if (sqrKross > tolerance * sqrLen0 * sqrLen1) { | ||
var s = (E.x * D1.y - E.y * D1.x) / kross; | ||
var t = (E.x * D0.y - E.y * D0.x) / kross; | ||
var s = (E.x * D1.y - E.y * D1.x) * invertKross; | ||
var t = (E.x * D0.y - E.y * D0.x) * invertKross; | ||
@@ -77,0 +78,0 @@ if (isBetween(s, 0, 1) && isBetween(t, 0, 1)) { |
{ | ||
"name": "@antv/g6-core", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "A Graph Visualization Framework in JavaScript", | ||
@@ -34,3 +34,2 @@ "keywords": [ | ||
"module": "es/index.js", | ||
"browser": "dist/g6-core.min.js", | ||
"types": "lib/index.d.ts", | ||
@@ -37,0 +36,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1086645
32045