onKeyboardWillHide(e) {
Animated.timing(this.state.height, {
toValue: this.listViewMaxHeight,
duration: e.duration,
easing: Easing.bezier(0.1, 0.76, 0.55, 0.9)
}).start();
},
onKeyboardWillShow(e) {
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const compose = (f, g) => x => f(g(x)) | |
const Id = x => | |
({ | |
fold: f => f(x), | |
map: f => Id(f(x)) | |
}) | |
Id.of = Id | |
const Tuple = (_1, _2) => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SVGPath.swift | |
// SVGPath | |
// | |
// Created by Tim Wood on 1/21/15. | |
// Updated by Vitaly Domnikov 10/6/2015 | |
// Updated by Jason Rodriguez 08/29/2017 | |
// Copyright (c) 2015 Tim Wood, Vitaly Domnikov, Jason Rodriguez. All rights reserved. | |
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/*:: | |
type Client = Object; | |
type Channel = string; | |
*/ | |
const channels/*: Map<Channel, Set<Client>> */ = new Map; | |
const clients/*: Map<Client, Set<Channel>> */ = new WeakMap; | |
const join = (name, client) => { | |
if (!channels.has(name)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this._panResponder = PanResponder.create({ | |
// ----------- NEGOTIATION: | |
// A view can become the touch responder by implementing the correct negotiation methods. | |
// Should child views be prevented from becoming responder on first touch? | |
onStartShouldSetPanResponderCapture: (evt, gestureState) => () => { | |
console.info('onStartShouldSetPanResponderCapture'); | |
return true; | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AGSSingleFingerZoomGestureRecognizer.swift | |
// | |
// Created by Nicholas Furness on 6/17/16. | |
// Copyright © 2016 Esri. All rights reserved. | |
// | |
import Foundation | |
import ArcGIS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {Left, Right} = require('data.either') | |
const Tuple = require('fantasy-tuples').Tuple2 | |
//List :: Either Null (Tuple a List) | |
const empty = () => | |
Left(null) | |
const cons = (x, l) => | |
Right(Tuple(x, l)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const DOUBLE_PRESS_DELAY = 300; | |
// ... | |
/** | |
* Double Press recognition | |
* @param {Event} e | |
*/ | |
handleImagePress(e) { | |
const now = new Date().getTime(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function protectFromUnmount() { | |
let callbacks = {}; | |
let count = 0; | |
const noop = value => value; | |
const wrapCallback = id => function(...params) { | |
const raceSafeCallbacks = callbacks; | |
if (!raceSafeCallbacks) |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent