Skip to content

Commit

Permalink
Support pointerEvents
Browse files Browse the repository at this point in the history
  • Loading branch information
sonaye committed Jul 27, 2018
1 parent 62b9c28 commit 7c84295
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 0.0.20
# 0.0.21

- **Breaking**: Project has been renamed to `haraka`. You can continue to use [`react-native-behavior`](https://www.npmjs.com/package/react-native-behavior) if you are already using it in a project (has been stable for over a year), it will not reacive any future updates however and has been deprecated.
- **Breaking**: `animatedNativeValue` prop is now `nativeDriver`.
Expand All @@ -16,6 +16,7 @@

- You can now use an animation or a layout preset from the available presets, see [the definition](../../#definition) for options.
- You can now get the animation reference instead of playing it immediately with the `ref` option in `goTo()` configuration. This can be useful for composing multiple behavior animations with `Animated.sequence` and `Animated.parallel`.
- You can pass a `pointerEvents` prop to the behavior view.
- Used Rollup to bundle the package.

# 0.0.19
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"license": "MIT",
"name": "haraka",
"description": "Stateful animations in React Native.",
"version": "0.0.20",
"version": "0.0.21",
"main": "lib/index.js",
"repository": {
"type": "git",
Expand Down
5 changes: 3 additions & 2 deletions src/behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export default class Behavior extends React.PureComponent {
indices,
initialState,
onGesture,
pointerEvents,
style,
swipeDistanceThreshold,
swipeVelocityThreshold,
Expand Down Expand Up @@ -262,7 +263,7 @@ export default class Behavior extends React.PureComponent {

if (enableGestures) {
return (
<NativeBehaviorView {...this.pan.panHandlers}>
<NativeBehaviorView {...this.pan.panHandlers} {...{ pointerEvents }}>
<Touchable>
<Behavior>{children}</Behavior>
</Touchable>
Expand All @@ -271,7 +272,7 @@ export default class Behavior extends React.PureComponent {
}

return (
<NativeBehaviorView>
<NativeBehaviorView {...{ pointerEvents }}>
<BehaviorView>{children}</BehaviorView>
</NativeBehaviorView>
);
Expand Down

0 comments on commit 7c84295

Please sign in to comment.