liuyg
2021-12-15 8409c653e725ad975b589419ddb9177f3be1e9fb
src/divForms/divForms.js
@@ -132,15 +132,17 @@
    }
    positionPopUp (windowCoord, id) {
        const x = windowCoord.x
        const y = windowCoord.y - document.getElementById(id).offsetHeight
        // x = windowCoord.x - document.getElementById(id).offsetWidth
        if (windowCoord != undefined && windowCoord.x && windowCoord.x != undefined && !Number.isNaN(windowCoord.x)) {
            const x = windowCoord.x
            const y = windowCoord.y - document.getElementById(id).offsetHeight
            // x = windowCoord.x - document.getElementById(id).offsetWidth
        document.getElementById(id).style.cssText = `
        visibility:visible;
        z-index:1;
        transform:translate3d(${Math.round(x)}px,${Math.round(y)}px, 0);
        `
            document.getElementById(id).style.cssText = `
            visibility:visible;
            z-index:1;
            transform:translate3d(${Math.round(x)}px,${Math.round(y)}px, 0);
            `
        }
    }
}