@antv/g6-core
Advanced tools
Comparing version 0.7.9 to 0.7.10-beta.0
@@ -50,3 +50,3 @@ var subjectColor = 'rgb(95, 149, 255)'; | ||
export default { | ||
version: '0.7.9', | ||
version: '0.7.10-beta.0', | ||
rootContainerClassName: 'root-container', | ||
@@ -53,0 +53,0 @@ nodeContainerClassName: 'node-container', |
import { __assign, __rest } from "tslib"; | ||
import { isFunction, groupBy } from '@antv/util'; | ||
import { isNaN, calculationItemsBBox } from '../../util/base'; | ||
import { isForce } from '../../util/layout'; | ||
var LayoutController = /** @class */function () { | ||
@@ -54,5 +55,10 @@ function LayoutController(graph) { | ||
graph = _a.graph, | ||
layoutType = _a.layoutType; | ||
layoutType = _a.layoutType, | ||
_b = _a.layoutCfg, | ||
layoutCfg = _b === void 0 ? {} : _b; | ||
if (!graph) return; | ||
if (graph.get('animate')) { | ||
var animate = layoutCfg.animate; | ||
var isDefaultAnimateLayout = animate === undefined && (layoutType === 'force' || layoutType === 'force2'); | ||
var forceAnimate = isForce(layoutType) && (animate || isDefaultAnimateLayout); | ||
if (graph.get('animate') && !forceAnimate) { | ||
graph.positionsAnimate(layoutType === 'comboCombined'); | ||
@@ -59,0 +65,0 @@ } else { |
@@ -390,2 +390,3 @@ import AbstractGraph from './graph/graph'; | ||
mat3: typeof import("gl-matrix").mat3; | ||
isForce: (layoutType: any) => boolean; | ||
defaultSubjectColors: string[]; | ||
@@ -392,0 +393,0 @@ compare: (attributeName: string) => (m: any, n: any) => number; |
@@ -6,2 +6,3 @@ import * as MathUtil from './math'; | ||
mat3: typeof mat3; | ||
isForce: (layoutType: any) => boolean; | ||
defaultSubjectColors: string[]; | ||
@@ -8,0 +9,0 @@ compare: (attributeName: string) => (m: any, n: any) => number; |
@@ -7,5 +7,6 @@ import { __assign } from "tslib"; | ||
import * as ColorUtil from './color'; | ||
import * as LayoutUtil from './layout'; | ||
import { ext, mat3 } from '@antv/matrix-util'; | ||
var transform = ext.transform; | ||
var Util = __assign(__assign(__assign(__assign(__assign(__assign({}, BaseUtil), GraphicUtil), PathUtil), MathUtil), ColorUtil), { | ||
var Util = __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, BaseUtil), GraphicUtil), PathUtil), MathUtil), ColorUtil), LayoutUtil), { | ||
transform: transform, | ||
@@ -12,0 +13,0 @@ mat3: mat3 |
@@ -56,3 +56,3 @@ "use strict"; | ||
var _default = { | ||
version: '0.7.9', | ||
version: '0.7.10-beta.0', | ||
rootContainerClassName: 'root-container', | ||
@@ -59,0 +59,0 @@ nodeContainerClassName: 'node-container', |
@@ -10,2 +10,3 @@ "use strict"; | ||
var _base = require("../../util/base"); | ||
var _layout = require("../../util/layout"); | ||
var LayoutController = /** @class */function () { | ||
@@ -61,5 +62,10 @@ function LayoutController(graph) { | ||
graph = _a.graph, | ||
layoutType = _a.layoutType; | ||
layoutType = _a.layoutType, | ||
_b = _a.layoutCfg, | ||
layoutCfg = _b === void 0 ? {} : _b; | ||
if (!graph) return; | ||
if (graph.get('animate')) { | ||
var animate = layoutCfg.animate; | ||
var isDefaultAnimateLayout = animate === undefined && (layoutType === 'force' || layoutType === 'force2'); | ||
var forceAnimate = (0, _layout.isForce)(layoutType) && (animate || isDefaultAnimateLayout); | ||
if (graph.get('animate') && !forceAnimate) { | ||
graph.positionsAnimate(layoutType === 'comboCombined'); | ||
@@ -66,0 +72,0 @@ } else { |
@@ -390,2 +390,3 @@ import AbstractGraph from './graph/graph'; | ||
mat3: typeof import("gl-matrix").mat3; | ||
isForce: (layoutType: any) => boolean; | ||
defaultSubjectColors: string[]; | ||
@@ -392,0 +393,0 @@ compare: (attributeName: string) => (m: any, n: any) => number; |
@@ -6,2 +6,3 @@ import * as MathUtil from './math'; | ||
mat3: typeof mat3; | ||
isForce: (layoutType: any) => boolean; | ||
defaultSubjectColors: string[]; | ||
@@ -8,0 +9,0 @@ compare: (attributeName: string) => (m: any, n: any) => number; |
@@ -14,2 +14,3 @@ "use strict"; | ||
var ColorUtil = _interopRequireWildcard(require("./color")); | ||
var LayoutUtil = _interopRequireWildcard(require("./layout")); | ||
var _matrixUtil = require("@antv/matrix-util"); | ||
@@ -19,3 +20,3 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
var transform = _matrixUtil.ext.transform; | ||
var Util = (0, _tslib.__assign)((0, _tslib.__assign)((0, _tslib.__assign)((0, _tslib.__assign)((0, _tslib.__assign)((0, _tslib.__assign)({}, BaseUtil), GraphicUtil), PathUtil), MathUtil), ColorUtil), { | ||
var Util = (0, _tslib.__assign)((0, _tslib.__assign)((0, _tslib.__assign)((0, _tslib.__assign)((0, _tslib.__assign)((0, _tslib.__assign)((0, _tslib.__assign)({}, BaseUtil), GraphicUtil), PathUtil), MathUtil), ColorUtil), LayoutUtil), { | ||
transform: transform, | ||
@@ -22,0 +23,0 @@ mat3: _matrixUtil.mat3 |
{ | ||
"name": "@antv/g6-core", | ||
"version": "0.7.9", | ||
"version": "0.7.10-beta.0", | ||
"description": "A Graph Visualization Framework in JavaScript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
1171895
207
34931