From aca241b966612107cb70833ac252dcc378c2de25 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Tue, 25 Nov 2014 16:10:16 +0200 Subject: 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. --- src/model/core.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/model') 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 - -- cgit v1.3.1