react-zoom-pan-pinch 2.3.2 → 2.5.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.
- package/dist/components/transform-wrapper.d.ts +1 -3
- package/dist/constants/state.constants.d.ts +1 -4
- package/dist/core/double-click/double-click.logic.d.ts +2 -0
- package/dist/core/handlers/handlers.utils.d.ts +6 -5
- package/dist/core/instance.core.d.ts +4 -2
- package/dist/index.cjs.js +130 -106
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +70 -69
- package/dist/index.esm.js +131 -107
- package/dist/index.esm.js.map +1 -1
- package/dist/models/context.model.d.ts +0 -1
- package/dist/stories/examples/svg-zoom-to-element/example.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/transform-component.tsx +3 -3
- package/src/components/transform-wrapper.tsx +25 -26
- package/src/constants/state.constants.ts +1 -16
- package/src/core/animations/animations.utils.ts +1 -0
- package/src/core/double-click/double-click.logic.ts +55 -8
- package/src/core/handlers/handlers.logic.ts +1 -7
- package/src/core/handlers/handlers.utils.ts +30 -37
- package/src/core/instance.core.ts +15 -5
- package/src/hooks/use-transform-context.tsx +10 -3
- package/src/models/context.model.ts +0 -1
- package/src/stories/docs/props.tsx +0 -6
- package/src/stories/examples/controls/controls.stories.mdx +1 -0
- package/src/stories/examples/svg-zoom-to-element/creativity.svg +143 -0
- package/src/stories/examples/svg-zoom-to-element/example.tsx +57 -0
- package/src/stories/examples/svg-zoom-to-element/svg-zoom-to-element.stories.mdx +28 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Meta, Story, ArgsTable, Canvas } from "@storybook/addon-docs/blocks";
|
|
2
|
+
import { action } from "@storybook/addon-actions";
|
|
3
|
+
|
|
4
|
+
import { TransformWrapper } from "../../../components/transform-wrapper";
|
|
5
|
+
import { argsTypes } from "../../types/args.types";
|
|
6
|
+
import { Example } from "./example";
|
|
7
|
+
|
|
8
|
+
export const Template = (args) => <Example {...args} />;
|
|
9
|
+
|
|
10
|
+
<Meta
|
|
11
|
+
title="Examples/SVG Zoom To Element"
|
|
12
|
+
component={TransformWrapper}
|
|
13
|
+
argTypes={argsTypes}
|
|
14
|
+
/>
|
|
15
|
+
|
|
16
|
+
# Zoom To Element
|
|
17
|
+
|
|
18
|
+
<br />
|
|
19
|
+
|
|
20
|
+
### Preview:
|
|
21
|
+
|
|
22
|
+
<Canvas>
|
|
23
|
+
<Story name="SVG Zoom To Element">{(args) => <Template {...args} />}</Story>
|
|
24
|
+
</Canvas>
|
|
25
|
+
|
|
26
|
+
## Component API
|
|
27
|
+
|
|
28
|
+
<ArgsTable story="SVG Zoom To Element" />
|