UNPKG

@tldraw/editor

Version:

tldraw infinite canvas SDK (editor).

54 lines (53 loc) 1.96 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var constants_exports = {}; __export(constants_exports, { DEFAULT_ANIMATION_OPTIONS: () => DEFAULT_ANIMATION_OPTIONS, DEFAULT_CAMERA_OPTIONS: () => DEFAULT_CAMERA_OPTIONS, INTERNAL_POINTER_IDS: () => INTERNAL_POINTER_IDS, LEFT_MOUSE_BUTTON: () => LEFT_MOUSE_BUTTON, MIDDLE_MOUSE_BUTTON: () => MIDDLE_MOUSE_BUTTON, RIGHT_MOUSE_BUTTON: () => RIGHT_MOUSE_BUTTON, SIDES: () => SIDES, STYLUS_ERASER_BUTTON: () => STYLUS_ERASER_BUTTON, ZOOM_TO_FIT_PADDING: () => ZOOM_TO_FIT_PADDING }); module.exports = __toCommonJS(constants_exports); var import_easings = require("./primitives/easings"); const DEFAULT_CAMERA_OPTIONS = { isLocked: false, wheelBehavior: "pan", panSpeed: 1, zoomSpeed: 1, zoomSteps: [0.05, 0.1, 0.25, 0.5, 1, 2, 4, 8] }; const DEFAULT_ANIMATION_OPTIONS = { duration: 0, easing: import_easings.EASINGS.easeInOutCubic }; const INTERNAL_POINTER_IDS = { CAMERA_MOVE: -10 }; const SIDES = ["top", "right", "bottom", "left"]; const LEFT_MOUSE_BUTTON = 0; const RIGHT_MOUSE_BUTTON = 2; const MIDDLE_MOUSE_BUTTON = 1; const STYLUS_ERASER_BUTTON = 5; const ZOOM_TO_FIT_PADDING = 128; //# sourceMappingURL=constants.js.map