File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Expand file tree Collapse file tree 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> {
5757 event . nativeEvent . position ,
5858 event . nativeEvent . source
5959 ) ;
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 ) {
6263 this . _onClick ( event ) ;
6364 }
6465 } ;
Original file line number Diff line number Diff line change @@ -97,6 +97,11 @@ export class ViroText extends ViroBase<Props> {
9797 canFuse = { this . props . onFuse != undefined }
9898 onHoverViro = { this . _onHover }
9999 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 }
100105 onTouchViro = { this . _onTouch }
101106 onScrollViro = { this . _onScroll }
102107 onSwipeViro = { this . _onSwipe }
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ class ViroBase extends React.Component {
4040 _onClickState = ( event ) => {
4141 this . props . onClickState &&
4242 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 ) {
4545 this . _onClick ( event ) ;
4646 }
4747 } ;
Original file line number Diff line number Diff line change @@ -73,7 +73,10 @@ class ViroText extends ViroBase_1.ViroBase {
7373 return ( < VRTText { ...this . props } ref = { ( component ) => {
7474 this . _component = component ;
7575 } } 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 } /> ) ;
7780 }
7881}
7982exports . ViroText = ViroText ;
You can’t perform that action at this time.
0 commit comments