1
0
Fork 0

GraphViewer: FishEye Distortion is now piped through community nodes

This commit is contained in:
Michael Hackstein 2013-07-29 14:33:23 +02:00
parent 9ed3fba6f8
commit 81aa7cfac9
1 changed files with 22 additions and 8 deletions

View File

@ -406,14 +406,28 @@ function CommunityNode(parent, initial) {
},
addDistortion = function(distFunc) {
_.each(nodeArray, function(n) {
//n.position = distFunc(n);
n.position = {
x: n.x,
y: n.y,
z: 1
};
});
if (self._expanded) {
var oldFocus = distFunc.focus();
var newFocus = [
oldFocus[0] - self.position.x,
oldFocus[1] - self.position.y
];
distFunc.focus(newFocus);
_.each(nodeArray, function(n) {
n.position = distFunc(n);
n.position.x /= self.position.z;
n.position.y /= self.position.z;
n.position.z /= self.position.z;
/*
n.position = {
x: n.x,
y: n.y,
z: 1
};
*/
});
distFunc.focus(oldFocus);
}
},
shapeAll = function(g, shapeFunc, shapeQue, start, colourMapper) {