set fixed position for NodeView navs
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
:style="`--nth: ${i}`"
|
:style="`--nth: ${i}`"
|
||||||
>
|
>
|
||||||
<node-view-child-list
|
<node-view-child-list
|
||||||
|
v-if="parent.children && parent.children.length"
|
||||||
:children="parent.children"
|
:children="parent.children"
|
||||||
smartphone
|
smartphone
|
||||||
@open-child="$emit('open-node', { parentId: parent.id, ...$event })"
|
@open-child="$emit('open-node', { parentId: parent.id, ...$event })"
|
||||||
@@ -166,7 +167,7 @@ export default {
|
|||||||
&:not(.active) {
|
&:not(.active) {
|
||||||
::v-deep {
|
::v-deep {
|
||||||
.node-view {
|
.node-view {
|
||||||
overflow-y: hidden;
|
// overflow-y: hidden;
|
||||||
|
|
||||||
&-header {
|
&-header {
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<button-close v-if="mode === 'view'" @click="onClose()" />
|
<button-close v-if="mode === 'view'" @click="onClose()" :style="`--offset: ${offset}px;`" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -42,6 +42,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
offset: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
trim,
|
trim,
|
||||||
toCommaList,
|
toCommaList,
|
||||||
@@ -49,6 +55,12 @@ export default {
|
|||||||
onClose () {
|
onClose () {
|
||||||
this.$parent.$emit('close-node', this.node.id)
|
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>
|
</script>
|
||||||
@@ -93,5 +105,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-close {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
float: right;
|
||||||
|
@include media-breakpoint-up($layout-bp) {
|
||||||
|
right: var(--offset);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -2,19 +2,21 @@
|
|||||||
<div
|
<div
|
||||||
class="node-view-header-ref" :class="'node-view-header-' + mode"
|
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-view-title
|
||||||
:node="node" tag="h4"
|
:node="node" tag="h4"
|
||||||
block edition
|
block edition
|
||||||
class="mr-auto"
|
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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -37,6 +39,12 @@ export default {
|
|||||||
mode: { type: String, required: true }
|
mode: { type: String, required: true }
|
||||||
},
|
},
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
offset: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
trim,
|
trim,
|
||||||
toCommaList,
|
toCommaList,
|
||||||
@@ -44,6 +52,12 @@ export default {
|
|||||||
onClose () {
|
onClose () {
|
||||||
this.$parent.$emit('close-node', this.node.id)
|
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>
|
</script>
|
||||||
@@ -54,6 +68,15 @@ export default {
|
|||||||
font-family: $font-family-text;
|
font-family: $font-family-text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-container {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
float: right;
|
||||||
|
@include media-breakpoint-up($layout-bp) {
|
||||||
|
right: var(--offset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ╭─╴╭─┐┌─╮┌─╮
|
// ╭─╴╭─┐┌─╮┌─╮
|
||||||
// │ ├─┤├┬╯│ │
|
// │ ├─┤├┬╯│ │
|
||||||
|
|||||||
Reference in New Issue
Block a user