@netless/app-presentation 0.1.9-beta.2 → 0.1.9-beta.4

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.d.ts CHANGED
@@ -306,6 +306,14 @@ declare class Presentation implements IDisposable<void> {
306
306
 
307
307
  declare const __inline: string;
308
308
 
309
+ interface ScrollbarEventCallback {
310
+ onScrollbarDragStart?: () => void;
311
+ onScrollbarDragEnd?: () => void;
312
+ onScrollbarDragX?: (x: number) => void;
313
+ onScrollbarDragY?: (y: number) => void;
314
+ onScrollCameraUpdated?: (appid: string, originScale: number, scale: number) => void;
315
+ }
316
+
309
317
  type Logger = (...data: any[]) => void;
310
318
  interface Viewport {
311
319
  readonly x: number;
@@ -338,6 +346,7 @@ interface PresentationAppOptions {
338
346
  useScrollbar?: boolean;
339
347
  /** debounceSync is used to set the presentation debounce sync, it will be used in the presentation, and the presentation will be debounce sync when the app is initialized */
340
348
  debounceSync?: boolean;
349
+ scrollbarEventCallback?: ScrollbarEventCallback;
341
350
  }
342
351
  interface PresentationController {
343
352
  readonly app: Presentation;
@@ -371,6 +380,8 @@ interface PresentationController {
371
380
  }) => void;
372
381
  /** get the origin scale */
373
382
  getOriginScale: () => number;
383
+ /** get the view scale */
384
+ getScale: () => number;
374
385
  }
375
386
 
376
387
  declare const NetlessAppPresentation: NetlessApp<{}, {}, PresentationAppOptions, PresentationController>;