mirror of
https://github.com/transmission/transmission.git
synced 2025-12-23 20:08:43 +00:00
(trunk web) #2052: when adding new torrents to the list (such as on startup), batch together all the additions to prevent unnecessary dom reflows
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
* Class Torrent
|
||||
*/
|
||||
|
||||
function Torrent(controller,data) {
|
||||
this.initialize(controller,data);
|
||||
function Torrent(domParent,controller,data) {
|
||||
this.initialize(domParent,controller,data);
|
||||
}
|
||||
|
||||
// Constants
|
||||
@@ -23,7 +23,7 @@ Torrent.prototype =
|
||||
/*
|
||||
* Constructor
|
||||
*/
|
||||
initialize: function(controller, data) {
|
||||
initialize: function(domParent,controller, data) {
|
||||
this._id = data.id;
|
||||
this._is_private = data.isPrivate;
|
||||
this._hashString = data.hashString;
|
||||
@@ -102,7 +102,7 @@ Torrent.prototype =
|
||||
this._element.css('margin-top', '7px');
|
||||
|
||||
// insert the element
|
||||
this._controller._torrent_list.appendChild( top_e );
|
||||
domParent.appendChild(top_e);
|
||||
|
||||
this.initializeTorrentFilesInspectorGroup();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user