orcasvn-react-diagrams 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/types/index.d.ts +1 -6
- package/dist/cjs/types/mocks/portIn.d.ts +4 -0
- package/dist/cjs/types/models/implementations/Element.d.ts +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/index.d.ts +1 -6
- package/dist/esm/types/mocks/portIn.d.ts +4 -0
- package/dist/esm/types/models/implementations/Element.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -441,7 +441,7 @@ function generateUniqueId() {
|
|
|
441
441
|
}
|
|
442
442
|
|
|
443
443
|
var Element$1 = /** @class */ (function () {
|
|
444
|
-
function Element(x, y, width, height, cssClass, renderShape, texts, ports, portMovealeAreas, portSlideRailSVGClassName, portDirection) {
|
|
444
|
+
function Element(x, y, width, height, cssClass, renderShape, texts, ports, portMovealeAreas, portSlideRailSVGClassName, portDirection, parentElement) {
|
|
445
445
|
if (portMovealeAreas === void 0) { portMovealeAreas = []; }
|
|
446
446
|
this.resizability = {
|
|
447
447
|
enabled: true,
|
|
@@ -459,6 +459,7 @@ var Element$1 = /** @class */ (function () {
|
|
|
459
459
|
this.portMoveableAreas = portMovealeAreas;
|
|
460
460
|
this.portSlideRailSVGClassName = portSlideRailSVGClassName;
|
|
461
461
|
this.portDirection = portDirection;
|
|
462
|
+
this.parentElement = parentElement;
|
|
462
463
|
}
|
|
463
464
|
Object.defineProperty(Element.prototype, "id", {
|
|
464
465
|
get: function () {
|
|
@@ -7810,6 +7811,7 @@ var Element = function (props) {
|
|
|
7810
7811
|
};
|
|
7811
7812
|
//Normalize port position
|
|
7812
7813
|
var normalizePortPosition = function (tempNewPosition) {
|
|
7814
|
+
console.info('normalizePortPosition', tempNewPosition);
|
|
7813
7815
|
var newPosition;
|
|
7814
7816
|
if (portMoveableAreas && portMoveableAreas.length > 0) { //If moveable areas is defined
|
|
7815
7817
|
newPosition = normalizePortPositionOnMoveableAreas(portMoveableAreas, tempNewPosition);
|
|
@@ -7936,6 +7938,7 @@ var Element = function (props) {
|
|
|
7936
7938
|
};
|
|
7937
7939
|
//Get rotate angle of port by port direction is defined.
|
|
7938
7940
|
var rotatePort = React.useCallback(function (port) {
|
|
7941
|
+
console.info('calculating port rotation', port);
|
|
7939
7942
|
if (!portSlideRailSVGClassName)
|
|
7940
7943
|
return 0;
|
|
7941
7944
|
var slideRailSVG = getSlideRailSVG(portSlideRailSVGClassName);
|
|
@@ -28,7 +28,7 @@ export default class Element implements IElement {
|
|
|
28
28
|
onResized?: ((width: number, height: number) => void) | undefined;
|
|
29
29
|
onMoved?: ((x: number, y: number) => void) | undefined;
|
|
30
30
|
_eventEmitter: EventEmitter;
|
|
31
|
-
constructor(x: number, y: number, width: number, height: number, cssClass?: string, renderShape?: (props: IElementProps) => JSX.Element, texts?: IText[], ports?: IPort[], portMovealeAreas?: IPosition[][], portSlideRailSVGClassName?: string, portDirection?: SubObjectDirection);
|
|
31
|
+
constructor(x: number, y: number, width: number, height: number, cssClass?: string, renderShape?: (props: IElementProps) => JSX.Element, texts?: IText[], ports?: IPort[], portMovealeAreas?: IPosition[][], portSlideRailSVGClassName?: string, portDirection?: SubObjectDirection, parentElement?: Element);
|
|
32
32
|
get id(): string;
|
|
33
33
|
get size(): ISize;
|
|
34
34
|
set size(value: ISize);
|
package/dist/esm/index.js
CHANGED
|
@@ -437,7 +437,7 @@ function generateUniqueId() {
|
|
|
437
437
|
}
|
|
438
438
|
|
|
439
439
|
var Element$1 = /** @class */ (function () {
|
|
440
|
-
function Element(x, y, width, height, cssClass, renderShape, texts, ports, portMovealeAreas, portSlideRailSVGClassName, portDirection) {
|
|
440
|
+
function Element(x, y, width, height, cssClass, renderShape, texts, ports, portMovealeAreas, portSlideRailSVGClassName, portDirection, parentElement) {
|
|
441
441
|
if (portMovealeAreas === void 0) { portMovealeAreas = []; }
|
|
442
442
|
this.resizability = {
|
|
443
443
|
enabled: true,
|
|
@@ -455,6 +455,7 @@ var Element$1 = /** @class */ (function () {
|
|
|
455
455
|
this.portMoveableAreas = portMovealeAreas;
|
|
456
456
|
this.portSlideRailSVGClassName = portSlideRailSVGClassName;
|
|
457
457
|
this.portDirection = portDirection;
|
|
458
|
+
this.parentElement = parentElement;
|
|
458
459
|
}
|
|
459
460
|
Object.defineProperty(Element.prototype, "id", {
|
|
460
461
|
get: function () {
|
|
@@ -7806,6 +7807,7 @@ var Element = function (props) {
|
|
|
7806
7807
|
};
|
|
7807
7808
|
//Normalize port position
|
|
7808
7809
|
var normalizePortPosition = function (tempNewPosition) {
|
|
7810
|
+
console.info('normalizePortPosition', tempNewPosition);
|
|
7809
7811
|
var newPosition;
|
|
7810
7812
|
if (portMoveableAreas && portMoveableAreas.length > 0) { //If moveable areas is defined
|
|
7811
7813
|
newPosition = normalizePortPositionOnMoveableAreas(portMoveableAreas, tempNewPosition);
|
|
@@ -7932,6 +7934,7 @@ var Element = function (props) {
|
|
|
7932
7934
|
};
|
|
7933
7935
|
//Get rotate angle of port by port direction is defined.
|
|
7934
7936
|
var rotatePort = useCallback(function (port) {
|
|
7937
|
+
console.info('calculating port rotation', port);
|
|
7935
7938
|
if (!portSlideRailSVGClassName)
|
|
7936
7939
|
return 0;
|
|
7937
7940
|
var slideRailSVG = getSlideRailSVG(portSlideRailSVGClassName);
|