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

Dragging the Console is sluggish when browser window is resized to mobile view #2641

Closed
PiyushChandra17 opened this issue Nov 27, 2023 · 3 comments · Fixed by #2754
Closed
Assignees
Labels

Comments

@PiyushChandra17
Copy link
Contributor

p5.js version

2.9.3

What is your operating system?

Mac OS

Web browser and version

No response

Actual Behavior

Dragging the Console is sluggish when browser window is resized to mobile view

Expected Behavior

Dragging the Console should be smooth and not sluggish when browser window is resized to mobile view

Steps to reproduce

Steps:

  1. Open the editor web app
  2. Resize the window till it's mobile size
  3. Notice dragging of console is not smooth
@lindapaiste
Copy link
Collaborator

I am not sure why this is happening so it may be tricky to debug. We probably want to play around in the "Profiler" in React dev tools and see if there is anything alarming.

@lindapaiste
Copy link
Collaborator

lindapaiste commented Nov 27, 2023

I found the issue by Googling: tomkp/react-split-pane#30 The problem is that the drag stops when the mouse goes over the iframe that renders the sketch. We are solving this on desktop with an invisible div over the sketch.

<div
className="preview-frame-overlay"
style={{ display: isOverlayVisible ? 'block' : 'none' }}
/>

<SplitPane
split="vertical"
defaultSize="50%"
onChange={() => {
setIsOverlayVisible(true);
}}
onDragFinished={() => {
setIsOverlayVisible(false);
}}

@lakshz
Copy link
Contributor

lakshz commented Dec 20, 2023

@lindapaiste I want to work on this. Can this be assigned to me?

lakshz added a commit to lakshz/p5.js-web-editor that referenced this issue Dec 22, 2023
lindapaiste added a commit that referenced this issue Dec 29, 2023
[#2641] Fix sluggish console movement on dragging, in mobile view of browser window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants