Android: rename selection props

This commit is contained in:
Amit Davidi 2017-03-01 12:29:17 +02:00
parent e8351dc807
commit ea139bfeff
2 changed files with 4 additions and 4 deletions

View File

@ -32,8 +32,8 @@ public class GalleryViewManager extends SimpleViewManager<GalleryView> {
private final String CUSTOM_BUTTON_BCK_COLOR_KEY = "backgroundColor"; private final String CUSTOM_BUTTON_BCK_COLOR_KEY = "backgroundColor";
private final String SELECTION_SELECTED_IMAGE_KEY = "selectedImage"; private final String SELECTION_SELECTED_IMAGE_KEY = "selectedImage";
private final String SELECTION_UNSELECTED_IMAGE_KEY = "unselectedImage"; private final String SELECTION_UNSELECTED_IMAGE_KEY = "unselectedImage";
private final String SELECTION_POSITION_KEY = "position"; private final String SELECTION_POSITION_KEY = "imagePosition";
private final String SELECTION_SIZE_KEY = "size"; private final String SELECTION_SIZE_KEY = "imageSizeAndroid";
private final String SELECTION_ENABLED_KEY = "enable"; private final String SELECTION_ENABLED_KEY = "enable";
/** /**

View File

@ -45,10 +45,10 @@ export default class CameraKitGalleryView extends Component {
_.update(transformedProps, 'selection.selectedImage', (image) => resolveAssetSource(image).uri); _.update(transformedProps, 'selection.selectedImage', (image) => resolveAssetSource(image).uri);
} }
const selectionPosition = _.get(transformedProps, 'selection.position'); const selectionPosition = _.get(transformedProps, 'selection.imagePosition');
if (selectionPosition) { if (selectionPosition) {
const positionCode = this.transformSelectedImagePosition(selectionPosition); const positionCode = this.transformSelectedImagePosition(selectionPosition);
_.update(transformedProps, 'selection.position', (position) => positionCode); _.update(transformedProps, 'selection.imagePosition', (position) => positionCode);
} }
return <GalleryView {...transformedProps} onTapImage={this.onTapImage}/> return <GalleryView {...transformedProps} onTapImage={this.onTapImage}/>