-
Notifications
You must be signed in to change notification settings - Fork 0
/
gesture-frame.d.ts
70 lines (70 loc) · 2.42 KB
/
gesture-frame.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
declare class ScrollableFrame extends HTMLElement {
#private;
static readonly observedAttributes: readonly string[];
get scale(): number;
set scale(scale: number);
get minScale(): number;
set minScale(minScale: number);
get maxScale(): number;
set maxScale(maxScale: number);
get offsetX(): number;
set offsetX(offsetX: number);
get offsetY(): number;
set offsetY(offsetY: number);
constructor();
connectedCallback(): void;
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
setOffset(offsetX: number, offsetY: number): void;
_zoom(scaleRatio: number, originClientX: number, originClientY: number): void;
/**
* Zoom keeping the apparent position of `(origin.x, origin.y)`. Zoom in when `scaleRatio > 1` and zoom out when `scaleRatio < 1`. `origin.x` and `origin.y` can be specified as a `number` (px) or a `` `${number}%` ``. The default value for both is `"50%"` (center).
*/
zoom(scaleRatio: number, origin?: {
readonly x?: number | `${number}%`;
readonly y?: number | `${number}%`;
}): void;
/**
* Adjust the scale and offset to display the entire content.
*/
fit(options?: {
readonly marginX?: number;
readonly marginY?: number;
}): void;
/**
* Adjust the scale and offset-x to fit the width.
*/
fitX(options?: {
readonly margin?: number;
}): void;
/**
* Adjust the scale and offset-y to fit the height.
*/
fitY(options?: {
readonly margin?: number;
}): void;
}
export declare class GestureFrame extends ScrollableFrame {
#private;
static readonly observedAttributes: readonly string[];
get panX(): boolean;
set panX(panX: boolean);
get panY(): boolean;
set panY(panY: boolean);
get panButton(): number;
set panButton(panButton: number);
get pinchZoom(): boolean;
set pinchZoom(pinchZoom: boolean);
get anchorLeft(): boolean;
set anchorLeft(anchorLeft: boolean);
get anchorRight(): boolean;
set anchorRight(anchorRight: boolean);
get anchorTop(): boolean;
set anchorTop(anchorTop: boolean);
get anchorBottom(): boolean;
set anchorBottom(anchorBottom: boolean);
connectedCallback(): void;
disconnectedCallback(): void;
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
constructor();
}
export {};