Commit a2a93359bb9752321a610bba5c2d5c718ca69312

Authored by Tomasz Bartosiak
2 parents ea36a40a 81aed5ff

Merge branch 'tomek' into dev

semantics/static/js/semantics_connections.js
... ... @@ -7,9 +7,24 @@ function memorizeConnections(arguments_connected, frames_connection){
7 7 }
8 8  
9 9 function getConnected(frame_id) { /* TODO */
10   - return []
  10 + return [];
11 11 }
12 12  
13 13 function removeFrameConnections(frame_id) { /* TODO */
14   - return
  14 + return;
  15 +}
  16 +
  17 +function removeArgumentConnections(frame_id, complement_id) {
  18 + for (var argument in connected) {
  19 + if (argument == 'frame_' + frame_id + '_comp_' + complement_id + '_' ||
  20 + argument == 'frame_' + frame_id + '_comp_' + complement_id + '_lemma_') {
  21 + var i;
  22 + for (i = 0; i < connected[argument].length; i++) {
  23 + var idx = connected_reverse[connected[argument][i]].indexOf('frame_' + frame_id + '_');
  24 + connected_reverse[connected[argument][i]].splice(idx, 1);
  25 + }
  26 + connected[argument] = [];
  27 + }
  28 + }
  29 + return;
15 30 }
... ...
semantics/static/js/semantics_frames.js
... ... @@ -318,6 +318,8 @@ function removeArgument(frame_id, complement_id, argument) {
318 318 } else { // argument leksykalny
319 319 frame_content[frame_id].lemma.include = false;
320 320 }
  321 +
  322 + removeArgumentConnections(frame_id, complement_id);
321 323  
322 324 frames_operations.push({operation: 'remove_argument', frame_id: frame_id, complement_id: complement_id});
323 325 }
... ...