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.d.ts
CHANGED
|
@@ -264,6 +264,7 @@ type MiniMapProps = {
|
|
|
264
264
|
children: React.ReactNode;
|
|
265
265
|
width?: number;
|
|
266
266
|
height?: number;
|
|
267
|
+
borderColor?: string;
|
|
267
268
|
} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
268
269
|
declare const MiniMap: React.FC<MiniMapProps>;
|
|
269
270
|
|
package/dist/index.esm.js
CHANGED
|
@@ -1741,8 +1741,8 @@ var previewStyles = {
|
|
|
1741
1741
|
boxShadow: "rgba(0,0,0,0.2) 0 0 0 10000000px",
|
|
1742
1742
|
};
|
|
1743
1743
|
var MiniMap = function (_a) {
|
|
1744
|
-
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"]);
|
|
1745
|
-
var
|
|
1744
|
+
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"]);
|
|
1745
|
+
var _e = useState(false), initialized = _e[0], setInitialized = _e[1];
|
|
1746
1746
|
var instance = useTransformContext();
|
|
1747
1747
|
var miniMapInstance = useRef(null);
|
|
1748
1748
|
var mainRef = useRef(null);
|
|
@@ -1848,7 +1848,7 @@ var MiniMap = function (_a) {
|
|
|
1848
1848
|
}, []);
|
|
1849
1849
|
return (React.createElement("div", __assign({}, rest, { ref: mainRef, style: wrapperStyle, className: "rzpp-mini-map ".concat(rest.className || "") }),
|
|
1850
1850
|
React.createElement("div", __assign({}, rest, { ref: wrapperRef, className: "rzpp-wrapper" }), children),
|
|
1851
|
-
React.createElement("div", { className: "rzpp-preview", ref: previewRef, style: previewStyles })));
|
|
1851
|
+
React.createElement("div", { className: "rzpp-preview", ref: previewRef, style: __assign(__assign({}, previewStyles), { borderColor: borderColor }) })));
|
|
1852
1852
|
};
|
|
1853
1853
|
|
|
1854
1854
|
function styleInject(css, ref) {
|