mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
ORIGINAL: Added the reverse zoom animation (for when switching back to tabcandy).
TODO: How do we get a prettier original image to zoom? How do you force a redraw?
This commit is contained in:
parent
a863dfd0ea
commit
191cec0c2a
@ -93,9 +93,27 @@ var Page = {
|
||||
return false;
|
||||
});
|
||||
|
||||
Utils.ilog(Tabs.onFocus)
|
||||
Tabs.onFocus(function(tab){
|
||||
Utils.log("HHHIIII")
|
||||
var lastTab = null;
|
||||
Tabs.onFocus(function(){
|
||||
// If we switched to TabCandy window...
|
||||
if( this.contentWindow == window && lastTab != null){
|
||||
// If there was a lastTab we want to animate
|
||||
// its mirror for the zoom out.
|
||||
var $tab = $(lastTab.mirror.el);
|
||||
|
||||
var [w,h, pos] = [$tab.width(), $tab.height(), $tab.position()];
|
||||
$tab.css({
|
||||
top: 0, left: 0,
|
||||
width: window.innerWidth,
|
||||
height: h * (window.innerWidth/w),
|
||||
zIndex: 999999,
|
||||
})
|
||||
.animate({
|
||||
top: pos.top, left: pos.left,
|
||||
width: w, height: h
|
||||
},250);
|
||||
}
|
||||
lastTab = this;
|
||||
});
|
||||
|
||||
$("#tabbar").toggle(
|
||||
|
Loading…
Reference in New Issue
Block a user