From 8409c653e725ad975b589419ddb9177f3be1e9fb Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 15 Dec 2021 08:41:37 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/school-web
---
src/divForms/divForms.js | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/divForms/divForms.js b/src/divForms/divForms.js
index 2df0e84..72327a5 100644
--- a/src/divForms/divForms.js
+++ b/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);
+ `
+ }
}
}
--
Gitblit v1.9.3