all files / diagram/objects/ port.js

98.53% Statements 67/68
94.87% Branches 37/39
93.75% Functions 15/16
98.39% Lines 61/62
18 statements, 7 functions, 29 branches Ignored     
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119              13914× 13914× 13914× 13914×                                                                     13892×   10×         22×                        
/* istanbul ignore next */ 
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/* istanbul ignore next */ 
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
define(["require", "exports", "@syncfusion/ej2-base", "../core/appearance", "../primitives/point", "../enum/enum", "./tooltip"], function (require, exports, ej2_base_1, appearance_1, point_1, enum_1, tooltip_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var Port = (function (_super) {
        __extends(Port, _super);
        function Port(parent, propName, defaultValue, isArray) {
            var _this = _super.call(this, parent, propName, defaultValue, isArray) || this;
            _this.inEdges = [];
            _this.outEdges = [];
            return _this;
        }
        __decorate([
            ej2_base_1.Property('')
        ], Port.prototype, "id", void 0);
        __decorate([
            ej2_base_1.Property('Center')
        ], Port.prototype, "horizontalAlignment", void 0);
        __decorate([
            ej2_base_1.Property('Center')
        ], Port.prototype, "verticalAlignment", void 0);
        __decorate([
            ej2_base_1.Complex({}, appearance_1.Margin)
        ], Port.prototype, "margin", void 0);
        __decorate([
            ej2_base_1.Property(12)
        ], Port.prototype, "width", void 0);
        __decorate([
            ej2_base_1.Property(12)
        ], Port.prototype, "height", void 0);
        __decorate([
            ej2_base_1.Complex({}, appearance_1.ShapeStyle)
        ], Port.prototype, "style", void 0);
        __decorate([
            ej2_base_1.Property('Square')
        ], Port.prototype, "shape", void 0);
        __decorate([
            ej2_base_1.Property('Auto')
        ], Port.prototype, "connectionDirection", void 0);
        __decorate([
            ej2_base_1.Property(enum_1.PortVisibility.Connect)
        ], Port.prototype, "visibility", void 0);
        __decorate([
            ej2_base_1.Property('')
        ], Port.prototype, "pathData", void 0);
        __decorate([
            ej2_base_1.Property(enum_1.PortConstraints.Default)
        ], Port.prototype, "constraints", void 0);
        __decorate([
            ej2_base_1.Property()
        ], Port.prototype, "addInfo", void 0);
        __decorate([
            ej2_base_1.Property()
        ], Port.prototype, "outEdges", void 0);
        __decorate([
            ej2_base_1.Property()
        ], Port.prototype, "inEdges", void 0);
        __decorate([
            ej2_base_1.Complex({}, tooltip_1.DiagramTooltip)
        ], Port.prototype, "tooltip", void 0);
        return Port;
    }(ej2_base_1.ChildProperty));
    exports.Port = Port;
    var PointPort = (function (_super) {
        __extends(PointPort, _super);
        function PointPort(parent, propName, defaultValue, isArray) {
            return _super.call(this, parent, propName, defaultValue, isArray) || this;
        }
        PointPort.prototype.getClassName = function () {
            return 'PointPort';
        };
        __decorate([
            ej2_base_1.Complex({ x: 0.5, y: 0.5 }, point_1.Point)
        ], PointPort.prototype, "offset", void 0);
        return PointPort;
    }(Port));
    exports.PointPort = PointPort;
    var PathPort = (function (_super) {
        __extends(PathPort, _super);
        function PathPort(parent, propName, defaultValue, isArray) {
            return _super.call(this, parent, propName, defaultValue, isArray) || this;
        }
        PathPort.prototype.getClassName = function () {
            return 'PathPort';
        };
        __decorate([
            ej2_base_1.Property(0.5)
        ], PathPort.prototype, "offset", void 0);
        __decorate([
            ej2_base_1.Complex({ x: 0, y: 0 }, point_1.Point)
        ], PathPort.prototype, "displacement", void 0);
        __decorate([
            ej2_base_1.Property('Center')
        ], PathPort.prototype, "alignment", void 0);
        return PathPort;
    }(Port));
    exports.PathPort = PathPort;
});