mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 18:05:55 +01:00
fix(client/rtl): split reversed
This commit is contained in:
@@ -46,6 +46,7 @@ function setupLeftPaneResizer(leftPaneVisible: boolean) {
|
|||||||
sizes: [leftPaneWidth, restPaneWidth],
|
sizes: [leftPaneWidth, restPaneWidth],
|
||||||
gutterSize: DEFAULT_GUTTER_SIZE,
|
gutterSize: DEFAULT_GUTTER_SIZE,
|
||||||
minSize: [150, 300],
|
minSize: [150, 300],
|
||||||
|
rtl: glob.isRtl,
|
||||||
onDragEnd: (sizes) => {
|
onDragEnd: (sizes) => {
|
||||||
leftPaneWidth = Math.round(sizes[0]);
|
leftPaneWidth = Math.round(sizes[0]);
|
||||||
options.save("leftPaneWidth", Math.round(sizes[0]));
|
options.save("leftPaneWidth", Math.round(sizes[0]));
|
||||||
@@ -79,6 +80,7 @@ function setupRightPaneResizer() {
|
|||||||
sizes: [100 - rightPaneWidth, rightPaneWidth],
|
sizes: [100 - rightPaneWidth, rightPaneWidth],
|
||||||
gutterSize: DEFAULT_GUTTER_SIZE,
|
gutterSize: DEFAULT_GUTTER_SIZE,
|
||||||
minSize: [300, 180],
|
minSize: [300, 180],
|
||||||
|
rtl: glob.isRtl,
|
||||||
onDragEnd: (sizes) => {
|
onDragEnd: (sizes) => {
|
||||||
rightPaneWidth = Math.round(sizes[1]);
|
rightPaneWidth = Math.round(sizes[1]);
|
||||||
options.save("rightPaneWidth", Math.round(sizes[1]));
|
options.save("rightPaneWidth", Math.round(sizes[1]));
|
||||||
@@ -154,6 +156,7 @@ function createSplitInstance(targetNtxIds: string[]) {
|
|||||||
const splitPanels = [...splitNoteContainer.querySelectorAll<HTMLElement>(':scope > .note-split')]
|
const splitPanels = [...splitNoteContainer.querySelectorAll<HTMLElement>(':scope > .note-split')]
|
||||||
.filter(el => targetNtxIds.includes(el.getAttribute('data-ntx-id') ?? ""));
|
.filter(el => targetNtxIds.includes(el.getAttribute('data-ntx-id') ?? ""));
|
||||||
const splitInstance = Split(splitPanels, {
|
const splitInstance = Split(splitPanels, {
|
||||||
|
rtl: glob.isRtl,
|
||||||
gutterSize: DEFAULT_GUTTER_SIZE,
|
gutterSize: DEFAULT_GUTTER_SIZE,
|
||||||
minSize: 150,
|
minSize: 150,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,9 +4,6 @@ import froca from "./froca.js";
|
|||||||
import hoistedNoteService from "./hoisted_note.js";
|
import hoistedNoteService from "./hoisted_note.js";
|
||||||
import appContext from "../components/app_context.js";
|
import appContext from "../components/app_context.js";
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {string|null}
|
|
||||||
*/
|
|
||||||
async function resolveNotePath(notePath: string, hoistedNoteId = "root") {
|
async function resolveNotePath(notePath: string, hoistedNoteId = "root") {
|
||||||
const runPath = await resolveNotePathToSegments(notePath, hoistedNoteId);
|
const runPath = await resolveNotePathToSegments(notePath, hoistedNoteId);
|
||||||
|
|
||||||
|
|||||||
@@ -229,6 +229,7 @@ export default abstract class AbstractSplitTypeWidget extends TypeWidget {
|
|||||||
|
|
||||||
if (!this.isReadOnly) {
|
if (!this.isReadOnly) {
|
||||||
this.splitInstance = Split(elements, {
|
this.splitInstance = Split(elements, {
|
||||||
|
rtl: glob.isRtl,
|
||||||
sizes: [ 50, 50 ],
|
sizes: [ 50, 50 ],
|
||||||
direction: this.layoutOrientation,
|
direction: this.layoutOrientation,
|
||||||
gutterSize: DEFAULT_GUTTER_SIZE,
|
gutterSize: DEFAULT_GUTTER_SIZE,
|
||||||
|
|||||||
Reference in New Issue
Block a user