react-sync-board 0.5.4 → 0.5.5
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
|
@@ -4325,7 +4325,7 @@ var _excluded$2 = ["type", "rotation", "id", "locked", "layer"],
|
|
|
4325
4325
|
_excluded3 = ["x", "y", "layer", "moving"];
|
|
4326
4326
|
|
|
4327
4327
|
var _templateObject$2;
|
|
4328
|
-
var ItemWrapper = newStyled.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n display: inline-block;\n transition: transform 150ms;\n user-select: none;\n padding:
|
|
4328
|
+
var ItemWrapper = newStyled.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n display: inline-block;\n transition: transform 150ms;\n user-select: none;\n padding: 2px;\n transform: rotate(", "deg);\n\n & .corner {\n position: absolute;\n width: 0px;\n height: 0px;\n }\n\n & .top-left {\n top: 0;\n left: 0;\n }\n & .top-right {\n top: 0;\n right: 0;\n }\n & .bottom-left {\n bottom: 0;\n left: 0;\n }\n & .bottom-right {\n bottom: 0;\n right: 0;\n }\n\n &.selected {\n border: 2px dashed #db5034;\n padding: 0px;\n cursor: pointer;\n }\n\n &.locked::after {\n content: \"\";\n position: absolute;\n width: 24px;\n height: 30px;\n top: 4px;\n right: 4px;\n opacity: 0.1;\n background-image: url(\"", "\");\n background-size: cover;\n user-select: none;\n }\n\n &.locked:hover::after {\n opacity: 0.3;\n }\n"])), function (_ref) {
|
|
4329
4329
|
var rotation = _ref.rotation;
|
|
4330
4330
|
return rotation;
|
|
4331
4331
|
}, img);
|
|
@@ -6974,8 +6974,8 @@ var BoundingBox = function BoundingBox() {
|
|
|
6974
6974
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
6975
6975
|
style: _objectSpread2(_objectSpread2({}, defaultZoneStyle), {}, {
|
|
6976
6976
|
transform: "translate(".concat(boundingBoxLast.left, "px, ").concat(boundingBoxLast.top, "px)"),
|
|
6977
|
-
height: "".concat(boundingBoxLast.height, "px"),
|
|
6978
|
-
width: "".concat(boundingBoxLast.width, "px")
|
|
6977
|
+
height: "".concat(boundingBoxLast.height - 2, "px"),
|
|
6978
|
+
width: "".concat(boundingBoxLast.width - 2, "px")
|
|
6979
6979
|
}),
|
|
6980
6980
|
className: "selection"
|
|
6981
6981
|
});
|
|
@@ -7655,8 +7655,8 @@ var useItemActions = function useItemActions() {
|
|
|
7655
7655
|
size = itemSize || 1;
|
|
7656
7656
|
}
|
|
7657
7657
|
|
|
7658
|
-
var centerX = item.x + elem.clientWidth / 2,
|
|
7659
|
-
centerY = item.y + elem.clientHeight / 2;
|
|
7658
|
+
var centerX = item.x + elem.clientWidth / 2 - offsetX,
|
|
7659
|
+
centerY = item.y + elem.clientHeight / 2 - offsetY;
|
|
7660
7660
|
var newX;
|
|
7661
7661
|
var newY;
|
|
7662
7662
|
var sizeX;
|