|
@@ -2,19 +2,21 @@
|
|
|
<div
|
|
|
class="node-view-header-ref" :class="'node-view-header-' + mode"
|
|
|
>
|
|
|
- <div class="d-flex w-100">
|
|
|
+ <div class="w-100">
|
|
|
+ <div class="nav-container" :style="`--offset: ${offset}px;`">
|
|
|
+ <node-view-child-list
|
|
|
+ v-if="mode === 'view' && node.children && node.children.length"
|
|
|
+ :children="node.children"
|
|
|
+ @open-child="$parent.$emit('open-child', $event)"
|
|
|
+ />
|
|
|
+ <button-close v-if="mode === 'view'" @click="onClose()" />
|
|
|
+ </div>
|
|
|
+
|
|
|
<node-view-title
|
|
|
:node="node" tag="h4"
|
|
|
block edition
|
|
|
class="mr-auto"
|
|
|
/>
|
|
|
-
|
|
|
- <node-view-child-list
|
|
|
- v-if="mode === 'view'"
|
|
|
- :children="node.children"
|
|
|
- @open-child="$parent.$emit('open-child', $event)"
|
|
|
- />
|
|
|
- <button-close v-if="mode === 'view'" @click="onClose()" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -37,6 +39,12 @@ export default {
|
|
|
mode: { type: String, required: true }
|
|
|
},
|
|
|
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ offset: 0
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
methods: {
|
|
|
trim,
|
|
|
toCommaList,
|
|
@@ -44,6 +52,12 @@ export default {
|
|
|
onClose () {
|
|
|
this.$parent.$emit('close-node', this.node.id)
|
|
|
}
|
|
|
+ },
|
|
|
+
|
|
|
+ mounted () {
|
|
|
+ const parentContH = this.$el.parentElement.offsetWidth
|
|
|
+ const parentH = this.$el.parentElement.parentElement.offsetWidth
|
|
|
+ this.offset = (parentH - parentContH) * -1
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -54,6 +68,15 @@ export default {
|
|
|
font-family: $font-family-text;
|
|
|
}
|
|
|
|
|
|
+ .nav-container {
|
|
|
+ position: relative;
|
|
|
+ display: flex;
|
|
|
+ float: right;
|
|
|
+ @include media-breakpoint-up($layout-bp) {
|
|
|
+ right: var(--offset);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// ╭─╴╭─┐┌─╮┌─╮
|
|
|
// │ ├─┤├┬╯│ │
|