File tree 4 files changed +14
-5
lines changed
4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,9 @@ export class ViroBase<T> extends React.Component<ViroBaseProps & T> {
57
57
event . nativeEvent . position ,
58
58
event . nativeEvent . source
59
59
) ;
60
- let CLICKED = ViroClickStateTypes . CLICKED ; // Value representation of Clicked ClickState within EventDelegateJni.
61
- if ( event . nativeEvent . clickState == CLICKED ) {
60
+
61
+ // Value representation of Clicked ClickState within EventDelegateJni.
62
+ if ( event . nativeEvent . clickState == ViroClickStateTypes . CLICKED ) {
62
63
this . _onClick ( event ) ;
63
64
}
64
65
} ;
Original file line number Diff line number Diff line change @@ -97,6 +97,11 @@ export class ViroText extends ViroBase<Props> {
97
97
canFuse = { this . props . onFuse != undefined }
98
98
onHoverViro = { this . _onHover }
99
99
onClickViro = { this . _onClickState }
100
+ // Fixes #272. for some reason, onClick was making it
101
+ // to the native code. Other incorrect props don't make it
102
+ // to the native code.
103
+ // https://github.com/NativeVision/viro/issues/272
104
+ onClick = { undefined }
100
105
onTouchViro = { this . _onTouch }
101
106
onScrollViro = { this . _onScroll }
102
107
onSwipeViro = { this . _onSwipe }
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ class ViroBase extends React.Component {
40
40
_onClickState = ( event ) => {
41
41
this . props . onClickState &&
42
42
this . props . onClickState ( event . nativeEvent . clickState , event . nativeEvent . position , event . nativeEvent . source ) ;
43
- let CLICKED = ViroEvents_1 . ViroClickStateTypes . CLICKED ; // Value representation of Clicked ClickState within EventDelegateJni.
44
- if ( event . nativeEvent . clickState == CLICKED ) {
43
+ // Value representation of Clicked ClickState within EventDelegateJni.
44
+ if ( event . nativeEvent . clickState == ViroEvents_1 . ViroClickStateTypes . CLICKED ) {
45
45
this . _onClick ( event ) ;
46
46
}
47
47
} ;
Original file line number Diff line number Diff line change @@ -73,7 +73,10 @@ class ViroText extends ViroBase_1.ViroBase {
73
73
return ( < VRTText { ...this . props } ref = { ( component ) => {
74
74
this . _component = component ;
75
75
} } onNativeTransformDelegateViro = { transformDelegate } hasTransformDelegate = { this . props . onTransformUpdate != undefined } style = { [ this . props . style ] } canHover = { this . props . onHover != undefined } canClick = { this . props . onClick != undefined ||
76
- this . props . onClickState != undefined } canTouch = { this . props . onTouch != undefined } canScroll = { this . props . onScroll != undefined } canSwipe = { this . props . onSwipe != undefined } canDrag = { this . props . onDrag != undefined } canPinch = { this . props . onPinch != undefined } canRotate = { this . props . onRotate != undefined } canFuse = { this . props . onFuse != undefined } onHoverViro = { this . _onHover } onClickViro = { this . _onClickState } onTouchViro = { this . _onTouch } onScrollViro = { this . _onScroll } onSwipeViro = { this . _onSwipe } onDragViro = { this . _onDrag } onPinchViro = { this . _onPinch } onRotateViro = { this . _onRotate } onFuseViro = { this . _onFuse } onAnimationStartViro = { this . _onAnimationStart } onAnimationFinishViro = { this . _onAnimationFinish } materials = { materials } transformBehaviors = { transformBehaviors } outerStroke = { outerStroke } canCollide = { this . props . onCollision != undefined } onCollisionViro = { this . _onCollision } timeToFuse = { timeToFuse } /> ) ;
76
+ this . props . onClickState != undefined } canTouch = { this . props . onTouch != undefined } canScroll = { this . props . onScroll != undefined } canSwipe = { this . props . onSwipe != undefined } canDrag = { this . props . onDrag != undefined } canPinch = { this . props . onPinch != undefined } canRotate = { this . props . onRotate != undefined } canFuse = { this . props . onFuse != undefined } onHoverViro = { this . _onHover } onClickViro = { this . _onClickState }
77
+ // Fixes #272. this.props
78
+ // https://github.com/NativeVision/viro/issues/272
79
+ onClick = { undefined } onTouchViro = { this . _onTouch } onScrollViro = { this . _onScroll } onSwipeViro = { this . _onSwipe } onDragViro = { this . _onDrag } onPinchViro = { this . _onPinch } onRotateViro = { this . _onRotate } onFuseViro = { this . _onFuse } onAnimationStartViro = { this . _onAnimationStart } onAnimationFinishViro = { this . _onAnimationFinish } materials = { materials } transformBehaviors = { transformBehaviors } outerStroke = { outerStroke } canCollide = { this . props . onCollision != undefined } onCollisionViro = { this . _onCollision } timeToFuse = { timeToFuse } /> ) ;
77
80
}
78
81
}
79
82
exports . ViroText = ViroText ;
You can’t perform that action at this time.
0 commit comments