Fix that the translation panel appears at (0,0)
This commit is contained in:
parent
ab8bf6205c
commit
02946b6106
|
@ -38,6 +38,8 @@ async function Select(e) {
|
||||||
const shouldTranslate = existsSelectionWord && isLeftClick && isPanelOutside;
|
const shouldTranslate = existsSelectionWord && isLeftClick && isPanelOutside;
|
||||||
if (!shouldTranslate) return;
|
if (!shouldTranslate) return;
|
||||||
|
|
||||||
|
clickPosition = e;
|
||||||
|
|
||||||
//選択した言語が翻訳先言語と異なるか判定
|
//選択した言語が翻訳先言語と異なるか判定
|
||||||
const shouldShowButtons = S.get().whenSelectText != "dontShowButton";
|
const shouldShowButtons = S.get().whenSelectText != "dontShowButton";
|
||||||
if (S.get().ifCheckLang && shouldShowButtons) {
|
if (S.get().ifCheckLang && shouldShowButtons) {
|
||||||
|
@ -45,7 +47,6 @@ async function Select(e) {
|
||||||
if (!shouldTranslate) return;
|
if (!shouldTranslate) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
clickPosition = e;
|
|
||||||
switch (S.get().whenSelectText) {
|
switch (S.get().whenSelectText) {
|
||||||
case "showButton":
|
case "showButton":
|
||||||
if (selectionWord.length == 0) return;
|
if (selectionWord.length == 0) return;
|
||||||
|
|
Loading…
Reference in a new issue