changed bufferImage property to imageBuffer

This commit is contained in:
Eric Rowell
2012-08-21 19:42:29 -07:00
parent 4b142db887
commit 7b4ec5e6c8
5 changed files with 13 additions and 13 deletions

10
dist/kinetic-core.js vendored
View File

@@ -4128,8 +4128,8 @@ Kinetic.Shape = Kinetic.Node.extend({
if('image' in this.attrs) {
attrs.image = this.attrs.image;
if(this.bufferImage) {
this.attrs.image = this.bufferImage;
if(this.imageBuffer) {
this.attrs.image = this.imageBuffer;
}
else {
this.attrs.image = null;
@@ -4534,14 +4534,14 @@ Kinetic.Image = Kinetic.Shape.extend({
}
},
/**
* create buffer image which enables more accurate hit detection mapping of the image
* create image buffer which enables more accurate hit detection mapping of the image
* by avoiding event detections for transparent pixels
* @name createBufferImage
* @name createImageBuffer
* @methodOf Kinetic.Image.prototype
* @param {Function} [callback] callback function to be called once
* the buffer image has been created and set
*/
createBufferImage: function(callback) {
createImageBuffer: function(callback) {
var canvas = new Kinetic.Canvas(this.attrs.width, this.attrs.height);
var context = canvas.getContext();
context.drawImage(this.attrs.image, 0, 0);

File diff suppressed because one or more lines are too long

View File

@@ -387,8 +387,8 @@ Kinetic.Shape = Kinetic.Node.extend({
if('image' in this.attrs) {
attrs.image = this.attrs.image;
if(this.bufferImage) {
this.attrs.image = this.bufferImage;
if(this.imageBuffer) {
this.attrs.image = this.imageBuffer;
}
else {
this.attrs.image = null;

View File

@@ -100,14 +100,14 @@ Kinetic.Image = Kinetic.Shape.extend({
}
},
/**
* create buffer image which enables more accurate hit detection mapping of the image
* create image buffer which enables more accurate hit detection mapping of the image
* by avoiding event detections for transparent pixels
* @name createBufferImage
* @name createImageBuffer
* @methodOf Kinetic.Image.prototype
* @param {Function} [callback] callback function to be called once
* the buffer image has been created and set
*/
createBufferImage: function(callback) {
createImageBuffer: function(callback) {
var canvas = new Kinetic.Canvas(this.attrs.width, this.attrs.height);
var context = canvas.getContext();
context.drawImage(this.attrs.image, 0, 0);

View File

@@ -1884,7 +1884,7 @@ Test.prototype.tests = {
layer.add(cachedShape);
cachedShape.createBufferImage(function() {
cachedShape.createImageBuffer(function() {
layer.draw();
@@ -2369,7 +2369,7 @@ Test.prototype.tests = {
});
layer.add(lion);
lion.createBufferImage(function() {
lion.createImageBuffer(function() {
stage.add(layer);
});
//document.body.appendChild(layer.bufferCanvas.element);