+ Point's constructer now accepts a point to copy

+ Added the close box back to the "new tab" group; it doesn't close the group, but it closes all the tabs. Seems like a useful feature, though maybe it shouldn't look like all the other close boxes
+ Groups no longer auto-close when all items are removed, if they're named
+ You can now close an empty group
+ Fixed bug with dragging tabs out of a group
+ Resizing the window now works, even if you've closed tab candy
+ When unsquishing, groups aren't forced into tab aspect ratio
This commit is contained in:
Ian Gilman 2010-04-26 16:48:46 -07:00
parent 0c2b12a943
commit 8a4ec46e48

View File

@ -19,9 +19,21 @@ var extensionManager = Cc["@mozilla.org/extensions/manager;1"]
.getService(Ci.nsIExtensionManager);
// ##########
window.Point = function(x, y) {
this.x = (typeof(x) == 'undefined' ? 0 : x);
this.y = (typeof(y) == 'undefined' ? 0 : y);
// Class: Point
// A simple point.
//
// Constructor: Point
// If a is a Point, creates a copy of it. Otherwise, expects a to be x,
// and creates a Point with it along with y. If either a or y are omitted,
// 0 is used in their place.
window.Point = function(a, y) {
if(a && typeof(a.x) != 'undefined' && typeof(a.y) != 'undefined') {
this.x = a.x;
this.y = a.y;
} else {
this.x = (typeof(a) == 'undefined' ? 0 : a);
this.y = (typeof(y) == 'undefined' ? 0 : y);
}
}
window.Point.prototype = {