From ba7f3c01e5c3ac7613c344d897fa494865a412cd Mon Sep 17 00:00:00 2001 From: sienori Date: Sat, 23 Feb 2019 18:03:56 +0900 Subject: [PATCH] Delete unnecessary code --- src/content/components/TranslateContainer.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/content/components/TranslateContainer.js b/src/content/components/TranslateContainer.js index 929c795..28f6b9b 100644 --- a/src/content/components/TranslateContainer.js +++ b/src/content/components/TranslateContainer.js @@ -46,19 +46,6 @@ const getSelectedPosition = () => { return selectedPosition; }; -const calcPanelPosition = clickedPosition => { - const panelReferencePoint = getSettings("panelReferencePoint"); - switch (panelReferencePoint) { - case "topSelectedText": - return getSelectedPosition("top"); - case "bottomSelectedText": - return getSelectedPosition("bottom"); - case "clickedPoint": - if (clickedPosition) return clickedPosition; - else return getSelectedPosition("bottom"); - } -}; - const translateText = async text => { const targetLang = getSettings("targetLang"); const result = await translate(text, "auto", targetLang);