"use strict";

angular.module('arethusa.morph').directive('mirrorMorphForm', [
  'morph',
  '$location',
  '$anchorScroll',
  function(morph, $location, $anchorScroll) {
    return {
      restrict: 'A',
      scope: {
        form: '=mirrorMorphForm',
        tokenId: '='
      },
      link: function(scope, element, attrs) {
        var morphToken = morph.analyses[scope.tokenId];
        var menuId = 'mfc' + scope.tokenId;

        function newCustomForm() {
          var form = angular.copy(scope.form);

          // We might want to clean up even more here - such as the
          // lexical inventory information. Revisit later.
          delete form.origin;

          return form;
        }

        element.bind('click', function() {
          scope.$apply(morphToken.customForm = newCustomForm());
          $location.hash(menuId);
          angular.element(document.getElementById(menuId)).removeClass('hide');
          $anchorScroll();
        });
      }
    };
  }
]);

@@ -919,16 +919,154 @@
 'hide');
+%0A%0A          // Sadly doesn't have any smooth scroll capabilities - we might have to%0A          // change this implementation at some point.
 %0A       

Add comment about possible smoothScrolling in mMF