changed createImageBuffer to createImageHitRegion for consistency

This commit is contained in:
Eric Rowell
2012-11-28 23:18:17 -08:00
parent 6ae7a932f8
commit 94670aeeda
3 changed files with 4 additions and 4 deletions

View File

@@ -132,12 +132,12 @@ Kinetic.Image.prototype = {
/** /**
* create image buffer 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 * by avoiding event detections for transparent pixels
* @name createImageBuffer * @name createImageHitRegion
* @methodOf Kinetic.Image.prototype * @methodOf Kinetic.Image.prototype
* @param {Function} [callback] callback function to be called once * @param {Function} [callback] callback function to be called once
* the buffer image has been created and set * the buffer image has been created and set
*/ */
createImageBuffer: function(callback) { createImageHitRegion: function(callback) {
var canvas = new Kinetic.Canvas(this.attrs.width, this.attrs.height); var canvas = new Kinetic.Canvas(this.attrs.width, this.attrs.height);
var context = canvas.getContext(); var context = canvas.getContext();
context.drawImage(this.attrs.image, 0, 0); context.drawImage(this.attrs.image, 0, 0);

View File

@@ -760,7 +760,7 @@ Test.Modules.NODE = {
//console.log(layer.toDataURL()); //console.log(layer.toDataURL());
cachedShape.createImageBuffer(function() { cachedShape.createImageHitRegion(function() {
layer.draw(); layer.draw();
//console.log(layer.toDataURL()); //console.log(layer.toDataURL());

View File

@@ -151,7 +151,7 @@ Test.Modules.IMAGE = {
layer.add(lion); layer.add(lion);
lion.createImageBuffer(function() { lion.createImageHitRegion(function() {
stage.add(layer); stage.add(layer);
layer.drawHit(); layer.drawHit();