orcasvn-react-diagrams 0.1.50 → 0.1.51

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 CHANGED
@@ -1094,17 +1094,15 @@ var Crescent = React.forwardRef(function (props, ref) {
1094
1094
  var Rectangle = React.forwardRef(function (props, ref) {
1095
1095
  var scaledWidth = props.width;
1096
1096
  var scaledHeight = props.height;
1097
- if (props.width > 100 || props.height > 100) {
1098
- var widthRatio = props.width / 100;
1099
- var heightRatio = props.height / 100;
1100
- if (widthRatio > heightRatio) {
1101
- scaledWidth = 100;
1102
- scaledHeight = scaledHeight / widthRatio;
1103
- }
1104
- else {
1105
- scaledHeight = 100;
1106
- scaledWidth = scaledWidth / heightRatio;
1107
- }
1097
+ var widthRatio = props.width / 100;
1098
+ var heightRatio = props.height / 100;
1099
+ if (widthRatio > heightRatio) {
1100
+ scaledWidth = 100;
1101
+ scaledHeight = scaledHeight / widthRatio;
1102
+ }
1103
+ else {
1104
+ scaledHeight = 100;
1105
+ scaledWidth = scaledWidth / heightRatio;
1108
1106
  }
1109
1107
  var sw = props.stroke ? (props.strokeWidth || 1) : 0;
1110
1108
  return (React.createElement(ShapeWrapper, __assign({}, props, { ref: ref, height: props.height, width: props.width }),
@@ -1115,17 +1113,15 @@ var Rectangle = React.forwardRef(function (props, ref) {
1115
1113
  var RectangularFrame = React.forwardRef(function (props, ref) {
1116
1114
  var scaledWidth = props.width;
1117
1115
  var scaledHeight = props.height;
1118
- if (props.width > 100 || props.height > 100) {
1119
- var widthRatio = props.width / 100;
1120
- var heightRatio = props.height / 100;
1121
- if (widthRatio > heightRatio) {
1122
- scaledWidth = 100;
1123
- scaledHeight = scaledHeight / widthRatio;
1124
- }
1125
- else {
1126
- scaledHeight = 100;
1127
- scaledWidth = scaledWidth / heightRatio;
1128
- }
1116
+ var widthRatio = props.width / 100;
1117
+ var heightRatio = props.height / 100;
1118
+ if (widthRatio > heightRatio) {
1119
+ scaledWidth = 100;
1120
+ scaledHeight = scaledHeight / widthRatio;
1121
+ }
1122
+ else {
1123
+ scaledHeight = 100;
1124
+ scaledWidth = scaledWidth / heightRatio;
1129
1125
  }
1130
1126
  var vbX = 0; //(100 - scaledWidth) / 2;
1131
1127
  var vbY = 0; //(100 - scaledHeight) / 2;
@@ -0,0 +1,5 @@
1
+ import IText from "../models/IText";
2
+ import { Port } from '../models';
3
+ export declare class CustomPort2 extends Port {
4
+ constructor(x: number, y: number, label?: IText, width?: number, height?: number);
5
+ }
package/dist/esm/index.js CHANGED
@@ -1090,17 +1090,15 @@ var Crescent = forwardRef(function (props, ref) {
1090
1090
  var Rectangle = forwardRef(function (props, ref) {
1091
1091
  var scaledWidth = props.width;
1092
1092
  var scaledHeight = props.height;
1093
- if (props.width > 100 || props.height > 100) {
1094
- var widthRatio = props.width / 100;
1095
- var heightRatio = props.height / 100;
1096
- if (widthRatio > heightRatio) {
1097
- scaledWidth = 100;
1098
- scaledHeight = scaledHeight / widthRatio;
1099
- }
1100
- else {
1101
- scaledHeight = 100;
1102
- scaledWidth = scaledWidth / heightRatio;
1103
- }
1093
+ var widthRatio = props.width / 100;
1094
+ var heightRatio = props.height / 100;
1095
+ if (widthRatio > heightRatio) {
1096
+ scaledWidth = 100;
1097
+ scaledHeight = scaledHeight / widthRatio;
1098
+ }
1099
+ else {
1100
+ scaledHeight = 100;
1101
+ scaledWidth = scaledWidth / heightRatio;
1104
1102
  }
1105
1103
  var sw = props.stroke ? (props.strokeWidth || 1) : 0;
1106
1104
  return (React.createElement(ShapeWrapper, __assign({}, props, { ref: ref, height: props.height, width: props.width }),
@@ -1111,17 +1109,15 @@ var Rectangle = forwardRef(function (props, ref) {
1111
1109
  var RectangularFrame = forwardRef(function (props, ref) {
1112
1110
  var scaledWidth = props.width;
1113
1111
  var scaledHeight = props.height;
1114
- if (props.width > 100 || props.height > 100) {
1115
- var widthRatio = props.width / 100;
1116
- var heightRatio = props.height / 100;
1117
- if (widthRatio > heightRatio) {
1118
- scaledWidth = 100;
1119
- scaledHeight = scaledHeight / widthRatio;
1120
- }
1121
- else {
1122
- scaledHeight = 100;
1123
- scaledWidth = scaledWidth / heightRatio;
1124
- }
1112
+ var widthRatio = props.width / 100;
1113
+ var heightRatio = props.height / 100;
1114
+ if (widthRatio > heightRatio) {
1115
+ scaledWidth = 100;
1116
+ scaledHeight = scaledHeight / widthRatio;
1117
+ }
1118
+ else {
1119
+ scaledHeight = 100;
1120
+ scaledWidth = scaledWidth / heightRatio;
1125
1121
  }
1126
1122
  var vbX = 0; //(100 - scaledWidth) / 2;
1127
1123
  var vbY = 0; //(100 - scaledHeight) / 2;