UNPKG

@avolutions/canvas-painter

Version:

CanvasPainter.js is a simple yet powerful JavaScript library for drawing basic shapes (rectangles, circles, etc.) on HTML5 Canvas with ease. Perfect for creating 2D graphics in your web projects.

26 lines (25 loc) 661 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ZoomOptions = void 0; /** * Options for configuring the zoom behavior of a canvas. */ class ZoomOptions { /** * Creates a new instance of ZoomOptions. * * @param options - The partial options provided by the user. */ constructor(options = {}) { const optionsWithDefaults = Object.assign(Object.assign({}, ZoomOptions.DefaultOptions), options); Object.assign(this, optionsWithDefaults); } } exports.ZoomOptions = ZoomOptions; /** * Default zoom options. */ ZoomOptions.DefaultOptions = { step: 0.1, useWheel: true };