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);