mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 00:18:56 +02:00
tried out zoom level, shows 2 for some reason
This commit is contained in:
parent
6e61ffda59
commit
f60b97307a
7 changed files with 3152 additions and 2877 deletions
|
@ -1,6 +1,9 @@
|
|||
var _ = require('underscore');
|
||||
var Backbone = require('backbone');
|
||||
|
||||
var Constants = require('../util/constants');
|
||||
var Views = require('../views');
|
||||
|
||||
/**
|
||||
* Globals
|
||||
*/
|
||||
|
@ -34,6 +37,18 @@ var init = function(){
|
|||
eventBaton.trigger('documentClick', e);
|
||||
});
|
||||
|
||||
// zoom level measure, I wish there was a jquery event for this
|
||||
require('../util/zoomLevel').setupZoomPoll(function(level) {
|
||||
eventBaton.trigger('zoomChange', level);
|
||||
}, this);
|
||||
|
||||
eventBaton.stealBaton('zoomChange', function(level) {
|
||||
if (level > Constants.VIEWPORT.maxZoom ||
|
||||
level < Constants.VIEWPORT.minZoom) {
|
||||
var view = new Views.ZoomAlertWindow();
|
||||
}
|
||||
});
|
||||
|
||||
// the default action on window focus and document click is to just focus the text area
|
||||
eventBaton.stealBaton('windowFocus', focusTextArea);
|
||||
eventBaton.stealBaton('documentClick', focusTextArea);
|
||||
|
@ -64,7 +79,6 @@ var init = function(){
|
|||
$(document).ready(init);
|
||||
|
||||
function UI() {
|
||||
this.active = true;
|
||||
var Collections = require('../models/collections');
|
||||
var CommandViews = require('../views/commandViews');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue