Skip to content

Commit

Permalink
Merge pull request #307 from wangcch/fix-split-panels-text
Browse files Browse the repository at this point in the history
fix: handle `showOutput`  work with `layoutReverse: false` mobile-only edge case
  • Loading branch information
edison1105 authored Feb 16, 2025
2 parents 180dcef + 0bd4c17 commit b9a1593
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 b9a1593

Please sign in to comment.