UNPKG

survey-creator-core

Version:

A framework-independent core package of the SurveyJS Survey Creator component. With Survey Creator, you can visually design complex, interactive JSON forms and surveys in a drag-and-drop interface.

71 lines (70 loc) 2.29 kB
import { Base, SurveyModel } from "survey-core"; import { SurveyCreatorModel } from "../creator-base"; import "./simulator.scss"; export declare class SurveySimulatorModel extends Base { private surveyProvider; private surveyChanged; /** * Value for CSS custom property `--sv-popup-overlay-height` on `.svd-simulator-content` (bound by framework views). * Empty string when not used (desktop). */ popupOverlayHeight: string; private syncPopupOverlayHeight; constructor(surveyProvider: SurveyCreatorModel); landscape: boolean; survey: SurveyModel; device: string; orientation: string; considerDPI: boolean; isRunning: boolean; simulatorEnabled: boolean; simulatorScaleEnabled: boolean; private currZoomScale; get zoomScale(): number; activateZoom: () => void; deactivateZoom: () => void; private listenTryToZoomWithWheel; private tryToZoomWithWheel; private listenTryToZoom; tryToZoom(data: any, event: any): boolean; private changeZoomScale; private zoomSimulator; resetZoomParameters(): void; private layoutRefreshRafId; /** * Responsiveness depends on survey root width after the simulator shell layout updates. * Schedules {@link SurveyModel.forceProcessResponsiveness} on the next animation frame * so embedded framework bindings have applied frame sizes first. */ queueSurveyLayoutRefresh(): void; cancelSurveyLayoutRefresh(): void; get activeDevice(): string; set activeDevice(device: string); get landscapeOrientation(): boolean; get scale(): number; get hasFrame(): boolean; get simulatorFrame(): { scale: number; frameWidth: number; frameHeight: number; landscapedFrameWidth: number; landscapedFrameHeight: number; deviceWidth: number; deviceHeight: number; cssClass: string; }; getRootCss(): string; } export declare var DEFAULT_MONITOR_DPI: number; export declare var simulatorDevices: { [index: string]: { cssPixelRatio?: number; ppi?: number; width?: number; height?: number; deviceType: string; title: string; cssClass?: string; visibleIndex?: number; }; };