Skip to content

Commit

Permalink
Added event param to getHorizontalBounds
Browse files Browse the repository at this point in the history
Firefox errors on getHorizontalBounds() because event is out of scope,
so I added event to the parameters.
  • Loading branch information
toemat committed Jun 12, 2014
1 parent 2098ab5 commit 457bbc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/grande.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
var childrenNodes = editNode.children,
editBounds = editNode.getBoundingClientRect();

imageBound = getHorizontalBounds(childrenNodes, editBounds);
imageBound = getHorizontalBounds(childrenNodes, editBounds, event);
}

function uploadImage(event) {
Expand All @@ -164,7 +164,7 @@
function toggleImageTooltip(event, element) {
var childrenNodes = editNode.children,
editBounds = editNode.getBoundingClientRect(),
bound = getHorizontalBounds(childrenNodes, editBounds);
bound = getHorizontalBounds(childrenNodes, editBounds, event);

if (bound) {
imageTooltip.style.left = (editBounds.left - 90 ) + "px";
Expand All @@ -175,7 +175,7 @@
}
}

function getHorizontalBounds(nodes, target) {
function getHorizontalBounds(nodes, target, event) {
var bounds = [],
bound,
i,
Expand Down

0 comments on commit 457bbc8

Please sign in to comment.