Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(split-pane): rendering order comes from the store.show-output #307

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>