summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/model/core.js7
-rw-r--r--src/rz_core.js8
2 files changed, 7 insertions, 8 deletions
diff --git a/src/model/core.js b/src/model/core.js
index 8575f7d0..015af1db 100644
--- a/src/model/core.js
+++ b/src/model/core.js
@@ -42,6 +42,13 @@ define([], function() {
function Link() {
}
+ // adapte Link to force_layoutL create __src,__dst aliases
+ Link.prototype.__defineGetter__('source', function(){
+ return this.__src;
+ });
+ Link.prototype.__defineGetter__('target', function(){
+ return this.__dst;
+ });
/**
* the most flexible way to create a node: - perform spec field validation -
diff --git a/src/rz_core.js b/src/rz_core.js
index 490c1a29..c1c8e0f9 100644
--- a/src/rz_core.js
+++ b/src/rz_core.js
@@ -114,14 +114,6 @@ function init_force_layout(){
.size([w, h])
.on("tick", tick)
.start();
-
- // adapte Link to force_layoutL create __src,__dst aliases
- model_core.Link.prototype.source = function(){
- return this.__src;
- }
- model_core.Link.prototype.target = function(){
- return this.__dst;
- }
}
initDrawingArea();