+ Now storing item z separately from the DOM (as the DOM appears to be unreliable in our new world, at least at startup). This fixes issues with tabs not appearing in their groups at startup

This commit is contained in:
Ian Gilman 2010-07-07 14:12:04 -07:00
Родитель cddf170d3c
Коммит 9101e912d9
4 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -542,6 +542,8 @@ window.Group.prototype = iQ.extend(new Item(), new Subscribable(), {
// Function: setZ
// Set the Z order for the group's container, as well as its children.
setZ: function(value) {
this.zIndex = value;
iQ(this.container).css({zIndex: value});
if(this.$debug)

Просмотреть файл

@ -65,6 +65,10 @@ window.Item = function() {
// The position and size of this Item, represented as a <Rect>.
this.bounds = null;
// Variable: zIndex
// The z-index for this item.
this.zIndex = 0;
// Variable: debug
// When set to true, displays a rectangle on the screen that corresponds with bounds.
// May be used for additional debugging features in the future.
@ -291,7 +295,7 @@ window.Item.prototype = {
// Function: getZ
// Returns the zIndex of the Item.
getZ: function() {
return parseInt(iQ(this.container).css('zIndex'));
return this.zIndex;
},
// ----------

Просмотреть файл

@ -55,9 +55,9 @@ Storage = {
// us to check whether it's loaded or not so using a private one for
// now.
var alreadyReady = Utils.getCurrentWindow().__SSi;
if(alreadyReady)
if(alreadyReady) {
callback();
else {
} else {
var obsService =
Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);

Просмотреть файл

@ -356,6 +356,7 @@ window.TabItem.prototype = iQ.extend(new Item(), {
// ----------
setZ: function(value) {
this.zIndex = value;
iQ(this.container).css({zIndex: value});
},