Minor fixes to pull request #58
[scpubgit/stemmaweb.git] / lib / stemmaweb / Controller / Relation.pm
index 12c63ef..3127298 100644 (file)
@@ -71,7 +71,7 @@ sub main :Chained('text') :PathPart('') :Args(0) {
        my $collation = $tradition->collation;
 
        # Stash text direction to use in JS.
-       $c->stash->{'direction'} = $collation->direction;
+       $c->stash->{'direction'} = $collation->direction || 'BI';
 
        # Stash the relationship definitions
        $c->stash->{'relationship_scopes'} = 
@@ -522,10 +522,6 @@ sub compress :Chained('text') :PathPart :Args(0) {
 
                $m->save($collation);
 
-               if ($collation->direction eq 'RL') {
-                       @nodes = reverse @nodes;
-               }
-
                $c->stash->{'result'} = {
                        success => 1,
                        nodes   => \@nodes,