Fix losing scroll position on remote changes
This commit is contained in:
parent
4e6e6ffb01
commit
f316c6b85a
@ -573,14 +573,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.setBoards = function (boards) {
|
this.setBoards = function (boards) {
|
||||||
|
var scroll = {};
|
||||||
//self.element
|
//self.element
|
||||||
for (var i in this.options.boards.list) {
|
for (var i in this.options.boards.list) {
|
||||||
var boardkey = this.options.boards.list[i];
|
var boardkey = this.options.boards.list[i];
|
||||||
|
scroll[boardkey] = $('.kanban-board[data-id="'+boardkey+'"] .kanban-drag').scrollTop();
|
||||||
this.removeBoard(boardkey);
|
this.removeBoard(boardkey);
|
||||||
}
|
}
|
||||||
this.options.boards = boards;
|
this.options.boards = boards;
|
||||||
this.addBoards();
|
this.addBoards();
|
||||||
self.options.refresh();
|
self.options.refresh();
|
||||||
|
this.options.boards.list.forEach(function (id) {
|
||||||
|
if (!scroll[id]) { return; }
|
||||||
|
$('.kanban-board[data-id="'+id+'"] .kanban-drag').scrollTop(scroll[id]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.findBoard = function (id) {
|
this.findBoard = function (id) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user