mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-14 08:34:26 +02:00
better zoom support
This commit is contained in:
parent
7750bae1b4
commit
423a353e28
14 changed files with 143 additions and 137 deletions
|
@ -11,8 +11,8 @@ var GLOBAL = {
|
|||
};
|
||||
|
||||
var VIEWPORT = {
|
||||
minZoom: 1,
|
||||
maxZoom: 1.15
|
||||
minZoom: 0.66,
|
||||
maxZoom: 1.25
|
||||
};
|
||||
|
||||
var GRAPHICS = {
|
||||
|
|
|
@ -15,7 +15,8 @@ var toGlobalize = {
|
|||
Q: { Q: require('q') },
|
||||
RebaseView: require('../views/rebaseView'),
|
||||
Views: require('../views'),
|
||||
MultiView: require('../views/multiView')
|
||||
MultiView: require('../views/multiView'),
|
||||
ZoomLevel: require('../util/zoomLevel')
|
||||
};
|
||||
|
||||
_.each(toGlobalize, function(module) {
|
||||
|
|
|
@ -26,7 +26,7 @@ EventBaton.prototype.trigger = function(name) {
|
|||
}
|
||||
|
||||
var listeners = this.eventMap[name];
|
||||
if (!listeners) {
|
||||
if (!listeners || !listeners.length) {
|
||||
console.warn('no listeners for', name);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -34,4 +34,5 @@ var setupZoomPoll = function(callback, context) {
|
|||
};
|
||||
|
||||
exports.setupZoomPoll = setupZoomPoll;
|
||||
exports.detectZoom = detectZoom;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue