Permalink
Browse files

Filter out events that didn't occur on the cube (but rather transitio…

…ns in its children)
  • Loading branch information...
1 parent 32c3cb6 commit f3da15a01b27f7677220e724f2770c680228f1d4 @tjvantoll committed Aug 25, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 PictureCube.js
View
@@ -32,6 +32,7 @@ PictureCube = function(node, images, options) {
var cubeHolder = this;
var transitionEvent = function(event) {
var side = parseInt(event.target.getAttribute('data-cube-picture-number'), 10);
+ if (!side) return;
var image = cubeHolder.cube.childNodes[side - 1].childNodes[0];
if (options.onchange) {

0 comments on commit f3da15a

Please sign in to comment.