mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Link Node - scroll to current flow in node list
This commit is contained in:
@@ -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);
|
||||
|
@@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user