mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 23:59:02 +02:00
feat(views/board): bypass horizontal scroll if column needs scrolling
This commit is contained in:
parent
f19e5977c2
commit
765691751a
@ -29,6 +29,7 @@ const TPL = /*html*/`
|
|||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
background-color: var(--accented-background-color);
|
background-color: var(--accented-background-color);
|
||||||
transition: border-color 0.2s ease;
|
transition: border-color 0.2s ease;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.board-view-container .board-column.drag-over {
|
.board-view-container .board-column.drag-over {
|
||||||
@ -131,6 +132,15 @@ export default class BoardView extends ViewMode<StateInfo> {
|
|||||||
.attr("data-column", column)
|
.attr("data-column", column)
|
||||||
.append($("<h3>").text(column));
|
.append($("<h3>").text(column));
|
||||||
|
|
||||||
|
// Allow vertical scrolling in the column, bypassing the horizontal scroll of the container.
|
||||||
|
$columnEl.on("wheel", (event) => {
|
||||||
|
const el = $columnEl[0];
|
||||||
|
const needsScroll = el.scrollHeight > el.clientHeight;
|
||||||
|
if (needsScroll) {
|
||||||
|
event.stopPropagation();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Setup drop zone for the column
|
// Setup drop zone for the column
|
||||||
this.setupColumnDropZone($columnEl, column);
|
this.setupColumnDropZone($columnEl, column);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user