Resolved compatibility issues with CocoonJS

This commit is contained in:
Mihhail Lapuškin
2013-08-25 12:24:20 +03:00
parent bf39df54b0
commit 09f7873a08
2 changed files with 2 additions and 2 deletions

View File

@@ -228,7 +228,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

@@ -549,7 +549,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