Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] SWATE: Make modal-cards created using the buttons "Add Building Block" and "Add template" drag-able using touch devices #385

Open
ZimmerD opened this issue Feb 27, 2024 · 1 comment
Assignees
Labels
Type: Feature Request This item is confirmed by the maintainers to be a request for a new feature

Comments

@ZimmerD
Copy link

ZimmerD commented Feb 27, 2024

Is your feature request related to a problem? Please describe.
I am currently experimenting using the ARCitect on a Windows 11 Laptop with a touchscreen and I noticed that the cards opened using the buttons "Add Building Block" and "Add template" are not yet movable using touch gestures.

Describe the solution you'd like
Being able to move the cards using touch gestures

Describe alternatives you've considered
Using a mouse or a pen or expanding the SWATE view

@Freymaurer Freymaurer transferred this issue from nfdi4plants/ARCitect Feb 27, 2024
@Freymaurer
Copy link
Collaborator

Freymaurer commented Mar 1, 2024

I started investigating this issue but it is no trivial task. Will have to resolve some higher priority issues first.

Here is a reminder for future me:

prop.onTouchStart (fun e ->
    let startPosition = {X = int e.touches.[0].clientX; Y = int e.touches.[0].clientY}
    let startSize = {X = int element.current.Value.offsetWidth; Y = int element.current.Value.offsetHeight}
    let onmousemove = ResizeEventListener.onmousemove startPosition startSize setSize
    let onmouseup = fun e -> ResizeEventListener.onmouseup (prefix, element) onmousemove
    Browser.Dom.document.addEventListener("touchmove", onmousemove)
    let config = createEmpty<AddEventListenerOptions>
    config.once <- true
    Browser.Dom.document.addEventListener("touchup", onmouseup, config)
)

@Freymaurer Freymaurer self-assigned this Jun 5, 2024
@Freymaurer Freymaurer added the Type: Feature Request This item is confirmed by the maintainers to be a request for a new feature label Jun 5, 2024
@Freymaurer Freymaurer moved this to Backlog in ARCStack Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Request This item is confirmed by the maintainers to be a request for a new feature
Projects
Status: Backlog
Development

No branches or pull requests

2 participants