my $note = $c->request->param('note');
my $scope = $c->request->param('scope');
- my $opts = { 'type' => $relation,
- 'scope' => $scope };
+ my $opts = { 'type' => $relation, 'propagate' => 1 };
+ $opts->{'scope'} = $scope if $scope;
$opts->{'annotation'} = $note if $note;
try {
$.each( data, function(item, source_target) {
var source_found = get_ellipse( source_target[0] );
var target_found = get_ellipse( source_target[1] );
- if( source_found.size() && target_found.size() ) {
+ var relation_found = $.inArray( source_target[2], rel_types );
+ if( source_found.size() && target_found.size() && relation_found > -1 ) {
var relation = relation_manager.create( source_target[0], source_target[1], $('#rel_type')[0].selectedIndex-1 );
relation.data( 'type', $('#rel_type :selected').text() );
relation.data( 'scope', $('#scope :selected').text() );