mirror of
https://github.com/konvajs/konva.git
synced 2025-05-15 20:49:48 +08:00
formatted pull request
This commit is contained in:
parent
148cde228a
commit
c09742c77c
13
dist/kinetic-core.js
vendored
13
dist/kinetic-core.js
vendored
@ -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
|
||||
};
|
||||
},
|
||||
/**
|
||||
|
4
dist/kinetic-core.min.js
vendored
4
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user