From 37e688f1d2a480717576bad264bfcf6ab04385f9 Mon Sep 17 00:00:00 2001 From: LV-426 Date: Tue, 16 Dec 2014 13:04:27 +0200 Subject: derive link type from name --- src/model/core.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/model/core.js') diff --git a/src/model/core.js b/src/model/core.js index d57a9f72..5c643ea1 100644 --- a/src/model/core.js +++ b/src/model/core.js @@ -148,10 +148,11 @@ define(['util'], function(util) { util.assert(undefined != dst, 'create_link_from_spec: dst missing'); util.assert(undefined != src.id, 'create_link_from_spec: src missing id'); util.assert(undefined != dst.id, 'create_link_from_spec: dst missing id'); + util.assert(undefined != link_spec.name, 'create_link_from_spec: name missing, unable to deduce type'); ret.__src = src; ret.__dst = dst; - ret.__type = 'textual_link'; + ret.__type = link_spec.name; if (undefined == link_spec.name){ console.warn('create_link_from_spec: name: ' + link_spec.name); -- cgit v1.3.1