|
|
@ -745,13 +745,14 @@ |
|
|
|
* 获取position:fixed相对定位的元素的clientRect |
|
|
|
* 获取position:fixed相对定位的元素的clientRect |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
getPositionRelativeContainingBlockRect: function (element) { |
|
|
|
getPositionRelativeContainingBlockRect: function (element) { |
|
|
|
var positionRelativeElement = BI.DOM.getPositionRelativeContainingBlock(element); |
|
|
|
const positionRelativeElement = BI.DOM.getPositionRelativeContainingBlock(element); |
|
|
|
var rect = positionRelativeElement.getBoundingClientRect(); |
|
|
|
const { top, right, bottom, left, width, height, x, y } = positionRelativeElement.getBoundingClientRect(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
...rect.toJSON(), |
|
|
|
top, right, bottom, left, width, height, x, y, |
|
|
|
scaleX: rect.width / positionRelativeElement.offsetWidth, |
|
|
|
scaleX: width / positionRelativeElement.offsetWidth, |
|
|
|
scaleY: rect.height / positionRelativeElement.offsetHeight |
|
|
|
scaleY: height / positionRelativeElement.offsetHeight, |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|