query design fix

This commit is contained in:
Jan Prochazka
2022-01-05 12:47:55 +01:00
parent c0dc179140
commit ebaa4fe4a6
2 changed files with 6 additions and 2 deletions

View File

@@ -34,6 +34,10 @@ export default class DomTableRef {
if (!col) return null;
const rect = col.getBoundingClientRect();
const wrap = this.domWrapper.getBoundingClientRect();
return (rect.top + rect.bottom) / 2 - wrap.top;
const tableRect = this.getRect();
let res = (rect.top + rect.bottom) / 2 - wrap.top;
if (res < tableRect.top) res = tableRect.top;
if (res > tableRect.bottom) res = tableRect.bottom;
return res;
}
}