Skip to content

Commit

Permalink
fix(split-pane): rendering order comes from the store.show-output
Browse files Browse the repository at this point in the history
  • Loading branch information
wangcch committed Jan 23, 2025
1 parent 47da477 commit f07a3c7
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/SplitPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const containerRef = useTemplateRef('container')
const previewRef = inject(injectKeyPreviewRef)!
// mobile only
const { store, splitPaneOptions } = inject(injectKeyProps)!
const { store, layoutReverse, splitPaneOptions } = inject(injectKeyProps)!
const state = reactive({
dragging: false,
Expand Down Expand Up @@ -66,6 +66,7 @@ function changeViewSize() {
:class="{
dragging: state.dragging,
'show-output': store.showOutput,
reverse: layoutReverse,
vertical: isVertical,
}"
@mousemove="dragMove"
Expand Down Expand Up @@ -201,21 +202,19 @@ function changeViewSize() {
.split-pane .toggler {
display: block;
}
.split-pane .right {
.split-pane .right,
.split-pane.show-output.reverse .right,
.split-pane.show-output .left,
.split-pane.reverse .left {
z-index: -1;
pointer-events: none;
}
.split-pane .left {
.split-pane .left,
.split-pane.show-output.reverse .left,
.split-pane.show-output .right,
.split-pane.reverse .right {
z-index: 0;
pointer-events: all;
}
.split-pane.show-output .right {
z-index: 0;
pointer-events: all;
}
.split-pane.show-output .left {
z-index: -1;
pointer-events: none;
}
}
</style>

0 comments on commit f07a3c7

Please sign in to comment.