11import options from "./options.js" ;
2- import Split from "split.js"
2+ import Split from "@triliumnext/ split.js" ;
33
44export const DEFAULT_GUTTER_SIZE = 5 ;
55
@@ -46,6 +46,7 @@ function setupLeftPaneResizer(leftPaneVisible: boolean) {
4646 sizes : [ leftPaneWidth , restPaneWidth ] ,
4747 gutterSize : DEFAULT_GUTTER_SIZE ,
4848 minSize : [ 150 , 300 ] ,
49+ rtl : glob . isRtl ,
4950 onDragEnd : ( sizes ) => {
5051 leftPaneWidth = Math . round ( sizes [ 0 ] ) ;
5152 options . save ( "leftPaneWidth" , Math . round ( sizes [ 0 ] ) ) ;
@@ -79,6 +80,7 @@ function setupRightPaneResizer() {
7980 sizes : [ 100 - rightPaneWidth , rightPaneWidth ] ,
8081 gutterSize : DEFAULT_GUTTER_SIZE ,
8182 minSize : [ 300 , 180 ] ,
83+ rtl : glob . isRtl ,
8284 onDragEnd : ( sizes ) => {
8385 rightPaneWidth = Math . round ( sizes [ 1 ] ) ;
8486 options . save ( "rightPaneWidth" , Math . round ( sizes [ 1 ] ) ) ;
@@ -99,7 +101,7 @@ function setupNoteSplitResizer(ntxIds: string[]) {
99101 let targetNtxIds : string [ ] | undefined ;
100102 for ( const ntxId of ntxIds ) {
101103 targetNtxIds = findKeyByNtxId ( ntxId ) ;
102- if ( targetNtxIds ) break ;
104+ if ( targetNtxIds ) break ;
103105 }
104106
105107 if ( targetNtxIds ) {
@@ -154,6 +156,7 @@ function createSplitInstance(targetNtxIds: string[]) {
154156 const splitPanels = [ ...splitNoteContainer . querySelectorAll < HTMLElement > ( ':scope > .note-split' ) ]
155157 . filter ( el => targetNtxIds . includes ( el . getAttribute ( 'data-ntx-id' ) ?? "" ) ) ;
156158 const splitInstance = Split ( splitPanels , {
159+ rtl : glob . isRtl ,
157160 gutterSize : DEFAULT_GUTTER_SIZE ,
158161 minSize : 150 ,
159162 } ) ;
0 commit comments