Merge pull request #581 from mihhail-lapushkin/master

Resolved compatibility issues with CocoonJS
This commit is contained in:
Eric Rowell 2013-10-18 10:13:22 -07:00
commit 2c7ea40f7e
2 changed files with 2 additions and 2 deletions

View File

@ -238,7 +238,7 @@
Kinetic.Node.prototype.isDraggable = Kinetic.Node.prototype.getDraggable;
var html = document.getElementsByTagName('html')[0];
var html = document.documentElement;
html.addEventListener('mouseup', Kinetic.DD._endDragBefore, true);
html.addEventListener('touchend', Kinetic.DD._endDragBefore, true);

View File

@ -598,7 +598,7 @@
};
},
_getContentPosition: function() {
var rect = this.content.getBoundingClientRect();
var rect = this.content.getBoundingClientRect ? this.content.getBoundingClientRect() : { top: 0, left: 0 };
return {
top: rect.top,
left: rect.left