'use strict';
define(function() {
  var legendSketch = function() {
    return {
      restrict: 'AE',
      templateUrl: 'js/XG/modules/print/views/directives/legendSketch.html',
      controllerAs: 'ModelGUICtrl',
      scope: true,
      link: function(scope, elt, attrs, ctrl) {
        var theScope = scope;
        while (theScope.$parent != undefined && theScope.legStyles == undefined)
          theScope = theScope.$parent;
        if (theScope.legStyles != undefined)
          scope.legStyles = theScope.legStyles;
      },
    };
  };

  legendSketch.$inject = [];
  return legendSketch;
});
