Skip to content

Commit

Permalink
implement fix described by issue
Browse files Browse the repository at this point in the history
  • Loading branch information
thenewguy committed Sep 2, 2015
1 parent 89fd08c commit f277303
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/iframeResizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,16 +251,16 @@
return true;
}

function getElementPosition(target){
var iFramePosition = target.getBoundingClientRect();
function getElementPosition(target){
var iFramePosition = target.getBoundingClientRect();

getPagePosition(iframeId);
getPagePosition(iframeId);

return {
x: parseInt(iFramePosition.left, 10) + parseInt(pagePosition.x, 10),
y: parseInt(iFramePosition.top, 10) + parseInt(pagePosition.y, 10)
};
}
return {
x: Math.floor( Number(iFramePosition.left) + Number(pagePosition.x) ),
y: Math.floor( Number(iFramePosition.top) + Number(pagePosition.y) )
};
}

function scrollRequestFromChild(addOffset){
function reposition(){
Expand Down

0 comments on commit f277303

Please sign in to comment.