Sha256: c73c07b5d0a4310e9de05de8b66a0dd1d6c9c99e6892cf9d74d4d5ae8d220356

Contents?: true

Size: 1.42 KB

Versions: 6

Compression:

Stored size: 1.42 KB

Contents

/*!
 * Angular Material Design
 * https://github.com/angular/material
 * @license MIT
 * v0.10.0
 */
(function( window, angular, undefined ){
"use strict";

(function() {
  'use strict';

  angular
    .module('material.components.fabTrigger', [ 'material.core' ])
    .directive('mdFabTrigger', MdFabTriggerDirective);

  /**
   * @ngdoc directive
   * @name mdFabTrigger
   * @module material.components.fabSpeedDial
   *
   * @restrict E
   *
   * @description
   * The `<md-fab-trigger>` directive is used inside of a `<md-fab-speed-dial>` or
   * `<md-fab-toolbar>` directive to mark the an element (or elements) as the trigger and setup the
   * proper event listeners.
   *
   * @usage
   * See the `<md-fab-speed-dial>` or `<md-fab-toolbar>` directives for example usage.
   */
  function MdFabTriggerDirective() {
    return {
      restrict: 'E',

      require: ['^?mdFabSpeedDial', '^?mdFabToolbar'],

      link: function(scope, element, attributes, controllers) {
        // Grab whichever parent controller is used
        var controller = controllers[0] || controllers[1];

        // Make the children open/close their parent directive
        if (controller) {
          angular.forEach(element.children(), function(child) {
            angular.element(child).on('focus', controller.open);
            angular.element(child).on('blur', controller.close);
          });
        }
      }
    }
  }
})();


})(window, window.angular);

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
todo_rails-0.1.7 vendor/assets/bower_components/angular-material/modules/js/fabTrigger/fabTrigger.js
todo_rails-0.1.6 vendor/assets/bower_components/angular-material/modules/js/fabTrigger/fabTrigger.js
todo_rails-0.1.5 vendor/assets/bower_components/angular-material/modules/js/fabTrigger/fabTrigger.js
todo_rails-0.1.4 vendor/assets/bower_components/angular-material/modules/js/fabTrigger/fabTrigger.js
todo_rails-0.1.3 vendor/assets/bower_components/angular-material/modules/js/fabTrigger/fabTrigger.js
todo_rails-0.1.2 vendor/assets/bower_components/angular-material/modules/js/fabTrigger/fabTrigger.js