@@ -4824,14 +4824,16 @@ function isParentElementOrSelf(child, parent) {
4824
4824
}
4825
4825
exports . isParentElementOrSelf = isParentElementOrSelf ;
4826
4826
exports . updateFlyingObj = function ( e , pGanttChartObj , pTimer ) {
4827
+ var documentElement = document . documentElement ;
4828
+ var bodyElement = document . getElementsByTagName ( 'body' ) [ 0 ] ;
4827
4829
var vCurTopBuf = 3 ;
4828
4830
var vCurLeftBuf = 5 ;
4829
4831
var vCurBotBuf = 3 ;
4830
4832
var vCurRightBuf = 15 ;
4831
4833
var vMouseX = ( e ) ? e . clientX : window . event . clientX ;
4832
4834
var vMouseY = ( e ) ? e . clientY : window . event . clientY ;
4833
- var vViewportX = document . documentElement . clientWidth || document . getElementsByTagName ( 'body' ) [ 0 ] . clientWidth ;
4834
- var vViewportY = document . documentElement . clientHeight || document . getElementsByTagName ( 'body' ) [ 0 ] . clientHeight ;
4835
+ var vViewportX = ( documentElement === null || documentElement === void 0 ? void 0 : documentElement . clientWidth ) || ( bodyElement === null || bodyElement === void 0 ? void 0 : bodyElement . clientWidth ) ;
4836
+ var vViewportY = ( documentElement === null || documentElement === void 0 ? void 0 : documentElement . clientHeight ) || ( bodyElement === null || bodyElement === void 0 ? void 0 : bodyElement . clientHeight ) ;
4835
4837
var vNewX = vMouseX ;
4836
4838
var vNewY = vMouseY ;
4837
4839
var screenX = screen . availWidth || window . innerWidth ;
@@ -4840,8 +4842,8 @@ exports.updateFlyingObj = function (e, pGanttChartObj, pTimer) {
4840
4842
var vOldY = parseInt ( pGanttChartObj . vTool . style . top ) ;
4841
4843
if ( navigator . appName . toLowerCase ( ) == 'microsoft internet explorer' ) {
4842
4844
// the clientX and clientY properties include the left and top borders of the client area
4843
- vMouseX -= document . documentElement . clientLeft ;
4844
- vMouseY -= document . documentElement . clientTop ;
4845
+ vMouseX -= documentElement === null || documentElement === void 0 ? void 0 : documentElement . clientLeft ;
4846
+ vMouseY -= documentElement === null || documentElement === void 0 ? void 0 : documentElement . clientTop ;
4845
4847
var vZoomFactor = exports . getZoomFactor ( ) ;
4846
4848
if ( vZoomFactor != 1 ) { // IE 7 at non-default zoom level
4847
4849
vMouseX = Math . round ( vMouseX / vZoomFactor ) ;
0 commit comments