Giter Club home page Giter Club logo

react-draggable-resizable-panel's Introduction

React Draggable and Resizable Panel

This project is the source code for the Medium article.

Run npm start to start the project.

react-draggable-resizable-panel's People

Contributors

nmingaleev avatar mjschurig avatar

Stargazers

Dietmar Puschmann avatar  avatar Rezaul Karim avatar CCDEJENE avatar Hunter Hancock avatar Roland avatar Fadhil Darma Putera Zagoto avatar Mohammad Ismail avatar Nigel avatar Sonny Lazuardi avatar Fabian Rauschert avatar  avatar ZhangDaZongWei avatar CJ avatar  avatar Peramanathan Sathyamoorthy avatar Agustin Sevilla avatar Johnathan Ludwig avatar Ruslana avatar  avatar

Watchers

James Cloos avatar  avatar

react-draggable-resizable-panel's Issues

Resizer doubles movement

I encountered an issue with the resizer component. I use Windows 10 with Chrome Canary. My Windows display settings are set to 4k with the recommended scaling factor of 300%. This leads to three times more resizing as the mouse movements sugests. This issue can be fixed by replacing lines 11 to 15 in the resizer index.js with the following:

const ratio = window.devicePixelRatio
const handleMouseMove = (e) => {
if (!direction) return
onResize(direction, e.movementX/ratio, e.movementY/ratio)
}

This scales the movement by the display scaling factor, leading to the correct resizing operation.

Confer to: w3c/uievents#40

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.