dist/js/materialize.js
function FloatingActionButton(el, options) {
      _classCallCheck(this, FloatingActionButton);

      var _this48 = _possibleConstructorReturn(this, (FloatingActionButton.__proto__ || Object.getPrototypeOf(FloatingActionButton)).call(this, FloatingActionButton, el, options));

      _this48.el.M_FloatingActionButton = _this48;

      /**
       * Options for the fab
       * @member FloatingActionButton#options
       * @prop {Boolean} [direction] - Direction fab menu opens
       * @prop {Boolean} [hoverEnabled=true] - Enable hover vs click
       * @prop {Boolean} [toolbarEnabled=false] - Enable toolbar transition
       */
      _this48.options = $.extend({}, FloatingActionButton.defaults, options);

      _this48.isOpen = false;
      _this48.$anchor = _this48.$el.children('a').first();
      _this48.$menu = _this48.$el.children('ul').first();
      _this48.$floatingBtns = _this48.$el.find('ul .btn-floating');
      _this48.$floatingBtnsReverse = _this48.$el.find('ul .btn-floating').reverse();
      _this48.offsetY = 0;
      _this48.offsetX = 0;

      _this48.$el.addClass("direction-" + _this48.options.direction);
      if (_this48.options.direction === 'top') {
        _this48.offsetY = 40;
      } else if (_this48.options.direction === 'right') {
        _this48.offsetX = -40;
      } else if (_this48.options.direction === 'bottom') {
        _this48.offsetY = -40;
      } else {
        _this48.offsetX = 40;
      }
      _this48._setupEventHandlers();
      return _this48;
    }
function FloatingActionButton(el, options) {
      _classCallCheck(this, FloatingActionButton);

      var _this48 = _possibleConstructorReturn(this, (FloatingActionButton.__proto__ || Object.getPrototypeOf(FloatingActionButton)).call(this, FloatingActionButton, el, options));

      _this48.el.M_FloatingActionButton = _this48;

      /**
       * Options for the fab
       * @member FloatingActionButton#options
       * @prop {Boolean} [direction] - Direction fab menu opens
       * @prop {Boolean} [hoverEnabled=true] - Enable hover vs click
       * @prop {Boolean} [toolbarEnabled=false] - Enable toolbar transition
       */
      _this48.options = $.extend({}, FloatingActionButton.defaults, options);

      _this48.isOpen = false;
      _this48.$anchor = _this48.$el.children('a').first();
      _this48.$menu = _this48.$el.children('ul').first();
      _this48.$floatingBtns = _this48.$el.find('ul .btn-floating');
      _this48.$floatingBtnsReverse = _this48.$el.find('ul .btn-floating').reverse();
      _this48.offsetY = 0;
      _this48.offsetX = 0;

      _this48.$el.addClass("direction-" + _this48.options.direction);
      if (_this48.options.direction === 'top') {
        _this48.offsetY = 40;
      } else if (_this48.options.direction === 'right') {
        _this48.offsetX = -40;
      } else if (_this48.options.direction === 'bottom') {
        _this48.offsetY = -40;
      } else {
        _this48.offsetX = 40;
      }
      _this48._setupEventHandlers();
      return _this48;
    }
function FloatingActionButton ( el , options ) { _classCallCheck ( this , FloatingActionButton ) ; var _this48 = _possibleConstructorReturn ( this , ( FloatingActionButton . __proto__ || Object . getPrototypeOf ( FloatingActionButton ) ) . call ( this , FloatingActionButton , el , options ) ) ; _this48 . el . M_FloatingActionButton = _this48 ; /**
       * Options for the fab
       * @member FloatingActionButton#options
       * @prop {Boolean} [direction] - Direction fab menu opens
       * @prop {Boolean} [hoverEnabled=true] - Enable hover vs click
       * @prop {Boolean} [toolbarEnabled=false] - Enable toolbar transition
       */ _this48 . options = $ . extend ( { } , FloatingActionButton . defaults , options ) ; _this48 . isOpen = false ; _this48 . $anchor = _this48 . $el . children ( 'a' ) . first ( ) ; _this48 . $menu = _this48 . $el . children ( 'ul' ) . first ( ) ; _this48 . $floatingBtns = _this48 . $el . find ( 'ul .btn-floating' ) ; _this48 . $floatingBtnsReverse = _this48 . $el . find ( 'ul .btn-floating' ) . reverse ( ) ; _this48 . offsetY = 0 ; _this48 . offsetX = 0 ; _this48 . $el . addClass ( "direction-" + _this48 . options . direction ) ; if ( _this48 . options . direction === 'top' ) { _this48 . offsetY = 40 ; } else if ( _this48 . options . direction === 'right' ) { _this48 . offsetX = - 40 ; } else if ( _this48 . options . direction === 'bottom' ) { _this48 . offsetY = - 40 ; } else { _this48 . offsetX = 40 ; } _this48 . _setupEventHandlers ( ) ; return _this48 ; }
Construct FloatingActionButton instance
@constructor
@param {Element} el
@param {Object} options
Construct FloatingActionButton instance