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

Final hierarchy window

parent 2f751c4a
Branches
No related merge requests found
......@@ -559,7 +559,7 @@ export default HierarchyEdit;
@change-frame="changePreviewedUnifiedFrameId"
:forceRefresh="internalForceRefresh" />
</div>
<div v-if="right_pane_tab === 'hierarchy'" class="overflow-hidden center" style="height: calc(100% - 43px); width: calc(80%)">
<div v-if="right_pane_tab === 'hierarchy'" class="px-0 pt-0 pb-0 overflow-auto">
<hierarchy-element :node="createHierarchyTree()" :spacing_elem_type="'none'"/>
</div>
<div :class="right_pane_tab !== 'notes' && 'd-none'" id="notes-component"></div>
......
......@@ -38,11 +38,11 @@ export default {
},
getSpacingElem() {
if(this.spacing_elem_type === "std") {
return "&#9500;&#8594;";
return "&#9474; &#9500;&#8594; &#9474;";
} else if(this.spacing_elem_type === "top_corner") {
return "&#9484;&#8594;";
return "&#160; &#160; &#160; &#160; &#9484;&#8594; &#9474; &#9474;";
} else if(this.spacing_elem_type === "down_corner") {
return "&#9492;&#8594;";
return "&#9474; &#9474; &#9492;&#8594;";
} else {
return "";
}
......@@ -94,81 +94,85 @@ export default {
<template>
<div :style="nodeMargin">
<div :style="nodeMargin" style="height: 100%">
<div v-if="hasHypyronyms" v-show="showHypyronyms">
<hierarchy-element
v-for="(child, index) in node.hypyronyms"
:key="child.id"
:node="child"
:spacing_elem_type='index === 0 ? "top_corner" : "std"'
:spacing="spacing + 10"
:spacing="spacing + 40"
/>
</div>
<div show class="d-flex justify-content-between mb-1">
<div class="row">
<div class="col" v-html="getSpacingElem"/>
<div class="col" style="max-width: 10px" v-html="getSpacingElem"/>
<div class="col">
<div align="left" style="display: table;">
<div class="unifiedFrame mt-3" id="hierarchy-unified-frame-title" v-html="node.unified_frame.title"></div>
<table id="hierarchy-unified-frame" class="m-0 table-borderless border border-secondary text-dark frame active">
<tbody>
<tr>
<template v-for="argument in node.unified_frame.arguments">
<td
class="argument py-2 px-1 border-top border-left border-secondary role-column"
:class="argument.role ? argument.role.str + ' ' : ''"
>
{{ argument.role_type }}
<div
v-if="argument.role"
<div class="row">
<div class="col cursor-pointer" style="text-align: center; font-size: large"><span
v-if="hasHypyronyms"
:class="toggleChildrenIcon"
@click="toggleHypyronyms"
@keypress="toggleHypyronyms">&#9650;</span></div>
</div>
<div class="row">
<div class="col" align="left" style="display: table;">
<div class="unifiedFrame" id="hierarchy-unified-frame-title" v-html="node.unified_frame.title"></div>
<table id="hierarchy-unified-frame" class="m-0 table-borderless border border-secondary text-dark frame active">
<tbody>
<tr>
<template v-for="argument in node.unified_frame.arguments">
<td
class="argument py-2 px-1 border-top border-left border-secondary role-column"
:class="argument.role ? argument.role.str + ' ' : ''"
>
[{{ argument.role.str }}]
</div>
<div v-else>
<ul class="ul-role">
<li v-for="proposed_role in argument.proposed_roles">
{{ proposed_role.str }}
</li>
</ul>
</div>
</td>
</template>
</tr>
<tr>
<td hidden class="preferences py-0 px-0 border-top border-left border-secondary role-column align-top"
v-for='argument in node.unified_frame.arguments'
:key='argument.id'
>
<ul class="ul-preference" v-if="argument.preferences.length > 0">
<li v-for='preference in argument.preferences'>
{{ argument.role_type }}
<div
v-if="preference.url != null"
class="preference py-2 px-1 preference-bold"
v-if="argument.role"
>
<a class="synset-plwn" v-bind:href="preference.url" target="_blank">{{ preference.str }}</a>
[{{ argument.role.str }}]
</div>
<div v-else>
<ul class="ul-role">
<li v-for="proposed_role in argument.proposed_roles">
{{ proposed_role.str }}
</li>
</ul>
</div>
<div v-else class="preference py-2 px-1 preference-bold">{{ preference.str }}</div>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</td>
</template>
</tr>
<tr>
<td hidden class="preferences py-0 px-0 border-top border-left border-secondary role-column align-top"
v-for='argument in node.unified_frame.arguments'
:key='argument.id'
>
<ul class="ul-preference" v-if="argument.preferences.length > 0">
<li v-for='preference in argument.preferences'>
<div
v-if="preference.url != null"
class="preference py-2 px-1 preference-bold"
>
<a class="synset-plwn" v-bind:href="preference.url" target="_blank">{{ preference.str }}</a>
</div>
<div v-else class="preference py-2 px-1 preference-bold">{{ preference.str }}</div>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row align-content-center">
<div class="col cursor-pointer" style="text-align: center; font-size: large"><span
v-if="hasHyponyms"
:class="toggleChildrenIcon"
@click="toggleHyponyms"
@keypress="toggleHyponyms">&#9660;</span></div>
</div>
{{ node.label }}
</div>
<div class="col"><span
v-if="hasHyponyms"
:class="toggleChildrenIcon"
@click="toggleHyponyms"
@keypress="toggleHyponyms">V</span></div>
<div class="col"><span
v-if="hasHypyronyms"
:class="toggleChildrenIcon"
@click="toggleHypyronyms"
@keypress="toggleHypyronyms">A</span></div>
</div>
</div>
<div v-if="hasHyponyms" v-show="showHyponyms">
......@@ -177,7 +181,7 @@ export default {
:key="child.id"
:node="child"
:spacing_elem_type='index === node.hyponyms.length - 1 ? "down_corner" : "std"'
:spacing="spacing + 10"
:spacing="spacing + 40"
/>
</div>
</div>
......
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