UNPKG

fabric

Version:

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

1 lines 843 B
{"version":3,"file":"fireEvent.min.mjs","sources":["../../../src/controls/fireEvent.ts"],"sourcesContent":["import type {\n ObjectModificationEvents,\n TModificationEvents,\n} from '../EventTypeDefs';\n\nexport const fireEvent = (\n eventName: TModificationEvents,\n options: ObjectModificationEvents[typeof eventName],\n) => {\n const {\n transform: { target },\n } = options;\n target.canvas?.fire(`object:${eventName}`, {\n ...options,\n target,\n });\n target.fire(eventName, options);\n};\n"],"names":["fireEvent","eventName","options","_target$canvas","transform","target","canvas","fire","concat","_objectSpread"],"mappings":"uFAKaA,EAAYA,CACvBC,EACAC,KACG,IAAAC,EACH,MACEC,WAAWC,OAAEA,IACXH,EACSC,QAAbA,EAAAE,EAAOC,kBAAMH,GAAbA,EAAeI,KAAIC,UAAAA,OAAWP,GAASQ,EAAAA,KAClCP,GAAO,GAAA,CACVG,YAEFA,EAAOE,KAAKN,EAAWC,EAAQ"}