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