Remove ZoteroPane.updateTagsBoxSize()

Disabled several years ago in bb5075e8b8
This commit is contained in:
Dan Stillman 2023-07-07 01:18:05 -04:00
parent 071162f914
commit b98efe0b67
2 changed files with 2 additions and 25 deletions

View file

@ -111,7 +111,6 @@ var ZoteroPane = new function()
let tabsDeck = document.querySelector('#tabs-deck')
if (!tabsDeck || tabsDeck.getAttribute('selectedIndex') == 0) {
this.updateToolbarPosition();
this.updateTagsBoxSize();
}
});
window.setTimeout(this.updateToolbarPosition.bind(this), 0);
@ -6126,7 +6125,6 @@ var ZoteroPane = new function()
}
this.updateToolbarPosition();
this.updateTagsBoxSize();
if (ZoteroPane.itemsView) {
// Need to immediately rerender the items here without any debouncing
// since tree height will have changed
@ -6275,27 +6273,6 @@ var ZoteroPane = new function()
this.handleTagSelectorResize();
}
/**
* Set an explicit height on the tags list to show a scroll bar if necessary
*
* This really should be be possible via CSS alone, but I couldn't get it to work, either
* because I was doing something wrong or because the XUL layout engine was messing with me.
* Revisit when we're all HTML.
*/
this.updateTagsBoxSize = function () {
// TODO: We can probably remove this function
return;
var pane = document.querySelector('#zotero-item-pane');
var header = document.querySelector('#zotero-item-pane .tags-box-header');
var list = document.querySelector('#zotero-item-pane .tags-box-list');
if (pane && header && list) {
let height = pane.getBoundingClientRect().height
- header.getBoundingClientRect().height
- 35; // a little padding
list.style.height = height + 'px';
}
};
/**
* Opens the about dialog
*/

View file

@ -1029,8 +1029,8 @@
</hbox>
<splitter id="zotero-items-splitter" resizebefore="closest" resizeafter="closest" collapse="after" orient="horizontal" zotero-persist="state orient"
onmousemove="ZoteroPane.updateToolbarPosition(); ZoteroPane.updateTagsBoxSize()"
oncommand="ZoteroPane.updateToolbarPosition(); ZoteroPane.updateTagsBoxSize()">
onmousemove="ZoteroPane.updateToolbarPosition()"
oncommand="ZoteroPane.updateToolbarPosition()">
<grippy id="zotero-items-grippy"/>
</splitter>