summaryrefslogtreecommitdiff
path: root/scripts/rhizicore.js
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-09-21 19:11:14 +0300
committerAlon Levy <alon@pobox.com>2014-09-21 19:11:14 +0300
commit810f2951b50357bcb6b854da312027d64fcddb25 (patch)
tree02c03da06e04897208aacba69729bad90093525f /scripts/rhizicore.js
parent15eb20c94c8143d84cb0c26fa5ae57a2a7b864c0 (diff)
Fixes #41: conjugation/connector only sentences keep their links
Diffstat (limited to 'scripts/rhizicore.js')
-rw-r--r--scripts/rhizicore.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js
index d90daac9..670ed7bb 100644
--- a/scripts/rhizicore.js
+++ b/scripts/rhizicore.js
@@ -186,14 +186,16 @@ function myGraph(el) {
}
}
- this.addLink = function(sourceId, targetId, name, state) {
+ this.addLink = function(sourceId, targetId, name, state, drop_conjugator_links) {
sourceId = sourceId && sourceId.toLowerCase();
targetId = targetId && targetId.toLowerCase();
var sourceNode = findNode(sourceId, null);
var targetNode = findNode(targetId, null);
var found = findLink(sourceId,targetId,name);
-
- if(name)if(name.replace(/ /g,"")==="and")state="temp";
+
+ if (drop_conjugator_links && name && (name.replace(/ /g,"") === "and")) {
+ state = "temp";
+ }
if(!found && ((sourceNode !== undefined) && (targetNode !== undefined))) {
var link = {
"source": sourceNode,