From 156e9acad429f5b9f95d5711f28e5f62b3a87e77 Mon Sep 17 00:00:00 2001 From: Kevin Tran Date: Sat, 28 Apr 2018 20:43:58 -0700 Subject: [PATCH] Properly reconfigure tab reorderer after redock When the user changes the tab dock to left or right, the reorderer gets into an inconsistent state. To solve this, the reorderer needs to be reconfigured to look at the proper dimensions. --- app/view/main/Main.js | 2 +- app/view/main/MainController.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/view/main/Main.js b/app/view/main/Main.js index 9a54ae84..cb6e10e4 100644 --- a/app/view/main/Main.js +++ b/app/view/main/Main.js @@ -385,6 +385,6 @@ Ext.define('Rambox.view.main.Main', { ,add: 'updatePositions' ,remove: 'updatePositions' ,childmove: 'updatePositions' - ,beforerender: 'initialize' + ,boxready: 'initialize' } }); diff --git a/app/view/main/MainController.js b/app/view/main/MainController.js index ddbe6869..25d2e7c7 100644 --- a/app/view/main/MainController.js +++ b/app/view/main/MainController.js @@ -8,6 +8,15 @@ Ext.define('Rambox.view.main.MainController', { tabPanel.setTabPosition(config.tabbar_location); tabPanel.setTabRotation(0); + + let reorderer = tabPanel.plugins.find((plugin) => plugin.ptype == "tabreorderer"); + + if ( reorderer !== undefined ) { + const names = reorderer.container.getLayout().names; + reorderer.dd.dim = names.width; + reorderer.dd.startAttr = names.beforeX; + reorderer.dd.endAttr = names.afterX; + } } // Make focus on webview every time the user change tabs, to enable the autofocus in websites