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 +18 -22
- package/dist/cjs/types/mocks/port2.d.ts +5 -0
- package/dist/esm/index.js +18 -22
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/mocks/port2.d.ts +5 -0
- package/package.json +1 -1
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
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
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
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
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;
|
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
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
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
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
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;
|