diff options
| author | Alon Levy <alon@pobox.com> | 2014-11-25 16:10:16 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-11-25 16:10:18 +0200 |
| commit | aca241b966612107cb70833ac252dcc378c2de25 (patch) | |
| tree | be5cdc545585ba22b1763971637b4a2519433660 /src/model | |
| parent | 012f24ae605e0add9dcec8000d7d6167b3207092 (diff) | |
core: Link.{source,target} need to be getters
Note that despite the sad sad fact __defineGetter__ is not supported by
IE8, we are currently at quality 'Crap' on IE8 even without it (I
checked, courtesy 14 days trial of crossover from codeweavers), and Dor
says it is a level -1000 priority.
Diffstat (limited to 'src/model')
| -rw-r--r-- | src/model/core.js | 7 |
1 files changed, 7 insertions, 0 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 - |
