Skip to content

can not change clipViewport and dragViewport state #17

Closed

Description

@salar-amr

hello , I noticed a button in pure no-vnc sdk which could change the state of clipViewport and dragViewport (true <=> false)

I implemented same strategy to get the same result but changing the state of these props does not change the behavior of vnc screen,
I faced this issue since the height of vnc screen is always more than the device and some time there is a need to drag the view to see the bottom of screen but when the clipViewport and dragViewport is true scrolling with touch events in mobile devices does not scroll the content of shared application

Activity

  1. roerohan commented on Dec 3, 2021

    @roerohan
    Owner

    @salar-amr

    _rfb.clipViewport = clipViewport || false;
    _rfb.dragViewport = dragViewport || false;

    I just take the props and pass them in the noVNC library. When you used noVNC directly, can you show me your implementation that made it work? Maybe that will give me some insight into why this is failing.

  2. roerohan commented on Feb 26, 2022

    @roerohan
    Owner

    In #26, I've exposed the rfb object. So, if you have a code snippet like:

    function App() {
      const vncScreenRef = useRef<React.ElementRef<typeof VncScreen>>(null);
    
      return (
        <VncScreen
          url={vncUrl}
          scaleViewport
          debug
          ref={vncScreenRef}
        />
      )
    }

    You can access the rfb object using vncScreenRef.current?.rfb. If the rfb object isn't set, it's value is null.

  3. self-assigned this
    on Feb 26, 2022
  4. Repository owner locked and limited conversation to collaborators on Feb 27, 2022
  5. converted this issue into a discussion #31 on Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions