diff options
author | 2017-05-04 07:48:42 -0400 | |
---|---|---|
committer | 2017-05-04 12:28:17 -0400 | |
commit | b54df0ddd0c6a0372327c5aa3668e5a6458fcd64 (patch) | |
tree | e69cfa9b314a801bd187cf0145d1d4306436229c /ecomp-portal-FE/client/bower_components/angular-material/modules/js/content/content.js | |
parent | 39d1e62c84041831bfc52cca73b5ed5efaf57d27 (diff) |
[PORTAL-7] Rebase
This rebasing includes common libraries and common overlays projects
abstraction of components
Change-Id: I9a24a338665c7cd058978e8636bc412d9e2fdce8
Signed-off-by: st782s <statta@research.att.com>
Diffstat (limited to 'ecomp-portal-FE/client/bower_components/angular-material/modules/js/content/content.js')
-rw-r--r-- | ecomp-portal-FE/client/bower_components/angular-material/modules/js/content/content.js | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/ecomp-portal-FE/client/bower_components/angular-material/modules/js/content/content.js b/ecomp-portal-FE/client/bower_components/angular-material/modules/js/content/content.js deleted file mode 100644 index 5e191e29..00000000 --- a/ecomp-portal-FE/client/bower_components/angular-material/modules/js/content/content.js +++ /dev/null @@ -1,85 +0,0 @@ -/*! - * Angular Material Design - * https://github.com/angular/material - * @license MIT - * v0.9.8 - */ -(function( window, angular, undefined ){ -"use strict"; - -/** - * @ngdoc module - * @name material.components.content - * - * @description - * Scrollable content - */ -angular.module('material.components.content', [ - 'material.core' -]) - .directive('mdContent', mdContentDirective); - -/** - * @ngdoc directive - * @name mdContent - * @module material.components.content - * - * @restrict E - * - * @description - * The `<md-content>` directive is a container element useful for scrollable content - * - * @usage - * - * - Add the `[layout-padding]` attribute to make the content padded. - * - * <hljs lang="html"> - * <md-content layout-padding> - * Lorem ipsum dolor sit amet, ne quod novum mei. - * </md-content> - * </hljs> - * - */ - -function mdContentDirective($mdTheming) { - return { - restrict: 'E', - controller: ['$scope', '$element', ContentController], - link: function(scope, element, attr) { - var node = element[0]; - - $mdTheming(element); - scope.$broadcast('$mdContentLoaded', element); - - iosScrollFix(element[0]); - } - }; - - function ContentController($scope, $element) { - this.$scope = $scope; - this.$element = $element; - } -} -mdContentDirective.$inject = ["$mdTheming"]; - -function iosScrollFix(node) { - // IOS FIX: - // If we scroll where there is no more room for the webview to scroll, - // by default the webview itself will scroll up and down, this looks really - // bad. So if we are scrolling to the very top or bottom, add/subtract one - angular.element(node).on('$md.pressdown', function(ev) { - // Only touch events - if (ev.pointer.type !== 't') return; - // Don't let a child content's touchstart ruin it for us. - if (ev.$materialScrollFixed) return; - ev.$materialScrollFixed = true; - - if (node.scrollTop === 0) { - node.scrollTop = 1; - } else if (node.scrollHeight === node.scrollTop + node.offsetHeight) { - node.scrollTop -= 1; - } - }); -} - -})(window, window.angular);
\ No newline at end of file |