Bug 600646 - Speed up the new tab animation [r=dolske, a=blocking]

This commit is contained in:
Aza Raskin 2010-10-06 13:17:53 -07:00
parent 8782dcbf1e
commit fc5c17170a
4 changed files with 4 additions and 33 deletions

View File

@ -1386,39 +1386,7 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
// TabItems will have handled the new tab and added the tabItem property.
// We don't have to check if it's an app tab (and therefore wouldn't have a
// TabItem), since we've just created it.
let newItem = newTab.tabItem;
var self = this;
iQ(newItem.container).css({opacity: 0});
let $anim = iQ("<div>")
.addClass("newTabAnimatee")
.css({
top: newItem.bounds.top + 5,
left: newItem.bounds.left + 5,
width: newItem.bounds.width - 10,
height: newItem.bounds.height - 10,
zIndex: 999,
opacity: 0
})
.appendTo("body")
.animate({opacity: 1}, {
duration: 500,
complete: function() {
$anim.animate({
top: 0,
left: 0,
width: window.innerWidth,
height: window.innerHeight
}, {
duration: 270,
complete: function() {
iQ(newItem.container).css({opacity: 1});
newItem.zoomIn(!url);
$anim.remove();
}
});
}
});
newTab.tabItem.zoomIn(!url);
},
// ----------

View File

@ -32,6 +32,7 @@ body {
.thumb {
box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.2);
background-color: white;
}
.favicon {

View File

@ -30,6 +30,7 @@ body {
.thumb {
box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.2);
background-color: white;
}
.favicon {

View File

@ -34,6 +34,7 @@ body {
.thumb {
box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.1);
background-color: white;
}
.favicon {