<commit_before>'use strict';

angular.module('dmpApp')
  /**
   * Provide configurable options for jsPlumb.
   * @see http://jsplumbtoolkit.com/doc/parameters
   * These will be used whenever a new connection is created, via #connect,
   *   that is, they are not used for #makeSource and #makeTarget calls.
   *
   * to configure:
   * `myApp.config(function(jsPlumbOptionsProvider) {
   *    jsPlumbOptionsProvider.set({
   *      paintStyle: {
   *       strokeStyle: 'red'
   *      }
   *    });
   *  });`
   *
   */
  .provider('jsPlumbOptions', function() {
    var defaultOptions = {
      anchors: [                  // [anchor for source, anchor for target], everything is a [x, y, dx, dy, ox, oy]
        [1, 0.5, 1, 0, -9, -6],   // [right-most border, center), pointing right, pointing horizontally, move 9 pixels to the left, move 6 pixels to the top]
        [0, 0.5, -1, 0, -7, -6]   // [left-most border, center, pointing left, pointing horizontally, move 7 pixels to the left, move 6 pixels to the top]
      ],
      endpoint: 'Blank',          // do not display eny endpoints
      connector: ['Flowchart', {  // this thing makes a nice corner when elements overflow into the next row
        cornerRadius: 5
      }],
      detachable: false,          // do not allow interaction with mouse
      paintStyle: {
        lineWidth: 3,
        strokeStyle: 'black'
      },
      overlays: [
        ['Arrow', {
          location: 1,            // at the source-end
          width: 10,              // widest point of arrowhead
          length: 12,             // longest span of arrowhead
          foldback: 0.75          // tailpoint is at 9 pixels (9 / 12)
        }]
      ]
    } , options = {};

    /**
     * Set options to the default options.
     */
    function setDefault() {
      options = angular.extend({}, defaultOptions);
    }

    /**
     * Extend options with the provided options. The semantics of `extend'
     *   follow angular.extend
     *
     * @param opts {Object}  Extension to the current options
     */
    this.set = function(opts) {
      options = angular.extend(options, opts);
    };

    /**
     * Provide the jsPlumbOptions.  This gets called during injection-time
     *   and will set-up the default options if options wasn't specified earlier.
     * @returns {Object}  The configured options
     */
    this.$get = function() {
      if (!options) {
        setDefault();
      }
      return options;
    };
  })
  /**
   * Provide an injectable instance of jsPlumb. Defaults to jsPlumb.getInstance
   * but can be mocked out (so, injectable...)
   */
  .provider('jsPlumb', function() {
    var instance = null;

    /**<commit_msg>components did not connect correctly<commit_after>'use strict';

angular.module('dmpApp')
  /**
   * Provide configurable options for jsPlumb.
   * @see http://jsplumbtoolkit.com/doc/parameters
   * These will be used whenever a new connection is created, via #connect,
   *   that is, they are not used for #makeSource and #makeTarget calls.
   *
   * to configure:
   * `myApp.config(function(jsPlumbOptionsProvider) {
   *    jsPlumbOptionsProvider.set({
   *      paintStyle: {
   *       strokeStyle: 'red'
   *      }
   *    });
   *  });`
   *
   */
  .provider('jsPlumbOptions', function() {
    var defaultOptions = {
      anchors: [                  // [anchor for source, anchor for target], everything is a [x, y, dx, dy, ox, oy]
        [1, 0.5, 1, 0, -9, -6],   // [right-most border, center), pointing right, pointing horizontally, move 9 pixels to the left, move 6 pixels to the top]
        [0, 0.5, -1, 0, -7, -6]   // [left-most border, center, pointing left, pointing horizontally, move 7 pixels to the left, move 6 pixels to the top]
      ],
      endpoint: 'Blank',          // do not display eny endpoints
      connector: ['Flowchart', {  // this thing makes a nice corner when elements overflow into the next row
        cornerRadius: 5
      }],
      detachable: false,          // do not allow interaction with mouse
      paintStyle: {
        lineWidth: 3,
        strokeStyle: 'black'
      },
      overlays: [
        ['Arrow', {
          location: 1,            // at the source-end
          width: 10,              // widest point of arrowhead
          length: 12,             // longest span of arrowhead
          foldback: 0.75          // tailpoint is at 9 pixels (9 / 12)
        }]
      ]
    } , options;

    /**
     * Set options to the default options.
     */
    function setDefault() {
      options = angular.extend({}, defaultOptions);
    }

    /**
     * Extend options with the provided options. The semantics of `extend'
     *   follow angular.extend
     *
     * @param opts {Object}  Extension to the current options
     */
    this.set = function(opts) {
      options = angular.extend(options || {}, opts);
    };

    /**
     * Provide the jsPlumbOptions.  This gets called during injection-time
     *   and will set-up the default options if options wasn't specified earlier.
     * @returns {Object}  The configured options
     */
    this.$get = function() {
      if (!options) {
        setDefault();
      }
      return options;
    };
  })
  /**
   * Provide an injectable instance of jsPlumb. Defaults to jsPlumb.getInstance
   * but can be mocked out (so, injectable...)
   */
  .provider('jsPlumb', function() {
    var instance = null;

    /**
{'fraction_non_alphanumeric': 0.11644591611479028, 'fraction_numerical': 0.01177336276674025, 'mean_word_length': 1.9988968560397131, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '659181', 'n_tokens_mistral': 1625, 'n_tokens_neox': 1560, 'n_words': 532}