Skip to content
Snippets Groups Projects
Commit 8caf4974 authored by dcz's avatar dcz
Browse files

Remove selected preferencies from propose list.

parent 8fa42aa4
Branches
Tags
No related merge requests found
......@@ -51,14 +51,16 @@ function slowal_frames2selecional_preferencies(unified_frame, slowal_frames) {
var slowal_frame_argument_mapping = slowal_frame_mapping.slowal_frame_argument_mapping[j];
let slowal_frame_argument = slowal_frame.arguments.find(o => o.argument_id === slowal_frame_argument_mapping.slowal_frame_agrument_id);
let unified_frame_argument = unified_frame.arguments.find(o => o.argument_id === slowal_frame_argument_mapping.unified_frame_agrument_id);
let unified_frame_argument = unified_frame.arguments.find(o => o.id === slowal_frame_argument_mapping.unified_frame_agrument_id);
const unified_frame_argument_preferences = new Set(unified_frame_argument.preferences.map(preference => preference.str));
let preferenceEntry = unified_argument_2_selecional_preferencies[slowal_frame_argument_mapping.unified_frame_agrument_id];
if(preferenceEntry == null) {
preferenceEntry = [];
unified_argument_2_selecional_preferencies[slowal_frame_argument_mapping.unified_frame_agrument_id] = preferenceEntry
}
preferenceEntry.push.apply(preferenceEntry, slowal_frame_argument.preferences)
preferenceEntry.push.apply(preferenceEntry, slowal_frame_argument.preferences.filter(preference => !unified_frame_argument_preferences.has(preference.str)))
}
}
return unified_argument_2_selecional_preferencies;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment