feat: tranbox: mobile support
This commit is contained in:
@@ -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"
|
||||
>
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user