play-co / timestep

GNU General Public License v3.0
16 stars 27 forks source link

View setHandleEvents typo #22

Closed roosmaa closed 8 years ago

roosmaa commented 10 years ago

It seems that the setHandleEvents implementation has a typo when checking if the ignoreSubviews argument is a boolean.


diff --git a/src/ui/View.js b/src/ui/View.js
index 8d5f2a3..78fc92a 100644
--- a/src/ui/View.js
+++ b/src/ui/View.js
@@ -334,7 +334,7 @@ var View = exports = Class(Emitter, function () {
        this.setHandleEvents = this.canHandleEvents = function (handleEvents, ignoreSubviews) {
                this.__input.canHandleEvents = handleEvents;

-               if (typeof ignoreEvents === 'boolean') {
+               if (typeof ignoreSubviews === 'boolean') {
                        this.__input.blockEvents = ignoreSubviews;
                }
        };
lunarraid commented 8 years ago

This was fixed in https://github.com/gameclosure/timestep/commit/a6cd30bc6afca389fabb30f7c3eab2afc76eec42