import { EditorAPI, Id } from '../types/CommonTypes'; import { ViewMode } from '../types/ViewModeTypes'; /** * The CanvasController is responsible for all Canvas-related functionality. * Methods inside this controller can be called by `window.SDK.canvas.{method-name}` */ export declare class CanvasController { #private; /** * @ignore */ constructor(editorAPI: EditorAPI); /** * This method fits the page to the given rectangle or the viewport available * Optional parameters `left`, `top`, `width` and `height` are needed to define the rectangle to fit the page to * If any or all of them aren't provided the page will fit the whole viewport available * @param _id the id of a specific page * @param left * @param top * @param width * @param height * @returns */ zoomToPage: (_id?: Id | null, left?: number | null, top?: number | null, width?: number | null, height?: number | null) => Promise>; /** * This method gets the scale factor of the canvas * @returns scale factor in percents */ getZoomPercentage: () => Promise>; /** * This method sets the scale factor to the canvas and re-centers the page * @param scaleFactor scale factor in percents * @returns */ setZoomPercentage: (scaleFactor: number) => Promise>; /** * This method sets a new view mode * @param viewMode view mode of the editor * @returns */ setViewMode: (viewMode: ViewMode) => Promise>; }