2018-01-24から1日間の記事一覧
ルーティングの追加 resources :diaries do resources :comments, only: [:create] end コントローラー側 @diaryComment = DiaryComment.new(diary_comment_params) @diaryComment.user_id = User.first.id respond_to do |format| if @diaryComment.save fo…
https://codepen.io/developingidea/pen/meAIncodepen.io こちらのコードを参考に学んでみた。 $(".buddy").on("swiperight",function(){ $(this).addClass('rotate-left').delay(700).fadeOut(1); $('.buddy').find('.status').remove(); $(this).append('<div class="status like">L</div>…
hammerjs.github.io var element = document.getElementById('swipeTarget'); var hammertime = new Hammer(element); hammertime.get('swipe').set({ direction: Hammer.DIRECTION_ALL, threshold: 1, velocity:0.1 }); hammertime.on('swipeleft',function…
const TabBarIcon = (props) => { return ( <Icon name={props.name} type="ionicon" color={props.focused ? hoge_color : fuga_color} /> ); }; フォントではなく画像を使いたい場合はImageを返す <Scene key="home" initial component={HomeScreen} tabBarLabel='ホーム', icon={({ focused }) => </scene></icon>
npm i --save react-vr-gaze-button import GazeButton from 'react-vr-gaze-button'; render() { const image = this.renderImage(); return ( <GazeButton onClick={() => this.props.onGaze()} duration={1500}> {time => ( image )} </GazeButton> ) } これで1.5秒注視したら何かする処理が作れる