From: Joris van Zundert Date: Wed, 26 Jun 2013 15:34:59 +0000 (+0200) Subject: On going work on detaching of nodes/strands. Strands detachable now, not visibly... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a471cb0f195745a7ae4465f1073fb26b835b3da1;p=scpubgit%2Fstemmaweb.git On going work on detaching of nodes/strands. Strands detachable now, not visibly yet. --- diff --git a/root/js/relationship.js b/root/js/relationship.js index 7298613..1be59af 100644 --- a/root/js/relationship.js +++ b/root/js/relationship.js @@ -5,6 +5,12 @@ var start_element_height = 0; var reltypes = {}; var readingdata = {}; +jQuery.removeFromArray = function(value, arr) { + return jQuery.grep(arr, function(elem, index) { + return elem !== value; + }); +}; + function arrayUnique(array) { var a = array.concat(); for(var i=0; i 0 ) { + console.log( 'jo' ); + $.each( edges, function( index, edge ) { + console.log( edge.get_label() ); + if( edge.get_label() == 'majority' && !edge.is_incoming ) { + detached_edges.push( edge.clone_for( outgoing_remaining ) ); + } + } ); + } + if( incoming_remaining.length > 0 ) { + console.log( 'je' ); + $.each( edges, function( index, edge ) { + if( edge.get_label() == 'majority' && edge.is_incoming ) { + detached_edges.push( edge.clone_for( outgoing_remaining ) ); + } + } ); + } + console.log( detached_edges ); + } ); + + //if not all witnesses of reading are detached in and out clone + // clone remaining from 'majority in' + //clone node with node_id + // in all clones replace reading.orig_rdg with node_id + // move cloned node up 20px + + +} + function Marquee() { var self = this; diff --git a/root/src/header.tt b/root/src/header.tt index 9264603..1821de3 100644 --- a/root/src/header.tt +++ b/root/src/header.tt @@ -19,6 +19,7 @@ [% IF applicationjs -%] [% END -%] + [% content %] [% pagetitle %]