mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-26 18:31:29 +00:00
+ Fixed a bug wherein when dragging out a new group, you couldn't reduce it's size
+ When clicking on a stacked group, you go directly into that group. Use command-click to open it up in the shield.
This commit is contained in:
parent
4c2258c2fa
commit
b8d12ec406
@ -757,8 +757,14 @@ window.Group.prototype = $.extend(new Item(), new Subscribable(), {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// ___ we're stacked, but command isn't held down
|
||||
if( Keys.meta == false ){
|
||||
Groups.setActiveGroup(self);
|
||||
return { shouldZoom: true };
|
||||
}
|
||||
|
||||
// ___ we're stacked, so expand
|
||||
// ___ we're stacked, and command is held down so expand
|
||||
Groups.setActiveGroup(self);
|
||||
var startBounds = child.getBounds();
|
||||
var $tray = $("<div />").css({
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
(function(){
|
||||
|
||||
window.Keys = {meta: false};
|
||||
|
||||
// ##########
|
||||
Navbar = {
|
||||
// ----------
|
||||
@ -189,7 +191,13 @@ window.Page = {
|
||||
|
||||
setupKeyHandlers: function(){
|
||||
var self = this;
|
||||
$(window).keyup(function(e){
|
||||
if( e.metaKey == false ) window.Keys.meta = false;
|
||||
});
|
||||
|
||||
$(window).keydown(function(e){
|
||||
if( e.metaKey == true ) window.Keys.meta = true;
|
||||
|
||||
if( !self.getActiveTab() ) return;
|
||||
|
||||
var centers = [[item.bounds.center(), item] for each(item in TabItems.getItems())];
|
||||
@ -344,7 +352,7 @@ window.Page = {
|
||||
const minSize = 60;
|
||||
|
||||
var startPos = {x:e.clientX, y:e.clientY}
|
||||
var phantom = $("<div class='group'>").css({
|
||||
var phantom = $("<div class='group phantom'>").css({
|
||||
position: "absolute",
|
||||
top: startPos.y,
|
||||
left: startPos.x,
|
||||
@ -376,7 +384,7 @@ window.Page = {
|
||||
}
|
||||
|
||||
function finalize(e){
|
||||
$("#bg").unbind("mousemove");
|
||||
$("#bg, .phantom").unbind("mousemove");
|
||||
if( phantom.css("opacity") != 1 ) collapse();
|
||||
else{
|
||||
var bounds = new Rect(startPos.x, startPos.y, phantom.width(), phantom.height())
|
||||
@ -396,7 +404,7 @@ window.Page = {
|
||||
}
|
||||
}
|
||||
|
||||
$("#bg").mousemove(updateSize)
|
||||
$("#bg, .phantom").mousemove(updateSize)
|
||||
$(window).one('mouseup', finalize);
|
||||
e.preventDefault();
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user