Code Monkey home page Code Monkey logo

Comments (4)

mochixuan avatar mochixuan commented on May 30, 2024

明白你要实现的功能: 这个组件只有一个JS文件,里面有个方法做了一下现在它的X,Y最大、最小值,你可以把那个最大Y值限制设置成屏幕高度就可以了。

from react-native-drag-sort.

wxsms avatar wxsms commented on May 30, 2024

谢谢,请问是否接受这个 Feature 的 PR 呢?

意向加入 props:

  1. restrictDragEdge Boolean, Default true
  2. onDragMove Function

同时为 onDragMoveonDragEnd 增加一个回调参数 nativeEvent,便于开发者获取屏幕坐标等信息。

from react-native-drag-sort.

mochixuan avatar mochixuan commented on May 30, 2024
  1. react-native-drag-sort这个组件只有一个文件,你可以直接复制到你的项目里对源码进行修改。
  2. 你说的这个两个需求都很简单,我可以给你说下怎么改,改哪里,但我觉得这两个功能不太适合这个组件,我就不加了😊。
    代码 112和113: 你可以把他的限制改成你需要的大小或者直接删除了就可以完成你的需求1
    onDragMove监听可以加在130行,x,y就是你想要的坐标了。

from react-native-drag-sort.

wxsms avatar wxsms commented on May 30, 2024

好的。再次感谢。

from react-native-drag-sort.

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.