mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 00:18:56 +02:00
window size alert
This commit is contained in:
parent
8bd5fb3196
commit
9b77632faf
4 changed files with 2315 additions and 3329 deletions
|
@ -63,6 +63,11 @@ var init = function() {
|
|||
events.trigger('resize', e);
|
||||
});
|
||||
|
||||
$(window).on('windowSizeCheck', _.throttle(function(e) {
|
||||
var width = $(window).width();
|
||||
var height = $(window).height();
|
||||
eventBaton.trigger('windowSizeCheck', {w: width, h: height});
|
||||
}, 500));
|
||||
eventBaton.stealBaton('docKeydown', function() { });
|
||||
eventBaton.stealBaton('docKeyup', function() { });
|
||||
|
||||
|
@ -78,6 +83,13 @@ var init = function() {
|
|||
var view = new Views.ZoomAlertWindow();
|
||||
}
|
||||
});
|
||||
eventBaton.stealBaton('windowSizeCheck', function(size) {
|
||||
if (size.w < Constants.VIEWPORT.minWidth ||
|
||||
size.h < Constants.VIEWPORT.minHeight) {
|
||||
var Views = require('../views');
|
||||
var view = new Views.WindowSizeAlertWindow();
|
||||
}
|
||||
});
|
||||
|
||||
// the default action on window focus and document click is to just focus the text area
|
||||
eventBaton.stealBaton('windowFocus', focusTextArea);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue