feat: tranbox: mobile support

This commit is contained in:
Gabe Yuan
2024-04-07 16:55:54 +08:00
parent 2f5d875c47
commit d565e2464a
4 changed files with 10 additions and 4 deletions

View File

@@ -25,8 +25,8 @@ export default function TranBtn({ onClick, position, tranboxSetting }) {
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
width={isMobile ? "32" : "20"}
height={isMobile ? "32" : "20"}
viewBox="0 0 32 32"
version="1.1"
>

View File

@@ -71,8 +71,8 @@ export default function Slection({
}
// todo: mobile support
window.addEventListener("mouseup", handleMouseup);
// window.addEventListener(isMobile ? "touchend" : "mouseup", handleMouseup);
// window.addEventListener("mouseup", handleMouseup);
window.addEventListener(isMobile ? "touchend" : "mouseup", handleMouseup);
return () => {
window.removeEventListener(
isMobile ? "touchend" : "mouseup",