Link Node - scroll to current flow in node list

This commit is contained in:
Nick O'Leary
2019-02-06 15:38:35 +00:00
parent 6e944485f0
commit 37b3601c47
3 changed files with 22 additions and 4 deletions

View File

@@ -327,6 +327,14 @@
},
length: function() {
return this.element.children().length;
},
show: function(item) {
var items = this.element.children().filter(function(f) {
return item === $(this).find(".red-ui-editableList-item-content").data('data');
});
if (items.length > 0) {
this.uiContainer.scrollTop(this.uiContainer.scrollTop()+items.position().top)
}
}
});
})(jQuery);

View File

@@ -171,6 +171,13 @@
} else {
return this._data;
}
},
show: function(id) {
for (var i=0;i<this._data.length;i++) {
if (this._data[i].id === id) {
this._topList.editableList('show',this._data[i]);
}
}
}
});