mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
..
This commit is contained in:
parent
e11195e8f4
commit
56f87cdec5
@ -179,13 +179,12 @@
|
|||||||
/*
|
/*
|
||||||
* return the coordinate of the top-left corner of container
|
* return the coordinate of the top-left corner of container
|
||||||
* in our coordinate system
|
* in our coordinate system
|
||||||
|
* may or may not work if there are nodes between p.parentNode and p.offsetParent
|
||||||
*/
|
*/
|
||||||
position : function () {
|
position : function () {
|
||||||
var rect = this.$p[0].getBoundingClientRect();
|
var p = this.$p[0];
|
||||||
// getBoundingClientRect will be called on $container
|
var c = p.parentNode;
|
||||||
// for a lot of times(= #pages), just hope JIT works
|
return [c.scrollLeft - p.offsetLeft - p.clientLeft, c.scrollTop - p.offsetTop - p.clientTop];
|
||||||
var rect_c = this.$container[0].getBoundingClientRect();
|
|
||||||
return [rect_c.left-rect.left, rect_c.top-rect.top];
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user