UNPKG

fabric

Version:

Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.

1 lines 987 B
{"version":3,"file":"FitContentLayout.min.mjs","sources":["../../../../src/LayoutManager/LayoutStrategies/FitContentLayout.ts"],"sourcesContent":["import type { StrictLayoutContext } from '../types';\nimport { LayoutStrategy } from './LayoutStrategy';\nimport { classRegistry } from '../../ClassRegistry';\n\n/**\n * Layout will adjust the bounding box to fit target's objects.\n */\nexport class FitContentLayout extends LayoutStrategy {\n static readonly type = 'fit-content';\n\n /**\n * @override layout on all triggers\n * Override at will\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n shouldPerformLayout(context: StrictLayoutContext) {\n return true;\n }\n}\n\nclassRegistry.setClass(FitContentLayout);\n"],"names":["FitContentLayout","LayoutStrategy","shouldPerformLayout","context","_defineProperty","classRegistry","setClass"],"mappings":"2MAOO,MAAMA,UAAyBC,EAQpCC,mBAAAA,CAAoBC,GAClB,OAAO,CACT,EACDC,EAXYJ,EAAgB,OACJ,eAYzBK,EAAcC,SAASN"}