|
@@ -35,11 +35,12 @@ export const showNFTGroupIcon = () => {
|
|
|
}
|
|
|
|
|
|
export const showNFTGroupList = (e) => {
|
|
|
- let { top, left } = getOffsetRect(e.target);
|
|
|
- let oTop = top + e.target.offsetHeight + 10;
|
|
|
+ let rectObject = e.target.getBoundingClientRect();
|
|
|
+ let { top, left, height } = rectObject;
|
|
|
+ let oTop = top + height + 10;
|
|
|
// 居底判断
|
|
|
let wHeight = document.body.offsetHeight || document.body.clientHeight;
|
|
|
- if ((top + e.target.offsetHeight + 290) > wHeight) oTop = top - 290;
|
|
|
+ if ((top + height + 290) > wHeight) oTop = top - 290;
|
|
|
let iframe = document.createElement('iframe');
|
|
|
iframe.src = chrome.runtime.getURL(`/iframe/nft-group.html`)
|
|
|
iframe.style.cssText = 'border:medium none; width:315px; height:260px;';
|