mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 17:27:22 +02:00
zoom level fixed
This commit is contained in:
parent
953bd49ee2
commit
ebdf188c1d
3 changed files with 35 additions and 2 deletions
|
@ -14890,14 +14890,25 @@ function detectZoom() {
|
|||
return window.outerWidth / window.innerWidth;
|
||||
}
|
||||
|
||||
var locked = true;
|
||||
var setupZoomPoll = function(callback, context) {
|
||||
var currentZoom = 0;
|
||||
|
||||
setInterval(function() {
|
||||
var newZoom = detectZoom();
|
||||
|
||||
if (newZoom !== currentZoom) {
|
||||
// we need to wait one more before issuing callback
|
||||
// to avoid window resize issues
|
||||
if (locked) {
|
||||
locked = false;
|
||||
return;
|
||||
}
|
||||
|
||||
currentZoom = newZoom;
|
||||
callback.apply(context, [newZoom]);
|
||||
} else {
|
||||
locked = true;
|
||||
}
|
||||
}, 500);
|
||||
};
|
||||
|
@ -19162,14 +19173,25 @@ function detectZoom() {
|
|||
return window.outerWidth / window.innerWidth;
|
||||
}
|
||||
|
||||
var locked = true;
|
||||
var setupZoomPoll = function(callback, context) {
|
||||
var currentZoom = 0;
|
||||
|
||||
setInterval(function() {
|
||||
var newZoom = detectZoom();
|
||||
|
||||
if (newZoom !== currentZoom) {
|
||||
// we need to wait one more before issuing callback
|
||||
// to avoid window resize issues
|
||||
if (locked) {
|
||||
locked = false;
|
||||
return;
|
||||
}
|
||||
|
||||
currentZoom = newZoom;
|
||||
callback.apply(context, [newZoom]);
|
||||
} else {
|
||||
locked = true;
|
||||
}
|
||||
}, 500);
|
||||
};
|
||||
|
|
|
@ -21,14 +21,25 @@ function detectZoom() {
|
|||
return window.outerWidth / window.innerWidth;
|
||||
}
|
||||
|
||||
var locked = true;
|
||||
var setupZoomPoll = function(callback, context) {
|
||||
var currentZoom = 0;
|
||||
|
||||
setInterval(function() {
|
||||
var newZoom = detectZoom();
|
||||
|
||||
if (newZoom !== currentZoom) {
|
||||
// we need to wait one more before issuing callback
|
||||
// to avoid window resize issues
|
||||
if (locked) {
|
||||
locked = false;
|
||||
return;
|
||||
}
|
||||
|
||||
currentZoom = newZoom;
|
||||
callback.apply(context, [newZoom]);
|
||||
} else {
|
||||
locked = true;
|
||||
}
|
||||
}, 500);
|
||||
};
|
||||
|
|
4
todo.txt
4
todo.txt
|
@ -4,7 +4,6 @@ Big things:
|
|||
Big Graphic things:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
[ ] levels dropdown selection?
|
||||
[.] level teardown
|
||||
[ ] git demonstration view
|
||||
[ ] sandbox can launch and takedown levels
|
||||
|
||||
|
@ -22,7 +21,6 @@ Minor Bugs to fix:
|
|||
|
||||
Big Bugs to fix:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
[ ] window zoom alert thing -- this just needs to be timeouted one more time
|
||||
[ ] click handlers on goal visualization for the actual canvas elements
|
||||
|
||||
/*************************************
|
||||
|
@ -34,6 +32,8 @@ Big Bugs to fix:
|
|||
Done things:
|
||||
(I only started this on Dec 17th 2012 to get a better sense of what was done)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
[x] window zoom alert thing -- this just needs to be timeouted one more time
|
||||
[x] level teardown
|
||||
[x] great die for levels
|
||||
[x] show which level you are in! with a little thing on the top
|
||||
[x] allow command history to clear finished ones
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue