-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Proposal] A “expression-binding” api to avoid gesture move js-native bridge cost #1730
Comments
I do remember when a pen drawing on a canvas , the basic principle is logging what coordinates the pen reached. here's we need an array to log it, Queue, FIFO. .. tbc |
Great! contribution welcome. 😃 |
It's absolutely useful to do better perf for gesture events model. My concern is whether it's enough for some extreme cases or boundary conditions? For example an element should be stoped when people move it out of the screen by an "expression-binding". It's common and how to finish it with our current design? |
I think this proposal can solve some problems related to js-native bridge communication.
|
How to use it?Have some exmple code?I can't use it in weex version 2.0. |
This PR/issue doesn't receive response since Weex migrated to Apache two years ago and this repository is no longer active yet. Feel free to ask question in new repository and thanks for your contribution. |
This issue is outdated for a long time and will be closed now. You can create a new one if you still have questions. |
1 similar comment
This issue is outdated for a long time and will be closed now. You can create a new one if you still have questions. |
Everyone knows when response to a gesture event like pan, there is three steps:
start ==> move ==> end(cancel)
For "start", "end" and "cancel" event, it's OK to raise the event to JS. But for move event, it's triggering too rapidly and there is not enough time for calling js-native bridge. At this state, it's really hard to implement fancy effect related to gesture with weex
To resolve this issue, I'm thinking of a “expression-binding” system, described as following:
The code might like the following
Now, the most necessary gesture is pan and two-finger touching.
Available variables in expression:
Available tool-functions in expression:
Available consts in expression:
Available operators in expression:
Interface design:
The text was updated successfully, but these errors were encountered: