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/esm/index.js CHANGED
@@ -4317,7 +4317,7 @@ var _excluded$2 = ["type", "rotation", "id", "locked", "layer"],
4317
4317
  _excluded3 = ["x", "y", "layer", "moving"];
4318
4318
 
4319
4319
  var _templateObject$2;
4320
- var ItemWrapper = newStyled.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n display: inline-block;\n transition: transform 150ms;\n user-select: none;\n padding: 4px;\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: 2px;\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) {
4320
+ 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) {
4321
4321
  var rotation = _ref.rotation;
4322
4322
  return rotation;
4323
4323
  }, img);
@@ -6966,8 +6966,8 @@ var BoundingBox = function BoundingBox() {
6966
6966
  return /*#__PURE__*/React.createElement("div", {
6967
6967
  style: _objectSpread2(_objectSpread2({}, defaultZoneStyle), {}, {
6968
6968
  transform: "translate(".concat(boundingBoxLast.left, "px, ").concat(boundingBoxLast.top, "px)"),
6969
- height: "".concat(boundingBoxLast.height, "px"),
6970
- width: "".concat(boundingBoxLast.width, "px")
6969
+ height: "".concat(boundingBoxLast.height - 2, "px"),
6970
+ width: "".concat(boundingBoxLast.width - 2, "px")
6971
6971
  }),
6972
6972
  className: "selection"
6973
6973
  });
@@ -7647,8 +7647,8 @@ var useItemActions = function useItemActions() {
7647
7647
  size = itemSize || 1;
7648
7648
  }
7649
7649
 
7650
- var centerX = item.x + elem.clientWidth / 2,
7651
- centerY = item.y + elem.clientHeight / 2;
7650
+ var centerX = item.x + elem.clientWidth / 2 - offsetX,
7651
+ centerY = item.y + elem.clientHeight / 2 - offsetY;
7652
7652
  var newX;
7653
7653
  var newY;
7654
7654
  var sizeX;