From 905100500f748fca945ac1b3d83e9c12221fe572 Mon Sep 17 00:00:00 2001 From: Piro / YUKI Hiroshi Date: Sun, 9 Feb 2014 01:00:04 +0900 Subject: [PATCH] Accept drag and drop of the tab bar itself, on the blank area around pinned tabs --- history.en.md | 1 + history.ja.md | 1 + modules/tabbarDNDObserver.js | 28 ++++++++++++++-------------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/history.en.md b/history.en.md index a36c10de..3f5ece25 100644 --- a/history.en.md +++ b/history.en.md @@ -2,6 +2,7 @@ - master/HEAD * Improved: On the "auto hide" mode, scroll to the current tab when the tab bar becomes shown. + * Improved: Accept drag and drop of the tab bar itself, on the blank area around pinned tabs. * Fixed: Don't activate "draw in titlebar" feature for windows with vertical tab bar. * Fixed: On the "auto hide" mode, keep scroll position of the tab bar correctly when the bar is shown and hidden. * Fixed: In the fullscreen mode, don't hide the navigation toolbar on OS X Lion. diff --git a/history.ja.md b/history.ja.md index 49bbb3ac..8f863873 100644 --- a/history.ja.md +++ b/history.ja.md @@ -2,6 +2,7 @@ - master/HEAD * タブバーを自動的に隠す状態の時、タブバーが表示されたら常に現在のタブの位置までタブバーをスクロールするようにした + * ピン留めされたタブの周囲の空き領域について、タブバー自体のドラッグ操作を受け付けるようにした * 縦型タブバーを伴うウィンドウではFirefoxの「ツールバーをタイトルバーに表示する」機能を常に無効化するようにした * タブバーを自動的に隠す状態の時、タブバーの開閉でスクロール位置が失われる問題を修正 * OS X Lionでのフルスクリーン表示において、ナビゲーションツールバーを隠さないようにした diff --git a/modules/tabbarDNDObserver.js b/modules/tabbarDNDObserver.js index c35b2a45..a91f2a23 100644 --- a/modules/tabbarDNDObserver.js +++ b/modules/tabbarDNDObserver.js @@ -1287,13 +1287,13 @@ catch(e) { startListenEvents : function TabbarDND_startListenEvents() { - var strip = this.treeStyleTab.tabStrip; - strip.addEventListener('dragstart', this, true); - strip.addEventListener('dragover', this, true); - strip.addEventListener('dragenter', this, false); - strip.addEventListener('dragleave', this, false); - strip.addEventListener('dragend', this, true); - strip.addEventListener('drop', this, true); + var target = this.treeStyleTab.ownerToolbar || this.treeStyleTab.tabStrip; + target.addEventListener('dragstart', this, true); + target.addEventListener('dragover', this, true); + target.addEventListener('dragenter', this, false); + target.addEventListener('dragleave', this, false); + target.addEventListener('dragend', this, true); + target.addEventListener('drop', this, true); }, destroy : function TabbarDND_destroy() @@ -1308,13 +1308,13 @@ catch(e) { endListenEvents : function TabbarDND_endListenEvents() { - var strip = this.treeStyleTab.tabStrip; - strip.removeEventListener('dragstart', this, true); - strip.removeEventListener('dragover', this, true); - strip.removeEventListener('dragenter', this, false); - strip.removeEventListener('dragleave', this, false); - strip.removeEventListener('dragend', this, true); - strip.removeEventListener('drop', this, true); + var target = this.treeStyleTab.ownerToolbar || this.treeStyleTab.tabStrip; + target.removeEventListener('dragstart', this, true); + target.removeEventListener('dragover', this, true); + target.removeEventListener('dragenter', this, false); + target.removeEventListener('dragleave', this, false); + target.removeEventListener('dragend', this, true); + target.removeEventListener('drop', this, true); } };