fx-compat: Remove use of tree.treeBoxObject and change getCellAt() signature

Properties and methods are now available on the tree itself, and
getCellAt() now returns an object instead of using in-out variables.
This commit is contained in:
Dan Stillman 2020-07-05 17:31:03 -04:00
parent ee78dd308b
commit b6f5d7183f
2 changed files with 3 additions and 7 deletions

View file

@ -406,13 +406,10 @@ var Zotero_RTFScan = new function() {
var tree = document.getElementById("tree");
// get clicked cell
var row = { }, col = { }, child = { };
tree.treeBoxObject.getCellAt(event.clientX, event.clientY, row, col, child);
var { row, col } = tree.getCellAt(event.clientX, event.clientY);
// figure out which item this corresponds to
row = row.value;
var level = tree.view.getLevel(row);
}
/**

View file

@ -2052,10 +2052,9 @@ Zotero.DragDrop = {
if (target.tagName == 'treechildren') {
var tree = target.parentNode;
if (tree.id == 'zotero-collections-tree') {
let row = {}, col = {}, obj = {};
tree.treeBoxObject.getCellAt(event.clientX, event.clientY, row, col, obj);
let { row } = tree.getCellAt(event.clientX, event.clientY);
let win = tree.ownerDocument.defaultView;
return win.ZoteroPane.collectionsView.getRow(row.value);
return win.ZoteroPane.collectionsView.getRow(row);
}
}
return false;