Comparing version 1.2.0 to 1.2.1
@@ -88,5 +88,5 @@ /** @module bigwheel */ | ||
if( s.autoResize ) { | ||
if( s.autoResize && global.innerWidth !== undefined && global.innerHeight !== undefined ) { | ||
on( window, 'resize', this.onResize.bind( this ) ); | ||
on( global, 'resize', this.onResize.bind( this ) ); | ||
@@ -188,3 +188,3 @@ this.onResize(); | ||
this.resize( window.innerWidth, window.innerHeight ); | ||
this.resize( global.innerWidth, global.innerHeight ); | ||
} | ||
@@ -191,0 +191,0 @@ }; |
{ | ||
"name": "bigwheel", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "bigwheel is an mvc framework that focuses on animation", | ||
@@ -25,10 +25,11 @@ "main": "index.js", | ||
"dependencies": { | ||
"bw-router": "^1.1.0", | ||
"bw-router": "^1.1.1", | ||
"bw-viewmediator": "^1.1.0", | ||
"bw-vm": "^1.2.0", | ||
"bw-vm": "^1.2.1", | ||
"dom-event": "git://github.com/mikkoh/dom-event" | ||
}, | ||
"devDependencies": { | ||
"promise": "^6.0.1" | ||
"promise": "^6.0.1", | ||
"tape": "^3.0.3" | ||
} | ||
} |
@@ -1,3 +0,78 @@ | ||
var framework = require( './framework' ); | ||
var test = require( 'tape' ); | ||
var bigwheel = require( './..' ); | ||
framework.init(); | ||
setTimeout( function() {}, 1000 ); | ||
test( 'testing framework', function( t ) { | ||
t.plan( 6 ); | ||
if( global.location ) { | ||
global.location.hash = ''; | ||
} | ||
var framework = bigwheel( function( done ) { | ||
done( { | ||
routes: { | ||
'/': { | ||
init: function( req, done ) { | ||
t.equal( req.route, '/', '"/" init received "/"' ); | ||
done(); | ||
}, | ||
aniIn: function( req, done ) { | ||
t.equal( req.route, '/', '"/" aniIn received "/"' ); | ||
done(); | ||
framework.go( '/about' ); | ||
}, | ||
aniOut: function( req, done ) { | ||
t.equal( req.route, '/about', '"/" aniOut received "/about"' ); | ||
done(); | ||
}, | ||
destroy: function( req, done ) { | ||
t.pass( '"/" destroy' ); | ||
done(); | ||
} | ||
}, | ||
'/about': function() { | ||
return { | ||
init: function( req, done ) { | ||
t.equal( req.route, '/about', '"/about" init received "/about"' ); | ||
done(); | ||
}, | ||
aniIn: function( req, done ) { | ||
t.equal( req.route, '/about', '"/about" aniIn received "/about"' ); | ||
done(); | ||
} | ||
}; | ||
} | ||
} | ||
}); | ||
}); | ||
framework.init(); | ||
}); |
11971
2
6
197
Updatedbw-router@^1.1.1
Updatedbw-vm@^1.2.1