This file contains hidden or 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
// @flow | |
type ComponentListType = $Subtype<$Keys<$npm$styledComponents$StyledComponentsComponentList>> | |
type $npm$styledComponents$Interpolation = ((executionContext: Object) => string) | string | number; | |
type $npm$styledComponents$NameGenerator = (hash: number) => string; | |
type $npm$styledComponents$TaggedTemplateLiteral<R> = {| (Array<string>, $npm$styledComponents$Interpolation): R |}; | |
type $npm$styledComponents$ReactComponentFunctional<Props: {}> = React$StatelessFunctionalComponent<Props> |
This file contains hidden or 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
angular.module('Demo', []).service( | |
'scrollAndResizeListener', function($window, $document, $timeout) { | |
var id = 0, | |
listeners = {}, | |
scrollTimeoutId, | |
resizeTimeoutId; | |
function invokeListeners() { | |
var clientHeight = $document[0].documentElement.clientHeight, | |
clientWidth = $document[0].documentElement.clientWidth; |
This file contains hidden or 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
angular.module('Demo', []).directive( | |
'imageLazySrc', function($document, $window) { | |
return { | |
restrict: 'A', | |
link: function($scope, $element, $attributes) { | |
function isInView() { | |
// get current viewport position and dimensions, and image position | |
var clientHeight = $document[0].documentElement.clientHeight, | |
clientWidth = $document[0].documentElement.clientWidth, |