@antv/layout
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -120,2 +120,4 @@ /** | ||
if (n === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -136,2 +138,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -138,0 +142,0 @@ } |
@@ -109,2 +109,4 @@ /** | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -115,2 +117,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -117,0 +121,0 @@ } |
@@ -57,2 +57,4 @@ /** | ||
if (n === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -73,2 +75,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -75,0 +79,0 @@ } |
@@ -142,4 +142,7 @@ /** | ||
}); | ||
if (nodesNum === 1) | ||
if (nodesNum === 1) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
} | ||
const sortedByX = levelNodes.sort((a, b) => { | ||
@@ -146,0 +149,0 @@ return a.x - b.x; |
@@ -182,5 +182,4 @@ /** | ||
self.ticking = false; | ||
if (self.onLayoutEnd) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
} | ||
}); | ||
@@ -187,0 +186,0 @@ self.ticking = true; |
@@ -50,2 +50,4 @@ /** | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -66,2 +68,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -68,0 +72,0 @@ } |
@@ -81,2 +81,4 @@ /** | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -97,2 +99,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -99,0 +103,0 @@ } |
@@ -71,2 +71,4 @@ /** | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -87,2 +89,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -89,0 +93,0 @@ } |
@@ -77,2 +77,4 @@ /** | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -93,2 +95,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -95,0 +99,0 @@ } |
@@ -61,2 +61,4 @@ /** | ||
if (n === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -67,2 +69,4 @@ } | ||
nodes[0].y = begin[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -69,0 +73,0 @@ } |
@@ -38,2 +38,4 @@ /** | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -44,2 +46,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -46,0 +50,0 @@ } |
@@ -87,2 +87,4 @@ /** | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -103,2 +105,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -105,0 +109,0 @@ } |
@@ -6,3 +6,3 @@ import { Base } from "../layout/base"; | ||
if (map.get(name)) { | ||
throw new Error(`The layout with the name ${name} exists already`); | ||
console.warn(`The layout with the name ${name} exists already, it will be overridden`); | ||
} | ||
@@ -9,0 +9,0 @@ if (isObject(layoutOverride)) { |
@@ -138,2 +138,4 @@ "use strict"; | ||
if (n === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -154,2 +156,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -156,0 +160,0 @@ } |
@@ -127,2 +127,4 @@ "use strict"; | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -133,2 +135,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -135,0 +139,0 @@ } |
@@ -75,2 +75,4 @@ "use strict"; | ||
if (n === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -91,2 +93,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -93,0 +97,0 @@ } |
@@ -163,4 +163,7 @@ "use strict"; | ||
}); | ||
if (nodesNum === 1) | ||
if (nodesNum === 1) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
} | ||
var sortedByX = levelNodes.sort(function (a, b) { | ||
@@ -167,0 +170,0 @@ return a.x - b.x; |
@@ -222,5 +222,4 @@ "use strict"; | ||
self.ticking = false; | ||
if (self.onLayoutEnd) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
} | ||
}); | ||
@@ -227,0 +226,0 @@ self.ticking = true; |
@@ -69,2 +69,4 @@ "use strict"; | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -85,2 +87,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -87,0 +91,0 @@ } |
@@ -99,2 +99,4 @@ "use strict"; | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -115,2 +117,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -117,0 +121,0 @@ } |
@@ -121,2 +121,4 @@ "use strict"; | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return [2 /*return*/]; | ||
@@ -137,2 +139,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return [2 /*return*/]; | ||
@@ -139,0 +143,0 @@ } |
@@ -126,2 +126,4 @@ "use strict"; | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return [2 /*return*/]; | ||
@@ -142,2 +144,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return [2 /*return*/]; | ||
@@ -144,0 +148,0 @@ } |
@@ -79,2 +79,4 @@ "use strict"; | ||
if (n === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -85,2 +87,4 @@ } | ||
nodes[0].y = begin[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -87,0 +91,0 @@ } |
@@ -56,2 +56,4 @@ "use strict"; | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -62,2 +64,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -64,0 +68,0 @@ } |
@@ -108,2 +108,4 @@ "use strict"; | ||
if (!nodes || nodes.length === 0) { | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -124,2 +126,4 @@ } | ||
nodes[0].y = center[1]; | ||
if (self.onLayoutEnd) | ||
self.onLayoutEnd(); | ||
return; | ||
@@ -126,0 +130,0 @@ } |
@@ -22,3 +22,3 @@ "use strict"; | ||
if (map.get(name)) { | ||
throw new Error("The layout with the name " + name + " exists already"); | ||
console.warn("The layout with the name " + name + " exists already, it will be overridden"); | ||
} | ||
@@ -25,0 +25,0 @@ if (util_1.isObject(layoutOverride)) { |
{ | ||
"name": "@antv/layout", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "graph layout algorithm", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1127726
14967