redhotmagma-graphics-editor 1.35.2 → 1.36.0-beta.0
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.
|
@@ -303,6 +303,16 @@ var InlineToolBox = /*#__PURE__*/function (_React$Component) {
|
|
|
303
303
|
}, renderAngleLabel ? renderAngleLabel(degAngle) : /*#__PURE__*/_react["default"].createElement("span", null, degAngle));
|
|
304
304
|
});
|
|
305
305
|
|
|
306
|
+
_defineProperty(_assertThisInitialized(_this), "ContainerComponent", function (props) {
|
|
307
|
+
var ContainerComponent = _this.props.ContainerComponent;
|
|
308
|
+
|
|
309
|
+
if (ContainerComponent === _react["default"].Fragment) {
|
|
310
|
+
return /*#__PURE__*/_react["default"].createElement(ContainerComponent, null, props.children);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
return /*#__PURE__*/_react["default"].createElement(ContainerComponent, props);
|
|
314
|
+
});
|
|
315
|
+
|
|
306
316
|
return _this;
|
|
307
317
|
}
|
|
308
318
|
|
|
@@ -416,9 +426,9 @@ var InlineToolBox = /*#__PURE__*/function (_React$Component) {
|
|
|
416
426
|
canvas = _this$props2.canvas,
|
|
417
427
|
selectedObject = _this$props2.selectedObject,
|
|
418
428
|
renderAngleLabel = _this$props2.renderAngleLabel,
|
|
419
|
-
ContainerComponent = _this$props2.ContainerComponent,
|
|
420
429
|
canvasPosition = _this$props2.canvasPosition;
|
|
421
|
-
var
|
|
430
|
+
var ContainerComponent = this.ContainerComponent,
|
|
431
|
+
AngleLabel = this.AngleLabel;
|
|
422
432
|
var renderToolboxButton = this.renderToolboxButton,
|
|
423
433
|
topRightContainerRef = this.topRightContainerRef,
|
|
424
434
|
bottomRightContainerRef = this.bottomRightContainerRef,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redhotmagma-graphics-editor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0-beta.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./index.js",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"paper": "^0.12.15",
|
|
14
14
|
"path-browserify": "^1.0.1",
|
|
15
15
|
"prop-types": "^15.7.2",
|
|
16
|
-
"react": "^
|
|
17
|
-
"react-dom": "^
|
|
16
|
+
"react": "^17.0.2",
|
|
17
|
+
"react-dom": "^17.0.2",
|
|
18
18
|
"react-hot-loader": "^4.13.0",
|
|
19
19
|
"text-to-svg": "^3.1.5",
|
|
20
20
|
"uuid": "^3.4.0"
|
|
@@ -331,19 +331,19 @@ class InlineToolBox extends React.Component {
|
|
|
331
331
|
);
|
|
332
332
|
};
|
|
333
333
|
|
|
334
|
+
ContainerComponent = props => {
|
|
335
|
+
const { ContainerComponent } = this.props;
|
|
336
|
+
if (ContainerComponent === React.Fragment) {
|
|
337
|
+
return <ContainerComponent>{props.children}</ContainerComponent>;
|
|
338
|
+
}
|
|
339
|
+
return <ContainerComponent {...props} />;
|
|
340
|
+
};
|
|
341
|
+
|
|
334
342
|
render() {
|
|
335
343
|
logger.log('render InlineToolbox');
|
|
336
344
|
if (this.state.show) {
|
|
337
|
-
const {
|
|
338
|
-
|
|
339
|
-
children,
|
|
340
|
-
canvas,
|
|
341
|
-
selectedObject,
|
|
342
|
-
renderAngleLabel,
|
|
343
|
-
ContainerComponent,
|
|
344
|
-
canvasPosition,
|
|
345
|
-
} = this.props;
|
|
346
|
-
const { AngleLabel } = this;
|
|
345
|
+
const { classes, children, canvas, selectedObject, renderAngleLabel, canvasPosition } = this.props;
|
|
346
|
+
const { ContainerComponent, AngleLabel } = this;
|
|
347
347
|
|
|
348
348
|
const {
|
|
349
349
|
renderToolboxButton,
|