<commit_before>/*globals define,_*/
/*
 * @author rkereskenyi / https://github/rkereskenyi
 * @author brollb / https://github/brollb
 *
 */

define(['js/Widgets/DiagramDesigner/DiagramDesignerWidget.Constants'], 
        function (DiagramDesignerWidgetConstants) {

    "use strict";

    var SVGDecoratorConnections,
        CONNECTION_AREA_CLASS = 'connection-area',
        DATA_LEN = 'len',
        DATA_ANGLE = 'angle',
        DATA_ANGLE1 = 'angle1',
        DATA_ANGLE2 = 'angle2',
        CONNECTOR_BASE = $('<div class="' + DiagramDesignerWidgetConstants.CONNECTOR_CLASS + '"/>'),
        CONN_AREA_DEFAULTS = {};

    SVGDecoratorConnections = function(){
    };

    SVGDecoratorConnections.prototype.setConnectionAreaDefaults = function (attr) {
        CONN_AREA_DEFAULTS = attr;
    };

    SVGDecoratorConnections.prototype._getCustomConnectionAreas = function (svgFile) {
        var connAreas = this.svgCache[svgFile].customConnectionAreas,
            len = connAreas ? connAreas.length : 0,
            connA;

        delete this._customConnectionAreas;

        if (len > 0) {
            this._customConnectionAreas = [];

            while (len--) {
                connA = {};

                _.extend(connA, connAreas[len]);
<commit_msg>Fixes #289 SVGDecorator blocked the UI if port svg was set.<commit_after>/*globals define,_*/
/*
 * @author rkereskenyi / https://github/rkereskenyi
 * @author brollb / https://github/brollb
 *
 */

define(['js/Widgets/DiagramDesigner/DiagramDesignerWidget.Constants'], 
        function (DiagramDesignerWidgetConstants) {

    "use strict";

    var SVGDecoratorConnections,
        CONNECTION_AREA_CLASS = 'connection-area',
        DATA_LEN = 'len',
        DATA_ANGLE = 'angle',
        DATA_ANGLE1 = 'angle1',
        DATA_ANGLE2 = 'angle2',
        CONNECTOR_BASE = $('<div class="' + DiagramDesignerWidgetConstants.CONNECTOR_CLASS + '"/>'),
        CONN_AREA_DEFAULTS = {};

    SVGDecoratorConnections = function(){
    };

    SVGDecoratorConnections.prototype.setConnectionAreaDefaults = function (attr) {
        CONN_AREA_DEFAULTS = attr;
    };

    SVGDecoratorConnections.prototype._getCustomConnectionAreas = function (svgFile) {
        var connAreas = this.svgCache[svgFile] ? this.svgCache[svgFile].customConnectionAreas : null,
            len = connAreas ? connAreas.length : 0,
            connA;

        delete this._customConnectionAreas;

        if (len > 0) {
            this._customConnectionAreas = [];

            while (len--) {
                connA = {};

                _.extend(connA, connAreas[len]);

{'fraction_non_alphanumeric': 0.11635944700460829, 'fraction_numerical': 0.00576036866359447, 'mean_word_length': 2.6638537271448666, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '6346509', 'n_tokens_mistral': 827, 'n_tokens_neox': 790, 'n_words': 130}