mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 14:15:30 +00:00
Bug 620506 - Remove debugging rect code r=ian
This commit is contained in:
parent
d76a289bf9
commit
901bc9c142
@ -249,9 +249,6 @@ function GroupItem(listOfEls, options) {
|
||||
// ___ Superclass initialization
|
||||
this._init($container[0]);
|
||||
|
||||
if (this.$debug)
|
||||
this.$debug.css({zIndex: -1000});
|
||||
|
||||
// ___ Children
|
||||
Array.prototype.forEach.call(listOfEls, function(el) {
|
||||
self.add(el, options);
|
||||
@ -600,7 +597,6 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||
|
||||
UI.clearShouldResizeItems();
|
||||
|
||||
this._updateDebugBounds();
|
||||
this.setTrenches(rect);
|
||||
|
||||
this.save();
|
||||
@ -614,9 +610,6 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||
|
||||
iQ(this.container).css({zIndex: value});
|
||||
|
||||
if (this.$debug)
|
||||
this.$debug.css({zIndex: value + 1});
|
||||
|
||||
var count = this._children.length;
|
||||
if (count) {
|
||||
var topZIndex = value + count + 1;
|
||||
|
@ -72,15 +72,6 @@ function Item() {
|
||||
// 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.
|
||||
this.debug = false;
|
||||
|
||||
// Variable: $debug
|
||||
// If <debug> is true, this will be the iQ object for the visible rectangle.
|
||||
this.$debug = null;
|
||||
|
||||
// Variable: container
|
||||
// The outermost DOM element that describes this item on screen.
|
||||
this.container = null;
|
||||
@ -154,16 +145,6 @@ Item.prototype = {
|
||||
this.container = container;
|
||||
this.$container = iQ(container);
|
||||
|
||||
if (this.debug) {
|
||||
this.$debug = iQ('<div>')
|
||||
.css({
|
||||
border: '2px solid green',
|
||||
zIndex: -10,
|
||||
position: 'absolute'
|
||||
})
|
||||
.appendTo('body');
|
||||
}
|
||||
|
||||
iQ(this.container).data('item', this);
|
||||
|
||||
// ___ drag
|
||||
@ -510,16 +491,6 @@ Item.prototype = {
|
||||
});
|
||||
},
|
||||
|
||||
// ----------
|
||||
// Function: _updateDebugBounds
|
||||
// Called by a subclass when its bounds change, to update the debugging rectangles on screen.
|
||||
// This functionality is enabled only by the debug property.
|
||||
_updateDebugBounds: function Item__updateDebugBounds() {
|
||||
if (this.$debug) {
|
||||
this.$debug.css(this.bounds);
|
||||
}
|
||||
},
|
||||
|
||||
// ----------
|
||||
// Function: setTrenches
|
||||
// Sets up/moves the trenches for snapping to this item.
|
||||
|
@ -202,7 +202,6 @@ function TabItem(tab, options) {
|
||||
|
||||
this.setResizable(true, options.immediately);
|
||||
this.droppable(true);
|
||||
this._updateDebugBounds();
|
||||
|
||||
TabItems.register(this);
|
||||
|
||||
@ -524,7 +523,6 @@ TabItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||
|
||||
UI.clearShouldResizeItems();
|
||||
|
||||
this._updateDebugBounds();
|
||||
rect = this.getBounds(); // ensure that it's a <Rect>
|
||||
|
||||
if (!Utils.isRect(this.bounds))
|
||||
|
Loading…
Reference in New Issue
Block a user