formatted pull request

This commit is contained in:
Eric Rowell 2012-07-18 23:53:28 -07:00
parent 148cde228a
commit c09742c77c
3 changed files with 6 additions and 16 deletions

13
dist/kinetic-core.js vendored
View File

@ -2797,17 +2797,10 @@ Kinetic.Stage = Kinetic.Container.extend({
* get container position
*/
_getContentPosition: function() {
var obj = this.content;
var top = 0;
var left = 0;
while(obj && obj.tagName !== 'BODY') {
top += obj.offsetTop - obj.scrollTop;
left += obj.offsetLeft - obj.scrollLeft;
obj = obj.offsetParent;
}
var rect = this.content.getBoundingClientRect(), root = document.documentElement;
return {
top: top,
left: left
top: rect.top + root.scrollTop,
left: rect.left + root.scrollLeft
};
},
/**

File diff suppressed because one or more lines are too long

View File

@ -765,10 +765,7 @@ Kinetic.Stage = Kinetic.Container.extend({
* get container position
*/
_getContentPosition: function() {
var
rect = this.content.getBoundingClientRect(),
root = document.documentElement
;
var rect = this.content.getBoundingClientRect(), root = document.documentElement;
return {
top: rect.top + root.scrollTop,
left: rect.left + root.scrollLeft