Giter VIP home page Giter VIP logo

Comments (11)

pat993 avatar pat993 commented on July 26, 2024 1

thanks for adding more feature, it now works on touch device, you guys did a great job

from ws-scrcpy.

drauggres avatar drauggres commented on July 26, 2024

You should be able to just click on the image to generate input events.
Have you tried original scrcpy, does it work?

from ws-scrcpy.

gamecln277 avatar gamecln277 commented on July 26, 2024

Yes , it work fine
But I need to use phone to control many emu.
so I very hope this software can work in my requirement...please

from ws-scrcpy.

drauggres avatar drauggres commented on July 26, 2024

So, you are using browser on a smartphone to open ws-scrcpy web page, is that correct?
I never tried to open it on a phone. I'm not sure that it's possible to use scroll/drag in ws-scrcpy on a common browser on a phone.

from ws-scrcpy.

gamecln277 avatar gamecln277 commented on July 26, 2024

YES!thst is I mean!
If web screen can fullscreen,maybe It will work fine?
I guess

from ws-scrcpy.

gamecln277 avatar gamecln277 commented on July 26, 2024

If look likes this

from ws-scrcpy.

gamecln277 avatar gamecln277 commented on July 26, 2024

I have a idea
If page design like this
maybe it will looks very wonderful!
and last fix the drag and scale problem

from ws-scrcpy.

drauggres avatar drauggres commented on July 26, 2024

I think that these lines inserted here should solve problem with drag (but I didn't test):

document.body.ondragstart = function(e: MouseEvent): void {
    e.preventDefault();
    e.stopPropagation();
};

P.S. Or adding draggable="false" attribute to the elements.

from ws-scrcpy.

gamecln277 avatar gamecln277 commented on July 26, 2024

document.body.onmousedown = function(e: MouseEvent): void { down++; onMouseEvent(e); }; document.body.onmouseup = function(e: MouseEvent): void { onMouseEvent(e); down--; }; document.body.onmousemove = function(e: MouseEvent): void { onMouseEvent(e); }; document.body.ondragstart = function(e: MouseEvent): void { e.preventDefault(); e.stopPropagation(); }; this.hasListeners = true;

I insert them but nothing change QQ

draggable="false"
this IDK where can I insert ...

picture

from ws-scrcpy.

santhoshbs1987 avatar santhoshbs1987 commented on July 26, 2024

I think that these lines inserted here should solve problem with drag (but I didn't test):

document.body.ondragstart = function(e: MouseEvent): void {
    e.preventDefault();
    e.stopPropagation();
};

P.S. Or adding draggable="false" attribute to the elements.

this did not work for me, please help with the working code

from ws-scrcpy.

santhoshbs1987 avatar santhoshbs1987 commented on July 26, 2024

document.body.onmousedown = function(e: MouseEvent): void { down++; onMouseEvent(e); }; document.body.onmouseup = function(e: MouseEvent): void { onMouseEvent(e); down--; }; document.body.onmousemove = function(e: MouseEvent): void { onMouseEvent(e); }; document.body.ondragstart = function(e: MouseEvent): void { e.preventDefault(); e.stopPropagation(); }; this.hasListeners = true;

I insert them but nothing change QQ

draggable="false"
this IDK where can I insert ...

picture

did you get the solution?

from ws-scrcpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.