From 80158fa808ca6e0e57a3ed43141a27b6296c8961 Mon Sep 17 00:00:00 2001 From: Feruz Date: Mon, 26 Nov 2018 12:07:21 +0200 Subject: [PATCH 1/4] middle btn tweaks --- src/components/postButton/view/postButtonView.js | 6 +++--- src/components/postButton/view/subPostButtonView.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/postButton/view/postButtonView.js b/src/components/postButton/view/postButtonView.js index b68362aa3..ed424c44d 100644 --- a/src/components/postButton/view/postButtonView.js +++ b/src/components/postButton/view/postButtonView.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { - Animated, Easing, TouchableOpacity, View, + Animated, Easing, TouchableOpacity, View, Fade, } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; @@ -13,7 +13,7 @@ import { default as ROUTES } from '../../../constants/routeNames'; // Styles import styles from './postButtonStyles'; -const SIZE = 75; +const SIZE = 60; const durationIn = 300; const durationOut = 200; @@ -30,7 +30,7 @@ class PostButtonView extends Component { if (this.mode._value) { Animated.parallel( [this.mode, this.icon1, this.icon2, this.icon3].map(item => Animated.timing(item, { - toValue: 0, + toValue: 100, duration: durationIn, easing: Easing.cubic, })), diff --git a/src/components/postButton/view/subPostButtonView.js b/src/components/postButton/view/subPostButtonView.js index e6636d39d..d8be6dda0 100644 --- a/src/components/postButton/view/subPostButtonView.js +++ b/src/components/postButton/view/subPostButtonView.js @@ -30,9 +30,9 @@ const SubPostButton = ({ style={[ styles.subButton, { - width: size / 2, - height: size / 2, - borderRadius: size / 4, + width: size / 1.5, + height: size / 1.5, + borderRadius: size / 3, }, ]} > From ea687bc1650cc7f06d36020ea902d8249032ade5 Mon Sep 17 00:00:00 2001 From: Feruz Date: Mon, 26 Nov 2018 13:40:09 +0200 Subject: [PATCH 2/4] fix position --- src/components/postButton/view/postButtonView.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/postButton/view/postButtonView.js b/src/components/postButton/view/postButtonView.js index ed424c44d..069a4a5fb 100644 --- a/src/components/postButton/view/postButtonView.js +++ b/src/components/postButton/view/postButtonView.js @@ -30,7 +30,7 @@ class PostButtonView extends Component { if (this.mode._value) { Animated.parallel( [this.mode, this.icon1, this.icon2, this.icon3].map(item => Animated.timing(item, { - toValue: 100, + toValue: 0, duration: durationIn, easing: Easing.cubic, })), @@ -56,27 +56,27 @@ class PostButtonView extends Component { render() { const firstX = this.icon1.interpolate({ inputRange: [0, 1], - outputRange: [20, -25], + outputRange: [25, -25], }); const firstY = this.icon1.interpolate({ inputRange: [0, 1], - outputRange: [0, -60], + outputRange: [-10, -70], }); const secondX = this.icon2.interpolate({ inputRange: [0, 1], - outputRange: [20, 35], + outputRange: [25, 35], }); const secondY = this.icon2.interpolate({ inputRange: [0, 1], - outputRange: [0, -85], + outputRange: [-10, -95], }); const thirdX = this.icon3.interpolate({ inputRange: [0, 1], - outputRange: [20, 95], + outputRange: [25, 95], }); const thirdY = this.icon3.interpolate({ inputRange: [0, 1], - outputRange: [0, -60], + outputRange: [-10, -70], }); const rotation = this.mode.interpolate({ From ea26e082f96055890e958a5026df77647e3f6edb Mon Sep 17 00:00:00 2001 From: Feruz Date: Mon, 26 Nov 2018 13:41:47 +0200 Subject: [PATCH 3/4] remove fade experiment --- src/components/postButton/view/postButtonView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/postButton/view/postButtonView.js b/src/components/postButton/view/postButtonView.js index 069a4a5fb..f2bc3bb58 100644 --- a/src/components/postButton/view/postButtonView.js +++ b/src/components/postButton/view/postButtonView.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { - Animated, Easing, TouchableOpacity, View, Fade, + Animated, Easing, TouchableOpacity, View, } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; From 1f8804f64a95e629b23d971daf30246cba274579 Mon Sep 17 00:00:00 2001 From: ue Date: Mon, 26 Nov 2018 15:23:57 +0300 Subject: [PATCH 4/4] fixed alligment --- src/components/postButton/view/postButtonView.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/components/postButton/view/postButtonView.js b/src/components/postButton/view/postButtonView.js index f2bc3bb58..65101d292 100644 --- a/src/components/postButton/view/postButtonView.js +++ b/src/components/postButton/view/postButtonView.js @@ -64,7 +64,7 @@ class PostButtonView extends Component { }); const secondX = this.icon2.interpolate({ inputRange: [0, 1], - outputRange: [25, 35], + outputRange: [25, 30], }); const secondY = this.icon2.interpolate({ inputRange: [0, 1], @@ -72,7 +72,7 @@ class PostButtonView extends Component { }); const thirdX = this.icon3.interpolate({ inputRange: [0, 1], - outputRange: [25, 95], + outputRange: [25, 90], }); const thirdY = this.icon3.interpolate({ inputRange: [0, 1], @@ -95,8 +95,7 @@ class PostButtonView extends Component { top: firstY, }} icon="camera" - onPress={() => handleSubButtonPress(ROUTES.SCREENS.EDITOR) - } + onPress={() => handleSubButtonPress(ROUTES.SCREENS.EDITOR)} /> handleSubButtonPress(ROUTES.SCREENS.EDITOR) - } + onPress={() => handleSubButtonPress(ROUTES.SCREENS.EDITOR)} /> handleSubButtonPress(ROUTES.SCREENS.EDITOR) - } + onPress={() => handleSubButtonPress(ROUTES.SCREENS.EDITOR)} />