1
0
Fork 0

GraphViewer: Minor renaming for conistency

This commit is contained in:
Michael Hackstein 2013-08-27 12:29:26 +02:00
parent 1f95ea61f5
commit 0732cc07f8
4 changed files with 11 additions and 11 deletions

View File

@ -29,12 +29,12 @@
////////////////////////////////////////////////////////////////////////////////
/*
* flags example format:
* config example format:
* {
* shape: {
* type: EdgeShaper.shapes.ARROW
* }
* label: "key" \\ function(node)
* label: "key" \\ function(edge)
* actions: {
* click: function(edge)
* }
@ -43,7 +43,7 @@
*
*/
function EdgeShaper(parent, flags, idfunc) {
function EdgeShaper(parent, config, idfunc) {
"use strict";
var self = this,
@ -332,8 +332,8 @@ function EdgeShaper(parent, flags, idfunc) {
toplevelSVG = d3.select(toplevelSVG[0][0].ownerSVGElement);
}
if (flags === undefined) {
flags = {
if (config === undefined) {
config = {
color: {
type: "single",
stroke: "#686766"
@ -341,14 +341,14 @@ function EdgeShaper(parent, flags, idfunc) {
};
}
if (flags.color === undefined) {
flags.color = {
if (config.color === undefined) {
config.color = {
type: "single",
stroke: "#686766"
};
}
parseConfig(flags);
parseConfig(config);
if (_.isFunction(idfunc)) {
idFunction = idfunc;

View File

@ -268,4 +268,4 @@ function EventDispatcher(nodeShaper, edgeShaper, config) {
throw "Not implemented";
};
*/
}
}

View File

@ -62,7 +62,7 @@ function ForceLayouter(config) {
} else {
res += defaultDistance;
}
if (d.target._isCommunity) {
if (d.target._
res += d.target.getDistance(defaultDistance);
} else {
res += defaultDistance;

View File

@ -526,4 +526,4 @@ NodeShaper.shapes = Object.freeze({
"CIRCLE": 1,
"RECT": 2,
"IMAGE": 3
});
});