react-zoom-pan-pinch 3.0.7 → 3.0.8
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/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/src/components/mini-map/mini-map.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/mini-map/mini-map.tsx +7 -1
- package/tsconfig.json +1 -0
package/dist/index.cjs.js
CHANGED
|
@@ -1749,8 +1749,8 @@ var previewStyles = {
|
|
|
1749
1749
|
boxShadow: "rgba(0,0,0,0.2) 0 0 0 10000000px",
|
|
1750
1750
|
};
|
|
1751
1751
|
var MiniMap = function (_a) {
|
|
1752
|
-
var _b = _a.width, width = _b === void 0 ? 200 : _b, _c = _a.height, height = _c === void 0 ? 200 : _c, children = _a.children, rest = __rest(_a, ["width", "height", "children"]);
|
|
1753
|
-
var
|
|
1752
|
+
var _b = _a.width, width = _b === void 0 ? 200 : _b, _c = _a.height, height = _c === void 0 ? 200 : _c, _d = _a.borderColor, borderColor = _d === void 0 ? "red" : _d, children = _a.children, rest = __rest(_a, ["width", "height", "borderColor", "children"]);
|
|
1753
|
+
var _e = React.useState(false), initialized = _e[0], setInitialized = _e[1];
|
|
1754
1754
|
var instance = useTransformContext();
|
|
1755
1755
|
var miniMapInstance = React.useRef(null);
|
|
1756
1756
|
var mainRef = React.useRef(null);
|
|
@@ -1856,7 +1856,7 @@ var MiniMap = function (_a) {
|
|
|
1856
1856
|
}, []);
|
|
1857
1857
|
return (React__default["default"].createElement("div", __assign({}, rest, { ref: mainRef, style: wrapperStyle, className: "rzpp-mini-map ".concat(rest.className || "") }),
|
|
1858
1858
|
React__default["default"].createElement("div", __assign({}, rest, { ref: wrapperRef, className: "rzpp-wrapper" }), children),
|
|
1859
|
-
React__default["default"].createElement("div", { className: "rzpp-preview", ref: previewRef, style: previewStyles })));
|
|
1859
|
+
React__default["default"].createElement("div", { className: "rzpp-preview", ref: previewRef, style: __assign(__assign({}, previewStyles), { borderColor: borderColor }) })));
|
|
1860
1860
|
};
|
|
1861
1861
|
|
|
1862
1862
|
function styleInject(css, ref) {
|