Skip to content

Commit 0bd4c17

Browse files
committed
fix(split-pane): rendering order comes from the store.show-output
1 parent 180dcef commit 0bd4c17

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

Diff for: src/SplitPane.vue

+10-11
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const containerRef = useTemplateRef('container')
99
const previewRef = inject(injectKeyPreviewRef)!
1010
1111
// mobile only
12-
const { store, splitPaneOptions } = inject(injectKeyProps)!
12+
const { store, layoutReverse, splitPaneOptions } = inject(injectKeyProps)!
1313
1414
const state = reactive({
1515
dragging: false,
@@ -66,6 +66,7 @@ function changeViewSize() {
6666
:class="{
6767
dragging: state.dragging,
6868
'show-output': store.showOutput,
69+
reverse: layoutReverse,
6970
vertical: isVertical,
7071
}"
7172
@mousemove="dragMove"
@@ -201,21 +202,19 @@ function changeViewSize() {
201202
.split-pane .toggler {
202203
display: block;
203204
}
204-
.split-pane .right {
205+
.split-pane .right,
206+
.split-pane.show-output.reverse .right,
207+
.split-pane.show-output .left,
208+
.split-pane.reverse .left {
205209
z-index: -1;
206210
pointer-events: none;
207211
}
208-
.split-pane .left {
212+
.split-pane .left,
213+
.split-pane.show-output.reverse .left,
214+
.split-pane.show-output .right,
215+
.split-pane.reverse .right {
209216
z-index: 0;
210217
pointer-events: all;
211218
}
212-
.split-pane.show-output .right {
213-
z-index: 0;
214-
pointer-events: all;
215-
}
216-
.split-pane.show-output .left {
217-
z-index: -1;
218-
pointer-events: none;
219-
}
220219
}
221220
</style>

0 commit comments

Comments
 (0)