Add debugging for tag selector truncation issue

https://forums.zotero.org/discussion/76665/tag-issue-display-of-some-tags-erratic
This commit is contained in:
Dan Stillman 2019-03-30 12:23:20 -04:00
parent ba12592164
commit ecdcb65f57

View file

@ -361,8 +361,11 @@ Zotero.TagSelector = class TagSelectorContainer extends React.PureComponent {
let widths = hasColor ? this.widthsBold : this.widths;
let width = widths.get(name);
if (width === undefined) {
//Zotero.debug(`Calculating ${hasColor ? 'bold ' : ''}width for tag '${name}'`);
width = this.getTextWidth(name, hasColor ? fontBold : font);
// TEMP
if (Zotero.Debug.enabled) {
Zotero.debug(`Calculated ${hasColor ? 'bold ' : ''}width of ${width} for tag '${name}'`);
}
widths.set(name, width);
}
return width;