@gx-design-vue/image 0.2.0-beta.26 → 0.2.0-beta.28
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/Image.d.ts +41 -22
- package/dist/ImagePreview/hooks/getFixScaleEleTransPosition.d.ts +16 -0
- package/dist/ImagePreview/hooks/useImageTransform.d.ts +35 -0
- package/dist/ImagePreview/hooks/useMouseEvent.d.ts +10 -0
- package/dist/ImagePreview/hooks/useTouchEvent.d.ts +8 -0
- package/dist/ImagePreview/index.d.ts +88 -9
- package/dist/ImagePreview/props.d.ts +31 -2
- package/dist/ImagePreview/typings.d.ts +0 -1
- package/dist/ImagePreview/utils/util.d.ts +4 -12
- package/dist/image.js +888 -1173
- package/dist/image.umd.cjs +1 -1
- package/dist/props.d.ts +13 -7
- package/dist/style.d.ts +3 -1
- package/dist/typings.d.ts +2 -0
- package/dist/utils/util.d.ts +1 -0
- package/package.json +4 -4
package/dist/Image.d.ts
CHANGED
|
@@ -3,11 +3,7 @@ import { imageProps } from './props';
|
|
|
3
3
|
export type GImageProps = Partial<ExtractPropTypes<typeof imageProps>>;
|
|
4
4
|
declare const GImage: import("vue").DefineComponent<ExtractPropTypes<{
|
|
5
5
|
preview: {
|
|
6
|
-
type: import("vue").PropType<import(".").BaseImagePreviewProps>;
|
|
7
|
-
default: () => import(".").BaseImagePreviewProps;
|
|
8
|
-
};
|
|
9
|
-
showPreview: {
|
|
10
|
-
type: import("vue").PropType<boolean>;
|
|
6
|
+
type: import("vue").PropType<import(".").BaseImagePreviewProps | boolean>;
|
|
11
7
|
default: boolean;
|
|
12
8
|
};
|
|
13
9
|
src: {
|
|
@@ -18,10 +14,16 @@ declare const GImage: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
18
14
|
type: import("vue").PropType<string>;
|
|
19
15
|
default: string;
|
|
20
16
|
};
|
|
17
|
+
loading: {
|
|
18
|
+
type: import("vue").PropType<"eager" | "lazy">;
|
|
19
|
+
};
|
|
21
20
|
fit: {
|
|
22
21
|
type: import("vue").PropType<"fill" | "contain" | "cover" | "none" | "scale-down">;
|
|
23
22
|
default: string;
|
|
24
23
|
};
|
|
24
|
+
crossOrigin: {
|
|
25
|
+
type: import("vue").PropType<"anonymous" | "use-credentials" | "">;
|
|
26
|
+
};
|
|
25
27
|
lazy: import("vue").PropType<boolean>;
|
|
26
28
|
scrollContainer: {
|
|
27
29
|
type: import("vue").PropType<string | HTMLElement | undefined>;
|
|
@@ -43,8 +45,12 @@ declare const GImage: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
43
45
|
onClick: {
|
|
44
46
|
type: import("vue").PropType<(info: any) => void>;
|
|
45
47
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
imageStyle: {
|
|
49
|
+
type: import("vue").PropType<CSSProperties>;
|
|
50
|
+
default: () => {};
|
|
51
|
+
};
|
|
52
|
+
imageClass: import("vue").PropType<string>;
|
|
53
|
+
size: import("vue").PropType<number>;
|
|
48
54
|
width: import("vue").PropType<number>;
|
|
49
55
|
height: import("vue").PropType<number>;
|
|
50
56
|
zIndex: {
|
|
@@ -54,13 +60,13 @@ declare const GImage: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
54
60
|
getContainer: {
|
|
55
61
|
type: import("vue").PropType<string>;
|
|
56
62
|
};
|
|
57
|
-
}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
63
|
+
}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
64
|
+
click: () => true;
|
|
65
|
+
load: (_event: Event) => true;
|
|
66
|
+
error: (_event: Event) => true;
|
|
67
|
+
}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
58
68
|
preview: {
|
|
59
|
-
type: import("vue").PropType<import(".").BaseImagePreviewProps>;
|
|
60
|
-
default: () => import(".").BaseImagePreviewProps;
|
|
61
|
-
};
|
|
62
|
-
showPreview: {
|
|
63
|
-
type: import("vue").PropType<boolean>;
|
|
69
|
+
type: import("vue").PropType<import(".").BaseImagePreviewProps | boolean>;
|
|
64
70
|
default: boolean;
|
|
65
71
|
};
|
|
66
72
|
src: {
|
|
@@ -71,10 +77,16 @@ declare const GImage: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
71
77
|
type: import("vue").PropType<string>;
|
|
72
78
|
default: string;
|
|
73
79
|
};
|
|
80
|
+
loading: {
|
|
81
|
+
type: import("vue").PropType<"eager" | "lazy">;
|
|
82
|
+
};
|
|
74
83
|
fit: {
|
|
75
84
|
type: import("vue").PropType<"fill" | "contain" | "cover" | "none" | "scale-down">;
|
|
76
85
|
default: string;
|
|
77
86
|
};
|
|
87
|
+
crossOrigin: {
|
|
88
|
+
type: import("vue").PropType<"anonymous" | "use-credentials" | "">;
|
|
89
|
+
};
|
|
78
90
|
lazy: import("vue").PropType<boolean>;
|
|
79
91
|
scrollContainer: {
|
|
80
92
|
type: import("vue").PropType<string | HTMLElement | undefined>;
|
|
@@ -96,8 +108,12 @@ declare const GImage: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
96
108
|
onClick: {
|
|
97
109
|
type: import("vue").PropType<(info: any) => void>;
|
|
98
110
|
};
|
|
99
|
-
|
|
100
|
-
|
|
111
|
+
imageStyle: {
|
|
112
|
+
type: import("vue").PropType<CSSProperties>;
|
|
113
|
+
default: () => {};
|
|
114
|
+
};
|
|
115
|
+
imageClass: import("vue").PropType<string>;
|
|
116
|
+
size: import("vue").PropType<number>;
|
|
101
117
|
width: import("vue").PropType<number>;
|
|
102
118
|
height: import("vue").PropType<number>;
|
|
103
119
|
zIndex: {
|
|
@@ -108,13 +124,16 @@ declare const GImage: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
108
124
|
type: import("vue").PropType<string>;
|
|
109
125
|
};
|
|
110
126
|
}>> & Readonly<{
|
|
111
|
-
|
|
112
|
-
onError?: ((
|
|
113
|
-
|
|
127
|
+
onClick?: (() => any) | undefined;
|
|
128
|
+
onError?: ((_event: Event) => any) | undefined;
|
|
129
|
+
onLoad?: ((_event: Event) => any) | undefined;
|
|
114
130
|
}>, {
|
|
115
131
|
zIndex: number;
|
|
116
|
-
|
|
117
|
-
|
|
132
|
+
placeholder: import("@gx-design-vue/pro-utils/dist").CustomRender;
|
|
133
|
+
preview: boolean | Partial<{
|
|
134
|
+
urls: string[];
|
|
135
|
+
mask: import("vue").VNode | boolean;
|
|
136
|
+
maskClass: string;
|
|
118
137
|
disabled: boolean;
|
|
119
138
|
zIndex: number;
|
|
120
139
|
current: number;
|
|
@@ -124,14 +143,14 @@ declare const GImage: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
124
143
|
countRender: import("@gx-design-vue/pro-utils/dist").WithFalse<(current: number, total: number) => import("@gx-design-vue/pro-utils/dist").CustomRender>;
|
|
125
144
|
icons: import(".").PreviewPropsIcons;
|
|
126
145
|
}>;
|
|
127
|
-
showPreview: boolean;
|
|
128
146
|
src: string;
|
|
129
147
|
alt: string;
|
|
130
148
|
fit: "fill" | "contain" | "cover" | "none" | "scale-down";
|
|
131
|
-
placeholder: import("@gx-design-vue/pro-utils/dist").CustomRender;
|
|
132
149
|
fallback: import("@gx-design-vue/pro-utils/dist").CustomRender;
|
|
150
|
+
imageStyle: CSSProperties;
|
|
133
151
|
}, SlotsType<{
|
|
134
152
|
default(): void;
|
|
153
|
+
mask(): void;
|
|
135
154
|
close(): void;
|
|
136
155
|
left(): void;
|
|
137
156
|
right(): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fix positon x,y point when
|
|
3
|
+
*
|
|
4
|
+
* Ele width && height < client
|
|
5
|
+
* - Back origin
|
|
6
|
+
*
|
|
7
|
+
* - Ele width | height > clientWidth | clientHeight
|
|
8
|
+
* - left | top > 0 -> Back 0
|
|
9
|
+
* - left | top + width | height < clientWidth | clientHeight -> Back left | top + width | height === clientWidth | clientHeight
|
|
10
|
+
*
|
|
11
|
+
* Regardless of other
|
|
12
|
+
*/
|
|
13
|
+
export default function getFixScaleEleTransPosition(width: number, height: number, left: number, top: number): null | {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
export interface TransformType {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
rotate: number;
|
|
6
|
+
scale: number;
|
|
7
|
+
flipX: boolean;
|
|
8
|
+
flipY: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type TransformAction = 'flipY' | 'flipX' | 'rotateLeft' | 'rotateRight' | 'zoomIn' | 'zoomOut' | 'close' | 'prev' | 'next' | 'wheel' | 'doubleClick' | 'move' | 'dragRebound' | 'touchZoom' | 'reset';
|
|
11
|
+
export type UpdateTransformFunc = (newTransform: Partial<TransformType>, action: TransformAction) => void;
|
|
12
|
+
export type DispatchZoomChangeFunc = (ratio: number, action: TransformAction, centerX?: number, centerY?: number, isTouch?: boolean) => void;
|
|
13
|
+
export default function useImageTransform(imgRef: Ref<HTMLImageElement>, minScale: Ref<number>, maxScale: Ref<number>, onTransform?: (info: {
|
|
14
|
+
transform: TransformType;
|
|
15
|
+
action: TransformAction;
|
|
16
|
+
}) => void): {
|
|
17
|
+
transform: Ref<{
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
rotate: number;
|
|
21
|
+
scale: number;
|
|
22
|
+
flipX: boolean;
|
|
23
|
+
flipY: boolean;
|
|
24
|
+
}, {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
rotate: number;
|
|
28
|
+
scale: number;
|
|
29
|
+
flipX: boolean;
|
|
30
|
+
flipY: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
resetTransform: (action: TransformAction) => void;
|
|
33
|
+
updateTransform: UpdateTransformFunc;
|
|
34
|
+
dispatchZoomChange: DispatchZoomChangeFunc;
|
|
35
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { MouseEventHandler } from '../typings';
|
|
3
|
+
import type { DispatchZoomChangeFunc, TransformType, UpdateTransformFunc } from './useImageTransform';
|
|
4
|
+
export default function useMouseEvent(imgRef: Ref<HTMLImageElement>, movable: Ref<boolean>, visible: Ref<boolean>, scaleStep: Ref<number>, transform: Ref<TransformType>, updateTransform: UpdateTransformFunc, dispatchZoomChange: DispatchZoomChangeFunc): {
|
|
5
|
+
isMoving: Ref<boolean, boolean>;
|
|
6
|
+
onMouseDown: MouseEventHandler;
|
|
7
|
+
onMouseMove: MouseEventHandler;
|
|
8
|
+
onMouseUp: MouseEventHandler;
|
|
9
|
+
onWheel: (event: WheelEvent) => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { DispatchZoomChangeFunc, TransformType, UpdateTransformFunc } from './useImageTransform';
|
|
3
|
+
export default function useTouchEvent(imgRef: Ref<HTMLImageElement>, movable: Ref<boolean>, visible: Ref<boolean>, minScale: Ref<number>, transform: Ref<TransformType>, updateTransform: UpdateTransformFunc, dispatchZoomChange: DispatchZoomChangeFunc): {
|
|
4
|
+
isTouching: Ref<boolean, boolean>;
|
|
5
|
+
onTouchStart: (event: TouchEvent) => void;
|
|
6
|
+
onTouchMove: (event: TouchEvent) => void;
|
|
7
|
+
onTouchEnd: () => void;
|
|
8
|
+
};
|
|
@@ -1,13 +1,34 @@
|
|
|
1
|
-
import type { ExtractPropTypes } from 'vue';
|
|
1
|
+
import type { ExtractPropTypes, SlotsType } from 'vue';
|
|
2
|
+
import type { TransformAction, TransformType } from './hooks/useImageTransform';
|
|
2
3
|
import type { PreviewPropsIcons } from './props';
|
|
3
4
|
import imagePreviewProps from './props';
|
|
4
5
|
export declare const slotsNames: string[];
|
|
5
6
|
export type ImagePreviewProps = Partial<ExtractPropTypes<typeof imagePreviewProps>>;
|
|
6
7
|
declare const GImagePreview: import("vue").DefineComponent<ExtractPropTypes<{
|
|
7
|
-
|
|
8
|
+
urls: {
|
|
8
9
|
type: import("vue").PropType<string[]>;
|
|
9
10
|
default: () => never[];
|
|
10
11
|
};
|
|
12
|
+
open: {
|
|
13
|
+
type: import("vue").PropType<boolean>;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
scaleStep: {
|
|
17
|
+
type: import("vue").PropType<number>;
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
minScale: {
|
|
21
|
+
type: import("vue").PropType<number>;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
maxScale: {
|
|
25
|
+
type: import("vue").PropType<number>;
|
|
26
|
+
default: number;
|
|
27
|
+
};
|
|
28
|
+
movable: {
|
|
29
|
+
type: import("vue").PropType<boolean>;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
11
32
|
disabled: import("vue").PropType<boolean>;
|
|
12
33
|
zIndex: {
|
|
13
34
|
type: import("vue").PropType<number>;
|
|
@@ -33,11 +54,44 @@ declare const GImagePreview: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
33
54
|
type: import("vue").PropType<PreviewPropsIcons>;
|
|
34
55
|
default: () => PreviewPropsIcons;
|
|
35
56
|
};
|
|
36
|
-
|
|
37
|
-
|
|
57
|
+
onTransform: import("vue").PropType<(info: {
|
|
58
|
+
transform: TransformType;
|
|
59
|
+
action: TransformAction;
|
|
60
|
+
}) => void>;
|
|
61
|
+
onOpenChange: import("vue").PropType<(val: boolean) => void>;
|
|
62
|
+
'onUpdate:open': import("vue").PropType<(val: boolean) => void>;
|
|
63
|
+
}>, () => import("ant-design-vue/es/_util/type").VueNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
64
|
+
close: () => true;
|
|
65
|
+
transform: (_info: {
|
|
66
|
+
transform: TransformType;
|
|
67
|
+
action: TransformAction;
|
|
68
|
+
}) => true;
|
|
69
|
+
'update:open': (_val: boolean) => true;
|
|
70
|
+
}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
71
|
+
urls: {
|
|
38
72
|
type: import("vue").PropType<string[]>;
|
|
39
73
|
default: () => never[];
|
|
40
74
|
};
|
|
75
|
+
open: {
|
|
76
|
+
type: import("vue").PropType<boolean>;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
79
|
+
scaleStep: {
|
|
80
|
+
type: import("vue").PropType<number>;
|
|
81
|
+
default: number;
|
|
82
|
+
};
|
|
83
|
+
minScale: {
|
|
84
|
+
type: import("vue").PropType<number>;
|
|
85
|
+
default: number;
|
|
86
|
+
};
|
|
87
|
+
maxScale: {
|
|
88
|
+
type: import("vue").PropType<number>;
|
|
89
|
+
default: number;
|
|
90
|
+
};
|
|
91
|
+
movable: {
|
|
92
|
+
type: import("vue").PropType<boolean>;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
41
95
|
disabled: import("vue").PropType<boolean>;
|
|
42
96
|
zIndex: {
|
|
43
97
|
type: import("vue").PropType<number>;
|
|
@@ -63,16 +117,41 @@ declare const GImagePreview: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
63
117
|
type: import("vue").PropType<PreviewPropsIcons>;
|
|
64
118
|
default: () => PreviewPropsIcons;
|
|
65
119
|
};
|
|
120
|
+
onTransform: import("vue").PropType<(info: {
|
|
121
|
+
transform: TransformType;
|
|
122
|
+
action: TransformAction;
|
|
123
|
+
}) => void>;
|
|
124
|
+
onOpenChange: import("vue").PropType<(val: boolean) => void>;
|
|
125
|
+
'onUpdate:open': import("vue").PropType<(val: boolean) => void>;
|
|
66
126
|
}>> & Readonly<{
|
|
67
|
-
onClose?: ((
|
|
68
|
-
|
|
69
|
-
|
|
127
|
+
onClose?: (() => any) | undefined;
|
|
128
|
+
onTransform?: ((_info: {
|
|
129
|
+
transform: TransformType;
|
|
130
|
+
action: TransformAction;
|
|
131
|
+
}) => any) | undefined;
|
|
132
|
+
"onUpdate:open"?: ((_val: boolean) => any) | undefined;
|
|
70
133
|
}>, {
|
|
71
|
-
|
|
134
|
+
urls: string[];
|
|
72
135
|
zIndex: number;
|
|
73
136
|
current: number;
|
|
74
137
|
infinite: boolean;
|
|
75
138
|
onHideOnClickModal: boolean;
|
|
76
139
|
icons: PreviewPropsIcons;
|
|
77
|
-
|
|
140
|
+
open: boolean;
|
|
141
|
+
scaleStep: number;
|
|
142
|
+
minScale: number;
|
|
143
|
+
maxScale: number;
|
|
144
|
+
movable: boolean;
|
|
145
|
+
}, SlotsType<{
|
|
146
|
+
close(): void;
|
|
147
|
+
left(): void;
|
|
148
|
+
right(): void;
|
|
149
|
+
rotateRight(): void;
|
|
150
|
+
rotateRight(): void;
|
|
151
|
+
zoomOut(): void;
|
|
152
|
+
flipX(): void;
|
|
153
|
+
flipY(): void;
|
|
154
|
+
rotateLeft(): void;
|
|
155
|
+
placeholder(): void;
|
|
156
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
78
157
|
export default GImagePreview;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CustomRender, WithFalse } from '@gx-design-vue/pro-utils';
|
|
2
2
|
import type { PropType, VNode } from 'vue';
|
|
3
|
+
import type { TransformAction, TransformType } from './hooks/useImageTransform';
|
|
3
4
|
export interface PreviewPropsIcons {
|
|
4
5
|
close?: VNode;
|
|
5
6
|
rotateLeft?: VNode;
|
|
@@ -12,7 +13,9 @@ export interface PreviewPropsIcons {
|
|
|
12
13
|
flipY?: VNode;
|
|
13
14
|
}
|
|
14
15
|
export type BaseImagePreviewProps = Partial<{
|
|
15
|
-
|
|
16
|
+
urls: string[];
|
|
17
|
+
mask: VNode | boolean;
|
|
18
|
+
maskClass: string;
|
|
16
19
|
disabled: boolean;
|
|
17
20
|
zIndex: number;
|
|
18
21
|
current: number;
|
|
@@ -23,10 +26,30 @@ export type BaseImagePreviewProps = Partial<{
|
|
|
23
26
|
icons: PreviewPropsIcons;
|
|
24
27
|
}>;
|
|
25
28
|
declare const _default: {
|
|
26
|
-
|
|
29
|
+
urls: {
|
|
27
30
|
type: PropType<string[]>;
|
|
28
31
|
default: () => never[];
|
|
29
32
|
};
|
|
33
|
+
open: {
|
|
34
|
+
type: PropType<boolean>;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
scaleStep: {
|
|
38
|
+
type: PropType<number>;
|
|
39
|
+
default: number;
|
|
40
|
+
};
|
|
41
|
+
minScale: {
|
|
42
|
+
type: PropType<number>;
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
maxScale: {
|
|
46
|
+
type: PropType<number>;
|
|
47
|
+
default: number;
|
|
48
|
+
};
|
|
49
|
+
movable: {
|
|
50
|
+
type: PropType<boolean>;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
30
53
|
disabled: PropType<boolean>;
|
|
31
54
|
zIndex: {
|
|
32
55
|
type: PropType<number>;
|
|
@@ -52,5 +75,11 @@ declare const _default: {
|
|
|
52
75
|
type: PropType<PreviewPropsIcons>;
|
|
53
76
|
default: () => PreviewPropsIcons;
|
|
54
77
|
};
|
|
78
|
+
onTransform: PropType<(info: {
|
|
79
|
+
transform: TransformType;
|
|
80
|
+
action: TransformAction;
|
|
81
|
+
}) => void>;
|
|
82
|
+
onOpenChange: PropType<(val: boolean) => void>;
|
|
83
|
+
'onUpdate:open': PropType<(val: boolean) => void>;
|
|
55
84
|
};
|
|
56
85
|
export default _default;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ComputedRef, VNode } from 'vue';
|
|
2
2
|
import type { PreviewPropsIcons } from './props';
|
|
3
3
|
export type MouseEventHandler = (e: MouseEvent) => void;
|
|
4
|
-
export type WheelEventHandler = (e: WheelEvent) => void;
|
|
5
4
|
export interface PreviewUrl {
|
|
6
5
|
url: string;
|
|
7
6
|
loading: boolean;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare function getClientSize(): {
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
};
|
|
9
|
-
export declare function getFixScaleEleTransPosition(width: number, height: number, left: number, top: number): null | {
|
|
10
|
-
x: number;
|
|
11
|
-
y: number;
|
|
12
|
-
};
|
|
1
|
+
/** Scale the ratio base */
|
|
2
|
+
export declare const BASE_SCALE_RATIO = 1;
|
|
3
|
+
/** The maximum zoom ratio when the mouse zooms in, adjustable */
|
|
4
|
+
export declare const WHEEL_MAX_SCALE_RATIO = 1;
|