fix #93 readded layer isListening and isVisible logic

This commit is contained in:
ericdrowell 2012-10-03 00:04:56 -07:00
parent 0eff286243
commit c6237b59e6
3 changed files with 43 additions and 39 deletions

View File

@ -3,7 +3,7 @@
* http://www.kineticjs.com/
* Copyright 2012, Eric Rowell
* Licensed under the MIT or GPL Version 2 licenses.
* Date: Oct 02 2012
* Date: Oct 03 2012
*
* Copyright (C) 2011 - 2012 by Eric Rowell
*
@ -2994,6 +2994,7 @@ Kinetic.Stage.prototype = {
*/
for(var n = layers.length - 1; n >= 0; n--) {
var layer = layers[n];
if(layer.isVisible() && layer.isListening()) {
var p = layer.bufferCanvas.context.getImageData(Math.round(pos.x), Math.round(pos.y), 1, 1).data;
// this indicates that a buffer pixel may have been found
if(p[3] === 255) {
@ -3011,6 +3012,7 @@ Kinetic.Stage.prototype = {
};
}
}
}
return null;
},

File diff suppressed because one or more lines are too long

View File

@ -368,6 +368,7 @@ Kinetic.Stage.prototype = {
*/
for(var n = layers.length - 1; n >= 0; n--) {
var layer = layers[n];
if(layer.isVisible() && layer.isListening()) {
var p = layer.bufferCanvas.context.getImageData(Math.round(pos.x), Math.round(pos.y), 1, 1).data;
// this indicates that a buffer pixel may have been found
if(p[3] === 255) {
@ -385,6 +386,7 @@ Kinetic.Stage.prototype = {
};
}
}
}
return null;
},