diff options
Diffstat (limited to 'MLEB/Translate/resources/js/ext.translate.editor.shortcuts.js')
-rw-r--r-- | MLEB/Translate/resources/js/ext.translate.editor.shortcuts.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/MLEB/Translate/resources/js/ext.translate.editor.shortcuts.js b/MLEB/Translate/resources/js/ext.translate.editor.shortcuts.js index b8d5c4e2..8c56ef94 100644 --- a/MLEB/Translate/resources/js/ext.translate.editor.shortcuts.js +++ b/MLEB/Translate/resources/js/ext.translate.editor.shortcuts.js @@ -5,16 +5,14 @@ 'use strict'; var translateEditorShortcuts = { showShortcuts: function () { - var editorOffset, minTop, maxTop, maxLeft, middle, rtl; - // Any better way? - rtl = $( document.body ).is( '.rtl' ); + var rtl = $( document.body ).is( '.rtl' ); - editorOffset = this.$editor.offset(); - minTop = editorOffset.top; - maxTop = minTop + this.$editor.outerHeight(); - middle = minTop + ( maxTop - minTop ) / 2; - maxLeft = rtl ? editorOffset.left : editorOffset.left + this.$editor.outerWidth(); + var editorOffset = this.$editor.offset(); + var minTop = editorOffset.top; + var maxTop = minTop + this.$editor.outerHeight(); + var middle = minTop + ( maxTop - minTop ) / 2; + var maxLeft = rtl ? editorOffset.left : editorOffset.left + this.$editor.outerWidth(); this.hideShortcuts(); |