cytoscape-cose-bilkent
Advanced tools
Comparing version 1.3.6 to 1.3.7
{ | ||
"name": "cytoscape-cose-bilkent", | ||
"version": "1.3.6", | ||
"version": "1.3.7", | ||
"description": "The CoSE layout for Cytoscape.js by Bilkent", | ||
@@ -5,0 +5,0 @@ "main": "cytoscape-cose-bilkent.js", |
{ | ||
"name": "cytoscape-cose-bilkent", | ||
"version": "1.3.6", | ||
"version": "1.3.7", | ||
"description": "The CoSE layout for Cytoscape.js by Bilkent", | ||
@@ -5,0 +5,0 @@ "main": "cytoscape-cose-bilkent.js", |
@@ -233,3 +233,5 @@ 'use strict'; | ||
var h = lnode.rect.height; | ||
var dummy_parent_id = cyNode.data('dummy_parent_id'); | ||
var dummy_parent_id = null; | ||
if(cyNode.scratch('coseBilkent') && cyNode.scratch('coseBilkent').dummy_parent_id) | ||
dummy_parent_id = cyNode.scratch('coseBilkent').dummy_parent_id; | ||
@@ -433,3 +435,3 @@ pData[ 'nodes' ].push({ | ||
t1.stop(); | ||
after.options.eles.nodes().removeData('dummy_parent_id'); | ||
after.options.eles.nodes().removeScratch('coseBilkent'); | ||
}); | ||
@@ -446,6 +448,7 @@ | ||
after.options.eles.nodes().positions(function (i, ele) { | ||
if (ele.data('dummy_parent_id')) { | ||
if (ele.scratch('coseBilkent') && ele.scratch('coseBilkent').dummy_parent_id) { | ||
var dummyParent = ele.scratch('coseBilkent').dummy_parent_id; | ||
return { | ||
x: pData[ele.data('dummy_parent_id')].x, | ||
y: pData[ele.data('dummy_parent_id')].y | ||
x: dummyParent.x, | ||
y: dummyParent.y | ||
}; | ||
@@ -622,6 +625,11 @@ } | ||
if (i == 0) { | ||
dummy.data('tempchildren', []); | ||
dummy.scratch('coseBilkent', {tempchildren: []}); | ||
} | ||
var node = tempMemberGroups[p_id][i]; | ||
node.data('dummy_parent_id', dummyCompoundId); | ||
var scratchObj = node.scratch('coseBilkent'); | ||
if(!scratchObj) { | ||
scratchObj = {}; | ||
node.scratch('coseBilkent', scratchObj); | ||
} | ||
scratchObj['dummy_parent_id'] = dummyCompoundId; | ||
this.options.cy.add({ | ||
@@ -637,3 +645,3 @@ group: "nodes", | ||
tempchild.width(); | ||
dummy.data('tempchildren').push(tempchild); | ||
dummy.scratch('coseBilkent').tempchildren.push(tempchild); | ||
} | ||
@@ -726,3 +734,3 @@ } | ||
var tempchildren = compound.data('tempchildren'); | ||
var tempchildren = compound.scratch('coseBilkent').tempchildren; | ||
for (var i = 0; i < tempchildren.length; i++) { | ||
@@ -805,3 +813,3 @@ tempchildren[i].remove(); | ||
if (!node.data('dummy_parent_id')) { | ||
if (!node.scratch('coseBilkent') || !node.scratch('coseBilkent').dummy_parent_id) { | ||
var owner = lNode.owner; | ||
@@ -1076,2 +1084,2 @@ owner.remove(lNode); | ||
return _CoSELayout; | ||
}; | ||
}; |
Sorry, the diff of this file is too big to display
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
548483
9970