@pilotdev/pilot-web-2d 23.0.8 → 23.0.10
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/index.d.ts +31 -14
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -23,16 +23,22 @@ export class Localization {
|
|
|
23
23
|
export type InitializeSuccessCallback = () => void;
|
|
24
24
|
export function coreInitializer(options: InitializerOptions, callback: InitializeSuccessCallback): void;
|
|
25
25
|
export function coreShutdown(): void;
|
|
26
|
+
export class DeviceEventHandler {
|
|
27
|
+
static isMobile: boolean;
|
|
28
|
+
static eventStartType: string;
|
|
29
|
+
static eventProcessType: string;
|
|
30
|
+
static eventEndType: string;
|
|
31
|
+
}
|
|
26
32
|
export interface IWindowStyle {
|
|
27
33
|
width: string;
|
|
28
34
|
height: string;
|
|
29
35
|
left: string;
|
|
30
|
-
right: string;
|
|
31
36
|
top: string;
|
|
32
37
|
}
|
|
33
38
|
export interface IWindowStateOptions {
|
|
34
39
|
saveKey: string;
|
|
35
|
-
restoreWindowSize
|
|
40
|
+
restoreWindowSize?: boolean;
|
|
41
|
+
restoreWindowPosition?: boolean;
|
|
36
42
|
}
|
|
37
43
|
export class WindowStater {
|
|
38
44
|
get windowStylesState(): IWindowStyle;
|
|
@@ -82,6 +88,7 @@ export namespace Viewer2DIcons {
|
|
|
82
88
|
const REMARK_CIRCLE_ICON: string;
|
|
83
89
|
const ZOOM_IN: string;
|
|
84
90
|
const ZOOM_OUT: string;
|
|
91
|
+
const FIT_WIDTH: string;
|
|
85
92
|
}
|
|
86
93
|
export interface ISettings {
|
|
87
94
|
changeSetting<T>(name: string, value: T, notify?: boolean, providedData?: any): void;
|
|
@@ -109,6 +116,7 @@ export class CoreEventTypes {
|
|
|
109
116
|
static VIEWER_MOUSE_MOVE_EVENT: string;
|
|
110
117
|
static VIEWER_MOUSE_UP_EVENT: string;
|
|
111
118
|
static VIEWER_MOUSE_LONG_TOUCH_EVENT: string;
|
|
119
|
+
static VIEWER_MOUSE_WHEEL: string;
|
|
112
120
|
static VIEWER_TOUCHSTART_EVENT: string;
|
|
113
121
|
static VIEWER_TOUCHEND_EVENT: string;
|
|
114
122
|
static SETTING_CHANGED_EVENT: string;
|
|
@@ -198,7 +206,6 @@ export class ExtensionBase {
|
|
|
198
206
|
onToolbarCreated(toolbar: Toolbar): void;
|
|
199
207
|
onTouchStart(event: TouchEvent): void;
|
|
200
208
|
onTouchEnd(event: TouchEvent): void;
|
|
201
|
-
protected bindDomEvents(): void;
|
|
202
209
|
}
|
|
203
210
|
export class ExtensionManager {
|
|
204
211
|
registerExtensionType(extensionId: string, extension: typeof ExtensionBase): boolean;
|
|
@@ -411,6 +418,7 @@ export class Dialog extends Control {
|
|
|
411
418
|
setResizable(value: boolean): Dialog;
|
|
412
419
|
setWindowOptions(value: IWindowStateOptions): Dialog;
|
|
413
420
|
setDraggable(value: boolean): Dialog;
|
|
421
|
+
setCloseble(value: boolean): Dialog;
|
|
414
422
|
openDialog(x?: number, y?: number): HTMLElement;
|
|
415
423
|
destroyDialog(): void;
|
|
416
424
|
isDialogShown(): boolean;
|
|
@@ -475,19 +483,11 @@ export interface IDocumentPage {
|
|
|
475
483
|
update(params?: IPageUpdateParams): void;
|
|
476
484
|
dispose(): any;
|
|
477
485
|
}
|
|
478
|
-
export class PageRenderedEvent extends Event {
|
|
479
|
-
page: IDocumentPage;
|
|
480
|
-
|
|
481
|
-
constructor(type: string, page: IDocumentPage, eventInitDict?: EventInit);
|
|
482
|
-
}
|
|
483
|
-
export class EventTypes extends CoreEventTypes {
|
|
484
|
-
static PAGE_RENDERED: string;
|
|
485
|
-
}
|
|
486
486
|
export interface IDocument {
|
|
487
487
|
loadDocumentAsync(arrayBuffer: ArrayBuffer): Promise<void>;
|
|
488
488
|
increaseScale(scaleFactor?: number): void;
|
|
489
489
|
decreaseScale(scaleFactor?: number): void;
|
|
490
|
-
|
|
490
|
+
fitWidth(): void;
|
|
491
491
|
getPageAsync(pageNumber: number): Promise<IDocumentPage>;
|
|
492
492
|
getPageByTarget(element: HTMLElement): IDocumentPage | undefined;
|
|
493
493
|
scrollPageIntoViewAsync(pageNumber: number): Promise<void>;
|
|
@@ -497,6 +497,17 @@ export const ZOOM_IN_SCALE_FACTOR = 1.15;
|
|
|
497
497
|
export const ZOOM_OUT_SCALE_FACTOR = 0.85;
|
|
498
498
|
export const ZOOM_MAX_SCALE = 10;
|
|
499
499
|
export const ZOOM_MIN_SCALE = 4;
|
|
500
|
+
export class EventTypes extends CoreEventTypes {
|
|
501
|
+
static PAGE_RENDERED: string;
|
|
502
|
+
static DOCUMENT_ZOOM_IN: string;
|
|
503
|
+
static DOCUMENT_ZOOM_OUT: string;
|
|
504
|
+
static DOCUMENT_FIT_WIDTH: string;
|
|
505
|
+
}
|
|
506
|
+
export class PageRenderedEvent extends Event {
|
|
507
|
+
page: IDocumentPage;
|
|
508
|
+
|
|
509
|
+
constructor(type: string, page: IDocumentPage, eventInitDict?: EventInit);
|
|
510
|
+
}
|
|
500
511
|
export let ViewerInstance: Viewer2D;
|
|
501
512
|
export class Viewer2D extends ViewerBase {
|
|
502
513
|
readonly settings: Readonly<ISettings>;
|
|
@@ -506,8 +517,6 @@ export class Viewer2D extends ViewerBase {
|
|
|
506
517
|
unloadDocument(): void;
|
|
507
518
|
start(): Promise<number>;
|
|
508
519
|
finish(): void;
|
|
509
|
-
protected zoomIn(event: MouseEvent): void;
|
|
510
|
-
protected zoomOut(event: MouseEvent): void;
|
|
511
520
|
}
|
|
512
521
|
export class GuiViewer2D extends Viewer2D {
|
|
513
522
|
loadDocument(buffer: ArrayBuffer, options: object, onSuccessCallback: SuccessCallback, onErrorCallback: ErrorCallback): void;
|
|
@@ -515,6 +524,14 @@ export class GuiViewer2D extends Viewer2D {
|
|
|
515
524
|
onPostExtensionLoad(extension: ExtensionBase): void;
|
|
516
525
|
protected getToolbarHeight(): number;
|
|
517
526
|
}
|
|
527
|
+
export function CreateViewer(container: HTMLElement, configuration?: Viewer2DConfiguration): GuiViewer2D;
|
|
528
|
+
export function CreateBasicViewer(container: HTMLElement, configuration?: Viewer2DConfiguration): Viewer2D;
|
|
529
|
+
/**
|
|
530
|
+
* @param options
|
|
531
|
+
* @param callback
|
|
532
|
+
*/
|
|
533
|
+
export function Initializer(options: InitializerOptions, callback: InitializeSuccessCallback): void;
|
|
534
|
+
export function shutdown(): void;
|
|
518
535
|
export class Extension extends ExtensionBase {
|
|
519
536
|
protected _viewer: Viewer2D;
|
|
520
537
|
}
|