From: Anna Sobiepanek Date: Thu, 17 Mar 2011 21:32:08 +0000 (-0400) Subject: fixed as per review [#392 state:super-review-requested] X-Git-Tag: v0.4~1^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=c0994680a85e84d34ca7ce902b22a5cdcdf53c0e;p=popcorn-js.git fixed as per review [#392 state:super-review-requested] --- diff --git a/plugins/lowerthird/popcorn.lowerthird.js b/plugins/lowerthird/popcorn.lowerthird.js index c2072db..ee0e472 100644 --- a/plugins/lowerthird/popcorn.lowerthird.js +++ b/plugins/lowerthird/popcorn.lowerthird.js @@ -38,7 +38,7 @@ var x = elem.offsetLeft; var y = elem.offsetTop; - while ( elem === elem.offsetParent ) { + while ( !!( elem = elem.offsetParent ) ) { x += elem.offsetLeft; y += elem.offsetTop; } diff --git a/plugins/subtitle/popcorn.subtitle.js b/plugins/subtitle/popcorn.subtitle.js index c6db4f2..454f8e3 100644 --- a/plugins/subtitle/popcorn.subtitle.js +++ b/plugins/subtitle/popcorn.subtitle.js @@ -66,7 +66,7 @@ do { left += obj.offsetLeft; top += obj.offsetTop; - } while (obj === obj.offsetParent); + } while ( !!(obj = obj.offsetParent) ); } return { left : left,