{"size": 1467, "ext": "js", "max_stars_repo_path": "examples/colorpicker.js", "max_stars_repo_name": "ger-benjamin/ngeo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "examples/colorpicker.js", "max_issues_repo_name": "ger-benjamin/ngeo", "max_issues_repo_issues_event_min_datetime": "2018-05-08T07:06:33.000Z", "max_issues_repo_issues_event_max_datetime": "2018-05-08T07:56:49.000Z", "max_forks_repo_path": "examples/colorpicker.js", "max_forks_repo_name": "ger-benjamin/ngeo", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 19.56, "max_line_length": 99, "alphanum_fraction": 0.651670075}
goog.provide('app.colorpicker');

/** @suppress {extraRequire} */
goog.require('ngeo.mapDirective');
/** @suppress {extraRequire} */
goog.require('ngeo.colorpickerDirective');


/** @type {!angular.Module} **/
app.module = angular.module('app', ['ngeo']);


/**
 * The application-specific color picker directive, based on the
 * ngeo-colorpicker directive.
 *
 * @return {angular.Directive} Directive Definition Object.
 * @ngInject
 */
app.colorpickerDirective = function() {
  return {
    restrict: 'E',
    scope: true,
    template: '<div ngeo-colorpicker="ctrl.colors" ngeo-colorpicker-color="mainCtrl.color"></div>',
    bindToController: true,
    controller: 'AppColorpickerController as ctrl'
  };
};


app.module.directive('appColorpicker', app.colorpickerDirective);


/**
 * @constructor
 * @ngInject
 */
app.ColorPickerController = function() {


  /**
   * The colors set.
   * @type {Array.<string>}
   * @const
   * @export
   */
  this.colors = [
    ['red', 'yellow', 'green', 'lightgreen', 'lightblue', 'orange', 'purple'],
    ['#ffffff', '#f7f7f7', '#c3c3c3', '#000000']];

};

app.module.controller('AppColorpickerController',
    app.ColorPickerController);


/**
 * @constructor
 * @param {angular.Scope} $scope Controller scope.
 * @ngInject
 */
app.MainController = function($scope) {

  /**
   * Active color.
   * @type {string}
   * @export
   */
  this.color = 'red';

};


app.module.controller('MainController', app.MainController);
