adding current dist files

This commit is contained in:
Eric Rowell 2012-03-23 23:52:17 -07:00
parent c8a6371ab5
commit 0610337db5
2 changed files with 22 additions and 16 deletions

16
dist/kinetic-core.js vendored
View File

@ -1116,10 +1116,14 @@ Kinetic.Stage.prototype = {
}
},
/**
* creates a composite data URL and passes it to a callback
* Creates a composite data URL and passes it to a callback. If MIME type is not
* specified, then "image/png" will result. For "image/jpeg", specify a quality
* level as arg2 (range 0.0 - 1.0)
* @param {function} callback
* @param {String} mimeType (optional)
* @param {Number} arg2 (optional)
*/
toDataURL: function(callback) {
toDataURL: function(callback, mimeType, arg2) {
var bufferLayer = this.bufferLayer;
var bufferContext = bufferLayer.getContext();
var layers = this.children;
@ -1134,7 +1138,7 @@ Kinetic.Stage.prototype = {
addLayer(n);
}
else {
callback(bufferLayer.getCanvas().toDataURL());
callback(bufferLayer.getCanvas().toDataURL(mimeType, arg2));
}
};
imageObj.src = dataURL;
@ -1369,6 +1373,7 @@ Kinetic.Stage.prototype = {
// propapgate backwards through children
for(var i = children.length - 1; i >= 0; i--) {
var child = children[i];
if (child.isListening) {
if(child.className === 'Shape') {
var exit = this._detectEvent(child, evt);
if(exit) {
@ -1382,6 +1387,7 @@ Kinetic.Stage.prototype = {
}
}
}
}
return false;
},
@ -1485,8 +1491,8 @@ Kinetic.Stage.prototype = {
* @param {Event} evt
*/
_setMousePosition: function(evt) {
var mouseX = evt.clientX - this._getContainerPosition().left + window.pageXOffset;
var mouseY = evt.clientY - this._getContainerPosition().top + window.pageYOffset;
var mouseX = evt.offsetX || (evt.clientX - this._getContainerPosition().left + window.pageXOffset);
var mouseY = evt.offsetY || (evt.clientY - this._getContainerPosition().top + window.pageYOffset);
this.mousePos = {
x: mouseX,
y: mouseY

File diff suppressed because one or more lines are too long