@nasser-sw/fabric 7.0.1-beta2 → 7.0.1-beta3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +0 -0
- package/.babelrcAlt +0 -0
- package/.browserslistrc +0 -0
- package/.editorconfig +0 -0
- package/.gitattributes +0 -0
- package/.gitpod.yml +0 -0
- package/.prettierignore +0 -0
- package/.prettierrc +0 -0
- package/CHANGELOG.md +0 -0
- package/CODE_OF_CONDUCT.md +0 -0
- package/CONTRIBUTING.md +0 -0
- package/LICENSE +0 -0
- package/OVERLAY_EDITOR_MIGRATION.md +0 -0
- package/README.md +0 -0
- package/SECURITY.md +0 -0
- package/debug/konva/CHANGELOG.md +0 -0
- package/debug/konva/LICENSE +0 -0
- package/debug/konva/README.md +0 -0
- package/debug/konva/gulpfile.mjs +0 -0
- package/debug/konva/package.json +0 -0
- package/debug/konva/release.sh +0 -0
- package/debug/konva/resources/doc-includes/ContainerParams.txt +0 -0
- package/debug/konva/resources/doc-includes/NodeParams.txt +0 -0
- package/debug/konva/resources/doc-includes/ShapeParams.txt +0 -0
- package/debug/konva/resources/jsdoc.conf.json +0 -0
- package/debug/konva/rollup.config.mjs +0 -0
- package/debug/konva/src/Animation.ts +0 -0
- package/debug/konva/src/BezierFunctions.ts +0 -0
- package/debug/konva/src/Canvas.ts +0 -0
- package/debug/konva/src/Container.ts +0 -0
- package/debug/konva/src/Context.ts +0 -0
- package/debug/konva/src/Core.ts +0 -0
- package/debug/konva/src/DragAndDrop.ts +0 -0
- package/debug/konva/src/Factory.ts +0 -0
- package/debug/konva/src/FastLayer.ts +0 -0
- package/debug/konva/src/Global.ts +0 -0
- package/debug/konva/src/Group.ts +0 -0
- package/debug/konva/src/Layer.ts +0 -0
- package/debug/konva/src/Node.ts +0 -0
- package/debug/konva/src/PointerEvents.ts +0 -0
- package/debug/konva/src/Shape.ts +0 -0
- package/debug/konva/src/Stage.ts +0 -0
- package/debug/konva/src/Tween.ts +0 -0
- package/debug/konva/src/Util.ts +0 -0
- package/debug/konva/src/Validators.ts +0 -0
- package/debug/konva/src/_CoreInternals.ts +0 -0
- package/debug/konva/src/_FullInternals.ts +0 -0
- package/debug/konva/src/canvas-backend.ts +0 -0
- package/debug/konva/src/filters/Blur.ts +0 -0
- package/debug/konva/src/filters/Brighten.ts +0 -0
- package/debug/konva/src/filters/Brightness.ts +0 -0
- package/debug/konva/src/filters/Contrast.ts +0 -0
- package/debug/konva/src/filters/Emboss.ts +0 -0
- package/debug/konva/src/filters/Enhance.ts +0 -0
- package/debug/konva/src/filters/Grayscale.ts +0 -0
- package/debug/konva/src/filters/HSL.ts +0 -0
- package/debug/konva/src/filters/HSV.ts +0 -0
- package/debug/konva/src/filters/Invert.ts +0 -0
- package/debug/konva/src/filters/Kaleidoscope.ts +0 -0
- package/debug/konva/src/filters/Mask.ts +0 -0
- package/debug/konva/src/filters/Noise.ts +0 -0
- package/debug/konva/src/filters/Pixelate.ts +0 -0
- package/debug/konva/src/filters/Posterize.ts +0 -0
- package/debug/konva/src/filters/RGB.ts +0 -0
- package/debug/konva/src/filters/RGBA.ts +0 -0
- package/debug/konva/src/filters/Sepia.ts +0 -0
- package/debug/konva/src/filters/Solarize.ts +0 -0
- package/debug/konva/src/filters/Threshold.ts +0 -0
- package/debug/konva/src/index.ts +0 -0
- package/debug/konva/src/shapes/Arc.ts +0 -0
- package/debug/konva/src/shapes/Arrow.ts +0 -0
- package/debug/konva/src/shapes/Circle.ts +0 -0
- package/debug/konva/src/shapes/Ellipse.ts +0 -0
- package/debug/konva/src/shapes/Image.ts +0 -0
- package/debug/konva/src/shapes/Label.ts +0 -0
- package/debug/konva/src/shapes/Line.ts +0 -0
- package/debug/konva/src/shapes/Path.ts +0 -0
- package/debug/konva/src/shapes/Rect.ts +0 -0
- package/debug/konva/src/shapes/RegularPolygon.ts +0 -0
- package/debug/konva/src/shapes/Ring.ts +0 -0
- package/debug/konva/src/shapes/Sprite.ts +0 -0
- package/debug/konva/src/shapes/Star.ts +0 -0
- package/debug/konva/src/shapes/Text.ts +0 -0
- package/debug/konva/src/shapes/TextPath.ts +0 -0
- package/debug/konva/src/shapes/Transformer.ts +0 -0
- package/debug/konva/src/shapes/Wedge.ts +0 -0
- package/debug/konva/src/skia-backend.ts +0 -0
- package/debug/konva/src/types.ts +0 -0
- package/debug/konva/tsconfig.json +0 -0
- package/debug/konva/tsconfig.test.json +0 -0
- package/dist/_virtual/_rollupPluginBabelHelpers.min.mjs +0 -0
- package/dist/_virtual/_rollupPluginBabelHelpers.min.mjs.map +0 -0
- package/dist/_virtual/_rollupPluginBabelHelpers.mjs +0 -0
- package/dist/_virtual/_rollupPluginBabelHelpers.mjs.map +0 -0
- package/dist/extensions/aligning_guidelines/constant.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/constant.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/index.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/index.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/typedefs.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/typedefs.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/util/basic.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/util/basic.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/util/collect-line.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/util/collect-line.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/util/collect-point.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/util/collect-point.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/util/draw.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/util/draw.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/util/get-objects-by-target.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/util/get-objects-by-target.d.ts.map +0 -0
- package/dist/extensions/data_updaters/gradient/index.d.ts +0 -0
- package/dist/extensions/data_updaters/gradient/index.d.ts.map +0 -0
- package/dist/extensions/data_updaters/origins/index.d.ts +0 -0
- package/dist/extensions/data_updaters/origins/index.d.ts.map +0 -0
- package/dist/extensions/index.d.ts +0 -0
- package/dist/extensions/index.d.ts.map +0 -0
- package/dist/fabric.d.ts +0 -0
- package/dist/fabric.d.ts.map +0 -0
- package/dist/fabric.min.mjs +0 -0
- package/dist/fabric.min.mjs.map +0 -0
- package/dist/fabric.mjs +0 -0
- package/dist/fabric.mjs.map +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.d.ts.map +0 -0
- package/dist/index.js +1266 -1000
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +1266 -1000
- package/dist/index.mjs.map +1 -1
- package/dist/index.node.cjs +1266 -1000
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.ts +0 -0
- package/dist/index.node.d.ts.map +0 -0
- package/dist/index.node.mjs +1266 -1000
- package/dist/index.node.mjs.map +1 -1
- package/dist/package.json.min.mjs +1 -1
- package/dist/package.json.min.mjs.map +0 -0
- package/dist/package.json.mjs +1 -1
- package/dist/package.json.mjs.map +0 -0
- package/dist/src/ClassRegistry.d.ts +0 -0
- package/dist/src/ClassRegistry.d.ts.map +0 -0
- package/dist/src/ClassRegistry.min.mjs +0 -0
- package/dist/src/ClassRegistry.min.mjs.map +0 -0
- package/dist/src/ClassRegistry.mjs +0 -0
- package/dist/src/ClassRegistry.mjs.map +0 -0
- package/dist/src/Collection.d.ts +0 -0
- package/dist/src/Collection.d.ts.map +0 -0
- package/dist/src/Collection.min.mjs +0 -0
- package/dist/src/Collection.min.mjs.map +0 -0
- package/dist/src/Collection.mjs +0 -0
- package/dist/src/Collection.mjs.map +0 -0
- package/dist/src/CommonMethods.d.ts +0 -0
- package/dist/src/CommonMethods.d.ts.map +0 -0
- package/dist/src/CommonMethods.min.mjs +0 -0
- package/dist/src/CommonMethods.min.mjs.map +0 -0
- package/dist/src/CommonMethods.mjs +0 -0
- package/dist/src/CommonMethods.mjs.map +0 -0
- package/dist/src/EventTypeDefs.d.ts +0 -0
- package/dist/src/EventTypeDefs.d.ts.map +0 -0
- package/dist/src/Intersection.d.ts +0 -0
- package/dist/src/Intersection.d.ts.map +0 -0
- package/dist/src/Intersection.min.mjs +0 -0
- package/dist/src/Intersection.min.mjs.map +0 -0
- package/dist/src/Intersection.mjs +0 -0
- package/dist/src/Intersection.mjs.map +0 -0
- package/dist/src/LayoutManager/ActiveSelectionLayoutManager.d.ts +0 -0
- package/dist/src/LayoutManager/ActiveSelectionLayoutManager.d.ts.map +0 -0
- package/dist/src/LayoutManager/ActiveSelectionLayoutManager.min.mjs +0 -0
- package/dist/src/LayoutManager/ActiveSelectionLayoutManager.min.mjs.map +0 -0
- package/dist/src/LayoutManager/ActiveSelectionLayoutManager.mjs +0 -0
- package/dist/src/LayoutManager/ActiveSelectionLayoutManager.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutManager.d.ts +0 -0
- package/dist/src/LayoutManager/LayoutManager.d.ts.map +0 -0
- package/dist/src/LayoutManager/LayoutManager.min.mjs +0 -0
- package/dist/src/LayoutManager/LayoutManager.min.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutManager.mjs +0 -0
- package/dist/src/LayoutManager/LayoutManager.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.min.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.min.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.min.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.min.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.min.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.min.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.min.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.min.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/utils.d.ts +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/utils.d.ts.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/utils.min.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/utils.min.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/utils.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/utils.mjs.map +0 -0
- package/dist/src/LayoutManager/constants.d.ts +0 -0
- package/dist/src/LayoutManager/constants.d.ts.map +0 -0
- package/dist/src/LayoutManager/constants.min.mjs +0 -0
- package/dist/src/LayoutManager/constants.min.mjs.map +0 -0
- package/dist/src/LayoutManager/constants.mjs +0 -0
- package/dist/src/LayoutManager/constants.mjs.map +0 -0
- package/dist/src/LayoutManager/index.d.ts +0 -0
- package/dist/src/LayoutManager/index.d.ts.map +0 -0
- package/dist/src/LayoutManager/types.d.ts +0 -0
- package/dist/src/LayoutManager/types.d.ts.map +0 -0
- package/dist/src/Observable.d.ts +0 -0
- package/dist/src/Observable.d.ts.map +0 -0
- package/dist/src/Observable.min.mjs +0 -0
- package/dist/src/Observable.min.mjs.map +0 -0
- package/dist/src/Observable.mjs +0 -0
- package/dist/src/Observable.mjs.map +0 -0
- package/dist/src/Pattern/Pattern.d.ts +0 -0
- package/dist/src/Pattern/Pattern.d.ts.map +0 -0
- package/dist/src/Pattern/Pattern.min.mjs +0 -0
- package/dist/src/Pattern/Pattern.min.mjs.map +0 -0
- package/dist/src/Pattern/Pattern.mjs +0 -0
- package/dist/src/Pattern/Pattern.mjs.map +0 -0
- package/dist/src/Pattern/index.d.ts +0 -0
- package/dist/src/Pattern/index.d.ts.map +0 -0
- package/dist/src/Pattern/types.d.ts +0 -0
- package/dist/src/Pattern/types.d.ts.map +0 -0
- package/dist/src/Point.d.ts +0 -0
- package/dist/src/Point.d.ts.map +0 -0
- package/dist/src/Point.min.mjs +0 -0
- package/dist/src/Point.min.mjs.map +0 -0
- package/dist/src/Point.mjs +0 -0
- package/dist/src/Point.mjs.map +0 -0
- package/dist/src/Shadow.d.ts +0 -0
- package/dist/src/Shadow.d.ts.map +0 -0
- package/dist/src/Shadow.min.mjs +0 -0
- package/dist/src/Shadow.min.mjs.map +0 -0
- package/dist/src/Shadow.mjs +0 -0
- package/dist/src/Shadow.mjs.map +0 -0
- package/dist/src/brushes/BaseBrush.d.ts +0 -0
- package/dist/src/brushes/BaseBrush.d.ts.map +0 -0
- package/dist/src/brushes/BaseBrush.min.mjs +0 -0
- package/dist/src/brushes/BaseBrush.min.mjs.map +0 -0
- package/dist/src/brushes/BaseBrush.mjs +0 -0
- package/dist/src/brushes/BaseBrush.mjs.map +0 -0
- package/dist/src/brushes/CircleBrush.d.ts +0 -0
- package/dist/src/brushes/CircleBrush.d.ts.map +0 -0
- package/dist/src/brushes/CircleBrush.min.mjs +0 -0
- package/dist/src/brushes/CircleBrush.min.mjs.map +0 -0
- package/dist/src/brushes/CircleBrush.mjs +0 -0
- package/dist/src/brushes/CircleBrush.mjs.map +0 -0
- package/dist/src/brushes/PatternBrush.d.ts +0 -0
- package/dist/src/brushes/PatternBrush.d.ts.map +0 -0
- package/dist/src/brushes/PatternBrush.min.mjs +0 -0
- package/dist/src/brushes/PatternBrush.min.mjs.map +0 -0
- package/dist/src/brushes/PatternBrush.mjs +0 -0
- package/dist/src/brushes/PatternBrush.mjs.map +0 -0
- package/dist/src/brushes/PencilBrush.d.ts +0 -0
- package/dist/src/brushes/PencilBrush.d.ts.map +0 -0
- package/dist/src/brushes/PencilBrush.min.mjs +0 -0
- package/dist/src/brushes/PencilBrush.min.mjs.map +0 -0
- package/dist/src/brushes/PencilBrush.mjs +0 -0
- package/dist/src/brushes/PencilBrush.mjs.map +0 -0
- package/dist/src/brushes/SprayBrush.d.ts +0 -0
- package/dist/src/brushes/SprayBrush.d.ts.map +0 -0
- package/dist/src/brushes/SprayBrush.min.mjs +0 -0
- package/dist/src/brushes/SprayBrush.min.mjs.map +0 -0
- package/dist/src/brushes/SprayBrush.mjs +0 -0
- package/dist/src/brushes/SprayBrush.mjs.map +0 -0
- package/dist/src/brushes/typedefs.d.ts +0 -0
- package/dist/src/brushes/typedefs.d.ts.map +0 -0
- package/dist/src/cache.d.ts +0 -0
- package/dist/src/cache.d.ts.map +0 -0
- package/dist/src/cache.min.mjs +0 -0
- package/dist/src/cache.min.mjs.map +0 -0
- package/dist/src/cache.mjs +0 -0
- package/dist/src/cache.mjs.map +0 -0
- package/dist/src/canvas/Canvas.d.ts +0 -0
- package/dist/src/canvas/Canvas.d.ts.map +0 -0
- package/dist/src/canvas/Canvas.min.mjs +0 -0
- package/dist/src/canvas/Canvas.min.mjs.map +0 -0
- package/dist/src/canvas/Canvas.mjs +0 -0
- package/dist/src/canvas/Canvas.mjs.map +0 -0
- package/dist/src/canvas/CanvasOptions.d.ts +0 -0
- package/dist/src/canvas/CanvasOptions.d.ts.map +0 -0
- package/dist/src/canvas/CanvasOptions.min.mjs +0 -0
- package/dist/src/canvas/CanvasOptions.min.mjs.map +0 -0
- package/dist/src/canvas/CanvasOptions.mjs +0 -0
- package/dist/src/canvas/CanvasOptions.mjs.map +0 -0
- package/dist/src/canvas/DOMManagers/CanvasDOMManager.d.ts +0 -0
- package/dist/src/canvas/DOMManagers/CanvasDOMManager.d.ts.map +0 -0
- package/dist/src/canvas/DOMManagers/CanvasDOMManager.min.mjs +0 -0
- package/dist/src/canvas/DOMManagers/CanvasDOMManager.min.mjs.map +0 -0
- package/dist/src/canvas/DOMManagers/CanvasDOMManager.mjs +0 -0
- package/dist/src/canvas/DOMManagers/CanvasDOMManager.mjs.map +0 -0
- package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts +0 -0
- package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts.map +0 -0
- package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.min.mjs +0 -0
- package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.min.mjs.map +0 -0
- package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.mjs +0 -0
- package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.mjs.map +0 -0
- package/dist/src/canvas/DOMManagers/util.d.ts +0 -0
- package/dist/src/canvas/DOMManagers/util.d.ts.map +0 -0
- package/dist/src/canvas/DOMManagers/util.min.mjs +0 -0
- package/dist/src/canvas/DOMManagers/util.min.mjs.map +0 -0
- package/dist/src/canvas/DOMManagers/util.mjs +0 -0
- package/dist/src/canvas/DOMManagers/util.mjs.map +0 -0
- package/dist/src/canvas/SelectableCanvas.d.ts +0 -0
- package/dist/src/canvas/SelectableCanvas.d.ts.map +0 -0
- package/dist/src/canvas/SelectableCanvas.min.mjs +0 -0
- package/dist/src/canvas/SelectableCanvas.min.mjs.map +0 -0
- package/dist/src/canvas/SelectableCanvas.mjs +0 -0
- package/dist/src/canvas/SelectableCanvas.mjs.map +0 -0
- package/dist/src/canvas/StaticCanvas.d.ts +0 -0
- package/dist/src/canvas/StaticCanvas.d.ts.map +0 -0
- package/dist/src/canvas/StaticCanvas.min.mjs +0 -0
- package/dist/src/canvas/StaticCanvas.min.mjs.map +0 -0
- package/dist/src/canvas/StaticCanvas.mjs +0 -0
- package/dist/src/canvas/StaticCanvas.mjs.map +0 -0
- package/dist/src/canvas/StaticCanvasOptions.d.ts +0 -0
- package/dist/src/canvas/StaticCanvasOptions.d.ts.map +0 -0
- package/dist/src/canvas/StaticCanvasOptions.min.mjs +0 -0
- package/dist/src/canvas/StaticCanvasOptions.min.mjs.map +0 -0
- package/dist/src/canvas/StaticCanvasOptions.mjs +0 -0
- package/dist/src/canvas/StaticCanvasOptions.mjs.map +0 -0
- package/dist/src/canvas/TextEditingManager.d.ts +0 -0
- package/dist/src/canvas/TextEditingManager.d.ts.map +0 -0
- package/dist/src/canvas/TextEditingManager.min.mjs +0 -0
- package/dist/src/canvas/TextEditingManager.min.mjs.map +0 -0
- package/dist/src/canvas/TextEditingManager.mjs +0 -0
- package/dist/src/canvas/TextEditingManager.mjs.map +0 -0
- package/dist/src/canvas/canvas_gestures.mixin.d.ts +0 -0
- package/dist/src/canvas/canvas_gestures.mixin.d.ts.map +0 -0
- package/dist/src/color/Color.d.ts +0 -0
- package/dist/src/color/Color.d.ts.map +0 -0
- package/dist/src/color/Color.min.mjs +0 -0
- package/dist/src/color/Color.min.mjs.map +0 -0
- package/dist/src/color/Color.mjs +0 -0
- package/dist/src/color/Color.mjs.map +0 -0
- package/dist/src/color/color_map.d.ts +0 -0
- package/dist/src/color/color_map.d.ts.map +0 -0
- package/dist/src/color/color_map.min.mjs +0 -0
- package/dist/src/color/color_map.min.mjs.map +0 -0
- package/dist/src/color/color_map.mjs +0 -0
- package/dist/src/color/color_map.mjs.map +0 -0
- package/dist/src/color/constants.d.ts +0 -0
- package/dist/src/color/constants.d.ts.map +0 -0
- package/dist/src/color/constants.min.mjs +0 -0
- package/dist/src/color/constants.min.mjs.map +0 -0
- package/dist/src/color/constants.mjs +0 -0
- package/dist/src/color/constants.mjs.map +0 -0
- package/dist/src/color/typedefs.d.ts +0 -0
- package/dist/src/color/typedefs.d.ts.map +0 -0
- package/dist/src/color/util.d.ts +0 -0
- package/dist/src/color/util.d.ts.map +0 -0
- package/dist/src/color/util.min.mjs +0 -0
- package/dist/src/color/util.min.mjs.map +0 -0
- package/dist/src/color/util.mjs +0 -0
- package/dist/src/color/util.mjs.map +0 -0
- package/dist/src/config.d.ts +0 -0
- package/dist/src/config.d.ts.map +0 -0
- package/dist/src/config.min.mjs +0 -0
- package/dist/src/config.min.mjs.map +0 -0
- package/dist/src/config.mjs +0 -0
- package/dist/src/config.mjs.map +0 -0
- package/dist/src/constants.d.ts +0 -0
- package/dist/src/constants.d.ts.map +0 -0
- package/dist/src/constants.min.mjs +0 -0
- package/dist/src/constants.min.mjs.map +0 -0
- package/dist/src/constants.mjs +0 -0
- package/dist/src/constants.mjs.map +0 -0
- package/dist/src/controls/Control.d.ts +0 -0
- package/dist/src/controls/Control.d.ts.map +0 -0
- package/dist/src/controls/Control.min.mjs +0 -0
- package/dist/src/controls/Control.min.mjs.map +0 -0
- package/dist/src/controls/Control.mjs +0 -0
- package/dist/src/controls/Control.mjs.map +0 -0
- package/dist/src/controls/changeHeight.d.ts +0 -0
- package/dist/src/controls/changeHeight.d.ts.map +0 -0
- package/dist/src/controls/changeWidth.d.ts +0 -0
- package/dist/src/controls/changeWidth.d.ts.map +0 -0
- package/dist/src/controls/changeWidth.min.mjs +0 -0
- package/dist/src/controls/changeWidth.min.mjs.map +0 -0
- package/dist/src/controls/changeWidth.mjs +0 -0
- package/dist/src/controls/changeWidth.mjs.map +0 -0
- package/dist/src/controls/commonControls.d.ts +0 -0
- package/dist/src/controls/commonControls.d.ts.map +0 -0
- package/dist/src/controls/commonControls.min.mjs +0 -0
- package/dist/src/controls/commonControls.min.mjs.map +0 -0
- package/dist/src/controls/commonControls.mjs +0 -0
- package/dist/src/controls/commonControls.mjs.map +0 -0
- package/dist/src/controls/controlRendering.d.ts +0 -0
- package/dist/src/controls/controlRendering.d.ts.map +0 -0
- package/dist/src/controls/controlRendering.min.mjs +0 -0
- package/dist/src/controls/controlRendering.min.mjs.map +0 -0
- package/dist/src/controls/controlRendering.mjs +0 -0
- package/dist/src/controls/controlRendering.mjs.map +0 -0
- package/dist/src/controls/drag.d.ts +0 -0
- package/dist/src/controls/drag.d.ts.map +0 -0
- package/dist/src/controls/drag.min.mjs +0 -0
- package/dist/src/controls/drag.min.mjs.map +0 -0
- package/dist/src/controls/drag.mjs +0 -0
- package/dist/src/controls/drag.mjs.map +0 -0
- package/dist/src/controls/fireEvent.d.ts +0 -0
- package/dist/src/controls/fireEvent.d.ts.map +0 -0
- package/dist/src/controls/fireEvent.min.mjs +0 -0
- package/dist/src/controls/fireEvent.min.mjs.map +0 -0
- package/dist/src/controls/fireEvent.mjs +0 -0
- package/dist/src/controls/fireEvent.mjs.map +0 -0
- package/dist/src/controls/index.d.ts +0 -0
- package/dist/src/controls/index.d.ts.map +0 -0
- package/dist/src/controls/index.min.mjs +0 -0
- package/dist/src/controls/index.min.mjs.map +0 -0
- package/dist/src/controls/index.mjs +0 -0
- package/dist/src/controls/index.mjs.map +0 -0
- package/dist/src/controls/pathControl.d.ts +0 -0
- package/dist/src/controls/pathControl.d.ts.map +0 -0
- package/dist/src/controls/pathControl.min.mjs +0 -0
- package/dist/src/controls/pathControl.min.mjs.map +0 -0
- package/dist/src/controls/pathControl.mjs +0 -0
- package/dist/src/controls/pathControl.mjs.map +0 -0
- package/dist/src/controls/polyControl.d.ts +0 -0
- package/dist/src/controls/polyControl.d.ts.map +0 -0
- package/dist/src/controls/polyControl.min.mjs +0 -0
- package/dist/src/controls/polyControl.min.mjs.map +0 -0
- package/dist/src/controls/polyControl.mjs +0 -0
- package/dist/src/controls/polyControl.mjs.map +0 -0
- package/dist/src/controls/rotate.d.ts +0 -0
- package/dist/src/controls/rotate.d.ts.map +0 -0
- package/dist/src/controls/rotate.min.mjs +0 -0
- package/dist/src/controls/rotate.min.mjs.map +0 -0
- package/dist/src/controls/rotate.mjs +0 -0
- package/dist/src/controls/rotate.mjs.map +0 -0
- package/dist/src/controls/scale.d.ts +0 -0
- package/dist/src/controls/scale.d.ts.map +0 -0
- package/dist/src/controls/scale.min.mjs +0 -0
- package/dist/src/controls/scale.min.mjs.map +0 -0
- package/dist/src/controls/scale.mjs +0 -0
- package/dist/src/controls/scale.mjs.map +0 -0
- package/dist/src/controls/scaleSkew.d.ts +0 -0
- package/dist/src/controls/scaleSkew.d.ts.map +0 -0
- package/dist/src/controls/scaleSkew.min.mjs +0 -0
- package/dist/src/controls/scaleSkew.min.mjs.map +0 -0
- package/dist/src/controls/scaleSkew.mjs +0 -0
- package/dist/src/controls/scaleSkew.mjs.map +0 -0
- package/dist/src/controls/skew.d.ts +0 -0
- package/dist/src/controls/skew.d.ts.map +0 -0
- package/dist/src/controls/skew.min.mjs +0 -0
- package/dist/src/controls/skew.min.mjs.map +0 -0
- package/dist/src/controls/skew.mjs +0 -0
- package/dist/src/controls/skew.mjs.map +0 -0
- package/dist/src/controls/util.d.ts +0 -0
- package/dist/src/controls/util.d.ts.map +0 -0
- package/dist/src/controls/util.min.mjs +0 -0
- package/dist/src/controls/util.min.mjs.map +0 -0
- package/dist/src/controls/util.mjs +0 -0
- package/dist/src/controls/util.mjs.map +0 -0
- package/dist/src/controls/wrapWithFireEvent.d.ts +0 -0
- package/dist/src/controls/wrapWithFireEvent.d.ts.map +0 -0
- package/dist/src/controls/wrapWithFireEvent.min.mjs +0 -0
- package/dist/src/controls/wrapWithFireEvent.min.mjs.map +0 -0
- package/dist/src/controls/wrapWithFireEvent.mjs +0 -0
- package/dist/src/controls/wrapWithFireEvent.mjs.map +0 -0
- package/dist/src/controls/wrapWithFixedAnchor.d.ts +0 -0
- package/dist/src/controls/wrapWithFixedAnchor.d.ts.map +0 -0
- package/dist/src/controls/wrapWithFixedAnchor.min.mjs +0 -0
- package/dist/src/controls/wrapWithFixedAnchor.min.mjs.map +0 -0
- package/dist/src/controls/wrapWithFixedAnchor.mjs +0 -0
- package/dist/src/controls/wrapWithFixedAnchor.mjs.map +0 -0
- package/dist/src/env/browser.d.ts +0 -0
- package/dist/src/env/browser.d.ts.map +0 -0
- package/dist/src/env/browser.min.mjs +0 -0
- package/dist/src/env/browser.min.mjs.map +0 -0
- package/dist/src/env/browser.mjs +0 -0
- package/dist/src/env/browser.mjs.map +0 -0
- package/dist/src/env/index.d.ts +0 -0
- package/dist/src/env/index.d.ts.map +0 -0
- package/dist/src/env/index.min.mjs +0 -0
- package/dist/src/env/index.min.mjs.map +0 -0
- package/dist/src/env/index.mjs +0 -0
- package/dist/src/env/index.mjs.map +0 -0
- package/dist/src/env/node.d.ts +0 -0
- package/dist/src/env/node.d.ts.map +0 -0
- package/dist/src/env/types.d.ts +0 -0
- package/dist/src/env/types.d.ts.map +0 -0
- package/dist/src/filters/BaseFilter.d.ts +0 -0
- package/dist/src/filters/BaseFilter.d.ts.map +0 -0
- package/dist/src/filters/BaseFilter.min.mjs +0 -0
- package/dist/src/filters/BaseFilter.min.mjs.map +0 -0
- package/dist/src/filters/BaseFilter.mjs +0 -0
- package/dist/src/filters/BaseFilter.mjs.map +0 -0
- package/dist/src/filters/BlendColor.d.ts +0 -0
- package/dist/src/filters/BlendColor.d.ts.map +0 -0
- package/dist/src/filters/BlendColor.min.mjs +0 -0
- package/dist/src/filters/BlendColor.min.mjs.map +0 -0
- package/dist/src/filters/BlendColor.mjs +0 -0
- package/dist/src/filters/BlendColor.mjs.map +0 -0
- package/dist/src/filters/BlendImage.d.ts +0 -0
- package/dist/src/filters/BlendImage.d.ts.map +0 -0
- package/dist/src/filters/BlendImage.min.mjs +0 -0
- package/dist/src/filters/BlendImage.min.mjs.map +0 -0
- package/dist/src/filters/BlendImage.mjs +0 -0
- package/dist/src/filters/BlendImage.mjs.map +0 -0
- package/dist/src/filters/Blur.d.ts +0 -0
- package/dist/src/filters/Blur.d.ts.map +0 -0
- package/dist/src/filters/Blur.min.mjs +0 -0
- package/dist/src/filters/Blur.min.mjs.map +0 -0
- package/dist/src/filters/Blur.mjs +0 -0
- package/dist/src/filters/Blur.mjs.map +0 -0
- package/dist/src/filters/Boilerplate.d.ts +0 -0
- package/dist/src/filters/Boilerplate.d.ts.map +0 -0
- package/dist/src/filters/Brightness.d.ts +0 -0
- package/dist/src/filters/Brightness.d.ts.map +0 -0
- package/dist/src/filters/Brightness.min.mjs +0 -0
- package/dist/src/filters/Brightness.min.mjs.map +0 -0
- package/dist/src/filters/Brightness.mjs +0 -0
- package/dist/src/filters/Brightness.mjs.map +0 -0
- package/dist/src/filters/Canvas2dFilterBackend.d.ts +0 -0
- package/dist/src/filters/Canvas2dFilterBackend.d.ts.map +0 -0
- package/dist/src/filters/Canvas2dFilterBackend.min.mjs +0 -0
- package/dist/src/filters/Canvas2dFilterBackend.min.mjs.map +0 -0
- package/dist/src/filters/Canvas2dFilterBackend.mjs +0 -0
- package/dist/src/filters/Canvas2dFilterBackend.mjs.map +0 -0
- package/dist/src/filters/ColorMatrix.d.ts +0 -0
- package/dist/src/filters/ColorMatrix.d.ts.map +0 -0
- package/dist/src/filters/ColorMatrix.min.mjs +0 -0
- package/dist/src/filters/ColorMatrix.min.mjs.map +0 -0
- package/dist/src/filters/ColorMatrix.mjs +0 -0
- package/dist/src/filters/ColorMatrix.mjs.map +0 -0
- package/dist/src/filters/ColorMatrixFilters.d.ts +0 -0
- package/dist/src/filters/ColorMatrixFilters.d.ts.map +0 -0
- package/dist/src/filters/ColorMatrixFilters.min.mjs +0 -0
- package/dist/src/filters/ColorMatrixFilters.min.mjs.map +0 -0
- package/dist/src/filters/ColorMatrixFilters.mjs +0 -0
- package/dist/src/filters/ColorMatrixFilters.mjs.map +0 -0
- package/dist/src/filters/Composed.d.ts +0 -0
- package/dist/src/filters/Composed.d.ts.map +0 -0
- package/dist/src/filters/Composed.min.mjs +0 -0
- package/dist/src/filters/Composed.min.mjs.map +0 -0
- package/dist/src/filters/Composed.mjs +0 -0
- package/dist/src/filters/Composed.mjs.map +0 -0
- package/dist/src/filters/Contrast.d.ts +0 -0
- package/dist/src/filters/Contrast.d.ts.map +0 -0
- package/dist/src/filters/Contrast.min.mjs +0 -0
- package/dist/src/filters/Contrast.min.mjs.map +0 -0
- package/dist/src/filters/Contrast.mjs +0 -0
- package/dist/src/filters/Contrast.mjs.map +0 -0
- package/dist/src/filters/Convolute.d.ts +0 -0
- package/dist/src/filters/Convolute.d.ts.map +0 -0
- package/dist/src/filters/Convolute.min.mjs +0 -0
- package/dist/src/filters/Convolute.min.mjs.map +0 -0
- package/dist/src/filters/Convolute.mjs +0 -0
- package/dist/src/filters/Convolute.mjs.map +0 -0
- package/dist/src/filters/FilterBackend.d.ts +0 -0
- package/dist/src/filters/FilterBackend.d.ts.map +0 -0
- package/dist/src/filters/FilterBackend.min.mjs +0 -0
- package/dist/src/filters/FilterBackend.min.mjs.map +0 -0
- package/dist/src/filters/FilterBackend.mjs +0 -0
- package/dist/src/filters/FilterBackend.mjs.map +0 -0
- package/dist/src/filters/GLProbes/GLProbe.d.ts +0 -0
- package/dist/src/filters/GLProbes/GLProbe.d.ts.map +0 -0
- package/dist/src/filters/GLProbes/GLProbe.min.mjs +0 -0
- package/dist/src/filters/GLProbes/GLProbe.min.mjs.map +0 -0
- package/dist/src/filters/GLProbes/GLProbe.mjs +0 -0
- package/dist/src/filters/GLProbes/GLProbe.mjs.map +0 -0
- package/dist/src/filters/GLProbes/NodeGLProbe.d.ts +0 -0
- package/dist/src/filters/GLProbes/NodeGLProbe.d.ts.map +0 -0
- package/dist/src/filters/GLProbes/WebGLProbe.d.ts +0 -0
- package/dist/src/filters/GLProbes/WebGLProbe.d.ts.map +0 -0
- package/dist/src/filters/GLProbes/WebGLProbe.min.mjs +0 -0
- package/dist/src/filters/GLProbes/WebGLProbe.min.mjs.map +0 -0
- package/dist/src/filters/GLProbes/WebGLProbe.mjs +0 -0
- package/dist/src/filters/GLProbes/WebGLProbe.mjs.map +0 -0
- package/dist/src/filters/Gamma.d.ts +0 -0
- package/dist/src/filters/Gamma.d.ts.map +0 -0
- package/dist/src/filters/Gamma.min.mjs +0 -0
- package/dist/src/filters/Gamma.min.mjs.map +0 -0
- package/dist/src/filters/Gamma.mjs +0 -0
- package/dist/src/filters/Gamma.mjs.map +0 -0
- package/dist/src/filters/Grayscale.d.ts +0 -0
- package/dist/src/filters/Grayscale.d.ts.map +0 -0
- package/dist/src/filters/Grayscale.min.mjs +0 -0
- package/dist/src/filters/Grayscale.min.mjs.map +0 -0
- package/dist/src/filters/Grayscale.mjs +0 -0
- package/dist/src/filters/Grayscale.mjs.map +0 -0
- package/dist/src/filters/HueRotation.d.ts +0 -0
- package/dist/src/filters/HueRotation.d.ts.map +0 -0
- package/dist/src/filters/HueRotation.min.mjs +0 -0
- package/dist/src/filters/HueRotation.min.mjs.map +0 -0
- package/dist/src/filters/HueRotation.mjs +0 -0
- package/dist/src/filters/HueRotation.mjs.map +0 -0
- package/dist/src/filters/Invert.d.ts +0 -0
- package/dist/src/filters/Invert.d.ts.map +0 -0
- package/dist/src/filters/Invert.min.mjs +0 -0
- package/dist/src/filters/Invert.min.mjs.map +0 -0
- package/dist/src/filters/Invert.mjs +0 -0
- package/dist/src/filters/Invert.mjs.map +0 -0
- package/dist/src/filters/Noise.d.ts +0 -0
- package/dist/src/filters/Noise.d.ts.map +0 -0
- package/dist/src/filters/Noise.min.mjs +0 -0
- package/dist/src/filters/Noise.min.mjs.map +0 -0
- package/dist/src/filters/Noise.mjs +0 -0
- package/dist/src/filters/Noise.mjs.map +0 -0
- package/dist/src/filters/Pixelate.d.ts +0 -0
- package/dist/src/filters/Pixelate.d.ts.map +0 -0
- package/dist/src/filters/Pixelate.min.mjs +0 -0
- package/dist/src/filters/Pixelate.min.mjs.map +0 -0
- package/dist/src/filters/Pixelate.mjs +0 -0
- package/dist/src/filters/Pixelate.mjs.map +0 -0
- package/dist/src/filters/RemoveColor.d.ts +0 -0
- package/dist/src/filters/RemoveColor.d.ts.map +0 -0
- package/dist/src/filters/RemoveColor.min.mjs +0 -0
- package/dist/src/filters/RemoveColor.min.mjs.map +0 -0
- package/dist/src/filters/RemoveColor.mjs +0 -0
- package/dist/src/filters/RemoveColor.mjs.map +0 -0
- package/dist/src/filters/Resize.d.ts +0 -0
- package/dist/src/filters/Resize.d.ts.map +0 -0
- package/dist/src/filters/Resize.min.mjs +0 -0
- package/dist/src/filters/Resize.min.mjs.map +0 -0
- package/dist/src/filters/Resize.mjs +0 -0
- package/dist/src/filters/Resize.mjs.map +0 -0
- package/dist/src/filters/Saturation.d.ts +0 -0
- package/dist/src/filters/Saturation.d.ts.map +0 -0
- package/dist/src/filters/Saturation.min.mjs +0 -0
- package/dist/src/filters/Saturation.min.mjs.map +0 -0
- package/dist/src/filters/Saturation.mjs +0 -0
- package/dist/src/filters/Saturation.mjs.map +0 -0
- package/dist/src/filters/Vibrance.d.ts +0 -0
- package/dist/src/filters/Vibrance.d.ts.map +0 -0
- package/dist/src/filters/Vibrance.min.mjs +0 -0
- package/dist/src/filters/Vibrance.min.mjs.map +0 -0
- package/dist/src/filters/Vibrance.mjs +0 -0
- package/dist/src/filters/Vibrance.mjs.map +0 -0
- package/dist/src/filters/WebGLFilterBackend.d.ts +0 -0
- package/dist/src/filters/WebGLFilterBackend.d.ts.map +0 -0
- package/dist/src/filters/WebGLFilterBackend.min.mjs +0 -0
- package/dist/src/filters/WebGLFilterBackend.min.mjs.map +0 -0
- package/dist/src/filters/WebGLFilterBackend.mjs +0 -0
- package/dist/src/filters/WebGLFilterBackend.mjs.map +0 -0
- package/dist/src/filters/filters.d.ts +0 -0
- package/dist/src/filters/filters.d.ts.map +0 -0
- package/dist/src/filters/filters.min.mjs +0 -0
- package/dist/src/filters/filters.min.mjs.map +0 -0
- package/dist/src/filters/filters.mjs +0 -0
- package/dist/src/filters/filters.mjs.map +0 -0
- package/dist/src/filters/index.d.ts +0 -0
- package/dist/src/filters/index.d.ts.map +0 -0
- package/dist/src/filters/shaders/baseFilter.d.ts +0 -0
- package/dist/src/filters/shaders/baseFilter.d.ts.map +0 -0
- package/dist/src/filters/shaders/baseFilter.min.mjs +0 -0
- package/dist/src/filters/shaders/baseFilter.min.mjs.map +0 -0
- package/dist/src/filters/shaders/baseFilter.mjs +0 -0
- package/dist/src/filters/shaders/baseFilter.mjs.map +0 -0
- package/dist/src/filters/shaders/blendColor.d.ts +0 -0
- package/dist/src/filters/shaders/blendColor.d.ts.map +0 -0
- package/dist/src/filters/shaders/blendColor.min.mjs +0 -0
- package/dist/src/filters/shaders/blendColor.min.mjs.map +0 -0
- package/dist/src/filters/shaders/blendColor.mjs +0 -0
- package/dist/src/filters/shaders/blendColor.mjs.map +0 -0
- package/dist/src/filters/shaders/blendImage.d.ts +0 -0
- package/dist/src/filters/shaders/blendImage.d.ts.map +0 -0
- package/dist/src/filters/shaders/blendImage.min.mjs +0 -0
- package/dist/src/filters/shaders/blendImage.min.mjs.map +0 -0
- package/dist/src/filters/shaders/blendImage.mjs +0 -0
- package/dist/src/filters/shaders/blendImage.mjs.map +0 -0
- package/dist/src/filters/shaders/blur.d.ts +0 -0
- package/dist/src/filters/shaders/blur.d.ts.map +0 -0
- package/dist/src/filters/shaders/blur.min.mjs +0 -0
- package/dist/src/filters/shaders/blur.min.mjs.map +0 -0
- package/dist/src/filters/shaders/blur.mjs +0 -0
- package/dist/src/filters/shaders/blur.mjs.map +0 -0
- package/dist/src/filters/shaders/brightness.d.ts +0 -0
- package/dist/src/filters/shaders/brightness.d.ts.map +0 -0
- package/dist/src/filters/shaders/brightness.min.mjs +0 -0
- package/dist/src/filters/shaders/brightness.min.mjs.map +0 -0
- package/dist/src/filters/shaders/brightness.mjs +0 -0
- package/dist/src/filters/shaders/brightness.mjs.map +0 -0
- package/dist/src/filters/shaders/colorMatrix.d.ts +0 -0
- package/dist/src/filters/shaders/colorMatrix.d.ts.map +0 -0
- package/dist/src/filters/shaders/colorMatrix.min.mjs +0 -0
- package/dist/src/filters/shaders/colorMatrix.min.mjs.map +0 -0
- package/dist/src/filters/shaders/colorMatrix.mjs +0 -0
- package/dist/src/filters/shaders/colorMatrix.mjs.map +0 -0
- package/dist/src/filters/shaders/constrast.d.ts +0 -0
- package/dist/src/filters/shaders/constrast.d.ts.map +0 -0
- package/dist/src/filters/shaders/constrast.min.mjs +0 -0
- package/dist/src/filters/shaders/constrast.min.mjs.map +0 -0
- package/dist/src/filters/shaders/constrast.mjs +0 -0
- package/dist/src/filters/shaders/constrast.mjs.map +0 -0
- package/dist/src/filters/shaders/convolute.d.ts +0 -0
- package/dist/src/filters/shaders/convolute.d.ts.map +0 -0
- package/dist/src/filters/shaders/convolute.min.mjs +0 -0
- package/dist/src/filters/shaders/convolute.min.mjs.map +0 -0
- package/dist/src/filters/shaders/convolute.mjs +0 -0
- package/dist/src/filters/shaders/convolute.mjs.map +0 -0
- package/dist/src/filters/shaders/gamma.d.ts +0 -0
- package/dist/src/filters/shaders/gamma.d.ts.map +0 -0
- package/dist/src/filters/shaders/gamma.min.mjs +0 -0
- package/dist/src/filters/shaders/gamma.min.mjs.map +0 -0
- package/dist/src/filters/shaders/gamma.mjs +0 -0
- package/dist/src/filters/shaders/gamma.mjs.map +0 -0
- package/dist/src/filters/shaders/grayscale.d.ts +0 -0
- package/dist/src/filters/shaders/grayscale.d.ts.map +0 -0
- package/dist/src/filters/shaders/grayscale.min.mjs +0 -0
- package/dist/src/filters/shaders/grayscale.min.mjs.map +0 -0
- package/dist/src/filters/shaders/grayscale.mjs +0 -0
- package/dist/src/filters/shaders/grayscale.mjs.map +0 -0
- package/dist/src/filters/shaders/invert.d.ts +0 -0
- package/dist/src/filters/shaders/invert.d.ts.map +0 -0
- package/dist/src/filters/shaders/invert.min.mjs +0 -0
- package/dist/src/filters/shaders/invert.min.mjs.map +0 -0
- package/dist/src/filters/shaders/invert.mjs +0 -0
- package/dist/src/filters/shaders/invert.mjs.map +0 -0
- package/dist/src/filters/shaders/noise.d.ts +0 -0
- package/dist/src/filters/shaders/noise.d.ts.map +0 -0
- package/dist/src/filters/shaders/noise.min.mjs +0 -0
- package/dist/src/filters/shaders/noise.min.mjs.map +0 -0
- package/dist/src/filters/shaders/noise.mjs +0 -0
- package/dist/src/filters/shaders/noise.mjs.map +0 -0
- package/dist/src/filters/shaders/pixelate.d.ts +0 -0
- package/dist/src/filters/shaders/pixelate.d.ts.map +0 -0
- package/dist/src/filters/shaders/pixelate.min.mjs +0 -0
- package/dist/src/filters/shaders/pixelate.min.mjs.map +0 -0
- package/dist/src/filters/shaders/pixelate.mjs +0 -0
- package/dist/src/filters/shaders/pixelate.mjs.map +0 -0
- package/dist/src/filters/shaders/removeColor.d.ts +0 -0
- package/dist/src/filters/shaders/removeColor.d.ts.map +0 -0
- package/dist/src/filters/shaders/removeColor.min.mjs +0 -0
- package/dist/src/filters/shaders/removeColor.min.mjs.map +0 -0
- package/dist/src/filters/shaders/removeColor.mjs +0 -0
- package/dist/src/filters/shaders/removeColor.mjs.map +0 -0
- package/dist/src/filters/shaders/saturation.d.ts +0 -0
- package/dist/src/filters/shaders/saturation.d.ts.map +0 -0
- package/dist/src/filters/shaders/saturation.min.mjs +0 -0
- package/dist/src/filters/shaders/saturation.min.mjs.map +0 -0
- package/dist/src/filters/shaders/saturation.mjs +0 -0
- package/dist/src/filters/shaders/saturation.mjs.map +0 -0
- package/dist/src/filters/shaders/vibrance.d.ts +0 -0
- package/dist/src/filters/shaders/vibrance.d.ts.map +0 -0
- package/dist/src/filters/shaders/vibrance.min.mjs +0 -0
- package/dist/src/filters/shaders/vibrance.min.mjs.map +0 -0
- package/dist/src/filters/shaders/vibrance.mjs +0 -0
- package/dist/src/filters/shaders/vibrance.mjs.map +0 -0
- package/dist/src/filters/typedefs.d.ts +0 -0
- package/dist/src/filters/typedefs.d.ts.map +0 -0
- package/dist/src/filters/utils.d.ts +0 -0
- package/dist/src/filters/utils.d.ts.map +0 -0
- package/dist/src/filters/utils.min.mjs +0 -0
- package/dist/src/filters/utils.min.mjs.map +0 -0
- package/dist/src/filters/utils.mjs +0 -0
- package/dist/src/filters/utils.mjs.map +0 -0
- package/dist/src/gradient/Gradient.d.ts +0 -0
- package/dist/src/gradient/Gradient.d.ts.map +0 -0
- package/dist/src/gradient/Gradient.min.mjs +0 -0
- package/dist/src/gradient/Gradient.min.mjs.map +0 -0
- package/dist/src/gradient/Gradient.mjs +0 -0
- package/dist/src/gradient/Gradient.mjs.map +0 -0
- package/dist/src/gradient/constants.d.ts +0 -0
- package/dist/src/gradient/constants.d.ts.map +0 -0
- package/dist/src/gradient/constants.min.mjs +0 -0
- package/dist/src/gradient/constants.min.mjs.map +0 -0
- package/dist/src/gradient/constants.mjs +0 -0
- package/dist/src/gradient/constants.mjs.map +0 -0
- package/dist/src/gradient/index.d.ts +0 -0
- package/dist/src/gradient/index.d.ts.map +0 -0
- package/dist/src/gradient/parser/misc.d.ts +0 -0
- package/dist/src/gradient/parser/misc.d.ts.map +0 -0
- package/dist/src/gradient/parser/misc.min.mjs +0 -0
- package/dist/src/gradient/parser/misc.min.mjs.map +0 -0
- package/dist/src/gradient/parser/misc.mjs +0 -0
- package/dist/src/gradient/parser/misc.mjs.map +0 -0
- package/dist/src/gradient/parser/parseColorStops.d.ts +0 -0
- package/dist/src/gradient/parser/parseColorStops.d.ts.map +0 -0
- package/dist/src/gradient/parser/parseColorStops.min.mjs +0 -0
- package/dist/src/gradient/parser/parseColorStops.min.mjs.map +0 -0
- package/dist/src/gradient/parser/parseColorStops.mjs +0 -0
- package/dist/src/gradient/parser/parseColorStops.mjs.map +0 -0
- package/dist/src/gradient/parser/parseCoords.d.ts +0 -0
- package/dist/src/gradient/parser/parseCoords.d.ts.map +0 -0
- package/dist/src/gradient/parser/parseCoords.min.mjs +0 -0
- package/dist/src/gradient/parser/parseCoords.min.mjs.map +0 -0
- package/dist/src/gradient/parser/parseCoords.mjs +0 -0
- package/dist/src/gradient/parser/parseCoords.mjs.map +0 -0
- package/dist/src/gradient/typedefs.d.ts +0 -0
- package/dist/src/gradient/typedefs.d.ts.map +0 -0
- package/dist/src/mixins/eraser_brush.mixin.d.ts +0 -0
- package/dist/src/mixins/eraser_brush.mixin.d.ts.map +0 -0
- package/dist/src/parkinglot/canvas_animation.mixin.d.ts +0 -0
- package/dist/src/parkinglot/canvas_animation.mixin.d.ts.map +0 -0
- package/dist/src/parkinglot/straighten.d.ts +0 -0
- package/dist/src/parkinglot/straighten.d.ts.map +0 -0
- package/dist/src/parser/applyViewboxTransform.d.ts +0 -0
- package/dist/src/parser/applyViewboxTransform.d.ts.map +0 -0
- package/dist/src/parser/applyViewboxTransform.min.mjs +0 -0
- package/dist/src/parser/applyViewboxTransform.min.mjs.map +0 -0
- package/dist/src/parser/applyViewboxTransform.mjs +0 -0
- package/dist/src/parser/applyViewboxTransform.mjs.map +0 -0
- package/dist/src/parser/attributes.d.ts +0 -0
- package/dist/src/parser/attributes.d.ts.map +0 -0
- package/dist/src/parser/attributes.min.mjs +0 -0
- package/dist/src/parser/attributes.min.mjs.map +0 -0
- package/dist/src/parser/attributes.mjs +0 -0
- package/dist/src/parser/attributes.mjs.map +0 -0
- package/dist/src/parser/constants.d.ts +0 -0
- package/dist/src/parser/constants.d.ts.map +0 -0
- package/dist/src/parser/constants.min.mjs +0 -0
- package/dist/src/parser/constants.min.mjs.map +0 -0
- package/dist/src/parser/constants.mjs +0 -0
- package/dist/src/parser/constants.mjs.map +0 -0
- package/dist/src/parser/doesSomeParentMatch.d.ts +0 -0
- package/dist/src/parser/doesSomeParentMatch.d.ts.map +0 -0
- package/dist/src/parser/doesSomeParentMatch.min.mjs +0 -0
- package/dist/src/parser/doesSomeParentMatch.min.mjs.map +0 -0
- package/dist/src/parser/doesSomeParentMatch.mjs +0 -0
- package/dist/src/parser/doesSomeParentMatch.mjs.map +0 -0
- package/dist/src/parser/elementMatchesRule.d.ts +0 -0
- package/dist/src/parser/elementMatchesRule.d.ts.map +0 -0
- package/dist/src/parser/elementMatchesRule.min.mjs +0 -0
- package/dist/src/parser/elementMatchesRule.min.mjs.map +0 -0
- package/dist/src/parser/elementMatchesRule.mjs +0 -0
- package/dist/src/parser/elementMatchesRule.mjs.map +0 -0
- package/dist/src/parser/elements_parser.d.ts +0 -0
- package/dist/src/parser/elements_parser.d.ts.map +0 -0
- package/dist/src/parser/elements_parser.min.mjs +0 -0
- package/dist/src/parser/elements_parser.min.mjs.map +0 -0
- package/dist/src/parser/elements_parser.mjs +0 -0
- package/dist/src/parser/elements_parser.mjs.map +0 -0
- package/dist/src/parser/getCSSRules.d.ts +0 -0
- package/dist/src/parser/getCSSRules.d.ts.map +0 -0
- package/dist/src/parser/getCSSRules.min.mjs +0 -0
- package/dist/src/parser/getCSSRules.min.mjs.map +0 -0
- package/dist/src/parser/getCSSRules.mjs +0 -0
- package/dist/src/parser/getCSSRules.mjs.map +0 -0
- package/dist/src/parser/getGlobalStylesForElement.d.ts +0 -0
- package/dist/src/parser/getGlobalStylesForElement.d.ts.map +0 -0
- package/dist/src/parser/getGlobalStylesForElement.min.mjs +0 -0
- package/dist/src/parser/getGlobalStylesForElement.min.mjs.map +0 -0
- package/dist/src/parser/getGlobalStylesForElement.mjs +0 -0
- package/dist/src/parser/getGlobalStylesForElement.mjs.map +0 -0
- package/dist/src/parser/getGradientDefs.d.ts +0 -0
- package/dist/src/parser/getGradientDefs.d.ts.map +0 -0
- package/dist/src/parser/getGradientDefs.min.mjs +0 -0
- package/dist/src/parser/getGradientDefs.min.mjs.map +0 -0
- package/dist/src/parser/getGradientDefs.mjs +0 -0
- package/dist/src/parser/getGradientDefs.mjs.map +0 -0
- package/dist/src/parser/getMultipleNodes.d.ts +0 -0
- package/dist/src/parser/getMultipleNodes.d.ts.map +0 -0
- package/dist/src/parser/getMultipleNodes.min.mjs +0 -0
- package/dist/src/parser/getMultipleNodes.min.mjs.map +0 -0
- package/dist/src/parser/getMultipleNodes.mjs +0 -0
- package/dist/src/parser/getMultipleNodes.mjs.map +0 -0
- package/dist/src/parser/getSvgRegex.d.ts +0 -0
- package/dist/src/parser/getSvgRegex.d.ts.map +0 -0
- package/dist/src/parser/getSvgRegex.min.mjs +0 -0
- package/dist/src/parser/getSvgRegex.min.mjs.map +0 -0
- package/dist/src/parser/getSvgRegex.mjs +0 -0
- package/dist/src/parser/getSvgRegex.mjs.map +0 -0
- package/dist/src/parser/getTagName.d.ts +0 -0
- package/dist/src/parser/getTagName.d.ts.map +0 -0
- package/dist/src/parser/getTagName.min.mjs +0 -0
- package/dist/src/parser/getTagName.min.mjs.map +0 -0
- package/dist/src/parser/getTagName.mjs +0 -0
- package/dist/src/parser/getTagName.mjs.map +0 -0
- package/dist/src/parser/hasInvalidAncestor.d.ts +0 -0
- package/dist/src/parser/hasInvalidAncestor.d.ts.map +0 -0
- package/dist/src/parser/hasInvalidAncestor.min.mjs +0 -0
- package/dist/src/parser/hasInvalidAncestor.min.mjs.map +0 -0
- package/dist/src/parser/hasInvalidAncestor.mjs +0 -0
- package/dist/src/parser/hasInvalidAncestor.mjs.map +0 -0
- package/dist/src/parser/loadSVGFromString.d.ts +0 -0
- package/dist/src/parser/loadSVGFromString.d.ts.map +0 -0
- package/dist/src/parser/loadSVGFromString.min.mjs +0 -0
- package/dist/src/parser/loadSVGFromString.min.mjs.map +0 -0
- package/dist/src/parser/loadSVGFromString.mjs +0 -0
- package/dist/src/parser/loadSVGFromString.mjs.map +0 -0
- package/dist/src/parser/loadSVGFromURL.d.ts +0 -0
- package/dist/src/parser/loadSVGFromURL.d.ts.map +0 -0
- package/dist/src/parser/loadSVGFromURL.min.mjs +0 -0
- package/dist/src/parser/loadSVGFromURL.min.mjs.map +0 -0
- package/dist/src/parser/loadSVGFromURL.mjs +0 -0
- package/dist/src/parser/loadSVGFromURL.mjs.map +0 -0
- package/dist/src/parser/normalizeAttr.d.ts +0 -0
- package/dist/src/parser/normalizeAttr.d.ts.map +0 -0
- package/dist/src/parser/normalizeAttr.min.mjs +0 -0
- package/dist/src/parser/normalizeAttr.min.mjs.map +0 -0
- package/dist/src/parser/normalizeAttr.mjs +0 -0
- package/dist/src/parser/normalizeAttr.mjs.map +0 -0
- package/dist/src/parser/normalizeValue.d.ts +0 -0
- package/dist/src/parser/normalizeValue.d.ts.map +0 -0
- package/dist/src/parser/normalizeValue.min.mjs +0 -0
- package/dist/src/parser/normalizeValue.min.mjs.map +0 -0
- package/dist/src/parser/normalizeValue.mjs +0 -0
- package/dist/src/parser/normalizeValue.mjs.map +0 -0
- package/dist/src/parser/parseAttributes.d.ts +0 -0
- package/dist/src/parser/parseAttributes.d.ts.map +0 -0
- package/dist/src/parser/parseAttributes.min.mjs +0 -0
- package/dist/src/parser/parseAttributes.min.mjs.map +0 -0
- package/dist/src/parser/parseAttributes.mjs +0 -0
- package/dist/src/parser/parseAttributes.mjs.map +0 -0
- package/dist/src/parser/parseFontDeclaration.d.ts +0 -0
- package/dist/src/parser/parseFontDeclaration.d.ts.map +0 -0
- package/dist/src/parser/parseFontDeclaration.min.mjs +0 -0
- package/dist/src/parser/parseFontDeclaration.min.mjs.map +0 -0
- package/dist/src/parser/parseFontDeclaration.mjs +0 -0
- package/dist/src/parser/parseFontDeclaration.mjs.map +0 -0
- package/dist/src/parser/parsePointsAttribute.d.ts +0 -0
- package/dist/src/parser/parsePointsAttribute.d.ts.map +0 -0
- package/dist/src/parser/parsePointsAttribute.min.mjs +0 -0
- package/dist/src/parser/parsePointsAttribute.min.mjs.map +0 -0
- package/dist/src/parser/parsePointsAttribute.mjs +0 -0
- package/dist/src/parser/parsePointsAttribute.mjs.map +0 -0
- package/dist/src/parser/parseSVGDocument.d.ts +0 -0
- package/dist/src/parser/parseSVGDocument.d.ts.map +0 -0
- package/dist/src/parser/parseSVGDocument.min.mjs +0 -0
- package/dist/src/parser/parseSVGDocument.min.mjs.map +0 -0
- package/dist/src/parser/parseSVGDocument.mjs +0 -0
- package/dist/src/parser/parseSVGDocument.mjs.map +0 -0
- package/dist/src/parser/parseStyleAttribute.d.ts +0 -0
- package/dist/src/parser/parseStyleAttribute.d.ts.map +0 -0
- package/dist/src/parser/parseStyleAttribute.min.mjs +0 -0
- package/dist/src/parser/parseStyleAttribute.min.mjs.map +0 -0
- package/dist/src/parser/parseStyleAttribute.mjs +0 -0
- package/dist/src/parser/parseStyleAttribute.mjs.map +0 -0
- package/dist/src/parser/parseStyleObject.d.ts +0 -0
- package/dist/src/parser/parseStyleObject.d.ts.map +0 -0
- package/dist/src/parser/parseStyleObject.min.mjs +0 -0
- package/dist/src/parser/parseStyleObject.min.mjs.map +0 -0
- package/dist/src/parser/parseStyleObject.mjs +0 -0
- package/dist/src/parser/parseStyleObject.mjs.map +0 -0
- package/dist/src/parser/parseStyleString.d.ts +0 -0
- package/dist/src/parser/parseStyleString.d.ts.map +0 -0
- package/dist/src/parser/parseStyleString.min.mjs +0 -0
- package/dist/src/parser/parseStyleString.min.mjs.map +0 -0
- package/dist/src/parser/parseStyleString.mjs +0 -0
- package/dist/src/parser/parseStyleString.mjs.map +0 -0
- package/dist/src/parser/parseTransformAttribute.d.ts +0 -0
- package/dist/src/parser/parseTransformAttribute.d.ts.map +0 -0
- package/dist/src/parser/parseTransformAttribute.min.mjs +0 -0
- package/dist/src/parser/parseTransformAttribute.min.mjs.map +0 -0
- package/dist/src/parser/parseTransformAttribute.mjs +0 -0
- package/dist/src/parser/parseTransformAttribute.mjs.map +0 -0
- package/dist/src/parser/parseUseDirectives.d.ts +0 -0
- package/dist/src/parser/parseUseDirectives.d.ts.map +0 -0
- package/dist/src/parser/parseUseDirectives.min.mjs +0 -0
- package/dist/src/parser/parseUseDirectives.min.mjs.map +0 -0
- package/dist/src/parser/parseUseDirectives.mjs +0 -0
- package/dist/src/parser/parseUseDirectives.mjs.map +0 -0
- package/dist/src/parser/percent.d.ts +0 -0
- package/dist/src/parser/percent.d.ts.map +0 -0
- package/dist/src/parser/percent.min.mjs +0 -0
- package/dist/src/parser/percent.min.mjs.map +0 -0
- package/dist/src/parser/percent.mjs +0 -0
- package/dist/src/parser/percent.mjs.map +0 -0
- package/dist/src/parser/recursivelyParseGradientsXlink.d.ts +0 -0
- package/dist/src/parser/recursivelyParseGradientsXlink.d.ts.map +0 -0
- package/dist/src/parser/recursivelyParseGradientsXlink.min.mjs +0 -0
- package/dist/src/parser/recursivelyParseGradientsXlink.min.mjs.map +0 -0
- package/dist/src/parser/recursivelyParseGradientsXlink.mjs +0 -0
- package/dist/src/parser/recursivelyParseGradientsXlink.mjs.map +0 -0
- package/dist/src/parser/selectorMatches.d.ts +0 -0
- package/dist/src/parser/selectorMatches.d.ts.map +0 -0
- package/dist/src/parser/selectorMatches.min.mjs +0 -0
- package/dist/src/parser/selectorMatches.min.mjs.map +0 -0
- package/dist/src/parser/selectorMatches.mjs +0 -0
- package/dist/src/parser/selectorMatches.mjs.map +0 -0
- package/dist/src/parser/setStrokeFillOpacity.d.ts +0 -0
- package/dist/src/parser/setStrokeFillOpacity.d.ts.map +0 -0
- package/dist/src/parser/setStrokeFillOpacity.min.mjs +0 -0
- package/dist/src/parser/setStrokeFillOpacity.min.mjs.map +0 -0
- package/dist/src/parser/setStrokeFillOpacity.mjs +0 -0
- package/dist/src/parser/setStrokeFillOpacity.mjs.map +0 -0
- package/dist/src/parser/typedefs.d.ts +0 -0
- package/dist/src/parser/typedefs.d.ts.map +0 -0
- package/dist/src/shapes/ActiveSelection.d.ts +0 -0
- package/dist/src/shapes/ActiveSelection.d.ts.map +0 -0
- package/dist/src/shapes/ActiveSelection.min.mjs +0 -0
- package/dist/src/shapes/ActiveSelection.min.mjs.map +0 -0
- package/dist/src/shapes/ActiveSelection.mjs +0 -0
- package/dist/src/shapes/ActiveSelection.mjs.map +0 -0
- package/dist/src/shapes/Circle.d.ts +0 -0
- package/dist/src/shapes/Circle.d.ts.map +0 -0
- package/dist/src/shapes/Circle.min.mjs +0 -0
- package/dist/src/shapes/Circle.min.mjs.map +0 -0
- package/dist/src/shapes/Circle.mjs +0 -0
- package/dist/src/shapes/Circle.mjs.map +0 -0
- package/dist/src/shapes/Ellipse.d.ts +0 -0
- package/dist/src/shapes/Ellipse.d.ts.map +0 -0
- package/dist/src/shapes/Ellipse.min.mjs +0 -0
- package/dist/src/shapes/Ellipse.min.mjs.map +0 -0
- package/dist/src/shapes/Ellipse.mjs +0 -0
- package/dist/src/shapes/Ellipse.mjs.map +0 -0
- package/dist/src/shapes/Group.d.ts +0 -0
- package/dist/src/shapes/Group.d.ts.map +0 -0
- package/dist/src/shapes/Group.min.mjs +0 -0
- package/dist/src/shapes/Group.min.mjs.map +0 -0
- package/dist/src/shapes/Group.mjs +0 -0
- package/dist/src/shapes/Group.mjs.map +0 -0
- package/dist/src/shapes/IText/DraggableTextDelegate.d.ts +0 -0
- package/dist/src/shapes/IText/DraggableTextDelegate.d.ts.map +0 -0
- package/dist/src/shapes/IText/DraggableTextDelegate.min.mjs +0 -0
- package/dist/src/shapes/IText/DraggableTextDelegate.min.mjs.map +0 -0
- package/dist/src/shapes/IText/DraggableTextDelegate.mjs +0 -0
- package/dist/src/shapes/IText/DraggableTextDelegate.mjs.map +0 -0
- package/dist/src/shapes/IText/IText.d.ts +0 -0
- package/dist/src/shapes/IText/IText.d.ts.map +0 -0
- package/dist/src/shapes/IText/IText.min.mjs +0 -0
- package/dist/src/shapes/IText/IText.min.mjs.map +1 -1
- package/dist/src/shapes/IText/IText.mjs +206 -206
- package/dist/src/shapes/IText/IText.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextBehavior.d.ts +0 -0
- package/dist/src/shapes/IText/ITextBehavior.d.ts.map +0 -0
- package/dist/src/shapes/IText/ITextBehavior.min.mjs +0 -0
- package/dist/src/shapes/IText/ITextBehavior.min.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextBehavior.mjs +152 -152
- package/dist/src/shapes/IText/ITextBehavior.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextClickBehavior.d.ts +0 -0
- package/dist/src/shapes/IText/ITextClickBehavior.d.ts.map +0 -0
- package/dist/src/shapes/IText/ITextClickBehavior.min.mjs +0 -0
- package/dist/src/shapes/IText/ITextClickBehavior.min.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextClickBehavior.mjs +36 -36
- package/dist/src/shapes/IText/ITextClickBehavior.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextKeyBehavior.d.ts +0 -0
- package/dist/src/shapes/IText/ITextKeyBehavior.d.ts.map +0 -0
- package/dist/src/shapes/IText/ITextKeyBehavior.min.mjs +0 -0
- package/dist/src/shapes/IText/ITextKeyBehavior.min.mjs.map +0 -0
- package/dist/src/shapes/IText/ITextKeyBehavior.mjs +0 -0
- package/dist/src/shapes/IText/ITextKeyBehavior.mjs.map +0 -0
- package/dist/src/shapes/IText/constants.d.ts +0 -0
- package/dist/src/shapes/IText/constants.d.ts.map +0 -0
- package/dist/src/shapes/IText/constants.min.mjs +0 -0
- package/dist/src/shapes/IText/constants.min.mjs.map +0 -0
- package/dist/src/shapes/IText/constants.mjs +0 -0
- package/dist/src/shapes/IText/constants.mjs.map +0 -0
- package/dist/src/shapes/Image.d.ts +0 -0
- package/dist/src/shapes/Image.d.ts.map +0 -0
- package/dist/src/shapes/Image.min.mjs +0 -0
- package/dist/src/shapes/Image.min.mjs.map +0 -0
- package/dist/src/shapes/Image.mjs +0 -0
- package/dist/src/shapes/Image.mjs.map +0 -0
- package/dist/src/shapes/Line.d.ts +0 -0
- package/dist/src/shapes/Line.d.ts.map +0 -0
- package/dist/src/shapes/Line.min.mjs +0 -0
- package/dist/src/shapes/Line.min.mjs.map +0 -0
- package/dist/src/shapes/Line.mjs +0 -0
- package/dist/src/shapes/Line.mjs.map +0 -0
- package/dist/src/shapes/Object/FabricObject.d.ts +0 -0
- package/dist/src/shapes/Object/FabricObject.d.ts.map +0 -0
- package/dist/src/shapes/Object/FabricObject.min.mjs +0 -0
- package/dist/src/shapes/Object/FabricObject.min.mjs.map +0 -0
- package/dist/src/shapes/Object/FabricObject.mjs +0 -0
- package/dist/src/shapes/Object/FabricObject.mjs.map +0 -0
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.d.ts +0 -0
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.d.ts.map +0 -0
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.min.mjs +0 -0
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.min.mjs.map +0 -0
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.mjs +0 -0
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.mjs.map +0 -0
- package/dist/src/shapes/Object/InteractiveObject.d.ts +0 -0
- package/dist/src/shapes/Object/InteractiveObject.d.ts.map +0 -0
- package/dist/src/shapes/Object/InteractiveObject.min.mjs +0 -0
- package/dist/src/shapes/Object/InteractiveObject.min.mjs.map +0 -0
- package/dist/src/shapes/Object/InteractiveObject.mjs +0 -0
- package/dist/src/shapes/Object/InteractiveObject.mjs.map +0 -0
- package/dist/src/shapes/Object/Object.d.ts +0 -0
- package/dist/src/shapes/Object/Object.d.ts.map +0 -0
- package/dist/src/shapes/Object/Object.min.mjs +0 -0
- package/dist/src/shapes/Object/Object.min.mjs.map +0 -0
- package/dist/src/shapes/Object/Object.mjs +0 -0
- package/dist/src/shapes/Object/Object.mjs.map +0 -0
- package/dist/src/shapes/Object/ObjectGeometry.d.ts +0 -0
- package/dist/src/shapes/Object/ObjectGeometry.d.ts.map +0 -0
- package/dist/src/shapes/Object/ObjectGeometry.min.mjs +0 -0
- package/dist/src/shapes/Object/ObjectGeometry.min.mjs.map +0 -0
- package/dist/src/shapes/Object/ObjectGeometry.mjs +0 -0
- package/dist/src/shapes/Object/ObjectGeometry.mjs.map +0 -0
- package/dist/src/shapes/Object/defaultValues.d.ts +0 -0
- package/dist/src/shapes/Object/defaultValues.d.ts.map +0 -0
- package/dist/src/shapes/Object/defaultValues.min.mjs +0 -0
- package/dist/src/shapes/Object/defaultValues.min.mjs.map +0 -0
- package/dist/src/shapes/Object/defaultValues.mjs +0 -0
- package/dist/src/shapes/Object/defaultValues.mjs.map +0 -0
- package/dist/src/shapes/Object/types/BaseProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/BaseProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/BorderProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/BorderProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/ControlProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/ControlProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/FabricObjectProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/FabricObjectProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/FillStrokeProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/FillStrokeProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/LockInteractionProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/LockInteractionProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/ObjectProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/ObjectProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/ObjectTransformProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/ObjectTransformProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/SerializedObjectProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/SerializedObjectProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/index.d.ts +0 -0
- package/dist/src/shapes/Object/types/index.d.ts.map +0 -0
- package/dist/src/shapes/Path.d.ts +0 -0
- package/dist/src/shapes/Path.d.ts.map +0 -0
- package/dist/src/shapes/Path.min.mjs +0 -0
- package/dist/src/shapes/Path.min.mjs.map +0 -0
- package/dist/src/shapes/Path.mjs +0 -0
- package/dist/src/shapes/Path.mjs.map +0 -0
- package/dist/src/shapes/Polygon.d.ts +0 -0
- package/dist/src/shapes/Polygon.d.ts.map +0 -0
- package/dist/src/shapes/Polygon.min.mjs +0 -0
- package/dist/src/shapes/Polygon.min.mjs.map +0 -0
- package/dist/src/shapes/Polygon.mjs +0 -0
- package/dist/src/shapes/Polygon.mjs.map +0 -0
- package/dist/src/shapes/Polyline.d.ts +7 -0
- package/dist/src/shapes/Polyline.d.ts.map +1 -1
- package/dist/src/shapes/Polyline.min.mjs +1 -1
- package/dist/src/shapes/Polyline.min.mjs.map +1 -1
- package/dist/src/shapes/Polyline.mjs +48 -16
- package/dist/src/shapes/Polyline.mjs.map +1 -1
- package/dist/src/shapes/Rect.d.ts +0 -0
- package/dist/src/shapes/Rect.d.ts.map +0 -0
- package/dist/src/shapes/Rect.min.mjs +0 -0
- package/dist/src/shapes/Rect.min.mjs.map +0 -0
- package/dist/src/shapes/Rect.mjs +0 -0
- package/dist/src/shapes/Rect.mjs.map +0 -0
- package/dist/src/shapes/Text/StyledText.d.ts +0 -0
- package/dist/src/shapes/Text/StyledText.d.ts.map +0 -0
- package/dist/src/shapes/Text/StyledText.min.mjs +0 -0
- package/dist/src/shapes/Text/StyledText.min.mjs.map +0 -0
- package/dist/src/shapes/Text/StyledText.mjs +0 -0
- package/dist/src/shapes/Text/StyledText.mjs.map +0 -0
- package/dist/src/shapes/Text/Text.d.ts +0 -0
- package/dist/src/shapes/Text/Text.d.ts.map +0 -0
- package/dist/src/shapes/Text/Text.min.mjs +0 -0
- package/dist/src/shapes/Text/Text.min.mjs.map +1 -1
- package/dist/src/shapes/Text/Text.mjs +283 -283
- package/dist/src/shapes/Text/Text.mjs.map +1 -1
- package/dist/src/shapes/Text/TextSVGExportMixin.d.ts +0 -0
- package/dist/src/shapes/Text/TextSVGExportMixin.d.ts.map +0 -0
- package/dist/src/shapes/Text/TextSVGExportMixin.min.mjs +0 -0
- package/dist/src/shapes/Text/TextSVGExportMixin.min.mjs.map +0 -0
- package/dist/src/shapes/Text/TextSVGExportMixin.mjs +0 -0
- package/dist/src/shapes/Text/TextSVGExportMixin.mjs.map +0 -0
- package/dist/src/shapes/Text/constants.d.ts +0 -0
- package/dist/src/shapes/Text/constants.d.ts.map +0 -0
- package/dist/src/shapes/Text/constants.min.mjs +0 -0
- package/dist/src/shapes/Text/constants.min.mjs.map +1 -1
- package/dist/src/shapes/Text/constants.mjs +0 -0
- package/dist/src/shapes/Text/constants.mjs.map +1 -1
- package/dist/src/shapes/Textbox.d.ts +0 -0
- package/dist/src/shapes/Textbox.d.ts.map +0 -0
- package/dist/src/shapes/Textbox.min.mjs +0 -0
- package/dist/src/shapes/Textbox.min.mjs.map +1 -1
- package/dist/src/shapes/Textbox.mjs +147 -147
- package/dist/src/shapes/Textbox.mjs.map +1 -1
- package/dist/src/shapes/Triangle.d.ts +27 -2
- package/dist/src/shapes/Triangle.d.ts.map +1 -1
- package/dist/src/shapes/Triangle.min.mjs +1 -1
- package/dist/src/shapes/Triangle.min.mjs.map +1 -1
- package/dist/src/shapes/Triangle.mjs +72 -12
- package/dist/src/shapes/Triangle.mjs.map +1 -1
- package/dist/src/text/browserLines.d.ts +0 -0
- package/dist/src/text/browserLines.d.ts.map +0 -0
- package/dist/src/text/browserLines.min.mjs +0 -0
- package/dist/src/text/browserLines.min.mjs.map +1 -1
- package/dist/src/text/browserLines.mjs +20 -20
- package/dist/src/text/browserLines.mjs.map +1 -1
- package/dist/src/text/ellipsis.d.ts +0 -0
- package/dist/src/text/ellipsis.d.ts.map +0 -0
- package/dist/src/text/ellipsis.min.mjs +0 -0
- package/dist/src/text/ellipsis.min.mjs.map +1 -1
- package/dist/src/text/ellipsis.mjs +11 -11
- package/dist/src/text/ellipsis.mjs.map +1 -1
- package/dist/src/text/hitTest.d.ts +0 -0
- package/dist/src/text/hitTest.d.ts.map +0 -0
- package/dist/src/text/hitTest.min.mjs +0 -0
- package/dist/src/text/hitTest.min.mjs.map +1 -1
- package/dist/src/text/hitTest.mjs +19 -19
- package/dist/src/text/hitTest.mjs.map +1 -1
- package/dist/src/text/layout.d.ts +0 -0
- package/dist/src/text/layout.d.ts.map +0 -0
- package/dist/src/text/layout.min.mjs +0 -0
- package/dist/src/text/layout.min.mjs.map +1 -1
- package/dist/src/text/layout.mjs +33 -33
- package/dist/src/text/layout.mjs.map +1 -1
- package/dist/src/text/measure.d.ts +0 -0
- package/dist/src/text/measure.d.ts.map +0 -0
- package/dist/src/text/measure.min.mjs +0 -0
- package/dist/src/text/measure.min.mjs.map +1 -1
- package/dist/src/text/measure.mjs +20 -20
- package/dist/src/text/measure.mjs.map +1 -1
- package/dist/src/text/overlayEditor.d.ts +0 -0
- package/dist/src/text/overlayEditor.d.ts.map +0 -0
- package/dist/src/text/overlayEditor.min.mjs +0 -0
- package/dist/src/text/overlayEditor.min.mjs.map +1 -1
- package/dist/src/text/overlayEditor.mjs +33 -33
- package/dist/src/text/overlayEditor.mjs.map +1 -1
- package/dist/src/text/unicode.d.ts +0 -0
- package/dist/src/text/unicode.d.ts.map +0 -0
- package/dist/src/text/unicode.min.mjs +0 -0
- package/dist/src/text/unicode.min.mjs.map +1 -1
- package/dist/src/text/unicode.mjs +8 -8
- package/dist/src/text/unicode.mjs.map +1 -1
- package/dist/src/typedefs.d.ts +0 -0
- package/dist/src/typedefs.d.ts.map +0 -0
- package/dist/src/util/animation/AnimationBase.d.ts +0 -0
- package/dist/src/util/animation/AnimationBase.d.ts.map +0 -0
- package/dist/src/util/animation/AnimationBase.min.mjs +0 -0
- package/dist/src/util/animation/AnimationBase.min.mjs.map +0 -0
- package/dist/src/util/animation/AnimationBase.mjs +0 -0
- package/dist/src/util/animation/AnimationBase.mjs.map +0 -0
- package/dist/src/util/animation/AnimationFrameProvider.d.ts +0 -0
- package/dist/src/util/animation/AnimationFrameProvider.d.ts.map +0 -0
- package/dist/src/util/animation/AnimationFrameProvider.min.mjs +0 -0
- package/dist/src/util/animation/AnimationFrameProvider.min.mjs.map +0 -0
- package/dist/src/util/animation/AnimationFrameProvider.mjs +0 -0
- package/dist/src/util/animation/AnimationFrameProvider.mjs.map +0 -0
- package/dist/src/util/animation/AnimationRegistry.d.ts +0 -0
- package/dist/src/util/animation/AnimationRegistry.d.ts.map +0 -0
- package/dist/src/util/animation/AnimationRegistry.min.mjs +0 -0
- package/dist/src/util/animation/AnimationRegistry.min.mjs.map +0 -0
- package/dist/src/util/animation/AnimationRegistry.mjs +0 -0
- package/dist/src/util/animation/AnimationRegistry.mjs.map +0 -0
- package/dist/src/util/animation/ArrayAnimation.d.ts +0 -0
- package/dist/src/util/animation/ArrayAnimation.d.ts.map +0 -0
- package/dist/src/util/animation/ArrayAnimation.min.mjs +0 -0
- package/dist/src/util/animation/ArrayAnimation.min.mjs.map +0 -0
- package/dist/src/util/animation/ArrayAnimation.mjs +0 -0
- package/dist/src/util/animation/ArrayAnimation.mjs.map +0 -0
- package/dist/src/util/animation/ColorAnimation.d.ts +0 -0
- package/dist/src/util/animation/ColorAnimation.d.ts.map +0 -0
- package/dist/src/util/animation/ColorAnimation.min.mjs +0 -0
- package/dist/src/util/animation/ColorAnimation.min.mjs.map +0 -0
- package/dist/src/util/animation/ColorAnimation.mjs +0 -0
- package/dist/src/util/animation/ColorAnimation.mjs.map +0 -0
- package/dist/src/util/animation/ValueAnimation.d.ts +0 -0
- package/dist/src/util/animation/ValueAnimation.d.ts.map +0 -0
- package/dist/src/util/animation/ValueAnimation.min.mjs +0 -0
- package/dist/src/util/animation/ValueAnimation.min.mjs.map +0 -0
- package/dist/src/util/animation/ValueAnimation.mjs +0 -0
- package/dist/src/util/animation/ValueAnimation.mjs.map +0 -0
- package/dist/src/util/animation/animate.d.ts +0 -0
- package/dist/src/util/animation/animate.d.ts.map +0 -0
- package/dist/src/util/animation/animate.min.mjs +0 -0
- package/dist/src/util/animation/animate.min.mjs.map +0 -0
- package/dist/src/util/animation/animate.mjs +0 -0
- package/dist/src/util/animation/animate.mjs.map +0 -0
- package/dist/src/util/animation/easing.d.ts +0 -0
- package/dist/src/util/animation/easing.d.ts.map +0 -0
- package/dist/src/util/animation/easing.min.mjs +0 -0
- package/dist/src/util/animation/easing.min.mjs.map +0 -0
- package/dist/src/util/animation/easing.mjs +0 -0
- package/dist/src/util/animation/easing.mjs.map +0 -0
- package/dist/src/util/animation/index.d.ts +0 -0
- package/dist/src/util/animation/index.d.ts.map +0 -0
- package/dist/src/util/animation/types.d.ts +0 -0
- package/dist/src/util/animation/types.d.ts.map +0 -0
- package/dist/src/util/applyMixins.d.ts +0 -0
- package/dist/src/util/applyMixins.d.ts.map +0 -0
- package/dist/src/util/applyMixins.min.mjs +0 -0
- package/dist/src/util/applyMixins.min.mjs.map +0 -0
- package/dist/src/util/applyMixins.mjs +0 -0
- package/dist/src/util/applyMixins.mjs.map +0 -0
- package/dist/src/util/dom_event.d.ts +0 -0
- package/dist/src/util/dom_event.d.ts.map +0 -0
- package/dist/src/util/dom_event.min.mjs +0 -0
- package/dist/src/util/dom_event.min.mjs.map +0 -0
- package/dist/src/util/dom_event.mjs +0 -0
- package/dist/src/util/dom_event.mjs.map +0 -0
- package/dist/src/util/dom_misc.d.ts +0 -0
- package/dist/src/util/dom_misc.d.ts.map +0 -0
- package/dist/src/util/dom_misc.min.mjs +0 -0
- package/dist/src/util/dom_misc.min.mjs.map +0 -0
- package/dist/src/util/dom_misc.mjs +0 -0
- package/dist/src/util/dom_misc.mjs.map +0 -0
- package/dist/src/util/index.d.ts +0 -0
- package/dist/src/util/index.d.ts.map +0 -0
- package/dist/src/util/index.min.mjs +0 -0
- package/dist/src/util/index.min.mjs.map +0 -0
- package/dist/src/util/index.mjs +0 -0
- package/dist/src/util/index.mjs.map +0 -0
- package/dist/src/util/internals/applyCanvasTransform.d.ts +0 -0
- package/dist/src/util/internals/applyCanvasTransform.d.ts.map +0 -0
- package/dist/src/util/internals/applyCanvasTransform.min.mjs +0 -0
- package/dist/src/util/internals/applyCanvasTransform.min.mjs.map +0 -0
- package/dist/src/util/internals/applyCanvasTransform.mjs +0 -0
- package/dist/src/util/internals/applyCanvasTransform.mjs.map +0 -0
- package/dist/src/util/internals/cleanupSvgAttribute.d.ts +0 -0
- package/dist/src/util/internals/cleanupSvgAttribute.d.ts.map +0 -0
- package/dist/src/util/internals/cleanupSvgAttribute.min.mjs +0 -0
- package/dist/src/util/internals/cleanupSvgAttribute.min.mjs.map +0 -0
- package/dist/src/util/internals/cleanupSvgAttribute.mjs +0 -0
- package/dist/src/util/internals/cleanupSvgAttribute.mjs.map +0 -0
- package/dist/src/util/internals/cloneStyles.d.ts +0 -0
- package/dist/src/util/internals/cloneStyles.d.ts.map +0 -0
- package/dist/src/util/internals/cloneStyles.min.mjs +0 -0
- package/dist/src/util/internals/cloneStyles.min.mjs.map +0 -0
- package/dist/src/util/internals/cloneStyles.mjs +0 -0
- package/dist/src/util/internals/cloneStyles.mjs.map +0 -0
- package/dist/src/util/internals/console.d.ts +0 -0
- package/dist/src/util/internals/console.d.ts.map +0 -0
- package/dist/src/util/internals/console.min.mjs +0 -0
- package/dist/src/util/internals/console.min.mjs.map +0 -0
- package/dist/src/util/internals/console.mjs +0 -0
- package/dist/src/util/internals/console.mjs.map +0 -0
- package/dist/src/util/internals/dom_style.d.ts +0 -0
- package/dist/src/util/internals/dom_style.d.ts.map +0 -0
- package/dist/src/util/internals/dom_style.min.mjs +0 -0
- package/dist/src/util/internals/dom_style.min.mjs.map +0 -0
- package/dist/src/util/internals/dom_style.mjs +0 -0
- package/dist/src/util/internals/dom_style.mjs.map +0 -0
- package/dist/src/util/internals/findRight.d.ts +0 -0
- package/dist/src/util/internals/findRight.d.ts.map +0 -0
- package/dist/src/util/internals/findRight.min.mjs +0 -0
- package/dist/src/util/internals/findRight.min.mjs.map +0 -0
- package/dist/src/util/internals/findRight.mjs +0 -0
- package/dist/src/util/internals/findRight.mjs.map +0 -0
- package/dist/src/util/internals/getRandomInt.d.ts +0 -0
- package/dist/src/util/internals/getRandomInt.d.ts.map +0 -0
- package/dist/src/util/internals/getRandomInt.min.mjs +0 -0
- package/dist/src/util/internals/getRandomInt.min.mjs.map +0 -0
- package/dist/src/util/internals/getRandomInt.mjs +0 -0
- package/dist/src/util/internals/getRandomInt.mjs.map +0 -0
- package/dist/src/util/internals/ifNaN.d.ts +0 -0
- package/dist/src/util/internals/ifNaN.d.ts.map +0 -0
- package/dist/src/util/internals/ifNaN.min.mjs +0 -0
- package/dist/src/util/internals/ifNaN.min.mjs.map +0 -0
- package/dist/src/util/internals/ifNaN.mjs +0 -0
- package/dist/src/util/internals/ifNaN.mjs.map +0 -0
- package/dist/src/util/internals/removeFromArray.d.ts +0 -0
- package/dist/src/util/internals/removeFromArray.d.ts.map +0 -0
- package/dist/src/util/internals/removeFromArray.min.mjs +0 -0
- package/dist/src/util/internals/removeFromArray.min.mjs.map +0 -0
- package/dist/src/util/internals/removeFromArray.mjs +0 -0
- package/dist/src/util/internals/removeFromArray.mjs.map +0 -0
- package/dist/src/util/internals/uid.d.ts +0 -0
- package/dist/src/util/internals/uid.d.ts.map +0 -0
- package/dist/src/util/internals/uid.min.mjs +0 -0
- package/dist/src/util/internals/uid.min.mjs.map +0 -0
- package/dist/src/util/internals/uid.mjs +0 -0
- package/dist/src/util/internals/uid.mjs.map +0 -0
- package/dist/src/util/lang_string.d.ts +0 -0
- package/dist/src/util/lang_string.d.ts.map +0 -0
- package/dist/src/util/lang_string.min.mjs +0 -0
- package/dist/src/util/lang_string.min.mjs.map +0 -0
- package/dist/src/util/lang_string.mjs +0 -0
- package/dist/src/util/lang_string.mjs.map +0 -0
- package/dist/src/util/misc/boundingBoxFromPoints.d.ts +0 -0
- package/dist/src/util/misc/boundingBoxFromPoints.d.ts.map +0 -0
- package/dist/src/util/misc/boundingBoxFromPoints.min.mjs +0 -0
- package/dist/src/util/misc/boundingBoxFromPoints.min.mjs.map +0 -0
- package/dist/src/util/misc/boundingBoxFromPoints.mjs +0 -0
- package/dist/src/util/misc/boundingBoxFromPoints.mjs.map +0 -0
- package/dist/src/util/misc/capValue.d.ts +0 -0
- package/dist/src/util/misc/capValue.d.ts.map +0 -0
- package/dist/src/util/misc/capValue.min.mjs +0 -0
- package/dist/src/util/misc/capValue.min.mjs.map +0 -0
- package/dist/src/util/misc/capValue.mjs +0 -0
- package/dist/src/util/misc/capValue.mjs.map +0 -0
- package/dist/src/util/misc/cornerRadius.d.ts +70 -0
- package/dist/src/util/misc/cornerRadius.d.ts.map +1 -0
- package/dist/src/util/misc/cornerRadius.min.mjs +2 -0
- package/dist/src/util/misc/cornerRadius.min.mjs.map +1 -0
- package/dist/src/util/misc/cornerRadius.mjs +181 -0
- package/dist/src/util/misc/cornerRadius.mjs.map +1 -0
- package/dist/src/util/misc/cos.d.ts +0 -0
- package/dist/src/util/misc/cos.d.ts.map +0 -0
- package/dist/src/util/misc/cos.min.mjs +0 -0
- package/dist/src/util/misc/cos.min.mjs.map +0 -0
- package/dist/src/util/misc/cos.mjs +0 -0
- package/dist/src/util/misc/cos.mjs.map +0 -0
- package/dist/src/util/misc/dom.d.ts +0 -0
- package/dist/src/util/misc/dom.d.ts.map +0 -0
- package/dist/src/util/misc/dom.min.mjs +0 -0
- package/dist/src/util/misc/dom.min.mjs.map +0 -0
- package/dist/src/util/misc/dom.mjs +0 -0
- package/dist/src/util/misc/dom.mjs.map +0 -0
- package/dist/src/util/misc/findScaleTo.d.ts +0 -0
- package/dist/src/util/misc/findScaleTo.d.ts.map +0 -0
- package/dist/src/util/misc/findScaleTo.min.mjs +0 -0
- package/dist/src/util/misc/findScaleTo.min.mjs.map +0 -0
- package/dist/src/util/misc/findScaleTo.mjs +0 -0
- package/dist/src/util/misc/findScaleTo.mjs.map +0 -0
- package/dist/src/util/misc/groupSVGElements.d.ts +0 -0
- package/dist/src/util/misc/groupSVGElements.d.ts.map +0 -0
- package/dist/src/util/misc/groupSVGElements.min.mjs +0 -0
- package/dist/src/util/misc/groupSVGElements.min.mjs.map +0 -0
- package/dist/src/util/misc/groupSVGElements.mjs +0 -0
- package/dist/src/util/misc/groupSVGElements.mjs.map +0 -0
- package/dist/src/util/misc/isTransparent.d.ts +0 -0
- package/dist/src/util/misc/isTransparent.d.ts.map +0 -0
- package/dist/src/util/misc/isTransparent.min.mjs +0 -0
- package/dist/src/util/misc/isTransparent.min.mjs.map +0 -0
- package/dist/src/util/misc/isTransparent.mjs +0 -0
- package/dist/src/util/misc/isTransparent.mjs.map +0 -0
- package/dist/src/util/misc/matrix.d.ts +0 -0
- package/dist/src/util/misc/matrix.d.ts.map +0 -0
- package/dist/src/util/misc/matrix.min.mjs +0 -0
- package/dist/src/util/misc/matrix.min.mjs.map +0 -0
- package/dist/src/util/misc/matrix.mjs +0 -0
- package/dist/src/util/misc/matrix.mjs.map +0 -0
- package/dist/src/util/misc/mergeClipPaths.d.ts +0 -0
- package/dist/src/util/misc/mergeClipPaths.d.ts.map +0 -0
- package/dist/src/util/misc/mergeClipPaths.min.mjs +0 -0
- package/dist/src/util/misc/mergeClipPaths.min.mjs.map +0 -0
- package/dist/src/util/misc/mergeClipPaths.mjs +0 -0
- package/dist/src/util/misc/mergeClipPaths.mjs.map +0 -0
- package/dist/src/util/misc/objectEnlive.d.ts +0 -0
- package/dist/src/util/misc/objectEnlive.d.ts.map +0 -0
- package/dist/src/util/misc/objectEnlive.min.mjs +0 -0
- package/dist/src/util/misc/objectEnlive.min.mjs.map +0 -0
- package/dist/src/util/misc/objectEnlive.mjs +0 -0
- package/dist/src/util/misc/objectEnlive.mjs.map +0 -0
- package/dist/src/util/misc/objectTransforms.d.ts +0 -0
- package/dist/src/util/misc/objectTransforms.d.ts.map +0 -0
- package/dist/src/util/misc/objectTransforms.min.mjs +0 -0
- package/dist/src/util/misc/objectTransforms.min.mjs.map +0 -0
- package/dist/src/util/misc/objectTransforms.mjs +0 -0
- package/dist/src/util/misc/objectTransforms.mjs.map +0 -0
- package/dist/src/util/misc/pick.d.ts +0 -0
- package/dist/src/util/misc/pick.d.ts.map +0 -0
- package/dist/src/util/misc/pick.min.mjs +0 -0
- package/dist/src/util/misc/pick.min.mjs.map +0 -0
- package/dist/src/util/misc/pick.mjs +0 -0
- package/dist/src/util/misc/pick.mjs.map +0 -0
- package/dist/src/util/misc/planeChange.d.ts +0 -0
- package/dist/src/util/misc/planeChange.d.ts.map +0 -0
- package/dist/src/util/misc/planeChange.min.mjs +0 -0
- package/dist/src/util/misc/planeChange.min.mjs.map +0 -0
- package/dist/src/util/misc/planeChange.mjs +0 -0
- package/dist/src/util/misc/planeChange.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.min.mjs +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.min.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.mjs +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.min.mjs +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.min.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.mjs +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts +0 -0
- package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.min.mjs +0 -0
- package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.min.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.mjs +0 -0
- package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/index.d.ts +0 -0
- package/dist/src/util/misc/projectStroke/index.d.ts.map +0 -0
- package/dist/src/util/misc/projectStroke/index.min.mjs +0 -0
- package/dist/src/util/misc/projectStroke/index.min.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/index.mjs +0 -0
- package/dist/src/util/misc/projectStroke/index.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/types.d.ts +0 -0
- package/dist/src/util/misc/projectStroke/types.d.ts.map +0 -0
- package/dist/src/util/misc/radiansDegreesConversion.d.ts +0 -0
- package/dist/src/util/misc/radiansDegreesConversion.d.ts.map +0 -0
- package/dist/src/util/misc/radiansDegreesConversion.min.mjs +0 -0
- package/dist/src/util/misc/radiansDegreesConversion.min.mjs.map +0 -0
- package/dist/src/util/misc/radiansDegreesConversion.mjs +0 -0
- package/dist/src/util/misc/radiansDegreesConversion.mjs.map +0 -0
- package/dist/src/util/misc/resolveOrigin.d.ts +0 -0
- package/dist/src/util/misc/resolveOrigin.d.ts.map +0 -0
- package/dist/src/util/misc/resolveOrigin.min.mjs +0 -0
- package/dist/src/util/misc/resolveOrigin.min.mjs.map +0 -0
- package/dist/src/util/misc/resolveOrigin.mjs +0 -0
- package/dist/src/util/misc/resolveOrigin.mjs.map +0 -0
- package/dist/src/util/misc/sin.d.ts +0 -0
- package/dist/src/util/misc/sin.d.ts.map +0 -0
- package/dist/src/util/misc/sin.min.mjs +0 -0
- package/dist/src/util/misc/sin.min.mjs.map +0 -0
- package/dist/src/util/misc/sin.mjs +0 -0
- package/dist/src/util/misc/sin.mjs.map +0 -0
- package/dist/src/util/misc/svgExport.d.ts +0 -0
- package/dist/src/util/misc/svgExport.d.ts.map +0 -0
- package/dist/src/util/misc/svgExport.min.mjs +0 -0
- package/dist/src/util/misc/svgExport.min.mjs.map +0 -0
- package/dist/src/util/misc/svgExport.mjs +0 -0
- package/dist/src/util/misc/svgExport.mjs.map +0 -0
- package/dist/src/util/misc/svgParsing.d.ts +0 -0
- package/dist/src/util/misc/svgParsing.d.ts.map +0 -0
- package/dist/src/util/misc/svgParsing.min.mjs +0 -0
- package/dist/src/util/misc/svgParsing.min.mjs.map +0 -0
- package/dist/src/util/misc/svgParsing.mjs +0 -0
- package/dist/src/util/misc/svgParsing.mjs.map +0 -0
- package/dist/src/util/misc/textStyles.d.ts +0 -0
- package/dist/src/util/misc/textStyles.d.ts.map +0 -0
- package/dist/src/util/misc/textStyles.min.mjs +0 -0
- package/dist/src/util/misc/textStyles.min.mjs.map +0 -0
- package/dist/src/util/misc/textStyles.mjs +0 -0
- package/dist/src/util/misc/textStyles.mjs.map +0 -0
- package/dist/src/util/misc/toFixed.d.ts +0 -0
- package/dist/src/util/misc/toFixed.d.ts.map +0 -0
- package/dist/src/util/misc/toFixed.min.mjs +0 -0
- package/dist/src/util/misc/toFixed.min.mjs.map +0 -0
- package/dist/src/util/misc/toFixed.mjs +0 -0
- package/dist/src/util/misc/toFixed.mjs.map +0 -0
- package/dist/src/util/misc/vectors.d.ts +0 -0
- package/dist/src/util/misc/vectors.d.ts.map +0 -0
- package/dist/src/util/misc/vectors.min.mjs +0 -0
- package/dist/src/util/misc/vectors.min.mjs.map +0 -0
- package/dist/src/util/misc/vectors.mjs +0 -0
- package/dist/src/util/misc/vectors.mjs.map +0 -0
- package/dist/src/util/path/index.d.ts +0 -0
- package/dist/src/util/path/index.d.ts.map +0 -0
- package/dist/src/util/path/index.min.mjs +0 -0
- package/dist/src/util/path/index.min.mjs.map +0 -0
- package/dist/src/util/path/index.mjs +0 -0
- package/dist/src/util/path/index.mjs.map +0 -0
- package/dist/src/util/path/regex.d.ts +0 -0
- package/dist/src/util/path/regex.d.ts.map +0 -0
- package/dist/src/util/path/regex.min.mjs +0 -0
- package/dist/src/util/path/regex.min.mjs.map +0 -0
- package/dist/src/util/path/regex.mjs +0 -0
- package/dist/src/util/path/regex.mjs.map +0 -0
- package/dist/src/util/path/typechecks.d.ts +0 -0
- package/dist/src/util/path/typechecks.d.ts.map +0 -0
- package/dist/src/util/path/typedefs.d.ts +0 -0
- package/dist/src/util/path/typedefs.d.ts.map +0 -0
- package/dist/src/util/transform_matrix_removal.d.ts +0 -0
- package/dist/src/util/transform_matrix_removal.d.ts.map +0 -0
- package/dist/src/util/transform_matrix_removal.min.mjs +0 -0
- package/dist/src/util/transform_matrix_removal.min.mjs.map +0 -0
- package/dist/src/util/transform_matrix_removal.mjs +0 -0
- package/dist/src/util/transform_matrix_removal.mjs.map +0 -0
- package/dist/src/util/typeAssertions.d.ts +0 -0
- package/dist/src/util/typeAssertions.d.ts.map +0 -0
- package/dist/src/util/typeAssertions.min.mjs +0 -0
- package/dist/src/util/typeAssertions.min.mjs.map +0 -0
- package/dist/src/util/typeAssertions.mjs +0 -0
- package/dist/src/util/typeAssertions.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/constant.mjs +0 -0
- package/dist-extensions/aligning_guidelines/constant.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/index.mjs +0 -0
- package/dist-extensions/aligning_guidelines/index.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/util/basic.mjs +0 -0
- package/dist-extensions/aligning_guidelines/util/basic.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/util/collect-line.mjs +0 -0
- package/dist-extensions/aligning_guidelines/util/collect-line.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/util/collect-point.mjs +0 -0
- package/dist-extensions/aligning_guidelines/util/collect-point.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/util/draw.mjs +0 -0
- package/dist-extensions/aligning_guidelines/util/draw.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/util/get-objects-by-target.mjs +0 -0
- package/dist-extensions/aligning_guidelines/util/get-objects-by-target.mjs.map +0 -0
- package/dist-extensions/data_updaters/gradient/index.mjs +0 -0
- package/dist-extensions/data_updaters/gradient/index.mjs.map +0 -0
- package/dist-extensions/data_updaters/origins/index.mjs +0 -0
- package/dist-extensions/data_updaters/origins/index.mjs.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/constant.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/constant.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/index.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/index.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/typedefs.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/typedefs.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/basic.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/basic.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/collect-line.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/collect-line.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/collect-point.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/collect-point.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/draw.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/draw.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/get-objects-by-target.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/get-objects-by-target.d.ts.map +0 -0
- package/dist-extensions/extensions/data_updaters/gradient/index.d.ts +0 -0
- package/dist-extensions/extensions/data_updaters/gradient/index.d.ts.map +0 -0
- package/dist-extensions/extensions/data_updaters/origins/index.d.ts +0 -0
- package/dist-extensions/extensions/data_updaters/origins/index.d.ts.map +0 -0
- package/dist-extensions/extensions/index.d.ts +0 -0
- package/dist-extensions/extensions/index.d.ts.map +0 -0
- package/dist-extensions/fabric-extensions.min.js +0 -0
- package/dist-extensions/fabric-extensions.min.js.map +0 -0
- package/dist-extensions/fabric.d.ts +0 -0
- package/dist-extensions/fabric.d.ts.map +0 -0
- package/dist-extensions/index.d.ts +0 -0
- package/dist-extensions/index.d.ts.map +0 -0
- package/dist-extensions/index.mjs +0 -0
- package/dist-extensions/index.mjs.map +0 -0
- package/dist-extensions/src/ClassRegistry.d.ts +0 -0
- package/dist-extensions/src/ClassRegistry.d.ts.map +0 -0
- package/dist-extensions/src/Collection.d.ts +0 -0
- package/dist-extensions/src/Collection.d.ts.map +0 -0
- package/dist-extensions/src/CommonMethods.d.ts +0 -0
- package/dist-extensions/src/CommonMethods.d.ts.map +0 -0
- package/dist-extensions/src/EventTypeDefs.d.ts +0 -0
- package/dist-extensions/src/EventTypeDefs.d.ts.map +0 -0
- package/dist-extensions/src/Intersection.d.ts +0 -0
- package/dist-extensions/src/Intersection.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/ActiveSelectionLayoutManager.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/ActiveSelectionLayoutManager.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/LayoutManager.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/LayoutManager.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/utils.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/utils.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/constants.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/constants.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/index.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/index.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/types.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/types.d.ts.map +0 -0
- package/dist-extensions/src/Observable.d.ts +0 -0
- package/dist-extensions/src/Observable.d.ts.map +0 -0
- package/dist-extensions/src/Pattern/Pattern.d.ts +0 -0
- package/dist-extensions/src/Pattern/Pattern.d.ts.map +0 -0
- package/dist-extensions/src/Pattern/index.d.ts +0 -0
- package/dist-extensions/src/Pattern/index.d.ts.map +0 -0
- package/dist-extensions/src/Pattern/types.d.ts +0 -0
- package/dist-extensions/src/Pattern/types.d.ts.map +0 -0
- package/dist-extensions/src/Point.d.ts +0 -0
- package/dist-extensions/src/Point.d.ts.map +0 -0
- package/dist-extensions/src/Shadow.d.ts +0 -0
- package/dist-extensions/src/Shadow.d.ts.map +0 -0
- package/dist-extensions/src/brushes/BaseBrush.d.ts +0 -0
- package/dist-extensions/src/brushes/BaseBrush.d.ts.map +0 -0
- package/dist-extensions/src/brushes/CircleBrush.d.ts +0 -0
- package/dist-extensions/src/brushes/CircleBrush.d.ts.map +0 -0
- package/dist-extensions/src/brushes/PatternBrush.d.ts +0 -0
- package/dist-extensions/src/brushes/PatternBrush.d.ts.map +0 -0
- package/dist-extensions/src/brushes/PencilBrush.d.ts +0 -0
- package/dist-extensions/src/brushes/PencilBrush.d.ts.map +0 -0
- package/dist-extensions/src/brushes/SprayBrush.d.ts +0 -0
- package/dist-extensions/src/brushes/SprayBrush.d.ts.map +0 -0
- package/dist-extensions/src/brushes/typedefs.d.ts +0 -0
- package/dist-extensions/src/brushes/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/cache.d.ts +0 -0
- package/dist-extensions/src/cache.d.ts.map +0 -0
- package/dist-extensions/src/canvas/Canvas.d.ts +0 -0
- package/dist-extensions/src/canvas/Canvas.d.ts.map +0 -0
- package/dist-extensions/src/canvas/CanvasOptions.d.ts +0 -0
- package/dist-extensions/src/canvas/CanvasOptions.d.ts.map +0 -0
- package/dist-extensions/src/canvas/DOMManagers/CanvasDOMManager.d.ts +0 -0
- package/dist-extensions/src/canvas/DOMManagers/CanvasDOMManager.d.ts.map +0 -0
- package/dist-extensions/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts +0 -0
- package/dist-extensions/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts.map +0 -0
- package/dist-extensions/src/canvas/DOMManagers/util.d.ts +0 -0
- package/dist-extensions/src/canvas/DOMManagers/util.d.ts.map +0 -0
- package/dist-extensions/src/canvas/SelectableCanvas.d.ts +0 -0
- package/dist-extensions/src/canvas/SelectableCanvas.d.ts.map +0 -0
- package/dist-extensions/src/canvas/StaticCanvas.d.ts +0 -0
- package/dist-extensions/src/canvas/StaticCanvas.d.ts.map +0 -0
- package/dist-extensions/src/canvas/StaticCanvasOptions.d.ts +0 -0
- package/dist-extensions/src/canvas/StaticCanvasOptions.d.ts.map +0 -0
- package/dist-extensions/src/canvas/TextEditingManager.d.ts +0 -0
- package/dist-extensions/src/canvas/TextEditingManager.d.ts.map +0 -0
- package/dist-extensions/src/color/Color.d.ts +0 -0
- package/dist-extensions/src/color/Color.d.ts.map +0 -0
- package/dist-extensions/src/color/color_map.d.ts +0 -0
- package/dist-extensions/src/color/color_map.d.ts.map +0 -0
- package/dist-extensions/src/color/constants.d.ts +0 -0
- package/dist-extensions/src/color/constants.d.ts.map +0 -0
- package/dist-extensions/src/color/typedefs.d.ts +0 -0
- package/dist-extensions/src/color/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/color/util.d.ts +0 -0
- package/dist-extensions/src/color/util.d.ts.map +0 -0
- package/dist-extensions/src/config.d.ts +0 -0
- package/dist-extensions/src/config.d.ts.map +0 -0
- package/dist-extensions/src/constants.d.ts +0 -0
- package/dist-extensions/src/constants.d.ts.map +0 -0
- package/dist-extensions/src/controls/Control.d.ts +0 -0
- package/dist-extensions/src/controls/Control.d.ts.map +0 -0
- package/dist-extensions/src/controls/changeHeight.d.ts +0 -0
- package/dist-extensions/src/controls/changeHeight.d.ts.map +0 -0
- package/dist-extensions/src/controls/changeWidth.d.ts +0 -0
- package/dist-extensions/src/controls/changeWidth.d.ts.map +0 -0
- package/dist-extensions/src/controls/commonControls.d.ts +0 -0
- package/dist-extensions/src/controls/commonControls.d.ts.map +0 -0
- package/dist-extensions/src/controls/controlRendering.d.ts +0 -0
- package/dist-extensions/src/controls/controlRendering.d.ts.map +0 -0
- package/dist-extensions/src/controls/drag.d.ts +0 -0
- package/dist-extensions/src/controls/drag.d.ts.map +0 -0
- package/dist-extensions/src/controls/fireEvent.d.ts +0 -0
- package/dist-extensions/src/controls/fireEvent.d.ts.map +0 -0
- package/dist-extensions/src/controls/index.d.ts +0 -0
- package/dist-extensions/src/controls/index.d.ts.map +0 -0
- package/dist-extensions/src/controls/pathControl.d.ts +0 -0
- package/dist-extensions/src/controls/pathControl.d.ts.map +0 -0
- package/dist-extensions/src/controls/polyControl.d.ts +0 -0
- package/dist-extensions/src/controls/polyControl.d.ts.map +0 -0
- package/dist-extensions/src/controls/rotate.d.ts +0 -0
- package/dist-extensions/src/controls/rotate.d.ts.map +0 -0
- package/dist-extensions/src/controls/scale.d.ts +0 -0
- package/dist-extensions/src/controls/scale.d.ts.map +0 -0
- package/dist-extensions/src/controls/scaleSkew.d.ts +0 -0
- package/dist-extensions/src/controls/scaleSkew.d.ts.map +0 -0
- package/dist-extensions/src/controls/skew.d.ts +0 -0
- package/dist-extensions/src/controls/skew.d.ts.map +0 -0
- package/dist-extensions/src/controls/util.d.ts +0 -0
- package/dist-extensions/src/controls/util.d.ts.map +0 -0
- package/dist-extensions/src/controls/wrapWithFireEvent.d.ts +0 -0
- package/dist-extensions/src/controls/wrapWithFireEvent.d.ts.map +0 -0
- package/dist-extensions/src/controls/wrapWithFixedAnchor.d.ts +0 -0
- package/dist-extensions/src/controls/wrapWithFixedAnchor.d.ts.map +0 -0
- package/dist-extensions/src/env/browser.d.ts +0 -0
- package/dist-extensions/src/env/browser.d.ts.map +0 -0
- package/dist-extensions/src/env/index.d.ts +0 -0
- package/dist-extensions/src/env/index.d.ts.map +0 -0
- package/dist-extensions/src/env/types.d.ts +0 -0
- package/dist-extensions/src/env/types.d.ts.map +0 -0
- package/dist-extensions/src/filters/BaseFilter.d.ts +0 -0
- package/dist-extensions/src/filters/BaseFilter.d.ts.map +0 -0
- package/dist-extensions/src/filters/BlendColor.d.ts +0 -0
- package/dist-extensions/src/filters/BlendColor.d.ts.map +0 -0
- package/dist-extensions/src/filters/BlendImage.d.ts +0 -0
- package/dist-extensions/src/filters/BlendImage.d.ts.map +0 -0
- package/dist-extensions/src/filters/Blur.d.ts +0 -0
- package/dist-extensions/src/filters/Blur.d.ts.map +0 -0
- package/dist-extensions/src/filters/Brightness.d.ts +0 -0
- package/dist-extensions/src/filters/Brightness.d.ts.map +0 -0
- package/dist-extensions/src/filters/Canvas2dFilterBackend.d.ts +0 -0
- package/dist-extensions/src/filters/Canvas2dFilterBackend.d.ts.map +0 -0
- package/dist-extensions/src/filters/ColorMatrix.d.ts +0 -0
- package/dist-extensions/src/filters/ColorMatrix.d.ts.map +0 -0
- package/dist-extensions/src/filters/ColorMatrixFilters.d.ts +0 -0
- package/dist-extensions/src/filters/ColorMatrixFilters.d.ts.map +0 -0
- package/dist-extensions/src/filters/Composed.d.ts +0 -0
- package/dist-extensions/src/filters/Composed.d.ts.map +0 -0
- package/dist-extensions/src/filters/Contrast.d.ts +0 -0
- package/dist-extensions/src/filters/Contrast.d.ts.map +0 -0
- package/dist-extensions/src/filters/Convolute.d.ts +0 -0
- package/dist-extensions/src/filters/Convolute.d.ts.map +0 -0
- package/dist-extensions/src/filters/FilterBackend.d.ts +0 -0
- package/dist-extensions/src/filters/FilterBackend.d.ts.map +0 -0
- package/dist-extensions/src/filters/GLProbes/GLProbe.d.ts +0 -0
- package/dist-extensions/src/filters/GLProbes/GLProbe.d.ts.map +0 -0
- package/dist-extensions/src/filters/GLProbes/WebGLProbe.d.ts +0 -0
- package/dist-extensions/src/filters/GLProbes/WebGLProbe.d.ts.map +0 -0
- package/dist-extensions/src/filters/Gamma.d.ts +0 -0
- package/dist-extensions/src/filters/Gamma.d.ts.map +0 -0
- package/dist-extensions/src/filters/Grayscale.d.ts +0 -0
- package/dist-extensions/src/filters/Grayscale.d.ts.map +0 -0
- package/dist-extensions/src/filters/HueRotation.d.ts +0 -0
- package/dist-extensions/src/filters/HueRotation.d.ts.map +0 -0
- package/dist-extensions/src/filters/Invert.d.ts +0 -0
- package/dist-extensions/src/filters/Invert.d.ts.map +0 -0
- package/dist-extensions/src/filters/Noise.d.ts +0 -0
- package/dist-extensions/src/filters/Noise.d.ts.map +0 -0
- package/dist-extensions/src/filters/Pixelate.d.ts +0 -0
- package/dist-extensions/src/filters/Pixelate.d.ts.map +0 -0
- package/dist-extensions/src/filters/RemoveColor.d.ts +0 -0
- package/dist-extensions/src/filters/RemoveColor.d.ts.map +0 -0
- package/dist-extensions/src/filters/Resize.d.ts +0 -0
- package/dist-extensions/src/filters/Resize.d.ts.map +0 -0
- package/dist-extensions/src/filters/Saturation.d.ts +0 -0
- package/dist-extensions/src/filters/Saturation.d.ts.map +0 -0
- package/dist-extensions/src/filters/Vibrance.d.ts +0 -0
- package/dist-extensions/src/filters/Vibrance.d.ts.map +0 -0
- package/dist-extensions/src/filters/WebGLFilterBackend.d.ts +0 -0
- package/dist-extensions/src/filters/WebGLFilterBackend.d.ts.map +0 -0
- package/dist-extensions/src/filters/filters.d.ts +0 -0
- package/dist-extensions/src/filters/filters.d.ts.map +0 -0
- package/dist-extensions/src/filters/index.d.ts +0 -0
- package/dist-extensions/src/filters/index.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/baseFilter.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/baseFilter.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/blendColor.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/blendColor.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/blendImage.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/blendImage.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/blur.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/blur.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/brightness.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/brightness.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/colorMatrix.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/colorMatrix.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/constrast.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/constrast.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/convolute.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/convolute.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/gamma.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/gamma.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/grayscale.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/grayscale.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/invert.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/invert.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/noise.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/noise.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/pixelate.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/pixelate.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/removeColor.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/removeColor.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/saturation.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/saturation.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/vibrance.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/vibrance.d.ts.map +0 -0
- package/dist-extensions/src/filters/typedefs.d.ts +0 -0
- package/dist-extensions/src/filters/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/filters/utils.d.ts +0 -0
- package/dist-extensions/src/filters/utils.d.ts.map +0 -0
- package/dist-extensions/src/gradient/Gradient.d.ts +0 -0
- package/dist-extensions/src/gradient/Gradient.d.ts.map +0 -0
- package/dist-extensions/src/gradient/constants.d.ts +0 -0
- package/dist-extensions/src/gradient/constants.d.ts.map +0 -0
- package/dist-extensions/src/gradient/index.d.ts +0 -0
- package/dist-extensions/src/gradient/index.d.ts.map +0 -0
- package/dist-extensions/src/gradient/parser/misc.d.ts +0 -0
- package/dist-extensions/src/gradient/parser/misc.d.ts.map +0 -0
- package/dist-extensions/src/gradient/parser/parseColorStops.d.ts +0 -0
- package/dist-extensions/src/gradient/parser/parseColorStops.d.ts.map +0 -0
- package/dist-extensions/src/gradient/parser/parseCoords.d.ts +0 -0
- package/dist-extensions/src/gradient/parser/parseCoords.d.ts.map +0 -0
- package/dist-extensions/src/gradient/typedefs.d.ts +0 -0
- package/dist-extensions/src/gradient/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/parser/applyViewboxTransform.d.ts +0 -0
- package/dist-extensions/src/parser/applyViewboxTransform.d.ts.map +0 -0
- package/dist-extensions/src/parser/attributes.d.ts +0 -0
- package/dist-extensions/src/parser/attributes.d.ts.map +0 -0
- package/dist-extensions/src/parser/constants.d.ts +0 -0
- package/dist-extensions/src/parser/constants.d.ts.map +0 -0
- package/dist-extensions/src/parser/doesSomeParentMatch.d.ts +0 -0
- package/dist-extensions/src/parser/doesSomeParentMatch.d.ts.map +0 -0
- package/dist-extensions/src/parser/elementMatchesRule.d.ts +0 -0
- package/dist-extensions/src/parser/elementMatchesRule.d.ts.map +0 -0
- package/dist-extensions/src/parser/elements_parser.d.ts +0 -0
- package/dist-extensions/src/parser/elements_parser.d.ts.map +0 -0
- package/dist-extensions/src/parser/getCSSRules.d.ts +0 -0
- package/dist-extensions/src/parser/getCSSRules.d.ts.map +0 -0
- package/dist-extensions/src/parser/getGlobalStylesForElement.d.ts +0 -0
- package/dist-extensions/src/parser/getGlobalStylesForElement.d.ts.map +0 -0
- package/dist-extensions/src/parser/getGradientDefs.d.ts +0 -0
- package/dist-extensions/src/parser/getGradientDefs.d.ts.map +0 -0
- package/dist-extensions/src/parser/getMultipleNodes.d.ts +0 -0
- package/dist-extensions/src/parser/getMultipleNodes.d.ts.map +0 -0
- package/dist-extensions/src/parser/getSvgRegex.d.ts +0 -0
- package/dist-extensions/src/parser/getSvgRegex.d.ts.map +0 -0
- package/dist-extensions/src/parser/getTagName.d.ts +0 -0
- package/dist-extensions/src/parser/getTagName.d.ts.map +0 -0
- package/dist-extensions/src/parser/hasInvalidAncestor.d.ts +0 -0
- package/dist-extensions/src/parser/hasInvalidAncestor.d.ts.map +0 -0
- package/dist-extensions/src/parser/loadSVGFromString.d.ts +0 -0
- package/dist-extensions/src/parser/loadSVGFromString.d.ts.map +0 -0
- package/dist-extensions/src/parser/loadSVGFromURL.d.ts +0 -0
- package/dist-extensions/src/parser/loadSVGFromURL.d.ts.map +0 -0
- package/dist-extensions/src/parser/normalizeAttr.d.ts +0 -0
- package/dist-extensions/src/parser/normalizeAttr.d.ts.map +0 -0
- package/dist-extensions/src/parser/normalizeValue.d.ts +0 -0
- package/dist-extensions/src/parser/normalizeValue.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseAttributes.d.ts +0 -0
- package/dist-extensions/src/parser/parseAttributes.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseFontDeclaration.d.ts +0 -0
- package/dist-extensions/src/parser/parseFontDeclaration.d.ts.map +0 -0
- package/dist-extensions/src/parser/parsePointsAttribute.d.ts +0 -0
- package/dist-extensions/src/parser/parsePointsAttribute.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseSVGDocument.d.ts +0 -0
- package/dist-extensions/src/parser/parseSVGDocument.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseStyleAttribute.d.ts +0 -0
- package/dist-extensions/src/parser/parseStyleAttribute.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseStyleObject.d.ts +0 -0
- package/dist-extensions/src/parser/parseStyleObject.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseStyleString.d.ts +0 -0
- package/dist-extensions/src/parser/parseStyleString.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseTransformAttribute.d.ts +0 -0
- package/dist-extensions/src/parser/parseTransformAttribute.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseUseDirectives.d.ts +0 -0
- package/dist-extensions/src/parser/parseUseDirectives.d.ts.map +0 -0
- package/dist-extensions/src/parser/percent.d.ts +0 -0
- package/dist-extensions/src/parser/percent.d.ts.map +0 -0
- package/dist-extensions/src/parser/recursivelyParseGradientsXlink.d.ts +0 -0
- package/dist-extensions/src/parser/recursivelyParseGradientsXlink.d.ts.map +0 -0
- package/dist-extensions/src/parser/selectorMatches.d.ts +0 -0
- package/dist-extensions/src/parser/selectorMatches.d.ts.map +0 -0
- package/dist-extensions/src/parser/setStrokeFillOpacity.d.ts +0 -0
- package/dist-extensions/src/parser/setStrokeFillOpacity.d.ts.map +0 -0
- package/dist-extensions/src/parser/typedefs.d.ts +0 -0
- package/dist-extensions/src/parser/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/shapes/ActiveSelection.d.ts +0 -0
- package/dist-extensions/src/shapes/ActiveSelection.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Circle.d.ts +0 -0
- package/dist-extensions/src/shapes/Circle.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Ellipse.d.ts +0 -0
- package/dist-extensions/src/shapes/Ellipse.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Group.d.ts +0 -0
- package/dist-extensions/src/shapes/Group.d.ts.map +0 -0
- package/dist-extensions/src/shapes/IText/DraggableTextDelegate.d.ts +0 -0
- package/dist-extensions/src/shapes/IText/DraggableTextDelegate.d.ts.map +0 -0
- package/dist-extensions/src/shapes/IText/IText.d.ts +0 -0
- package/dist-extensions/src/shapes/IText/IText.d.ts.map +0 -0
- package/dist-extensions/src/shapes/IText/ITextBehavior.d.ts +0 -0
- package/dist-extensions/src/shapes/IText/ITextBehavior.d.ts.map +0 -0
- package/dist-extensions/src/shapes/IText/ITextClickBehavior.d.ts +0 -0
- package/dist-extensions/src/shapes/IText/ITextClickBehavior.d.ts.map +0 -0
- package/dist-extensions/src/shapes/IText/ITextKeyBehavior.d.ts +0 -0
- package/dist-extensions/src/shapes/IText/ITextKeyBehavior.d.ts.map +0 -0
- package/dist-extensions/src/shapes/IText/constants.d.ts +0 -0
- package/dist-extensions/src/shapes/IText/constants.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Image.d.ts +0 -0
- package/dist-extensions/src/shapes/Image.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Line.d.ts +0 -0
- package/dist-extensions/src/shapes/Line.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/FabricObject.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/FabricObject.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/FabricObjectSVGExportMixin.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/FabricObjectSVGExportMixin.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/InteractiveObject.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/InteractiveObject.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/Object.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/Object.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/ObjectGeometry.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/ObjectGeometry.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/defaultValues.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/defaultValues.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/BaseProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/BaseProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/BorderProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/BorderProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/ControlProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/ControlProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/FabricObjectProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/FabricObjectProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/FillStrokeProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/FillStrokeProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/LockInteractionProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/LockInteractionProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/ObjectProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/ObjectProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/ObjectTransformProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/ObjectTransformProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/SerializedObjectProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/SerializedObjectProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/index.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/index.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Path.d.ts +0 -0
- package/dist-extensions/src/shapes/Path.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Polygon.d.ts +0 -0
- package/dist-extensions/src/shapes/Polygon.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Polyline.d.ts +7 -0
- package/dist-extensions/src/shapes/Polyline.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Rect.d.ts +0 -0
- package/dist-extensions/src/shapes/Rect.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Text/StyledText.d.ts +0 -0
- package/dist-extensions/src/shapes/Text/StyledText.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Text/Text.d.ts +0 -0
- package/dist-extensions/src/shapes/Text/Text.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Text/TextSVGExportMixin.d.ts +0 -0
- package/dist-extensions/src/shapes/Text/TextSVGExportMixin.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Text/constants.d.ts +0 -0
- package/dist-extensions/src/shapes/Text/constants.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Textbox.d.ts +0 -0
- package/dist-extensions/src/shapes/Textbox.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Triangle.d.ts +27 -2
- package/dist-extensions/src/shapes/Triangle.d.ts.map +1 -1
- package/dist-extensions/src/text/browserLines.d.ts +0 -0
- package/dist-extensions/src/text/browserLines.d.ts.map +0 -0
- package/dist-extensions/src/text/ellipsis.d.ts +0 -0
- package/dist-extensions/src/text/ellipsis.d.ts.map +0 -0
- package/dist-extensions/src/text/hitTest.d.ts +0 -0
- package/dist-extensions/src/text/hitTest.d.ts.map +0 -0
- package/dist-extensions/src/text/layout.d.ts +0 -0
- package/dist-extensions/src/text/layout.d.ts.map +0 -0
- package/dist-extensions/src/text/measure.d.ts +0 -0
- package/dist-extensions/src/text/measure.d.ts.map +0 -0
- package/dist-extensions/src/text/overlayEditor.d.ts +0 -0
- package/dist-extensions/src/text/overlayEditor.d.ts.map +0 -0
- package/dist-extensions/src/text/unicode.d.ts +0 -0
- package/dist-extensions/src/text/unicode.d.ts.map +0 -0
- package/dist-extensions/src/typedefs.d.ts +0 -0
- package/dist-extensions/src/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/AnimationBase.d.ts +0 -0
- package/dist-extensions/src/util/animation/AnimationBase.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/AnimationFrameProvider.d.ts +0 -0
- package/dist-extensions/src/util/animation/AnimationFrameProvider.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/AnimationRegistry.d.ts +0 -0
- package/dist-extensions/src/util/animation/AnimationRegistry.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/ArrayAnimation.d.ts +0 -0
- package/dist-extensions/src/util/animation/ArrayAnimation.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/ColorAnimation.d.ts +0 -0
- package/dist-extensions/src/util/animation/ColorAnimation.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/ValueAnimation.d.ts +0 -0
- package/dist-extensions/src/util/animation/ValueAnimation.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/animate.d.ts +0 -0
- package/dist-extensions/src/util/animation/animate.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/easing.d.ts +0 -0
- package/dist-extensions/src/util/animation/easing.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/index.d.ts +0 -0
- package/dist-extensions/src/util/animation/index.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/types.d.ts +0 -0
- package/dist-extensions/src/util/animation/types.d.ts.map +0 -0
- package/dist-extensions/src/util/applyMixins.d.ts +0 -0
- package/dist-extensions/src/util/applyMixins.d.ts.map +0 -0
- package/dist-extensions/src/util/dom_event.d.ts +0 -0
- package/dist-extensions/src/util/dom_event.d.ts.map +0 -0
- package/dist-extensions/src/util/dom_misc.d.ts +0 -0
- package/dist-extensions/src/util/dom_misc.d.ts.map +0 -0
- package/dist-extensions/src/util/index.d.ts +0 -0
- package/dist-extensions/src/util/index.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/applyCanvasTransform.d.ts +0 -0
- package/dist-extensions/src/util/internals/applyCanvasTransform.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/cleanupSvgAttribute.d.ts +0 -0
- package/dist-extensions/src/util/internals/cleanupSvgAttribute.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/cloneStyles.d.ts +0 -0
- package/dist-extensions/src/util/internals/cloneStyles.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/console.d.ts +0 -0
- package/dist-extensions/src/util/internals/console.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/dom_style.d.ts +0 -0
- package/dist-extensions/src/util/internals/dom_style.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/findRight.d.ts +0 -0
- package/dist-extensions/src/util/internals/findRight.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/getRandomInt.d.ts +0 -0
- package/dist-extensions/src/util/internals/getRandomInt.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/ifNaN.d.ts +0 -0
- package/dist-extensions/src/util/internals/ifNaN.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/removeFromArray.d.ts +0 -0
- package/dist-extensions/src/util/internals/removeFromArray.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/uid.d.ts +0 -0
- package/dist-extensions/src/util/internals/uid.d.ts.map +0 -0
- package/dist-extensions/src/util/lang_string.d.ts +0 -0
- package/dist-extensions/src/util/lang_string.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/boundingBoxFromPoints.d.ts +0 -0
- package/dist-extensions/src/util/misc/boundingBoxFromPoints.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/capValue.d.ts +0 -0
- package/dist-extensions/src/util/misc/capValue.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/cornerRadius.d.ts +70 -0
- package/dist-extensions/src/util/misc/cornerRadius.d.ts.map +1 -0
- package/dist-extensions/src/util/misc/cos.d.ts +0 -0
- package/dist-extensions/src/util/misc/cos.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/dom.d.ts +0 -0
- package/dist-extensions/src/util/misc/dom.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/findScaleTo.d.ts +0 -0
- package/dist-extensions/src/util/misc/findScaleTo.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/groupSVGElements.d.ts +0 -0
- package/dist-extensions/src/util/misc/groupSVGElements.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/isTransparent.d.ts +0 -0
- package/dist-extensions/src/util/misc/isTransparent.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/matrix.d.ts +0 -0
- package/dist-extensions/src/util/misc/matrix.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/mergeClipPaths.d.ts +0 -0
- package/dist-extensions/src/util/misc/mergeClipPaths.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/objectEnlive.d.ts +0 -0
- package/dist-extensions/src/util/misc/objectEnlive.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/objectTransforms.d.ts +0 -0
- package/dist-extensions/src/util/misc/objectTransforms.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/pick.d.ts +0 -0
- package/dist-extensions/src/util/misc/pick.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/planeChange.d.ts +0 -0
- package/dist-extensions/src/util/misc/planeChange.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts +0 -0
- package/dist-extensions/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts +0 -0
- package/dist-extensions/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts +0 -0
- package/dist-extensions/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/projectStroke/index.d.ts +0 -0
- package/dist-extensions/src/util/misc/projectStroke/index.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/projectStroke/types.d.ts +0 -0
- package/dist-extensions/src/util/misc/projectStroke/types.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/radiansDegreesConversion.d.ts +0 -0
- package/dist-extensions/src/util/misc/radiansDegreesConversion.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/resolveOrigin.d.ts +0 -0
- package/dist-extensions/src/util/misc/resolveOrigin.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/sin.d.ts +0 -0
- package/dist-extensions/src/util/misc/sin.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/svgExport.d.ts +0 -0
- package/dist-extensions/src/util/misc/svgExport.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/svgParsing.d.ts +0 -0
- package/dist-extensions/src/util/misc/svgParsing.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/textStyles.d.ts +0 -0
- package/dist-extensions/src/util/misc/textStyles.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/toFixed.d.ts +0 -0
- package/dist-extensions/src/util/misc/toFixed.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/vectors.d.ts +0 -0
- package/dist-extensions/src/util/misc/vectors.d.ts.map +0 -0
- package/dist-extensions/src/util/path/index.d.ts +0 -0
- package/dist-extensions/src/util/path/index.d.ts.map +0 -0
- package/dist-extensions/src/util/path/regex.d.ts +0 -0
- package/dist-extensions/src/util/path/regex.d.ts.map +0 -0
- package/dist-extensions/src/util/path/typedefs.d.ts +0 -0
- package/dist-extensions/src/util/path/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/util/transform_matrix_removal.d.ts +0 -0
- package/dist-extensions/src/util/transform_matrix_removal.d.ts.map +0 -0
- package/dist-extensions/src/util/typeAssertions.d.ts +0 -0
- package/dist-extensions/src/util/typeAssertions.d.ts.map +0 -0
- package/docs/fabric-konva-gap-analysis.md +274 -0
- package/docs/konva-text-behavior-spec.md +265 -0
- package/docs/text-engine-design.md +698 -0
- package/eslint.config.mjs +0 -0
- package/examples/overlay-edit.html +416 -416
- package/extensions/README.MD +0 -0
- package/extensions/aligning_guidelines/README.MD +0 -0
- package/extensions/aligning_guidelines/constant.ts +0 -0
- package/extensions/aligning_guidelines/index.ts +0 -0
- package/extensions/aligning_guidelines/typedefs.ts +0 -0
- package/extensions/aligning_guidelines/util/basic.spec.ts +0 -0
- package/extensions/aligning_guidelines/util/basic.ts +0 -0
- package/extensions/aligning_guidelines/util/collect-line.ts +0 -0
- package/extensions/aligning_guidelines/util/collect-point.ts +0 -0
- package/extensions/aligning_guidelines/util/draw.ts +0 -0
- package/extensions/aligning_guidelines/util/get-objects-by-target.ts +0 -0
- package/extensions/data_updaters/README.md +0 -0
- package/extensions/data_updaters/gradient/__snapshots__/index.spec.ts.snap +0 -0
- package/extensions/data_updaters/gradient/index.spec.ts +0 -0
- package/extensions/data_updaters/gradient/index.ts +0 -0
- package/extensions/data_updaters/origins/README.md +0 -0
- package/extensions/data_updaters/origins/index.spec.ts +0 -0
- package/extensions/data_updaters/origins/index.ts +0 -0
- package/extensions/index.ts +0 -0
- package/fabric-test-editor.html +964 -507
- package/fabric.ts +0 -0
- package/index.node.ts +0 -0
- package/index.ts +0 -0
- package/lib/aligning_guidelines.js +0 -0
- package/lib/centering_guidelines.js +0 -0
- package/lib/event.js +0 -0
- package/package.json +164 -164
- package/playwright.config.ts +0 -0
- package/playwright.setup.ts +0 -0
- package/publish-next.js +0 -0
- package/publish.js +0 -0
- package/rollup.config.mjs +0 -0
- package/scripts/bench-text.js +591 -591
- package/scripts/build.mjs +0 -0
- package/scripts/buildLock.mjs +0 -0
- package/scripts/buildReporter.mjs +0 -0
- package/scripts/buildStats.mjs +0 -0
- package/scripts/dirname.mjs +0 -0
- package/scripts/git.mjs +0 -0
- package/scripts/index.mjs +0 -0
- package/scripts/sandbox.mjs +0 -0
- package/src/ClassRegistry.spec.ts +0 -0
- package/src/ClassRegistry.ts +0 -0
- package/src/Collection.spec.ts +0 -0
- package/src/Collection.ts +0 -0
- package/src/CommonMethods.ts +0 -0
- package/src/EventTypeDefs.ts +0 -0
- package/src/Intersection.spec.ts +0 -0
- package/src/Intersection.ts +0 -0
- package/src/LayoutManager/ActiveSelectionLayoutManager.spec.ts +0 -0
- package/src/LayoutManager/ActiveSelectionLayoutManager.ts +0 -0
- package/src/LayoutManager/LayoutManager.spec.ts +0 -0
- package/src/LayoutManager/LayoutManager.ts +0 -0
- package/src/LayoutManager/LayoutStrategies/ClipPathLayout.ts +0 -0
- package/src/LayoutManager/LayoutStrategies/FitContentLayout.ts +0 -0
- package/src/LayoutManager/LayoutStrategies/FixedLayout.ts +0 -0
- package/src/LayoutManager/LayoutStrategies/LayoutStrategy.ts +0 -0
- package/src/LayoutManager/LayoutStrategies/utils.ts +0 -0
- package/src/LayoutManager/README.md +0 -0
- package/src/LayoutManager/__snapshots__/LayoutManager.spec.ts.snap +0 -0
- package/src/LayoutManager/constants.ts +0 -0
- package/src/LayoutManager/index.ts +0 -0
- package/src/LayoutManager/types.ts +0 -0
- package/src/Observable.spec.ts +0 -0
- package/src/Observable.ts +0 -0
- package/src/Pattern/Pattern.spec.ts +0 -0
- package/src/Pattern/Pattern.ts +0 -0
- package/src/Pattern/index.ts +0 -0
- package/src/Pattern/types.ts +0 -0
- package/src/Point.spec.ts +0 -0
- package/src/Point.ts +0 -0
- package/src/Shadow.spec.ts +0 -0
- package/src/Shadow.ts +0 -0
- package/src/__snapshots__/Shadow.spec.ts.snap +0 -0
- package/src/brushes/BaseBrush.spec.ts +0 -0
- package/src/brushes/BaseBrush.ts +0 -0
- package/src/brushes/CircleBrush.test.ts +0 -0
- package/src/brushes/CircleBrush.ts +0 -0
- package/src/brushes/PatternBrush.ts +0 -0
- package/src/brushes/PencilBrush.spec.ts +0 -0
- package/src/brushes/PencilBrush.ts +0 -0
- package/src/brushes/SprayBrush.ts +0 -0
- package/src/brushes/__snapshots__/PencilBrush.spec.ts.snap +0 -0
- package/src/brushes/typedefs.ts +0 -0
- package/src/cache.spec.ts +0 -0
- package/src/cache.ts +0 -0
- package/src/canvas/Canvas-dispose.spec.ts +0 -0
- package/src/canvas/Canvas-events.spec.ts +0 -0
- package/src/canvas/Canvas.spec.ts +0 -0
- package/src/canvas/Canvas.ts +0 -0
- package/src/canvas/CanvasOptions.ts +0 -0
- package/src/canvas/DOMManagers/CanvasDOMManager.ts +0 -0
- package/src/canvas/DOMManagers/StaticCanvasDOMManager.ts +0 -0
- package/src/canvas/DOMManagers/util.spec.ts +0 -0
- package/src/canvas/DOMManagers/util.ts +0 -0
- package/src/canvas/SelectableCanvas.spec.ts +0 -0
- package/src/canvas/SelectableCanvas.ts +0 -0
- package/src/canvas/StaticCanvas.spec.ts +0 -0
- package/src/canvas/StaticCanvas.ts +0 -0
- package/src/canvas/StaticCanvasOptions.ts +0 -0
- package/src/canvas/TextEditingManager.ts +0 -0
- package/src/canvas/__tests__/SelectableCanvas.spec.ts +0 -0
- package/src/canvas/__tests__/__snapshots__/eventData.test.ts.snap +0 -0
- package/src/canvas/__tests__/eventData.test.ts +0 -0
- package/src/canvas/canvas_gestures.mixin.ts +0 -0
- package/src/color/Color.ts +0 -0
- package/src/color/color.test.ts +0 -0
- package/src/color/color_map.ts +0 -0
- package/src/color/constants.ts +0 -0
- package/src/color/typedefs.ts +0 -0
- package/src/color/util.ts +0 -0
- package/src/config.ts +0 -0
- package/src/constants.ts +0 -0
- package/src/controls/Control-cursor.spec.ts +0 -0
- package/src/controls/Control-handlers.spec.ts +0 -0
- package/src/controls/Control.spec.ts +0 -0
- package/src/controls/Control.ts +0 -0
- package/src/controls/changeHeight.ts +0 -0
- package/src/controls/changeWidth.test.ts +0 -0
- package/src/controls/changeWidth.ts +0 -0
- package/src/controls/commonControls.ts +0 -0
- package/src/controls/controlRendering.ts +0 -0
- package/src/controls/drag.ts +0 -0
- package/src/controls/fireEvent.ts +0 -0
- package/src/controls/index.ts +0 -0
- package/src/controls/pathControl.spec.ts +0 -0
- package/src/controls/pathControl.ts +0 -0
- package/src/controls/polyControl.spec.ts +0 -0
- package/src/controls/polyControl.ts +0 -0
- package/src/controls/rotate.ts +0 -0
- package/src/controls/scale.test.ts +0 -0
- package/src/controls/scale.ts +0 -0
- package/src/controls/scaleSkew.ts +0 -0
- package/src/controls/skew.ts +0 -0
- package/src/controls/util.ts +0 -0
- package/src/controls/wrapWithFireEvent.ts +0 -0
- package/src/controls/wrapWithFixedAnchor.spec.ts +0 -0
- package/src/controls/wrapWithFixedAnchor.ts +0 -0
- package/src/env/browser.ts +0 -0
- package/src/env/env.spec.ts +0 -0
- package/src/env/index.ts +0 -0
- package/src/env/node.ts +0 -0
- package/src/env/types.ts +0 -0
- package/src/filters/BaseFilter.spec.ts +0 -0
- package/src/filters/BaseFilter.ts +0 -0
- package/src/filters/BlendColor.ts +0 -0
- package/src/filters/BlendImage.ts +0 -0
- package/src/filters/Blur.ts +0 -0
- package/src/filters/Boilerplate.ts +0 -0
- package/src/filters/Brightness.ts +0 -0
- package/src/filters/Canvas2dFilterBackend.ts +0 -0
- package/src/filters/ColorMatrix.spec.ts +0 -0
- package/src/filters/ColorMatrix.ts +0 -0
- package/src/filters/ColorMatrixFilters.ts +0 -0
- package/src/filters/Composed.ts +0 -0
- package/src/filters/Contrast.ts +0 -0
- package/src/filters/Convolute.ts +0 -0
- package/src/filters/FilterBackend.ts +0 -0
- package/src/filters/GLProbes/GLProbe.ts +0 -0
- package/src/filters/GLProbes/NodeGLProbe.ts +0 -0
- package/src/filters/GLProbes/WebGLProbe.ts +0 -0
- package/src/filters/Gamma.ts +0 -0
- package/src/filters/Grayscale.ts +0 -0
- package/src/filters/HueRotation.ts +0 -0
- package/src/filters/Invert.ts +0 -0
- package/src/filters/Noise.ts +0 -0
- package/src/filters/Pixelate.ts +0 -0
- package/src/filters/RemoveColor.ts +0 -0
- package/src/filters/Resize.ts +0 -0
- package/src/filters/Saturation.ts +0 -0
- package/src/filters/Vibrance.ts +0 -0
- package/src/filters/WebGLFilterBackend.spec.ts +0 -0
- package/src/filters/WebGLFilterBackend.ts +0 -0
- package/src/filters/filters.ts +0 -0
- package/src/filters/index.ts +0 -0
- package/src/filters/shaders/baseFilter.ts +0 -0
- package/src/filters/shaders/blendColor.ts +0 -0
- package/src/filters/shaders/blendImage.ts +0 -0
- package/src/filters/shaders/blur.ts +0 -0
- package/src/filters/shaders/brightness.ts +0 -0
- package/src/filters/shaders/colorMatrix.ts +0 -0
- package/src/filters/shaders/constrast.ts +0 -0
- package/src/filters/shaders/convolute.ts +0 -0
- package/src/filters/shaders/gamma.ts +0 -0
- package/src/filters/shaders/grayscale.ts +0 -0
- package/src/filters/shaders/invert.ts +0 -0
- package/src/filters/shaders/noise.ts +0 -0
- package/src/filters/shaders/pixelate.ts +0 -0
- package/src/filters/shaders/removeColor.ts +0 -0
- package/src/filters/shaders/saturation.ts +0 -0
- package/src/filters/shaders/vibrance.ts +0 -0
- package/src/filters/typedefs.ts +0 -0
- package/src/filters/utils.ts +0 -0
- package/src/gradient/Gradient.spec.ts +0 -0
- package/src/gradient/Gradient.ts +0 -0
- package/src/gradient/constants.ts +0 -0
- package/src/gradient/index.ts +0 -0
- package/src/gradient/parser/misc.ts +0 -0
- package/src/gradient/parser/parseColorStops.ts +0 -0
- package/src/gradient/parser/parseCoords.ts +0 -0
- package/src/gradient/typedefs.ts +0 -0
- package/src/mixins/eraser_brush.mixin.ts +0 -0
- package/src/parkinglot/canvas_animation.mixin.ts +0 -0
- package/src/parkinglot/straighten.ts +0 -0
- package/src/parser/applyViewboxTransform.spec.ts +0 -0
- package/src/parser/applyViewboxTransform.ts +0 -0
- package/src/parser/attributes.ts +0 -0
- package/src/parser/constants.spec.ts +0 -0
- package/src/parser/constants.ts +0 -0
- package/src/parser/doesSomeParentMatch.ts +0 -0
- package/src/parser/elementMatchesRule.ts +0 -0
- package/src/parser/elements_parser.ts +0 -0
- package/src/parser/getCSSRules.spec.ts +0 -0
- package/src/parser/getCSSRules.ts +0 -0
- package/src/parser/getGlobalStylesForElement.ts +0 -0
- package/src/parser/getGradientDefs.ts +0 -0
- package/src/parser/getMultipleNodes.ts +0 -0
- package/src/parser/getSvgRegex.ts +0 -0
- package/src/parser/getTagName.ts +0 -0
- package/src/parser/hasInvalidAncestor.ts +0 -0
- package/src/parser/loadSVGFromString.test.ts +0 -0
- package/src/parser/loadSVGFromString.ts +0 -0
- package/src/parser/loadSVGFromURL.ts +0 -0
- package/src/parser/normalizeAttr.ts +0 -0
- package/src/parser/normalizeValue.ts +0 -0
- package/src/parser/parseAttributes.ts +0 -0
- package/src/parser/parseFontDeclaration.ts +0 -0
- package/src/parser/parsePointsAttribute.ts +0 -0
- package/src/parser/parseSVGDocument.ts +0 -0
- package/src/parser/parseStyleAttribute.ts +0 -0
- package/src/parser/parseStyleObject.ts +0 -0
- package/src/parser/parseStyleString.ts +0 -0
- package/src/parser/parseTransformAttribute.ts +0 -0
- package/src/parser/parseUseDirectives.test.ts +0 -0
- package/src/parser/parseUseDirectives.ts +0 -0
- package/src/parser/parser.spec.ts +0 -0
- package/src/parser/percent.ts +0 -0
- package/src/parser/recursivelyParseGradientsXlink.ts +0 -0
- package/src/parser/selectorMatches.ts +0 -0
- package/src/parser/setStrokeFillOpacity.ts +0 -0
- package/src/parser/typedefs.ts +0 -0
- package/src/shapes/ActiveSelection.spec.ts +0 -0
- package/src/shapes/ActiveSelection.ts +0 -0
- package/src/shapes/Circle.spec.ts +0 -0
- package/src/shapes/Circle.ts +0 -0
- package/src/shapes/Ellipse.spec.ts +0 -0
- package/src/shapes/Ellipse.ts +0 -0
- package/src/shapes/Group.spec.ts +0 -0
- package/src/shapes/Group.ts +0 -0
- package/src/shapes/IText/DraggableTextDelegate.ts +0 -0
- package/src/shapes/IText/IText-click-behavior.spec.ts +0 -0
- package/src/shapes/IText/IText.test.ts +0 -0
- package/src/shapes/IText/IText.ts +846 -846
- package/src/shapes/IText/ITextBehavior.test.ts +0 -0
- package/src/shapes/IText/ITextBehavior.ts +1176 -1176
- package/src/shapes/IText/ITextClickBehavior.ts +254 -254
- package/src/shapes/IText/ITextKeyBehavior.test.ts +0 -0
- package/src/shapes/IText/ITextKeyBehavior.ts +0 -0
- package/src/shapes/IText/__snapshots__/IText.test.ts.snap +0 -0
- package/src/shapes/IText/__snapshots__/ITextBehavior.test.ts.snap +0 -0
- package/src/shapes/IText/constants.ts +0 -0
- package/src/shapes/Image-filters.spec.ts +0 -0
- package/src/shapes/Image.spec.ts +0 -0
- package/src/shapes/Image.ts +0 -0
- package/src/shapes/Line.spec.ts +0 -0
- package/src/shapes/Line.ts +0 -0
- package/src/shapes/Object/FabricObject.spec.ts +0 -0
- package/src/shapes/Object/FabricObject.ts +0 -0
- package/src/shapes/Object/FabricObjectSVGExportMixin.ts +0 -0
- package/src/shapes/Object/InteractiveObject.spec.ts +0 -0
- package/src/shapes/Object/InteractiveObject.ts +0 -0
- package/src/shapes/Object/Object-clip-path.spec.ts +0 -0
- package/src/shapes/Object/Object-interactivity.spec.ts +0 -0
- package/src/shapes/Object/Object.spec.ts +0 -0
- package/src/shapes/Object/Object.ts +0 -0
- package/src/shapes/Object/ObjectGeometry.spec.ts +0 -0
- package/src/shapes/Object/ObjectGeometry.ts +0 -0
- package/src/shapes/Object/ObjectOrigin.spec.ts +0 -0
- package/src/shapes/Object/ObjectSerialization.spec.ts +0 -0
- package/src/shapes/Object/StackedObject.spec.ts +0 -0
- package/src/shapes/Object/__snapshots__/InteractiveObject.spec.ts.snap +0 -0
- package/src/shapes/Object/defaultValues.ts +0 -0
- package/src/shapes/Object/types/BaseProps.ts +0 -0
- package/src/shapes/Object/types/BorderProps.ts +0 -0
- package/src/shapes/Object/types/ControlProps.ts +0 -0
- package/src/shapes/Object/types/FabricObjectProps.ts +0 -0
- package/src/shapes/Object/types/FillStrokeProps.ts +0 -0
- package/src/shapes/Object/types/LockInteractionProps.ts +0 -0
- package/src/shapes/Object/types/ObjectProps.ts +0 -0
- package/src/shapes/Object/types/ObjectTransformProps.ts +0 -0
- package/src/shapes/Object/types/SerializedObjectProps.ts +0 -0
- package/src/shapes/Object/types/index.ts +0 -0
- package/src/shapes/Path.spec.ts +0 -0
- package/src/shapes/Path.ts +0 -0
- package/src/shapes/Polygon.spec.ts +0 -0
- package/src/shapes/Polygon.ts +0 -0
- package/src/shapes/Polyline.spec.ts +0 -0
- package/src/shapes/Polyline.ts +70 -29
- package/src/shapes/Rect.spec.ts +0 -0
- package/src/shapes/Rect.ts +0 -0
- package/src/shapes/Text/StyledText.spec.ts +0 -0
- package/src/shapes/Text/StyledText.ts +0 -0
- package/src/shapes/Text/Text.spec.ts +0 -0
- package/src/shapes/Text/Text.ts +2226 -2226
- package/src/shapes/Text/TextSVGExportMixin.spec.ts +0 -0
- package/src/shapes/Text/TextSVGExportMixin.ts +0 -0
- package/src/shapes/Text/__snapshots__/Text.spec.ts.snap +0 -0
- package/src/shapes/Text/__snapshots__/TextSVGExportMixin.spec.ts.snap +0 -0
- package/src/shapes/Text/constants.ts +134 -134
- package/src/shapes/Textbox.spec.ts +0 -0
- package/src/shapes/Textbox.ts +788 -788
- package/src/shapes/Triangle.spec.ts +76 -0
- package/src/shapes/Triangle.ts +85 -15
- package/src/shapes/__snapshots__/Image.spec.ts.snap +0 -0
- package/src/shapes/__snapshots__/Textbox.spec.ts.snap +0 -0
- package/src/text/browserLines.ts +233 -233
- package/src/text/ellipsis.ts +516 -516
- package/src/text/hitTest.ts +623 -623
- package/src/text/layout.ts +586 -586
- package/src/text/measure.ts +475 -475
- package/src/text/overlayEditor.ts +1035 -1035
- package/src/text/unicode.ts +454 -454
- package/src/typedefs.ts +0 -0
- package/src/util/__snapshots__/index.spec.ts.snap +0 -0
- package/src/util/animation/AnimationBase.ts +0 -0
- package/src/util/animation/AnimationFrameProvider.ts +0 -0
- package/src/util/animation/AnimationRegistry.ts +0 -0
- package/src/util/animation/ArrayAnimation.ts +0 -0
- package/src/util/animation/ColorAnimation.ts +0 -0
- package/src/util/animation/ValueAnimation.ts +0 -0
- package/src/util/animation/__snapshots__/animations.spec.ts.snap +0 -0
- package/src/util/animation/animate.ts +0 -0
- package/src/util/animation/animations.spec.ts +0 -0
- package/src/util/animation/easing.ts +0 -0
- package/src/util/animation/index.ts +0 -0
- package/src/util/animation/types.ts +0 -0
- package/src/util/applyMixins.ts +0 -0
- package/src/util/dom_event.spec.ts +0 -0
- package/src/util/dom_event.ts +0 -0
- package/src/util/dom_misc.ts +0 -0
- package/src/util/index.spec.ts +0 -0
- package/src/util/index.ts +0 -0
- package/src/util/internals/applyCanvasTransform.ts +0 -0
- package/src/util/internals/cleanupSvgAttribute.test.ts +0 -0
- package/src/util/internals/cleanupSvgAttribute.ts +0 -0
- package/src/util/internals/cloneStyles.spec.ts +0 -0
- package/src/util/internals/cloneStyles.ts +0 -0
- package/src/util/internals/console.ts +0 -0
- package/src/util/internals/dom_style.spec.ts +0 -0
- package/src/util/internals/dom_style.ts +0 -0
- package/src/util/internals/findRight.ts +0 -0
- package/src/util/internals/getRandomInt.test.ts +0 -0
- package/src/util/internals/getRandomInt.ts +0 -0
- package/src/util/internals/ifNaN.ts +0 -0
- package/src/util/internals/removeFromArray.spec.ts +0 -0
- package/src/util/internals/removeFromArray.ts +0 -0
- package/src/util/internals/uid.ts +0 -0
- package/src/util/lang_string.spec.ts +0 -0
- package/src/util/lang_string.ts +0 -0
- package/src/util/misc/boundingBoxFromPoints.spec.ts +0 -0
- package/src/util/misc/boundingBoxFromPoints.ts +0 -0
- package/src/util/misc/capValue.spec.ts +0 -0
- package/src/util/misc/capValue.ts +0 -0
- package/src/util/misc/cornerRadius.spec.ts +141 -0
- package/src/util/misc/cornerRadius.ts +269 -0
- package/src/util/misc/cos.spec.ts +0 -0
- package/src/util/misc/cos.ts +0 -0
- package/src/util/misc/dom.spec.ts +0 -0
- package/src/util/misc/dom.ts +0 -0
- package/src/util/misc/findScaleTo.spec.ts +0 -0
- package/src/util/misc/findScaleTo.ts +0 -0
- package/src/util/misc/groupSVGElements.spec.ts +0 -0
- package/src/util/misc/groupSVGElements.ts +0 -0
- package/src/util/misc/isTransparent.ts +0 -0
- package/src/util/misc/matrix.spec.ts +0 -0
- package/src/util/misc/matrix.ts +0 -0
- package/src/util/misc/mergeClipPaths.spec.ts +0 -0
- package/src/util/misc/mergeClipPaths.ts +0 -0
- package/src/util/misc/objectEnlive.spec.ts +0 -0
- package/src/util/misc/objectEnlive.ts +0 -0
- package/src/util/misc/objectTransforms.spec.ts +0 -0
- package/src/util/misc/objectTransforms.ts +0 -0
- package/src/util/misc/pick.spec.ts +0 -0
- package/src/util/misc/pick.ts +0 -0
- package/src/util/misc/planeChange.spec.ts +0 -0
- package/src/util/misc/planeChange.ts +0 -0
- package/src/util/misc/projectStroke/StrokeLineCapProjections.ts +0 -0
- package/src/util/misc/projectStroke/StrokeLineJoinProjections.ts +0 -0
- package/src/util/misc/projectStroke/StrokeProjectionsBase.ts +0 -0
- package/src/util/misc/projectStroke/index.ts +0 -0
- package/src/util/misc/projectStroke/types.ts +0 -0
- package/src/util/misc/radiansDegreesConversion.spec.ts +0 -0
- package/src/util/misc/radiansDegreesConversion.ts +0 -0
- package/src/util/misc/resolveOrigin.ts +0 -0
- package/src/util/misc/sin.ts +0 -0
- package/src/util/misc/svgExport.ts +0 -0
- package/src/util/misc/svgParsing.spec.ts +0 -0
- package/src/util/misc/svgParsing.ts +0 -0
- package/src/util/misc/textStyles.ts +0 -0
- package/src/util/misc/toFixed.spec.ts +0 -0
- package/src/util/misc/toFixed.ts +0 -0
- package/src/util/misc/vectors.spec.ts +0 -0
- package/src/util/misc/vectors.ts +0 -0
- package/src/util/path/__snapshots__/index.spec.ts.snap +0 -0
- package/src/util/path/index.spec.ts +0 -0
- package/src/util/path/index.ts +0 -0
- package/src/util/path/regex.ts +0 -0
- package/src/util/path/typechecks.ts +0 -0
- package/src/util/path/typedefs.ts +0 -0
- package/src/util/transform_matrix_removal.ts +0 -0
- package/src/util/typeAssertions.spec.ts +0 -0
- package/src/util/typeAssertions.ts +0 -0
- package/tsconfig-extensions.json +0 -0
- package/tsconfig.json +0 -0
- package/tsconfig.spec.json +0 -0
- package/typedoc.config.json +0 -0
- package/vitest.config.ts +0 -0
- package/vitest.d.ts +0 -0
- package/vitest.env.d.ts +0 -0
- package/vitest.extend.ts +0 -0
- package/vitest.setup.ts +0 -0
- package/dist/src/controls/changeHeight.min.mjs +0 -2
- package/dist/src/controls/changeHeight.min.mjs.map +0 -1
- package/dist/src/controls/changeHeight.mjs +0 -36
- package/dist/src/controls/changeHeight.mjs.map +0 -1
package/dist/index.node.mjs
CHANGED
|
@@ -410,7 +410,7 @@ class Cache {
|
|
|
410
410
|
}
|
|
411
411
|
const cache = new Cache();
|
|
412
412
|
|
|
413
|
-
var version = "7.0.1-
|
|
413
|
+
var version = "7.0.1-beta2";
|
|
414
414
|
|
|
415
415
|
// use this syntax so babel plugin see this import here
|
|
416
416
|
const VERSION = version;
|
|
@@ -17890,10 +17890,189 @@ _defineProperty(Line, "ATTRIBUTE_NAMES", SHARED_ATTRIBUTES.concat(coordProps));
|
|
|
17890
17890
|
classRegistry.setClass(Line);
|
|
17891
17891
|
classRegistry.setSVGClass(Line);
|
|
17892
17892
|
|
|
17893
|
+
/**
|
|
17894
|
+
* Calculate the distance between two points
|
|
17895
|
+
*/
|
|
17896
|
+
function pointDistance(p1, p2) {
|
|
17897
|
+
return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
|
|
17898
|
+
}
|
|
17899
|
+
|
|
17900
|
+
/**
|
|
17901
|
+
* Normalize a vector
|
|
17902
|
+
*/
|
|
17903
|
+
function normalizeVector(vector) {
|
|
17904
|
+
const length = Math.sqrt(vector.x * vector.x + vector.y * vector.y);
|
|
17905
|
+
if (length === 0) return {
|
|
17906
|
+
x: 0,
|
|
17907
|
+
y: 0
|
|
17908
|
+
};
|
|
17909
|
+
return {
|
|
17910
|
+
x: vector.x / length,
|
|
17911
|
+
y: vector.y / length
|
|
17912
|
+
};
|
|
17913
|
+
}
|
|
17914
|
+
|
|
17915
|
+
/**
|
|
17916
|
+
* Get the maximum allowed radius for a corner based on adjacent edge lengths
|
|
17917
|
+
*/
|
|
17918
|
+
function getMaxRadius(prevPoint, currentPoint, nextPoint) {
|
|
17919
|
+
const dist1 = pointDistance(prevPoint, currentPoint);
|
|
17920
|
+
const dist2 = pointDistance(currentPoint, nextPoint);
|
|
17921
|
+
return Math.min(dist1, dist2) / 2;
|
|
17922
|
+
}
|
|
17923
|
+
|
|
17924
|
+
/**
|
|
17925
|
+
* Calculate rounded corner data for a single corner
|
|
17926
|
+
*/
|
|
17927
|
+
function calculateRoundedCorner(prevPoint, currentPoint, nextPoint, radius) {
|
|
17928
|
+
// Calculate edge vectors
|
|
17929
|
+
const edge1 = {
|
|
17930
|
+
x: currentPoint.x - prevPoint.x,
|
|
17931
|
+
y: currentPoint.y - prevPoint.y
|
|
17932
|
+
};
|
|
17933
|
+
const edge2 = {
|
|
17934
|
+
x: nextPoint.x - currentPoint.x,
|
|
17935
|
+
y: nextPoint.y - currentPoint.y
|
|
17936
|
+
};
|
|
17937
|
+
|
|
17938
|
+
// Normalize edge vectors
|
|
17939
|
+
const norm1 = normalizeVector(edge1);
|
|
17940
|
+
const norm2 = normalizeVector(edge2);
|
|
17941
|
+
|
|
17942
|
+
// Calculate the maximum allowed radius
|
|
17943
|
+
const maxRadius = getMaxRadius(prevPoint, currentPoint, nextPoint);
|
|
17944
|
+
const actualRadius = Math.min(radius, maxRadius);
|
|
17945
|
+
|
|
17946
|
+
// Calculate start and end points of the rounded corner
|
|
17947
|
+
const startPoint = {
|
|
17948
|
+
x: currentPoint.x - norm1.x * actualRadius,
|
|
17949
|
+
y: currentPoint.y - norm1.y * actualRadius
|
|
17950
|
+
};
|
|
17951
|
+
const endPoint = {
|
|
17952
|
+
x: currentPoint.x + norm2.x * actualRadius,
|
|
17953
|
+
y: currentPoint.y + norm2.y * actualRadius
|
|
17954
|
+
};
|
|
17955
|
+
|
|
17956
|
+
// Calculate control points for bezier curve
|
|
17957
|
+
// Using the magic number kRect for optimal circular approximation
|
|
17958
|
+
const controlOffset = actualRadius * kRect;
|
|
17959
|
+
const cp1 = {
|
|
17960
|
+
x: startPoint.x + norm1.x * controlOffset,
|
|
17961
|
+
y: startPoint.y + norm1.y * controlOffset
|
|
17962
|
+
};
|
|
17963
|
+
const cp2 = {
|
|
17964
|
+
x: endPoint.x - norm2.x * controlOffset,
|
|
17965
|
+
y: endPoint.y - norm2.y * controlOffset
|
|
17966
|
+
};
|
|
17967
|
+
return {
|
|
17968
|
+
corner: currentPoint,
|
|
17969
|
+
start: startPoint,
|
|
17970
|
+
end: endPoint,
|
|
17971
|
+
cp1,
|
|
17972
|
+
cp2,
|
|
17973
|
+
actualRadius
|
|
17974
|
+
};
|
|
17975
|
+
}
|
|
17976
|
+
|
|
17977
|
+
/**
|
|
17978
|
+
* Apply corner radius to a polygon defined by points
|
|
17979
|
+
*/
|
|
17980
|
+
function applyCornerRadiusToPolygon(points, radius) {
|
|
17981
|
+
let radiusAsPercentage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
17982
|
+
if (points.length < 3) {
|
|
17983
|
+
throw new Error('Polygon must have at least 3 points');
|
|
17984
|
+
}
|
|
17985
|
+
|
|
17986
|
+
// Calculate bounding box if radius is percentage-based
|
|
17987
|
+
let actualRadius = radius;
|
|
17988
|
+
if (radiusAsPercentage) {
|
|
17989
|
+
const minX = Math.min(...points.map(p => p.x));
|
|
17990
|
+
const maxX = Math.max(...points.map(p => p.x));
|
|
17991
|
+
const minY = Math.min(...points.map(p => p.y));
|
|
17992
|
+
const maxY = Math.max(...points.map(p => p.y));
|
|
17993
|
+
const width = maxX - minX;
|
|
17994
|
+
const height = maxY - minY;
|
|
17995
|
+
const minDimension = Math.min(width, height);
|
|
17996
|
+
actualRadius = radius / 100 * minDimension;
|
|
17997
|
+
}
|
|
17998
|
+
const roundedCorners = [];
|
|
17999
|
+
for (let i = 0; i < points.length; i++) {
|
|
18000
|
+
const prevIndex = (i - 1 + points.length) % points.length;
|
|
18001
|
+
const nextIndex = (i + 1) % points.length;
|
|
18002
|
+
const prevPoint = points[prevIndex];
|
|
18003
|
+
const currentPoint = points[i];
|
|
18004
|
+
const nextPoint = points[nextIndex];
|
|
18005
|
+
const roundedCorner = calculateRoundedCorner(prevPoint, currentPoint, nextPoint, actualRadius);
|
|
18006
|
+
roundedCorners.push(roundedCorner);
|
|
18007
|
+
}
|
|
18008
|
+
return roundedCorners;
|
|
18009
|
+
}
|
|
18010
|
+
|
|
18011
|
+
/**
|
|
18012
|
+
* Render a rounded polygon to a canvas context
|
|
18013
|
+
*/
|
|
18014
|
+
function renderRoundedPolygon(ctx, roundedCorners) {
|
|
18015
|
+
let closed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
18016
|
+
if (roundedCorners.length === 0) return;
|
|
18017
|
+
ctx.beginPath();
|
|
18018
|
+
|
|
18019
|
+
// Start at the first corner's start point
|
|
18020
|
+
const firstCorner = roundedCorners[0];
|
|
18021
|
+
ctx.moveTo(firstCorner.start.x, firstCorner.start.y);
|
|
18022
|
+
for (let i = 0; i < roundedCorners.length; i++) {
|
|
18023
|
+
const corner = roundedCorners[i];
|
|
18024
|
+
const nextIndex = (i + 1) % roundedCorners.length;
|
|
18025
|
+
const nextCorner = roundedCorners[nextIndex];
|
|
18026
|
+
|
|
18027
|
+
// Draw the rounded corner using bezier curve
|
|
18028
|
+
ctx.bezierCurveTo(corner.cp1.x, corner.cp1.y, corner.cp2.x, corner.cp2.y, corner.end.x, corner.end.y);
|
|
18029
|
+
|
|
18030
|
+
// Draw line to next corner's start point (if not the last segment in open path)
|
|
18031
|
+
if (i < roundedCorners.length - 1 || closed) {
|
|
18032
|
+
ctx.lineTo(nextCorner.start.x, nextCorner.start.y);
|
|
18033
|
+
}
|
|
18034
|
+
}
|
|
18035
|
+
if (closed) {
|
|
18036
|
+
ctx.closePath();
|
|
18037
|
+
}
|
|
18038
|
+
}
|
|
18039
|
+
|
|
18040
|
+
/**
|
|
18041
|
+
* Generate SVG path data for a rounded polygon
|
|
18042
|
+
*/
|
|
18043
|
+
function generateRoundedPolygonPath(roundedCorners) {
|
|
18044
|
+
let closed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
18045
|
+
if (roundedCorners.length === 0) return '';
|
|
18046
|
+
const pathData = [];
|
|
18047
|
+
const firstCorner = roundedCorners[0];
|
|
18048
|
+
|
|
18049
|
+
// Move to first corner's start point
|
|
18050
|
+
pathData.push(`M ${firstCorner.start.x} ${firstCorner.start.y}`);
|
|
18051
|
+
for (let i = 0; i < roundedCorners.length; i++) {
|
|
18052
|
+
const corner = roundedCorners[i];
|
|
18053
|
+
const nextIndex = (i + 1) % roundedCorners.length;
|
|
18054
|
+
const nextCorner = roundedCorners[nextIndex];
|
|
18055
|
+
|
|
18056
|
+
// Add bezier curve for the rounded corner
|
|
18057
|
+
pathData.push(`C ${corner.cp1.x} ${corner.cp1.y} ${corner.cp2.x} ${corner.cp2.y} ${corner.end.x} ${corner.end.y}`);
|
|
18058
|
+
|
|
18059
|
+
// Add line to next corner's start point (if not the last segment in open path)
|
|
18060
|
+
if (i < roundedCorners.length - 1 || closed) {
|
|
18061
|
+
pathData.push(`L ${nextCorner.start.x} ${nextCorner.start.y}`);
|
|
18062
|
+
}
|
|
18063
|
+
}
|
|
18064
|
+
if (closed) {
|
|
18065
|
+
pathData.push('Z');
|
|
18066
|
+
}
|
|
18067
|
+
return pathData.join(' ');
|
|
18068
|
+
}
|
|
18069
|
+
|
|
17893
18070
|
const triangleDefaultValues = {
|
|
17894
18071
|
width: 100,
|
|
17895
|
-
height: 100
|
|
18072
|
+
height: 100,
|
|
18073
|
+
cornerRadius: 0
|
|
17896
18074
|
};
|
|
18075
|
+
const TRIANGLE_PROPS = ['cornerRadius'];
|
|
17897
18076
|
class Triangle extends FabricObject {
|
|
17898
18077
|
static getDefaults() {
|
|
17899
18078
|
return {
|
|
@@ -17912,34 +18091,90 @@ class Triangle extends FabricObject {
|
|
|
17912
18091
|
this.setOptions(options);
|
|
17913
18092
|
}
|
|
17914
18093
|
|
|
18094
|
+
/**
|
|
18095
|
+
* Get triangle points as an array of XY coordinates
|
|
18096
|
+
* @private
|
|
18097
|
+
*/
|
|
18098
|
+
_getTrianglePoints() {
|
|
18099
|
+
const widthBy2 = this.width / 2;
|
|
18100
|
+
const heightBy2 = this.height / 2;
|
|
18101
|
+
return [{
|
|
18102
|
+
x: -widthBy2,
|
|
18103
|
+
y: heightBy2
|
|
18104
|
+
},
|
|
18105
|
+
// bottom left
|
|
18106
|
+
{
|
|
18107
|
+
x: 0,
|
|
18108
|
+
y: -heightBy2
|
|
18109
|
+
},
|
|
18110
|
+
// top center
|
|
18111
|
+
{
|
|
18112
|
+
x: widthBy2,
|
|
18113
|
+
y: heightBy2
|
|
18114
|
+
} // bottom right
|
|
18115
|
+
];
|
|
18116
|
+
}
|
|
18117
|
+
|
|
17915
18118
|
/**
|
|
17916
18119
|
* @private
|
|
17917
18120
|
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
17918
18121
|
*/
|
|
17919
18122
|
_render(ctx) {
|
|
17920
|
-
|
|
17921
|
-
|
|
17922
|
-
|
|
17923
|
-
|
|
17924
|
-
|
|
17925
|
-
|
|
17926
|
-
|
|
18123
|
+
if (this.cornerRadius > 0) {
|
|
18124
|
+
// Render rounded triangle
|
|
18125
|
+
const points = this._getTrianglePoints();
|
|
18126
|
+
const roundedCorners = applyCornerRadiusToPolygon(points, this.cornerRadius);
|
|
18127
|
+
renderRoundedPolygon(ctx, roundedCorners, true);
|
|
18128
|
+
} else {
|
|
18129
|
+
// Render sharp triangle (original implementation)
|
|
18130
|
+
const widthBy2 = this.width / 2;
|
|
18131
|
+
const heightBy2 = this.height / 2;
|
|
18132
|
+
ctx.beginPath();
|
|
18133
|
+
ctx.moveTo(-widthBy2, heightBy2);
|
|
18134
|
+
ctx.lineTo(0, -heightBy2);
|
|
18135
|
+
ctx.lineTo(widthBy2, heightBy2);
|
|
18136
|
+
ctx.closePath();
|
|
18137
|
+
}
|
|
17927
18138
|
this._renderPaintInOrder(ctx);
|
|
17928
18139
|
}
|
|
17929
18140
|
|
|
18141
|
+
/**
|
|
18142
|
+
* Returns object representation of an instance
|
|
18143
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
18144
|
+
* @return {Object} object representation of an instance
|
|
18145
|
+
*/
|
|
18146
|
+
toObject() {
|
|
18147
|
+
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
18148
|
+
return super.toObject([...TRIANGLE_PROPS, ...propertiesToInclude]);
|
|
18149
|
+
}
|
|
18150
|
+
|
|
17930
18151
|
/**
|
|
17931
18152
|
* Returns svg representation of an instance
|
|
17932
18153
|
* @return {Array} an array of strings with the specific svg representation
|
|
17933
18154
|
* of the instance
|
|
17934
18155
|
*/
|
|
17935
18156
|
_toSVG() {
|
|
17936
|
-
|
|
17937
|
-
|
|
17938
|
-
points =
|
|
17939
|
-
|
|
18157
|
+
if (this.cornerRadius > 0) {
|
|
18158
|
+
// Generate rounded triangle as path
|
|
18159
|
+
const points = this._getTrianglePoints();
|
|
18160
|
+
const roundedCorners = applyCornerRadiusToPolygon(points, this.cornerRadius);
|
|
18161
|
+
const pathData = generateRoundedPolygonPath(roundedCorners, true);
|
|
18162
|
+
return ['<path ', 'COMMON_PARTS', `d="${pathData}" />`];
|
|
18163
|
+
} else {
|
|
18164
|
+
// Original sharp triangle implementation
|
|
18165
|
+
const widthBy2 = this.width / 2;
|
|
18166
|
+
const heightBy2 = this.height / 2;
|
|
18167
|
+
const points = `${-widthBy2} ${heightBy2},0 ${-heightBy2},${widthBy2} ${heightBy2}`;
|
|
18168
|
+
return ['<polygon ', 'COMMON_PARTS', 'points="', points, '" />'];
|
|
18169
|
+
}
|
|
17940
18170
|
}
|
|
17941
18171
|
}
|
|
18172
|
+
/**
|
|
18173
|
+
* Corner radius for rounded triangle corners
|
|
18174
|
+
* @type Number
|
|
18175
|
+
*/
|
|
17942
18176
|
_defineProperty(Triangle, "type", 'Triangle');
|
|
18177
|
+
_defineProperty(Triangle, "cacheProperties", [...cacheProperties, ...TRIANGLE_PROPS]);
|
|
17943
18178
|
_defineProperty(Triangle, "ownDefaults", triangleDefaultValues);
|
|
17944
18179
|
classRegistry.setClass(Triangle);
|
|
17945
18180
|
classRegistry.setSVGClass(Triangle);
|
|
@@ -18104,7 +18339,8 @@ const polylineDefaultValues = {
|
|
|
18104
18339
|
/**
|
|
18105
18340
|
* @deprecated transient option soon to be removed in favor of a different design
|
|
18106
18341
|
*/
|
|
18107
|
-
exactBoundingBox: false
|
|
18342
|
+
exactBoundingBox: false,
|
|
18343
|
+
cornerRadius: 0
|
|
18108
18344
|
};
|
|
18109
18345
|
class Polyline extends FabricObject {
|
|
18110
18346
|
static getDefaults() {
|
|
@@ -18318,7 +18554,7 @@ class Polyline extends FabricObject {
|
|
|
18318
18554
|
toObject() {
|
|
18319
18555
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
18320
18556
|
return {
|
|
18321
|
-
...super.toObject(propertiesToInclude),
|
|
18557
|
+
...super.toObject(['cornerRadius', ...propertiesToInclude]),
|
|
18322
18558
|
points: this.points.map(_ref => {
|
|
18323
18559
|
let {
|
|
18324
18560
|
x,
|
|
@@ -18338,14 +18574,28 @@ class Polyline extends FabricObject {
|
|
|
18338
18574
|
* of the instance
|
|
18339
18575
|
*/
|
|
18340
18576
|
_toSVG() {
|
|
18341
|
-
|
|
18342
|
-
|
|
18343
|
-
|
|
18344
|
-
|
|
18345
|
-
|
|
18346
|
-
|
|
18577
|
+
if (this.cornerRadius > 0 && this.points.length >= 3) {
|
|
18578
|
+
// Generate rounded polygon/polyline as path
|
|
18579
|
+
const diffX = this.pathOffset.x;
|
|
18580
|
+
const diffY = this.pathOffset.y;
|
|
18581
|
+
const adjustedPoints = this.points.map(point => ({
|
|
18582
|
+
x: point.x - diffX,
|
|
18583
|
+
y: point.y - diffY
|
|
18584
|
+
}));
|
|
18585
|
+
const roundedCorners = applyCornerRadiusToPolygon(adjustedPoints, this.cornerRadius);
|
|
18586
|
+
const pathData = generateRoundedPolygonPath(roundedCorners, !this.isOpen());
|
|
18587
|
+
return ['<path ', 'COMMON_PARTS', `d="${pathData}" />\n`];
|
|
18588
|
+
} else {
|
|
18589
|
+
// Original sharp corners implementation
|
|
18590
|
+
const points = [];
|
|
18591
|
+
const diffX = this.pathOffset.x;
|
|
18592
|
+
const diffY = this.pathOffset.y;
|
|
18593
|
+
const NUM_FRACTION_DIGITS = config.NUM_FRACTION_DIGITS;
|
|
18594
|
+
for (let i = 0, len = this.points.length; i < len; i++) {
|
|
18595
|
+
points.push(toFixed(this.points[i].x - diffX, NUM_FRACTION_DIGITS), ',', toFixed(this.points[i].y - diffY, NUM_FRACTION_DIGITS), ' ');
|
|
18596
|
+
}
|
|
18597
|
+
return [`<${this.constructor.type.toLowerCase()} `, 'COMMON_PARTS', `points="${points.join('')}" />\n`];
|
|
18347
18598
|
}
|
|
18348
|
-
return [`<${this.constructor.type.toLowerCase()} `, 'COMMON_PARTS', `points="${points.join('')}" />\n`];
|
|
18349
18599
|
}
|
|
18350
18600
|
|
|
18351
18601
|
/**
|
|
@@ -18361,13 +18611,24 @@ class Polyline extends FabricObject {
|
|
|
18361
18611
|
// NaN comes from parseFloat of a empty string in parser
|
|
18362
18612
|
return;
|
|
18363
18613
|
}
|
|
18364
|
-
|
|
18365
|
-
|
|
18366
|
-
|
|
18367
|
-
|
|
18368
|
-
|
|
18614
|
+
if (this.cornerRadius > 0 && len >= 3) {
|
|
18615
|
+
// Render with rounded corners
|
|
18616
|
+
const adjustedPoints = this.points.map(point => ({
|
|
18617
|
+
x: point.x - x,
|
|
18618
|
+
y: point.y - y
|
|
18619
|
+
}));
|
|
18620
|
+
const roundedCorners = applyCornerRadiusToPolygon(adjustedPoints, this.cornerRadius);
|
|
18621
|
+
renderRoundedPolygon(ctx, roundedCorners, !this.isOpen());
|
|
18622
|
+
} else {
|
|
18623
|
+
// Original sharp corners implementation
|
|
18624
|
+
ctx.beginPath();
|
|
18625
|
+
ctx.moveTo(this.points[0].x - x, this.points[0].y - y);
|
|
18626
|
+
for (let i = 0; i < len; i++) {
|
|
18627
|
+
const point = this.points[i];
|
|
18628
|
+
ctx.lineTo(point.x - x, point.y - y);
|
|
18629
|
+
}
|
|
18630
|
+
!this.isOpen() && ctx.closePath();
|
|
18369
18631
|
}
|
|
18370
|
-
!this.isOpen() && ctx.closePath();
|
|
18371
18632
|
this._renderPaintInOrder(ctx);
|
|
18372
18633
|
}
|
|
18373
18634
|
|
|
@@ -18432,10 +18693,15 @@ class Polyline extends FabricObject {
|
|
|
18432
18693
|
* @type Boolean
|
|
18433
18694
|
* @default false
|
|
18434
18695
|
*/
|
|
18696
|
+
/**
|
|
18697
|
+
* Corner radius for rounded corners
|
|
18698
|
+
* @type Number
|
|
18699
|
+
* @default 0
|
|
18700
|
+
*/
|
|
18435
18701
|
_defineProperty(Polyline, "ownDefaults", polylineDefaultValues);
|
|
18436
18702
|
_defineProperty(Polyline, "type", 'Polyline');
|
|
18437
18703
|
_defineProperty(Polyline, "layoutProperties", [SKEW_X, SKEW_Y, 'strokeLineCap', 'strokeLineJoin', 'strokeMiterLimit', 'strokeWidth', 'strokeUniform', 'points']);
|
|
18438
|
-
_defineProperty(Polyline, "cacheProperties", [...cacheProperties, 'points']);
|
|
18704
|
+
_defineProperty(Polyline, "cacheProperties", [...cacheProperties, 'points', 'cornerRadius']);
|
|
18439
18705
|
_defineProperty(Polyline, "ATTRIBUTE_NAMES", [...SHARED_ATTRIBUTES]);
|
|
18440
18706
|
classRegistry.setClass(Polyline);
|
|
18441
18707
|
classRegistry.setSVGClass(Polyline);
|
|
@@ -18729,8 +18995,8 @@ _defineProperty(StyledText, "_styleProperties", styleProperties);
|
|
|
18729
18995
|
// Global measurement context - reused for performance
|
|
18730
18996
|
let measurementContext = null;
|
|
18731
18997
|
|
|
18732
|
-
/**
|
|
18733
|
-
* Get or create the shared measurement context
|
|
18998
|
+
/**
|
|
18999
|
+
* Get or create the shared measurement context
|
|
18734
19000
|
*/
|
|
18735
19001
|
function getMeasurementContext() {
|
|
18736
19002
|
if (!measurementContext) {
|
|
@@ -18743,8 +19009,8 @@ function getMeasurementContext() {
|
|
|
18743
19009
|
return measurementContext;
|
|
18744
19010
|
}
|
|
18745
19011
|
|
|
18746
|
-
/**
|
|
18747
|
-
* Measure a single grapheme
|
|
19012
|
+
/**
|
|
19013
|
+
* Measure a single grapheme
|
|
18748
19014
|
*/
|
|
18749
19015
|
function measureGrapheme(grapheme, options, ctx) {
|
|
18750
19016
|
// Check cache first
|
|
@@ -18777,8 +19043,8 @@ function measureGrapheme(grapheme, options, ctx) {
|
|
|
18777
19043
|
return measurement;
|
|
18778
19044
|
}
|
|
18779
19045
|
|
|
18780
|
-
/**
|
|
18781
|
-
* Measure a grapheme with kerning relative to previous character
|
|
19046
|
+
/**
|
|
19047
|
+
* Measure a grapheme with kerning relative to previous character
|
|
18782
19048
|
*/
|
|
18783
19049
|
function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
|
|
18784
19050
|
// Get individual measurement
|
|
@@ -18819,8 +19085,8 @@ function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
|
|
|
18819
19085
|
};
|
|
18820
19086
|
}
|
|
18821
19087
|
|
|
18822
|
-
/**
|
|
18823
|
-
* Get font metrics for layout calculations
|
|
19088
|
+
/**
|
|
19089
|
+
* Get font metrics for layout calculations
|
|
18824
19090
|
*/
|
|
18825
19091
|
function getFontMetrics(options) {
|
|
18826
19092
|
var _metrics$fontBounding, _metrics$fontBounding2, _metrics$actualBoundi, _metrics$actualBoundi2;
|
|
@@ -18855,8 +19121,8 @@ function getFontMetrics(options) {
|
|
|
18855
19121
|
return result;
|
|
18856
19122
|
}
|
|
18857
19123
|
|
|
18858
|
-
/**
|
|
18859
|
-
* Apply font styling to canvas context
|
|
19124
|
+
/**
|
|
19125
|
+
* Apply font styling to canvas context
|
|
18860
19126
|
*/
|
|
18861
19127
|
function applyFontStyle(ctx, options) {
|
|
18862
19128
|
const fontDeclaration = getFontDeclaration(options);
|
|
@@ -18873,8 +19139,8 @@ function applyFontStyle(ctx, options) {
|
|
|
18873
19139
|
ctx.textBaseline = 'alphabetic';
|
|
18874
19140
|
}
|
|
18875
19141
|
|
|
18876
|
-
/**
|
|
18877
|
-
* Generate font declaration string
|
|
19142
|
+
/**
|
|
19143
|
+
* Generate font declaration string
|
|
18878
19144
|
*/
|
|
18879
19145
|
function getFontDeclaration(options) {
|
|
18880
19146
|
const {
|
|
@@ -18889,8 +19155,8 @@ function getFontDeclaration(options) {
|
|
|
18889
19155
|
return `${fontStyle} ${fontWeight} ${fontSize}px ${normalizedFamily}`;
|
|
18890
19156
|
}
|
|
18891
19157
|
|
|
18892
|
-
/**
|
|
18893
|
-
* LRU Cache implementation for measurements
|
|
19158
|
+
/**
|
|
19159
|
+
* LRU Cache implementation for measurements
|
|
18894
19160
|
*/
|
|
18895
19161
|
class LRUCache {
|
|
18896
19162
|
constructor() {
|
|
@@ -18952,8 +19218,8 @@ class LRUCache {
|
|
|
18952
19218
|
}
|
|
18953
19219
|
}
|
|
18954
19220
|
|
|
18955
|
-
/**
|
|
18956
|
-
* Advanced measurement cache with font-aware keys
|
|
19221
|
+
/**
|
|
19222
|
+
* Advanced measurement cache with font-aware keys
|
|
18957
19223
|
*/
|
|
18958
19224
|
class MeasurementCache {
|
|
18959
19225
|
constructor() {
|
|
@@ -18980,8 +19246,8 @@ class MeasurementCache {
|
|
|
18980
19246
|
}
|
|
18981
19247
|
}
|
|
18982
19248
|
|
|
18983
|
-
/**
|
|
18984
|
-
* Kerning cache for character pairs
|
|
19249
|
+
/**
|
|
19250
|
+
* Kerning cache for character pairs
|
|
18985
19251
|
*/
|
|
18986
19252
|
class KerningCache {
|
|
18987
19253
|
constructor() {
|
|
@@ -19009,8 +19275,8 @@ class KerningCache {
|
|
|
19009
19275
|
}
|
|
19010
19276
|
}
|
|
19011
19277
|
|
|
19012
|
-
/**
|
|
19013
|
-
* Font metrics cache
|
|
19278
|
+
/**
|
|
19279
|
+
* Font metrics cache
|
|
19014
19280
|
*/
|
|
19015
19281
|
class FontMetricsCache {
|
|
19016
19282
|
constructor() {
|
|
@@ -19037,17 +19303,17 @@ const measurementCache = new MeasurementCache();
|
|
|
19037
19303
|
const kerningCache = new KerningCache();
|
|
19038
19304
|
const fontMetricsCache = new FontMetricsCache();
|
|
19039
19305
|
|
|
19040
|
-
/**
|
|
19041
|
-
* Unicode and Internationalization Support
|
|
19042
|
-
*
|
|
19043
|
-
* Enhanced Unicode handling for complex scripts, RTL/LTR text,
|
|
19044
|
-
* and grapheme cluster boundary detection.
|
|
19306
|
+
/**
|
|
19307
|
+
* Unicode and Internationalization Support
|
|
19308
|
+
*
|
|
19309
|
+
* Enhanced Unicode handling for complex scripts, RTL/LTR text,
|
|
19310
|
+
* and grapheme cluster boundary detection.
|
|
19045
19311
|
*/
|
|
19046
19312
|
|
|
19047
19313
|
|
|
19048
|
-
/**
|
|
19049
|
-
* Enhanced grapheme segmentation using Intl.Segmenter when available
|
|
19050
|
-
* with fallback to existing graphemeSplit implementation
|
|
19314
|
+
/**
|
|
19315
|
+
* Enhanced grapheme segmentation using Intl.Segmenter when available
|
|
19316
|
+
* with fallback to existing graphemeSplit implementation
|
|
19051
19317
|
*/
|
|
19052
19318
|
function segmentGraphemes(text) {
|
|
19053
19319
|
// Use native Intl.Segmenter if available
|
|
@@ -19067,15 +19333,15 @@ function segmentGraphemes(text) {
|
|
|
19067
19333
|
return graphemeSplit(text);
|
|
19068
19334
|
}
|
|
19069
19335
|
|
|
19070
|
-
/**
|
|
19071
|
-
* Ellipsis Text Truncation System
|
|
19072
|
-
*
|
|
19073
|
-
* Implements text truncation with ellipsis when content exceeds bounds,
|
|
19074
|
-
* using binary search for optimal truncation points.
|
|
19336
|
+
/**
|
|
19337
|
+
* Ellipsis Text Truncation System
|
|
19338
|
+
*
|
|
19339
|
+
* Implements text truncation with ellipsis when content exceeds bounds,
|
|
19340
|
+
* using binary search for optimal truncation points.
|
|
19075
19341
|
*/
|
|
19076
19342
|
|
|
19077
|
-
/**
|
|
19078
|
-
* Apply ellipsis truncation to text based on width/height constraints
|
|
19343
|
+
/**
|
|
19344
|
+
* Apply ellipsis truncation to text based on width/height constraints
|
|
19079
19345
|
*/
|
|
19080
19346
|
function applyEllipsis(text, options) {
|
|
19081
19347
|
const {
|
|
@@ -19145,8 +19411,8 @@ function applyEllipsis(text, options) {
|
|
|
19145
19411
|
};
|
|
19146
19412
|
}
|
|
19147
19413
|
|
|
19148
|
-
/**
|
|
19149
|
-
* Truncate text based on width constraint using binary search
|
|
19414
|
+
/**
|
|
19415
|
+
* Truncate text based on width constraint using binary search
|
|
19150
19416
|
*/
|
|
19151
19417
|
function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn) {
|
|
19152
19418
|
const graphemes = segmentGraphemes(text);
|
|
@@ -19196,8 +19462,8 @@ function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn)
|
|
|
19196
19462
|
};
|
|
19197
19463
|
}
|
|
19198
19464
|
|
|
19199
|
-
/**
|
|
19200
|
-
* Truncate text based on height constraint
|
|
19465
|
+
/**
|
|
19466
|
+
* Truncate text based on height constraint
|
|
19201
19467
|
*/
|
|
19202
19468
|
function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
|
|
19203
19469
|
var _measureFn;
|
|
@@ -19245,19 +19511,19 @@ function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
|
|
|
19245
19511
|
return truncateByWidth(lines[0], firstLineWidth, ellipsisChar, 0, measureFn);
|
|
19246
19512
|
}
|
|
19247
19513
|
|
|
19248
|
-
/**
|
|
19249
|
-
* Core Text Layout Engine
|
|
19250
|
-
*
|
|
19251
|
-
* Implements Konva-compatible text layout with support for:
|
|
19252
|
-
* - Multiple wrap modes (word/char/none)
|
|
19253
|
-
* - Ellipsis truncation
|
|
19254
|
-
* - Justify alignment with proper space distribution
|
|
19255
|
-
* - RTL/LTR text direction
|
|
19256
|
-
* - Advanced grapheme handling
|
|
19514
|
+
/**
|
|
19515
|
+
* Core Text Layout Engine
|
|
19516
|
+
*
|
|
19517
|
+
* Implements Konva-compatible text layout with support for:
|
|
19518
|
+
* - Multiple wrap modes (word/char/none)
|
|
19519
|
+
* - Ellipsis truncation
|
|
19520
|
+
* - Justify alignment with proper space distribution
|
|
19521
|
+
* - RTL/LTR text direction
|
|
19522
|
+
* - Advanced grapheme handling
|
|
19257
19523
|
*/
|
|
19258
19524
|
|
|
19259
|
-
/**
|
|
19260
|
-
* Main text layout function - converts text and options into positioned layout
|
|
19525
|
+
/**
|
|
19526
|
+
* Main text layout function - converts text and options into positioned layout
|
|
19261
19527
|
*/
|
|
19262
19528
|
function layoutText(options) {
|
|
19263
19529
|
var _ellipsisResult;
|
|
@@ -19376,8 +19642,8 @@ function layoutText(options) {
|
|
|
19376
19642
|
};
|
|
19377
19643
|
}
|
|
19378
19644
|
|
|
19379
|
-
/**
|
|
19380
|
-
* Layout a single paragraph with wrapping
|
|
19645
|
+
/**
|
|
19646
|
+
* Layout a single paragraph with wrapping
|
|
19381
19647
|
*/
|
|
19382
19648
|
function layoutParagraph(text, options) {
|
|
19383
19649
|
const {
|
|
@@ -19412,8 +19678,8 @@ function layoutParagraph(text, options) {
|
|
|
19412
19678
|
return layoutLines;
|
|
19413
19679
|
}
|
|
19414
19680
|
|
|
19415
|
-
/**
|
|
19416
|
-
* Layout a single line of text (no wrapping)
|
|
19681
|
+
/**
|
|
19682
|
+
* Layout a single line of text (no wrapping)
|
|
19417
19683
|
*/
|
|
19418
19684
|
function layoutSingleLine(text, options) {
|
|
19419
19685
|
let textOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -19483,8 +19749,8 @@ function layoutSingleLine(text, options) {
|
|
|
19483
19749
|
};
|
|
19484
19750
|
}
|
|
19485
19751
|
|
|
19486
|
-
/**
|
|
19487
|
-
* Word-based wrapping algorithm
|
|
19752
|
+
/**
|
|
19753
|
+
* Word-based wrapping algorithm
|
|
19488
19754
|
*/
|
|
19489
19755
|
function wrapByWords(text, maxWidth, options) {
|
|
19490
19756
|
const lines = [];
|
|
@@ -19517,8 +19783,8 @@ function wrapByWords(text, maxWidth, options) {
|
|
|
19517
19783
|
return lines.length > 0 ? lines : [''];
|
|
19518
19784
|
}
|
|
19519
19785
|
|
|
19520
|
-
/**
|
|
19521
|
-
* Character-based wrapping algorithm
|
|
19786
|
+
/**
|
|
19787
|
+
* Character-based wrapping algorithm
|
|
19522
19788
|
*/
|
|
19523
19789
|
function wrapByCharacters(text, maxWidth, options) {
|
|
19524
19790
|
const lines = [];
|
|
@@ -19540,8 +19806,8 @@ function wrapByCharacters(text, maxWidth, options) {
|
|
|
19540
19806
|
return lines.length > 0 ? lines : [''];
|
|
19541
19807
|
}
|
|
19542
19808
|
|
|
19543
|
-
/**
|
|
19544
|
-
* Apply text alignment to lines
|
|
19809
|
+
/**
|
|
19810
|
+
* Apply text alignment to lines
|
|
19545
19811
|
*/
|
|
19546
19812
|
function applyAlignment(lines, align, containerWidth, options) {
|
|
19547
19813
|
return lines.map(line => {
|
|
@@ -19575,8 +19841,8 @@ function applyAlignment(lines, align, containerWidth, options) {
|
|
|
19575
19841
|
});
|
|
19576
19842
|
}
|
|
19577
19843
|
|
|
19578
|
-
/**
|
|
19579
|
-
* Apply justify alignment by expanding spaces
|
|
19844
|
+
/**
|
|
19845
|
+
* Apply justify alignment by expanding spaces
|
|
19580
19846
|
*/
|
|
19581
19847
|
function applyJustification(line, containerWidth, options) {
|
|
19582
19848
|
const spaces = line.graphemes.filter(g => /\s/.test(g)).length;
|
|
@@ -19599,8 +19865,8 @@ function applyJustification(line, containerWidth, options) {
|
|
|
19599
19865
|
return line;
|
|
19600
19866
|
}
|
|
19601
19867
|
|
|
19602
|
-
/**
|
|
19603
|
-
* Calculate vertical alignment offset
|
|
19868
|
+
/**
|
|
19869
|
+
* Calculate vertical alignment offset
|
|
19604
19870
|
*/
|
|
19605
19871
|
function calculateVerticalOffset(contentHeight, containerHeight, align) {
|
|
19606
19872
|
switch (align) {
|
|
@@ -19614,8 +19880,8 @@ function calculateVerticalOffset(contentHeight, containerHeight, align) {
|
|
|
19614
19880
|
}
|
|
19615
19881
|
}
|
|
19616
19882
|
|
|
19617
|
-
/**
|
|
19618
|
-
* Handle height overflow with ellipsis
|
|
19883
|
+
/**
|
|
19884
|
+
* Handle height overflow with ellipsis
|
|
19619
19885
|
*/
|
|
19620
19886
|
function handleHeightOverflow(existingLines, overflowLine, remainingHeight, options) {
|
|
19621
19887
|
// If ellipsis is enabled, try to fit part of the overflow line
|
|
@@ -19644,8 +19910,8 @@ function handleHeightOverflow(existingLines, overflowLine, remainingHeight, opti
|
|
|
19644
19910
|
};
|
|
19645
19911
|
}
|
|
19646
19912
|
|
|
19647
|
-
/**
|
|
19648
|
-
* Create empty line for empty paragraphs
|
|
19913
|
+
/**
|
|
19914
|
+
* Create empty line for empty paragraphs
|
|
19649
19915
|
*/
|
|
19650
19916
|
function createEmptyLine(options) {
|
|
19651
19917
|
const height = options.fontSize * options.lineHeight;
|
|
@@ -19661,8 +19927,8 @@ function createEmptyLine(options) {
|
|
|
19661
19927
|
};
|
|
19662
19928
|
}
|
|
19663
19929
|
|
|
19664
|
-
/**
|
|
19665
|
-
* Measure width of a line of text
|
|
19930
|
+
/**
|
|
19931
|
+
* Measure width of a line of text
|
|
19666
19932
|
*/
|
|
19667
19933
|
function measureLineWidth(text, options) {
|
|
19668
19934
|
const graphemes = segmentGraphemes(text);
|
|
@@ -19679,8 +19945,8 @@ function measureLineWidth(text, options) {
|
|
|
19679
19945
|
return width;
|
|
19680
19946
|
}
|
|
19681
19947
|
|
|
19682
|
-
/**
|
|
19683
|
-
* Convert layout options to measurement options
|
|
19948
|
+
/**
|
|
19949
|
+
* Convert layout options to measurement options
|
|
19684
19950
|
*/
|
|
19685
19951
|
function createMeasurementOptions(options) {
|
|
19686
19952
|
return {
|
|
@@ -19923,15 +20189,15 @@ class TextSVGExportMixin extends FabricObjectSVGExportMixin {
|
|
|
19923
20189
|
}
|
|
19924
20190
|
}
|
|
19925
20191
|
|
|
19926
|
-
/**
|
|
19927
|
-
* Browser Line Break Extraction
|
|
19928
|
-
*
|
|
19929
|
-
* Captures exact line breaks as rendered by the browser to ensure
|
|
19930
|
-
* pixel-perfect consistency between DOM editing and canvas rendering.
|
|
20192
|
+
/**
|
|
20193
|
+
* Browser Line Break Extraction
|
|
20194
|
+
*
|
|
20195
|
+
* Captures exact line breaks as rendered by the browser to ensure
|
|
20196
|
+
* pixel-perfect consistency between DOM editing and canvas rendering.
|
|
19931
20197
|
*/
|
|
19932
20198
|
|
|
19933
|
-
/**
|
|
19934
|
-
* Segment text into graphemes safely using Intl.Segmenter or fallback
|
|
20199
|
+
/**
|
|
20200
|
+
* Segment text into graphemes safely using Intl.Segmenter or fallback
|
|
19935
20201
|
*/
|
|
19936
20202
|
function segmentIntoGraphemes(text) {
|
|
19937
20203
|
if (typeof Intl !== 'undefined' && Intl.Segmenter) {
|
|
@@ -19945,9 +20211,9 @@ function segmentIntoGraphemes(text) {
|
|
|
19945
20211
|
return Array.from(text);
|
|
19946
20212
|
}
|
|
19947
20213
|
|
|
19948
|
-
/**
|
|
19949
|
-
* Extract line break information from a textarea by creating a mirror element
|
|
19950
|
-
* with identical computed styles and measuring grapheme positions.
|
|
20214
|
+
/**
|
|
20215
|
+
* Extract line break information from a textarea by creating a mirror element
|
|
20216
|
+
* with identical computed styles and measuring grapheme positions.
|
|
19951
20217
|
*/
|
|
19952
20218
|
function extractLinesFromDOM(textarea) {
|
|
19953
20219
|
const text = textarea.value;
|
|
@@ -20042,16 +20308,16 @@ function extractLinesFromDOM(textarea) {
|
|
|
20042
20308
|
}
|
|
20043
20309
|
}
|
|
20044
20310
|
|
|
20045
|
-
/**
|
|
20046
|
-
* Create a hash of layout-affecting properties to detect when browser lines are still valid
|
|
20311
|
+
/**
|
|
20312
|
+
* Create a hash of layout-affecting properties to detect when browser lines are still valid
|
|
20047
20313
|
*/
|
|
20048
20314
|
function createLayoutHash(target) {
|
|
20049
20315
|
const properties = [target.text, target.width, target.height, target.fontFamily, target.fontSize, target.fontWeight, target.fontStyle, target.lineHeight, target.charSpacing, target.textAlign, target.direction];
|
|
20050
20316
|
return properties.map(p => String(p)).join('|');
|
|
20051
20317
|
}
|
|
20052
20318
|
|
|
20053
|
-
/**
|
|
20054
|
-
* Check if stored browser lines are still valid for the current target state
|
|
20319
|
+
/**
|
|
20320
|
+
* Check if stored browser lines are still valid for the current target state
|
|
20055
20321
|
*/
|
|
20056
20322
|
function areBrowserLinesValid(target, storedHash) {
|
|
20057
20323
|
if (!storedHash || !target.__lastBrowserLines) {
|
|
@@ -20061,24 +20327,24 @@ function areBrowserLinesValid(target, storedHash) {
|
|
|
20061
20327
|
return currentHash === storedHash;
|
|
20062
20328
|
}
|
|
20063
20329
|
|
|
20064
|
-
/**
|
|
20065
|
-
* Store browser lines on a target object with validity hash
|
|
20330
|
+
/**
|
|
20331
|
+
* Store browser lines on a target object with validity hash
|
|
20066
20332
|
*/
|
|
20067
20333
|
function storeBrowserLines(target, lines, layoutHash) {
|
|
20068
20334
|
target.__lastBrowserLines = lines;
|
|
20069
20335
|
target.__lastBrowserLinesHash = createLayoutHash(target);
|
|
20070
20336
|
}
|
|
20071
20337
|
|
|
20072
|
-
/**
|
|
20073
|
-
* Clear stored browser lines from a target object
|
|
20338
|
+
/**
|
|
20339
|
+
* Clear stored browser lines from a target object
|
|
20074
20340
|
*/
|
|
20075
20341
|
function clearBrowserLines(target) {
|
|
20076
20342
|
delete target.__lastBrowserLines;
|
|
20077
20343
|
delete target.__lastBrowserLinesHash;
|
|
20078
20344
|
}
|
|
20079
20345
|
|
|
20080
|
-
/**
|
|
20081
|
-
* Get stored browser lines if they're still valid
|
|
20346
|
+
/**
|
|
20347
|
+
* Get stored browser lines if they're still valid
|
|
20082
20348
|
*/
|
|
20083
20349
|
function getBrowserLines(target) {
|
|
20084
20350
|
const lines = target.__lastBrowserLines;
|
|
@@ -20091,9 +20357,9 @@ function getBrowserLines(target) {
|
|
|
20091
20357
|
|
|
20092
20358
|
let measuringContext;
|
|
20093
20359
|
|
|
20094
|
-
/**
|
|
20095
|
-
* Return a context for measurement of text string.
|
|
20096
|
-
* if created it gets stored for reuse
|
|
20360
|
+
/**
|
|
20361
|
+
* Return a context for measurement of text string.
|
|
20362
|
+
* if created it gets stored for reuse
|
|
20097
20363
|
*/
|
|
20098
20364
|
function getMeasuringContext() {
|
|
20099
20365
|
if (!measuringContext) {
|
|
@@ -20106,17 +20372,17 @@ function getMeasuringContext() {
|
|
|
20106
20372
|
return measuringContext;
|
|
20107
20373
|
}
|
|
20108
20374
|
|
|
20109
|
-
/**
|
|
20110
|
-
* Measure and return the info of a single grapheme.
|
|
20111
|
-
* needs the the info of previous graphemes already filled
|
|
20112
|
-
* Override to customize measuring
|
|
20375
|
+
/**
|
|
20376
|
+
* Measure and return the info of a single grapheme.
|
|
20377
|
+
* needs the the info of previous graphemes already filled
|
|
20378
|
+
* Override to customize measuring
|
|
20113
20379
|
*/
|
|
20114
20380
|
|
|
20115
20381
|
// @TODO this is not complete
|
|
20116
20382
|
|
|
20117
|
-
/**
|
|
20118
|
-
* Text class
|
|
20119
|
-
* @see {@link http://fabricjs.com/fabric-intro-part-2#text}
|
|
20383
|
+
/**
|
|
20384
|
+
* Text class
|
|
20385
|
+
* @see {@link http://fabricjs.com/fabric-intro-part-2#text}
|
|
20120
20386
|
*/
|
|
20121
20387
|
class FabricText extends StyledText {
|
|
20122
20388
|
static getDefaults() {
|
|
@@ -20127,11 +20393,11 @@ class FabricText extends StyledText {
|
|
|
20127
20393
|
}
|
|
20128
20394
|
constructor(text, options) {
|
|
20129
20395
|
super();
|
|
20130
|
-
/**
|
|
20131
|
-
* contains characters bounding boxes
|
|
20132
|
-
* This variable is considered to be protected.
|
|
20133
|
-
* But for how mixins are implemented right now, we can't leave it private
|
|
20134
|
-
* @protected
|
|
20396
|
+
/**
|
|
20397
|
+
* contains characters bounding boxes
|
|
20398
|
+
* This variable is considered to be protected.
|
|
20399
|
+
* But for how mixins are implemented right now, we can't leave it private
|
|
20400
|
+
* @protected
|
|
20135
20401
|
*/
|
|
20136
20402
|
_defineProperty(this, "__charBounds", []);
|
|
20137
20403
|
Object.assign(this, FabricText.ownDefaults);
|
|
@@ -20148,9 +20414,9 @@ class FabricText extends StyledText {
|
|
|
20148
20414
|
this.setCoords();
|
|
20149
20415
|
}
|
|
20150
20416
|
|
|
20151
|
-
/**
|
|
20152
|
-
* If text has a path, it will add the extra information needed
|
|
20153
|
-
* for path and text calculations
|
|
20417
|
+
/**
|
|
20418
|
+
* If text has a path, it will add the extra information needed
|
|
20419
|
+
* for path and text calculations
|
|
20154
20420
|
*/
|
|
20155
20421
|
setPathInfo() {
|
|
20156
20422
|
const path = this.path;
|
|
@@ -20159,10 +20425,10 @@ class FabricText extends StyledText {
|
|
|
20159
20425
|
}
|
|
20160
20426
|
}
|
|
20161
20427
|
|
|
20162
|
-
/**
|
|
20163
|
-
* @private
|
|
20164
|
-
* Divides text into lines of text and lines of graphemes.
|
|
20165
|
-
* Uses browser lines when available for pixel-perfect consistency.
|
|
20428
|
+
/**
|
|
20429
|
+
* @private
|
|
20430
|
+
* Divides text into lines of text and lines of graphemes.
|
|
20431
|
+
* Uses browser lines when available for pixel-perfect consistency.
|
|
20166
20432
|
*/
|
|
20167
20433
|
_splitText() {
|
|
20168
20434
|
// Check if we have valid browser lines and should use them
|
|
@@ -20178,9 +20444,9 @@ class FabricText extends StyledText {
|
|
|
20178
20444
|
return newLines;
|
|
20179
20445
|
}
|
|
20180
20446
|
|
|
20181
|
-
/**
|
|
20182
|
-
* Create TextLinesInfo from browser-extracted lines
|
|
20183
|
-
* @private
|
|
20447
|
+
/**
|
|
20448
|
+
* Create TextLinesInfo from browser-extracted lines
|
|
20449
|
+
* @private
|
|
20184
20450
|
*/
|
|
20185
20451
|
_splitTextFromBrowserLines(browserLines) {
|
|
20186
20452
|
const lines = [];
|
|
@@ -20214,10 +20480,10 @@ class FabricText extends StyledText {
|
|
|
20214
20480
|
return result;
|
|
20215
20481
|
}
|
|
20216
20482
|
|
|
20217
|
-
/**
|
|
20218
|
-
* Initialize or update text dimensions.
|
|
20219
|
-
* Updates this.width and this.height with the proper values.
|
|
20220
|
-
* Does not return dimensions.
|
|
20483
|
+
/**
|
|
20484
|
+
* Initialize or update text dimensions.
|
|
20485
|
+
* Updates this.width and this.height with the proper values.
|
|
20486
|
+
* Does not return dimensions.
|
|
20221
20487
|
*/
|
|
20222
20488
|
initDimensions() {
|
|
20223
20489
|
// Use advanced layout if enabled
|
|
@@ -20240,8 +20506,8 @@ class FabricText extends StyledText {
|
|
|
20240
20506
|
}
|
|
20241
20507
|
}
|
|
20242
20508
|
|
|
20243
|
-
/**
|
|
20244
|
-
* Enlarge space boxes and shift the others
|
|
20509
|
+
/**
|
|
20510
|
+
* Enlarge space boxes and shift the others
|
|
20245
20511
|
*/
|
|
20246
20512
|
enlargeSpaces() {
|
|
20247
20513
|
let diffSpace, currentLineWidth, numberOfSpaces, accumulatedSpace, line, charBound, spaces;
|
|
@@ -20300,18 +20566,18 @@ class FabricText extends StyledText {
|
|
|
20300
20566
|
}
|
|
20301
20567
|
}
|
|
20302
20568
|
|
|
20303
|
-
/**
|
|
20304
|
-
* Advanced layout using new text engine (Konva-compatible)
|
|
20305
|
-
* @private
|
|
20569
|
+
/**
|
|
20570
|
+
* Advanced layout using new text engine (Konva-compatible)
|
|
20571
|
+
* @private
|
|
20306
20572
|
*/
|
|
20307
20573
|
_layoutTextAdvanced() {
|
|
20308
20574
|
const options = this._getAdvancedLayoutOptions();
|
|
20309
20575
|
return layoutText(options);
|
|
20310
20576
|
}
|
|
20311
20577
|
|
|
20312
|
-
/**
|
|
20313
|
-
* Get advanced layout options from current text properties
|
|
20314
|
-
* @private
|
|
20578
|
+
/**
|
|
20579
|
+
* Get advanced layout options from current text properties
|
|
20580
|
+
* @private
|
|
20315
20581
|
*/
|
|
20316
20582
|
_getAdvancedLayoutOptions() {
|
|
20317
20583
|
return {
|
|
@@ -20333,9 +20599,9 @@ class FabricText extends StyledText {
|
|
|
20333
20599
|
};
|
|
20334
20600
|
}
|
|
20335
20601
|
|
|
20336
|
-
/**
|
|
20337
|
-
* Map Fabric textAlign to Konva align format
|
|
20338
|
-
* @private
|
|
20602
|
+
/**
|
|
20603
|
+
* Map Fabric textAlign to Konva align format
|
|
20604
|
+
* @private
|
|
20339
20605
|
*/
|
|
20340
20606
|
_mapTextAlignToAlign(textAlign) {
|
|
20341
20607
|
switch (textAlign) {
|
|
@@ -20356,8 +20622,8 @@ class FabricText extends StyledText {
|
|
|
20356
20622
|
}
|
|
20357
20623
|
}
|
|
20358
20624
|
|
|
20359
|
-
/**
|
|
20360
|
-
* Enhanced initDimensions that uses advanced layout when enabled
|
|
20625
|
+
/**
|
|
20626
|
+
* Enhanced initDimensions that uses advanced layout when enabled
|
|
20361
20627
|
*/
|
|
20362
20628
|
initDimensionsAdvanced() {
|
|
20363
20629
|
if (!this.enableAdvancedLayout) {
|
|
@@ -20374,9 +20640,9 @@ class FabricText extends StyledText {
|
|
|
20374
20640
|
this.dirty = true;
|
|
20375
20641
|
}
|
|
20376
20642
|
|
|
20377
|
-
/**
|
|
20378
|
-
* Convert new layout format to legacy _textLines and __charBounds format
|
|
20379
|
-
* @private
|
|
20643
|
+
/**
|
|
20644
|
+
* Convert new layout format to legacy _textLines and __charBounds format
|
|
20645
|
+
* @private
|
|
20380
20646
|
*/
|
|
20381
20647
|
_convertLayoutToLegacyFormat(layout) {
|
|
20382
20648
|
this._textLines = layout.lines.map(line => line.graphemes);
|
|
@@ -20398,30 +20664,30 @@ class FabricText extends StyledText {
|
|
|
20398
20664
|
}
|
|
20399
20665
|
}
|
|
20400
20666
|
|
|
20401
|
-
/**
|
|
20402
|
-
* Detect if the text line is ended with an hard break
|
|
20403
|
-
* text and itext do not have wrapping, return false
|
|
20404
|
-
* @return {Boolean}
|
|
20667
|
+
/**
|
|
20668
|
+
* Detect if the text line is ended with an hard break
|
|
20669
|
+
* text and itext do not have wrapping, return false
|
|
20670
|
+
* @return {Boolean}
|
|
20405
20671
|
*/
|
|
20406
20672
|
isEndOfWrapping(lineIndex) {
|
|
20407
20673
|
return lineIndex === this._textLines.length - 1;
|
|
20408
20674
|
}
|
|
20409
20675
|
|
|
20410
|
-
/**
|
|
20411
|
-
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
20412
|
-
* and counting style.
|
|
20413
|
-
* It return always 1 for text and Itext. Textbox has its own implementation
|
|
20414
|
-
* @return Number
|
|
20676
|
+
/**
|
|
20677
|
+
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
20678
|
+
* and counting style.
|
|
20679
|
+
* It return always 1 for text and Itext. Textbox has its own implementation
|
|
20680
|
+
* @return Number
|
|
20415
20681
|
*/
|
|
20416
20682
|
|
|
20417
20683
|
missingNewlineOffset(_lineIndex) {
|
|
20418
20684
|
return 1;
|
|
20419
20685
|
}
|
|
20420
20686
|
|
|
20421
|
-
/**
|
|
20422
|
-
* Returns 2d representation (lineIndex and charIndex) of cursor
|
|
20423
|
-
* @param {Number} selectionStart
|
|
20424
|
-
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
20687
|
+
/**
|
|
20688
|
+
* Returns 2d representation (lineIndex and charIndex) of cursor
|
|
20689
|
+
* @param {Number} selectionStart
|
|
20690
|
+
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
20425
20691
|
*/
|
|
20426
20692
|
get2DCursorLocation(selectionStart, skipWrapping) {
|
|
20427
20693
|
const lines = skipWrapping ? this._unwrappedTextLines : this._textLines;
|
|
@@ -20441,24 +20707,24 @@ class FabricText extends StyledText {
|
|
|
20441
20707
|
};
|
|
20442
20708
|
}
|
|
20443
20709
|
|
|
20444
|
-
/**
|
|
20445
|
-
* Returns string representation of an instance
|
|
20446
|
-
* @return {String} String representation of text object
|
|
20710
|
+
/**
|
|
20711
|
+
* Returns string representation of an instance
|
|
20712
|
+
* @return {String} String representation of text object
|
|
20447
20713
|
*/
|
|
20448
20714
|
toString() {
|
|
20449
20715
|
return `#<Text (${this.complexity()}): { "text": "${this.text}", "fontFamily": "${this.fontFamily}" }>`;
|
|
20450
20716
|
}
|
|
20451
20717
|
|
|
20452
|
-
/**
|
|
20453
|
-
* Return the dimension and the zoom level needed to create a cache canvas
|
|
20454
|
-
* big enough to host the object to be cached.
|
|
20455
|
-
* @private
|
|
20456
|
-
* @param {Object} dim.x width of object to be cached
|
|
20457
|
-
* @param {Object} dim.y height of object to be cached
|
|
20458
|
-
* @return {Object}.width width of canvas
|
|
20459
|
-
* @return {Object}.height height of canvas
|
|
20460
|
-
* @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
|
|
20461
|
-
* @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
|
|
20718
|
+
/**
|
|
20719
|
+
* Return the dimension and the zoom level needed to create a cache canvas
|
|
20720
|
+
* big enough to host the object to be cached.
|
|
20721
|
+
* @private
|
|
20722
|
+
* @param {Object} dim.x width of object to be cached
|
|
20723
|
+
* @param {Object} dim.y height of object to be cached
|
|
20724
|
+
* @return {Object}.width width of canvas
|
|
20725
|
+
* @return {Object}.height height of canvas
|
|
20726
|
+
* @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
|
|
20727
|
+
* @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
|
|
20462
20728
|
*/
|
|
20463
20729
|
_getCacheCanvasDimensions() {
|
|
20464
20730
|
const dims = super._getCacheCanvasDimensions();
|
|
@@ -20468,9 +20734,9 @@ class FabricText extends StyledText {
|
|
|
20468
20734
|
return dims;
|
|
20469
20735
|
}
|
|
20470
20736
|
|
|
20471
|
-
/**
|
|
20472
|
-
* @private
|
|
20473
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20737
|
+
/**
|
|
20738
|
+
* @private
|
|
20739
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20474
20740
|
*/
|
|
20475
20741
|
_render(ctx) {
|
|
20476
20742
|
const path = this.path;
|
|
@@ -20483,9 +20749,9 @@ class FabricText extends StyledText {
|
|
|
20483
20749
|
this._renderTextDecoration(ctx, 'linethrough');
|
|
20484
20750
|
}
|
|
20485
20751
|
|
|
20486
|
-
/**
|
|
20487
|
-
* @private
|
|
20488
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20752
|
+
/**
|
|
20753
|
+
* @private
|
|
20754
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20489
20755
|
*/
|
|
20490
20756
|
_renderText(ctx) {
|
|
20491
20757
|
// Skip text rendering if in overlay editing mode
|
|
@@ -20501,15 +20767,15 @@ class FabricText extends StyledText {
|
|
|
20501
20767
|
}
|
|
20502
20768
|
}
|
|
20503
20769
|
|
|
20504
|
-
/**
|
|
20505
|
-
* Set the font parameter of the context with the object properties or with charStyle
|
|
20506
|
-
* @private
|
|
20507
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20508
|
-
* @param {Object} [charStyle] object with font style properties
|
|
20509
|
-
* @param {String} [charStyle.fontFamily] Font Family
|
|
20510
|
-
* @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
|
|
20511
|
-
* @param {String} [charStyle.fontWeight] Font weight
|
|
20512
|
-
* @param {String} [charStyle.fontStyle] Font style (italic|normal)
|
|
20770
|
+
/**
|
|
20771
|
+
* Set the font parameter of the context with the object properties or with charStyle
|
|
20772
|
+
* @private
|
|
20773
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20774
|
+
* @param {Object} [charStyle] object with font style properties
|
|
20775
|
+
* @param {String} [charStyle.fontFamily] Font Family
|
|
20776
|
+
* @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
|
|
20777
|
+
* @param {String} [charStyle.fontWeight] Font weight
|
|
20778
|
+
* @param {String} [charStyle.fontStyle] Font style (italic|normal)
|
|
20513
20779
|
*/
|
|
20514
20780
|
_setTextStyles(ctx, charStyle, forMeasuring) {
|
|
20515
20781
|
ctx.textBaseline = 'alphabetic';
|
|
@@ -20529,11 +20795,11 @@ class FabricText extends StyledText {
|
|
|
20529
20795
|
ctx.font = this._getFontDeclaration(charStyle, forMeasuring);
|
|
20530
20796
|
}
|
|
20531
20797
|
|
|
20532
|
-
/**
|
|
20533
|
-
* calculate and return the text Width measuring each line.
|
|
20534
|
-
* @private
|
|
20535
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20536
|
-
* @return {Number} Maximum width of Text object
|
|
20798
|
+
/**
|
|
20799
|
+
* calculate and return the text Width measuring each line.
|
|
20800
|
+
* @private
|
|
20801
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20802
|
+
* @return {Number} Maximum width of Text object
|
|
20537
20803
|
*/
|
|
20538
20804
|
calcTextWidth() {
|
|
20539
20805
|
let maxWidth = this.getLineWidth(0);
|
|
@@ -20546,23 +20812,23 @@ class FabricText extends StyledText {
|
|
|
20546
20812
|
return maxWidth;
|
|
20547
20813
|
}
|
|
20548
20814
|
|
|
20549
|
-
/**
|
|
20550
|
-
* @private
|
|
20551
|
-
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20552
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20553
|
-
* @param {String} line Text to render
|
|
20554
|
-
* @param {Number} left Left position of text
|
|
20555
|
-
* @param {Number} top Top position of text
|
|
20556
|
-
* @param {Number} lineIndex Index of a line in a text
|
|
20815
|
+
/**
|
|
20816
|
+
* @private
|
|
20817
|
+
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20818
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20819
|
+
* @param {String} line Text to render
|
|
20820
|
+
* @param {Number} left Left position of text
|
|
20821
|
+
* @param {Number} top Top position of text
|
|
20822
|
+
* @param {Number} lineIndex Index of a line in a text
|
|
20557
20823
|
*/
|
|
20558
20824
|
_renderTextLine(method, ctx, line, left, top, lineIndex) {
|
|
20559
20825
|
this._renderChars(method, ctx, line, left, top, lineIndex);
|
|
20560
20826
|
}
|
|
20561
20827
|
|
|
20562
|
-
/**
|
|
20563
|
-
* Renders the text background for lines, taking care of style
|
|
20564
|
-
* @private
|
|
20565
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20828
|
+
/**
|
|
20829
|
+
* Renders the text background for lines, taking care of style
|
|
20830
|
+
* @private
|
|
20831
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20566
20832
|
*/
|
|
20567
20833
|
_renderTextLinesBackground(ctx) {
|
|
20568
20834
|
if (!this.textBackgroundColor && !this.styleHas('textBackgroundColor')) {
|
|
@@ -20625,15 +20891,15 @@ class FabricText extends StyledText {
|
|
|
20625
20891
|
this._removeShadow(ctx);
|
|
20626
20892
|
}
|
|
20627
20893
|
|
|
20628
|
-
/**
|
|
20629
|
-
* measure and return the width of a single character.
|
|
20630
|
-
* possibly overridden to accommodate different measure logic or
|
|
20631
|
-
* to hook some external lib for character measurement
|
|
20632
|
-
* @private
|
|
20633
|
-
* @param {String} _char, char to be measured
|
|
20634
|
-
* @param {Object} charStyle style of char to be measured
|
|
20635
|
-
* @param {String} [previousChar] previous char
|
|
20636
|
-
* @param {Object} [prevCharStyle] style of previous char
|
|
20894
|
+
/**
|
|
20895
|
+
* measure and return the width of a single character.
|
|
20896
|
+
* possibly overridden to accommodate different measure logic or
|
|
20897
|
+
* to hook some external lib for character measurement
|
|
20898
|
+
* @private
|
|
20899
|
+
* @param {String} _char, char to be measured
|
|
20900
|
+
* @param {Object} charStyle style of char to be measured
|
|
20901
|
+
* @param {String} [previousChar] previous char
|
|
20902
|
+
* @param {Object} [prevCharStyle] style of previous char
|
|
20637
20903
|
*/
|
|
20638
20904
|
_measureChar(_char, charStyle, previousChar, prevCharStyle) {
|
|
20639
20905
|
const fontCache = cache.getFontCache(charStyle),
|
|
@@ -20678,19 +20944,19 @@ class FabricText extends StyledText {
|
|
|
20678
20944
|
};
|
|
20679
20945
|
}
|
|
20680
20946
|
|
|
20681
|
-
/**
|
|
20682
|
-
* Computes height of character at given position
|
|
20683
|
-
* @param {Number} line the line index number
|
|
20684
|
-
* @param {Number} _char the character index number
|
|
20685
|
-
* @return {Number} fontSize of the character
|
|
20947
|
+
/**
|
|
20948
|
+
* Computes height of character at given position
|
|
20949
|
+
* @param {Number} line the line index number
|
|
20950
|
+
* @param {Number} _char the character index number
|
|
20951
|
+
* @return {Number} fontSize of the character
|
|
20686
20952
|
*/
|
|
20687
20953
|
getHeightOfChar(line, _char) {
|
|
20688
20954
|
return this.getValueOfPropertyAt(line, _char, 'fontSize');
|
|
20689
20955
|
}
|
|
20690
20956
|
|
|
20691
|
-
/**
|
|
20692
|
-
* measure a text line measuring all characters.
|
|
20693
|
-
* @param {Number} lineIndex line number
|
|
20957
|
+
/**
|
|
20958
|
+
* measure a text line measuring all characters.
|
|
20959
|
+
* @param {Number} lineIndex line number
|
|
20694
20960
|
*/
|
|
20695
20961
|
measureLine(lineIndex) {
|
|
20696
20962
|
const lineInfo = this._measureLine(lineIndex);
|
|
@@ -20703,11 +20969,11 @@ class FabricText extends StyledText {
|
|
|
20703
20969
|
return lineInfo;
|
|
20704
20970
|
}
|
|
20705
20971
|
|
|
20706
|
-
/**
|
|
20707
|
-
* measure every grapheme of a line, populating __charBounds
|
|
20708
|
-
* @param {Number} lineIndex
|
|
20709
|
-
* @return {Object} object.width total width of characters
|
|
20710
|
-
* @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
|
|
20972
|
+
/**
|
|
20973
|
+
* measure every grapheme of a line, populating __charBounds
|
|
20974
|
+
* @param {Number} lineIndex
|
|
20975
|
+
* @return {Object} object.width total width of characters
|
|
20976
|
+
* @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
|
|
20711
20977
|
*/
|
|
20712
20978
|
_measureLine(lineIndex) {
|
|
20713
20979
|
let width = 0,
|
|
@@ -20770,13 +21036,13 @@ class FabricText extends StyledText {
|
|
|
20770
21036
|
};
|
|
20771
21037
|
}
|
|
20772
21038
|
|
|
20773
|
-
/**
|
|
20774
|
-
* Calculate the angle and the left,top position of the char that follow a path.
|
|
20775
|
-
* It appends it to graphemeInfo to be reused later at rendering
|
|
20776
|
-
* @private
|
|
20777
|
-
* @param {Number} positionInPath to be measured
|
|
20778
|
-
* @param {GraphemeBBox} graphemeInfo current grapheme box information
|
|
20779
|
-
* @param {Object} startingPoint position of the point
|
|
21039
|
+
/**
|
|
21040
|
+
* Calculate the angle and the left,top position of the char that follow a path.
|
|
21041
|
+
* It appends it to graphemeInfo to be reused later at rendering
|
|
21042
|
+
* @private
|
|
21043
|
+
* @param {Number} positionInPath to be measured
|
|
21044
|
+
* @param {GraphemeBBox} graphemeInfo current grapheme box information
|
|
21045
|
+
* @param {Object} startingPoint position of the point
|
|
20780
21046
|
*/
|
|
20781
21047
|
_setGraphemeOnPath(positionInPath, graphemeInfo) {
|
|
20782
21048
|
const centerPosition = positionInPath + graphemeInfo.kernedWidth / 2,
|
|
@@ -20789,13 +21055,13 @@ class FabricText extends StyledText {
|
|
|
20789
21055
|
graphemeInfo.angle = info.angle + (this.pathSide === RIGHT ? Math.PI : 0);
|
|
20790
21056
|
}
|
|
20791
21057
|
|
|
20792
|
-
/**
|
|
20793
|
-
*
|
|
20794
|
-
* @param {String} grapheme to be measured
|
|
20795
|
-
* @param {Number} lineIndex index of the line where the char is
|
|
20796
|
-
* @param {Number} charIndex position in the line
|
|
20797
|
-
* @param {String} [prevGrapheme] character preceding the one to be measured
|
|
20798
|
-
* @returns {GraphemeBBox} grapheme bbox
|
|
21058
|
+
/**
|
|
21059
|
+
*
|
|
21060
|
+
* @param {String} grapheme to be measured
|
|
21061
|
+
* @param {Number} lineIndex index of the line where the char is
|
|
21062
|
+
* @param {Number} charIndex position in the line
|
|
21063
|
+
* @param {String} [prevGrapheme] character preceding the one to be measured
|
|
21064
|
+
* @returns {GraphemeBBox} grapheme bbox
|
|
20799
21065
|
*/
|
|
20800
21066
|
_getGraphemeBox(grapheme, lineIndex, charIndex, prevGrapheme, skipLeft) {
|
|
20801
21067
|
const style = this.getCompleteStyleDeclaration(lineIndex, charIndex),
|
|
@@ -20823,10 +21089,10 @@ class FabricText extends StyledText {
|
|
|
20823
21089
|
return box;
|
|
20824
21090
|
}
|
|
20825
21091
|
|
|
20826
|
-
/**
|
|
20827
|
-
* Calculate height of line at 'lineIndex'
|
|
20828
|
-
* @param {Number} lineIndex index of line to calculate
|
|
20829
|
-
* @return {Number}
|
|
21092
|
+
/**
|
|
21093
|
+
* Calculate height of line at 'lineIndex'
|
|
21094
|
+
* @param {Number} lineIndex index of line to calculate
|
|
21095
|
+
* @return {Number}
|
|
20830
21096
|
*/
|
|
20831
21097
|
getHeightOfLine(lineIndex) {
|
|
20832
21098
|
if (this.__lineHeights[lineIndex]) {
|
|
@@ -20842,8 +21108,8 @@ class FabricText extends StyledText {
|
|
|
20842
21108
|
return this.__lineHeights[lineIndex] = maxHeight * this.lineHeight * this._fontSizeMult;
|
|
20843
21109
|
}
|
|
20844
21110
|
|
|
20845
|
-
/**
|
|
20846
|
-
* Calculate text box height
|
|
21111
|
+
/**
|
|
21112
|
+
* Calculate text box height
|
|
20847
21113
|
*/
|
|
20848
21114
|
calcTextHeight() {
|
|
20849
21115
|
let lineHeight,
|
|
@@ -20855,26 +21121,26 @@ class FabricText extends StyledText {
|
|
|
20855
21121
|
return height;
|
|
20856
21122
|
}
|
|
20857
21123
|
|
|
20858
|
-
/**
|
|
20859
|
-
* @private
|
|
20860
|
-
* @return {Number} Left offset
|
|
21124
|
+
/**
|
|
21125
|
+
* @private
|
|
21126
|
+
* @return {Number} Left offset
|
|
20861
21127
|
*/
|
|
20862
21128
|
_getLeftOffset() {
|
|
20863
21129
|
return this.direction === 'ltr' ? -this.width / 2 : this.width / 2;
|
|
20864
21130
|
}
|
|
20865
21131
|
|
|
20866
|
-
/**
|
|
20867
|
-
* @private
|
|
20868
|
-
* @return {Number} Top offset
|
|
21132
|
+
/**
|
|
21133
|
+
* @private
|
|
21134
|
+
* @return {Number} Top offset
|
|
20869
21135
|
*/
|
|
20870
21136
|
_getTopOffset() {
|
|
20871
21137
|
return -this.height / 2;
|
|
20872
21138
|
}
|
|
20873
21139
|
|
|
20874
|
-
/**
|
|
20875
|
-
* @private
|
|
20876
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20877
|
-
* @param {String} method Method name ("fillText" or "strokeText")
|
|
21140
|
+
/**
|
|
21141
|
+
* @private
|
|
21142
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21143
|
+
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20878
21144
|
*/
|
|
20879
21145
|
_renderTextCommon(ctx, method) {
|
|
20880
21146
|
ctx.save();
|
|
@@ -20891,9 +21157,9 @@ class FabricText extends StyledText {
|
|
|
20891
21157
|
ctx.restore();
|
|
20892
21158
|
}
|
|
20893
21159
|
|
|
20894
|
-
/**
|
|
20895
|
-
* @private
|
|
20896
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21160
|
+
/**
|
|
21161
|
+
* @private
|
|
21162
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20897
21163
|
*/
|
|
20898
21164
|
_renderTextFill(ctx) {
|
|
20899
21165
|
if (!this.fill && !this.styleHas(FILL)) {
|
|
@@ -20902,9 +21168,9 @@ class FabricText extends StyledText {
|
|
|
20902
21168
|
this._renderTextCommon(ctx, 'fillText');
|
|
20903
21169
|
}
|
|
20904
21170
|
|
|
20905
|
-
/**
|
|
20906
|
-
* @private
|
|
20907
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21171
|
+
/**
|
|
21172
|
+
* @private
|
|
21173
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20908
21174
|
*/
|
|
20909
21175
|
_renderTextStroke(ctx) {
|
|
20910
21176
|
if ((!this.stroke || this.strokeWidth === 0) && this.isEmptyStyles()) {
|
|
@@ -20921,14 +21187,14 @@ class FabricText extends StyledText {
|
|
|
20921
21187
|
ctx.restore();
|
|
20922
21188
|
}
|
|
20923
21189
|
|
|
20924
|
-
/**
|
|
20925
|
-
* @private
|
|
20926
|
-
* @param {String} method fillText or strokeText.
|
|
20927
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20928
|
-
* @param {Array} line Content of the line, splitted in an array by grapheme
|
|
20929
|
-
* @param {Number} left
|
|
20930
|
-
* @param {Number} top
|
|
20931
|
-
* @param {Number} lineIndex
|
|
21190
|
+
/**
|
|
21191
|
+
* @private
|
|
21192
|
+
* @param {String} method fillText or strokeText.
|
|
21193
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21194
|
+
* @param {Array} line Content of the line, splitted in an array by grapheme
|
|
21195
|
+
* @param {Number} left
|
|
21196
|
+
* @param {Number} top
|
|
21197
|
+
* @param {Number} lineIndex
|
|
20932
21198
|
*/
|
|
20933
21199
|
_renderChars(method, ctx, line, left, top, lineIndex) {
|
|
20934
21200
|
const lineHeight = this.getHeightOfLine(lineIndex),
|
|
@@ -21010,16 +21276,16 @@ class FabricText extends StyledText {
|
|
|
21010
21276
|
ctx.restore();
|
|
21011
21277
|
}
|
|
21012
21278
|
|
|
21013
|
-
/**
|
|
21014
|
-
* This function try to patch the missing gradientTransform on canvas gradients.
|
|
21015
|
-
* transforming a context to transform the gradient, is going to transform the stroke too.
|
|
21016
|
-
* we want to transform the gradient but not the stroke operation, so we create
|
|
21017
|
-
* a transformed gradient on a pattern and then we use the pattern instead of the gradient.
|
|
21018
|
-
* this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
|
|
21019
|
-
* is limited.
|
|
21020
|
-
* @private
|
|
21021
|
-
* @param {TFiller} filler a fabric gradient instance
|
|
21022
|
-
* @return {CanvasPattern} a pattern to use as fill/stroke style
|
|
21279
|
+
/**
|
|
21280
|
+
* This function try to patch the missing gradientTransform on canvas gradients.
|
|
21281
|
+
* transforming a context to transform the gradient, is going to transform the stroke too.
|
|
21282
|
+
* we want to transform the gradient but not the stroke operation, so we create
|
|
21283
|
+
* a transformed gradient on a pattern and then we use the pattern instead of the gradient.
|
|
21284
|
+
* this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
|
|
21285
|
+
* is limited.
|
|
21286
|
+
* @private
|
|
21287
|
+
* @param {TFiller} filler a fabric gradient instance
|
|
21288
|
+
* @return {CanvasPattern} a pattern to use as fill/stroke style
|
|
21023
21289
|
*/
|
|
21024
21290
|
_applyPatternGradientTransformText(filler) {
|
|
21025
21291
|
// TODO: verify compatibility with strokeUniform
|
|
@@ -21075,12 +21341,12 @@ class FabricText extends StyledText {
|
|
|
21075
21341
|
};
|
|
21076
21342
|
}
|
|
21077
21343
|
|
|
21078
|
-
/**
|
|
21079
|
-
* This function prepare the canvas for a stroke style, and stroke and strokeWidth
|
|
21080
|
-
* need to be sent in as defined
|
|
21081
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
21082
|
-
* @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
|
|
21083
|
-
* @returns
|
|
21344
|
+
/**
|
|
21345
|
+
* This function prepare the canvas for a stroke style, and stroke and strokeWidth
|
|
21346
|
+
* need to be sent in as defined
|
|
21347
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
21348
|
+
* @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
|
|
21349
|
+
* @returns
|
|
21084
21350
|
*/
|
|
21085
21351
|
_setStrokeStyles(ctx, _ref) {
|
|
21086
21352
|
let {
|
|
@@ -21095,12 +21361,12 @@ class FabricText extends StyledText {
|
|
|
21095
21361
|
return this.handleFiller(ctx, 'strokeStyle', stroke);
|
|
21096
21362
|
}
|
|
21097
21363
|
|
|
21098
|
-
/**
|
|
21099
|
-
* This function prepare the canvas for a ill style, and fill
|
|
21100
|
-
* need to be sent in as defined
|
|
21101
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
21102
|
-
* @param {CompleteTextStyleDeclaration} style with ill defined
|
|
21103
|
-
* @returns
|
|
21364
|
+
/**
|
|
21365
|
+
* This function prepare the canvas for a ill style, and fill
|
|
21366
|
+
* need to be sent in as defined
|
|
21367
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
21368
|
+
* @param {CompleteTextStyleDeclaration} style with ill defined
|
|
21369
|
+
* @returns
|
|
21104
21370
|
*/
|
|
21105
21371
|
_setFillStyles(ctx, _ref2) {
|
|
21106
21372
|
let {
|
|
@@ -21109,16 +21375,16 @@ class FabricText extends StyledText {
|
|
|
21109
21375
|
return this.handleFiller(ctx, 'fillStyle', fill);
|
|
21110
21376
|
}
|
|
21111
21377
|
|
|
21112
|
-
/**
|
|
21113
|
-
* @private
|
|
21114
|
-
* @param {String} method
|
|
21115
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21116
|
-
* @param {Number} lineIndex
|
|
21117
|
-
* @param {Number} charIndex
|
|
21118
|
-
* @param {String} _char
|
|
21119
|
-
* @param {Number} left Left coordinate
|
|
21120
|
-
* @param {Number} top Top coordinate
|
|
21121
|
-
* @param {Number} lineHeight Height of the line
|
|
21378
|
+
/**
|
|
21379
|
+
* @private
|
|
21380
|
+
* @param {String} method
|
|
21381
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21382
|
+
* @param {Number} lineIndex
|
|
21383
|
+
* @param {Number} charIndex
|
|
21384
|
+
* @param {String} _char
|
|
21385
|
+
* @param {Number} left Left coordinate
|
|
21386
|
+
* @param {Number} top Top coordinate
|
|
21387
|
+
* @param {Number} lineHeight Height of the line
|
|
21122
21388
|
*/
|
|
21123
21389
|
_renderChar(method, ctx, lineIndex, charIndex, _char, left, top) {
|
|
21124
21390
|
const decl = this._getStyleDeclaration(lineIndex, charIndex),
|
|
@@ -21147,30 +21413,30 @@ class FabricText extends StyledText {
|
|
|
21147
21413
|
ctx.restore();
|
|
21148
21414
|
}
|
|
21149
21415
|
|
|
21150
|
-
/**
|
|
21151
|
-
* Turns the character into a 'superior figure' (i.e. 'superscript')
|
|
21152
|
-
* @param {Number} start selection start
|
|
21153
|
-
* @param {Number} end selection end
|
|
21416
|
+
/**
|
|
21417
|
+
* Turns the character into a 'superior figure' (i.e. 'superscript')
|
|
21418
|
+
* @param {Number} start selection start
|
|
21419
|
+
* @param {Number} end selection end
|
|
21154
21420
|
*/
|
|
21155
21421
|
setSuperscript(start, end) {
|
|
21156
21422
|
this._setScript(start, end, this.superscript);
|
|
21157
21423
|
}
|
|
21158
21424
|
|
|
21159
|
-
/**
|
|
21160
|
-
* Turns the character into an 'inferior figure' (i.e. 'subscript')
|
|
21161
|
-
* @param {Number} start selection start
|
|
21162
|
-
* @param {Number} end selection end
|
|
21425
|
+
/**
|
|
21426
|
+
* Turns the character into an 'inferior figure' (i.e. 'subscript')
|
|
21427
|
+
* @param {Number} start selection start
|
|
21428
|
+
* @param {Number} end selection end
|
|
21163
21429
|
*/
|
|
21164
21430
|
setSubscript(start, end) {
|
|
21165
21431
|
this._setScript(start, end, this.subscript);
|
|
21166
21432
|
}
|
|
21167
21433
|
|
|
21168
|
-
/**
|
|
21169
|
-
* Applies 'schema' at given position
|
|
21170
|
-
* @private
|
|
21171
|
-
* @param {Number} start selection start
|
|
21172
|
-
* @param {Number} end selection end
|
|
21173
|
-
* @param {Number} schema
|
|
21434
|
+
/**
|
|
21435
|
+
* Applies 'schema' at given position
|
|
21436
|
+
* @private
|
|
21437
|
+
* @param {Number} start selection start
|
|
21438
|
+
* @param {Number} end selection end
|
|
21439
|
+
* @param {Number} schema
|
|
21174
21440
|
*/
|
|
21175
21441
|
_setScript(start, end, schema) {
|
|
21176
21442
|
const loc = this.get2DCursorLocation(start, true),
|
|
@@ -21183,10 +21449,10 @@ class FabricText extends StyledText {
|
|
|
21183
21449
|
this.setSelectionStyles(style, start, end);
|
|
21184
21450
|
}
|
|
21185
21451
|
|
|
21186
|
-
/**
|
|
21187
|
-
* @private
|
|
21188
|
-
* @param {Number} lineIndex index text line
|
|
21189
|
-
* @return {Number} Line left offset
|
|
21452
|
+
/**
|
|
21453
|
+
* @private
|
|
21454
|
+
* @param {Number} lineIndex index text line
|
|
21455
|
+
* @return {Number} Line left offset
|
|
21190
21456
|
*/
|
|
21191
21457
|
_getLineLeftOffset(lineIndex) {
|
|
21192
21458
|
const lineWidth = this.getLineWidth(lineIndex),
|
|
@@ -21236,8 +21502,8 @@ class FabricText extends StyledText {
|
|
|
21236
21502
|
return leftOffset;
|
|
21237
21503
|
}
|
|
21238
21504
|
|
|
21239
|
-
/**
|
|
21240
|
-
* @private
|
|
21505
|
+
/**
|
|
21506
|
+
* @private
|
|
21241
21507
|
*/
|
|
21242
21508
|
_clearCache() {
|
|
21243
21509
|
this._forceClearCache = false;
|
|
@@ -21246,12 +21512,12 @@ class FabricText extends StyledText {
|
|
|
21246
21512
|
this.__charBounds = [];
|
|
21247
21513
|
}
|
|
21248
21514
|
|
|
21249
|
-
/**
|
|
21250
|
-
* Measure a single line given its index. Used to calculate the initial
|
|
21251
|
-
* text bounding box. The values are calculated and stored in __lineWidths cache.
|
|
21252
|
-
* @private
|
|
21253
|
-
* @param {Number} lineIndex line number
|
|
21254
|
-
* @return {Number} Line width
|
|
21515
|
+
/**
|
|
21516
|
+
* Measure a single line given its index. Used to calculate the initial
|
|
21517
|
+
* text bounding box. The values are calculated and stored in __lineWidths cache.
|
|
21518
|
+
* @private
|
|
21519
|
+
* @param {Number} lineIndex line number
|
|
21520
|
+
* @return {Number} Line width
|
|
21255
21521
|
*/
|
|
21256
21522
|
getLineWidth(lineIndex) {
|
|
21257
21523
|
if (this.__lineWidths[lineIndex] !== undefined) {
|
|
@@ -21270,12 +21536,12 @@ class FabricText extends StyledText {
|
|
|
21270
21536
|
return 0;
|
|
21271
21537
|
}
|
|
21272
21538
|
|
|
21273
|
-
/**
|
|
21274
|
-
* Retrieves the value of property at given character position
|
|
21275
|
-
* @param {Number} lineIndex the line number
|
|
21276
|
-
* @param {Number} charIndex the character number
|
|
21277
|
-
* @param {String} property the property name
|
|
21278
|
-
* @returns the value of 'property'
|
|
21539
|
+
/**
|
|
21540
|
+
* Retrieves the value of property at given character position
|
|
21541
|
+
* @param {Number} lineIndex the line number
|
|
21542
|
+
* @param {Number} charIndex the character number
|
|
21543
|
+
* @param {String} property the property name
|
|
21544
|
+
* @returns the value of 'property'
|
|
21279
21545
|
*/
|
|
21280
21546
|
getValueOfPropertyAt(lineIndex, charIndex, property) {
|
|
21281
21547
|
var _charStyle$property;
|
|
@@ -21283,9 +21549,9 @@ class FabricText extends StyledText {
|
|
|
21283
21549
|
return (_charStyle$property = charStyle[property]) !== null && _charStyle$property !== void 0 ? _charStyle$property : this[property];
|
|
21284
21550
|
}
|
|
21285
21551
|
|
|
21286
|
-
/**
|
|
21287
|
-
* @private
|
|
21288
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21552
|
+
/**
|
|
21553
|
+
* @private
|
|
21554
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21289
21555
|
*/
|
|
21290
21556
|
_renderTextDecoration(ctx, type) {
|
|
21291
21557
|
if (!this[type] && !this.styleHas(type)) {
|
|
@@ -21369,10 +21635,10 @@ class FabricText extends StyledText {
|
|
|
21369
21635
|
this._removeShadow(ctx);
|
|
21370
21636
|
}
|
|
21371
21637
|
|
|
21372
|
-
/**
|
|
21373
|
-
* return font declaration string for canvas context
|
|
21374
|
-
* @param {Object} [styleObject] object
|
|
21375
|
-
* @returns {String} font declaration formatted for canvas context.
|
|
21638
|
+
/**
|
|
21639
|
+
* return font declaration string for canvas context
|
|
21640
|
+
* @param {Object} [styleObject] object
|
|
21641
|
+
* @returns {String} font declaration formatted for canvas context.
|
|
21376
21642
|
*/
|
|
21377
21643
|
_getFontDeclaration() {
|
|
21378
21644
|
let {
|
|
@@ -21386,9 +21652,9 @@ class FabricText extends StyledText {
|
|
|
21386
21652
|
return [fontStyle, fontWeight, `${forMeasuring ? this.CACHE_FONT_SIZE : fontSize}px`, parsedFontFamily].join(' ');
|
|
21387
21653
|
}
|
|
21388
21654
|
|
|
21389
|
-
/**
|
|
21390
|
-
* Renders text instance on a specified context
|
|
21391
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21655
|
+
/**
|
|
21656
|
+
* Renders text instance on a specified context
|
|
21657
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21392
21658
|
*/
|
|
21393
21659
|
render(ctx) {
|
|
21394
21660
|
if (!this.visible) {
|
|
@@ -21403,22 +21669,22 @@ class FabricText extends StyledText {
|
|
|
21403
21669
|
super.render(ctx);
|
|
21404
21670
|
}
|
|
21405
21671
|
|
|
21406
|
-
/**
|
|
21407
|
-
* Override this method to customize grapheme splitting
|
|
21408
|
-
* @todo the util `graphemeSplit` needs to be injectable in some way.
|
|
21409
|
-
* is more comfortable to inject the correct util rather than having to override text
|
|
21410
|
-
* in the middle of the prototype chain
|
|
21411
|
-
* @param {string} value
|
|
21412
|
-
* @returns {string[]} array of graphemes
|
|
21672
|
+
/**
|
|
21673
|
+
* Override this method to customize grapheme splitting
|
|
21674
|
+
* @todo the util `graphemeSplit` needs to be injectable in some way.
|
|
21675
|
+
* is more comfortable to inject the correct util rather than having to override text
|
|
21676
|
+
* in the middle of the prototype chain
|
|
21677
|
+
* @param {string} value
|
|
21678
|
+
* @returns {string[]} array of graphemes
|
|
21413
21679
|
*/
|
|
21414
21680
|
graphemeSplit(value) {
|
|
21415
21681
|
return graphemeSplit(value);
|
|
21416
21682
|
}
|
|
21417
21683
|
|
|
21418
|
-
/**
|
|
21419
|
-
* Returns the text as an array of lines.
|
|
21420
|
-
* @param {String} text text to split
|
|
21421
|
-
* @returns Lines in the text
|
|
21684
|
+
/**
|
|
21685
|
+
* Returns the text as an array of lines.
|
|
21686
|
+
* @param {String} text text to split
|
|
21687
|
+
* @returns Lines in the text
|
|
21422
21688
|
*/
|
|
21423
21689
|
_splitTextIntoLines(text) {
|
|
21424
21690
|
const lines = text.split(this._reNewline),
|
|
@@ -21438,10 +21704,10 @@ class FabricText extends StyledText {
|
|
|
21438
21704
|
};
|
|
21439
21705
|
}
|
|
21440
21706
|
|
|
21441
|
-
/**
|
|
21442
|
-
* Returns object representation of an instance
|
|
21443
|
-
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
21444
|
-
* @return {Object} Object representation of an instance
|
|
21707
|
+
/**
|
|
21708
|
+
* Returns object representation of an instance
|
|
21709
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
21710
|
+
* @return {Object} Object representation of an instance
|
|
21445
21711
|
*/
|
|
21446
21712
|
toObject() {
|
|
21447
21713
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -21484,23 +21750,23 @@ class FabricText extends StyledText {
|
|
|
21484
21750
|
return this;
|
|
21485
21751
|
}
|
|
21486
21752
|
|
|
21487
|
-
/**
|
|
21488
|
-
* Returns complexity of an instance
|
|
21489
|
-
* @return {Number} complexity
|
|
21753
|
+
/**
|
|
21754
|
+
* Returns complexity of an instance
|
|
21755
|
+
* @return {Number} complexity
|
|
21490
21756
|
*/
|
|
21491
21757
|
complexity() {
|
|
21492
21758
|
return 1;
|
|
21493
21759
|
}
|
|
21494
21760
|
|
|
21495
|
-
/**
|
|
21496
|
-
* List of generic font families
|
|
21497
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
|
|
21761
|
+
/**
|
|
21762
|
+
* List of generic font families
|
|
21763
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
|
|
21498
21764
|
*/
|
|
21499
|
-
|
|
21500
|
-
/**
|
|
21501
|
-
* Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
|
|
21502
|
-
* @param {HTMLElement} element Element to parse
|
|
21503
|
-
* @param {Object} [options] Options object
|
|
21765
|
+
|
|
21766
|
+
/**
|
|
21767
|
+
* Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
|
|
21768
|
+
* @param {HTMLElement} element Element to parse
|
|
21769
|
+
* @param {Object} [options] Options object
|
|
21504
21770
|
*/
|
|
21505
21771
|
static async fromElement(element, options, cssRules) {
|
|
21506
21772
|
const parsedAttributes = parseAttributes(element, FabricText.ATTRIBUTE_NAMES, cssRules);
|
|
@@ -21539,10 +21805,10 @@ class FabricText extends StyledText {
|
|
|
21539
21805
|
scaledDiff = lineHeightDiff * textHeightScaleFactor,
|
|
21540
21806
|
textHeight = text.getScaledHeight() + scaledDiff;
|
|
21541
21807
|
let offX = 0;
|
|
21542
|
-
/*
|
|
21543
|
-
Adjust positioning:
|
|
21544
|
-
x/y attributes in SVG correspond to the bottom-left corner of text bounding box
|
|
21545
|
-
fabric output by default at top, left.
|
|
21808
|
+
/*
|
|
21809
|
+
Adjust positioning:
|
|
21810
|
+
x/y attributes in SVG correspond to the bottom-left corner of text bounding box
|
|
21811
|
+
fabric output by default at top, left.
|
|
21546
21812
|
*/
|
|
21547
21813
|
if (textAnchor === CENTER) {
|
|
21548
21814
|
offX = text.getScaledWidth() / 2;
|
|
@@ -21560,10 +21826,10 @@ class FabricText extends StyledText {
|
|
|
21560
21826
|
|
|
21561
21827
|
/* _FROM_SVG_END_ */
|
|
21562
21828
|
|
|
21563
|
-
/**
|
|
21564
|
-
* Returns FabricText instance from an object representation
|
|
21565
|
-
* @param {Object} object plain js Object to create an instance from
|
|
21566
|
-
* @returns {Promise<FabricText>}
|
|
21829
|
+
/**
|
|
21830
|
+
* Returns FabricText instance from an object representation
|
|
21831
|
+
* @param {Object} object plain js Object to create an instance from
|
|
21832
|
+
* @returns {Promise<FabricText>}
|
|
21567
21833
|
*/
|
|
21568
21834
|
static fromObject(object) {
|
|
21569
21835
|
return this._fromObject({
|
|
@@ -21574,10 +21840,10 @@ class FabricText extends StyledText {
|
|
|
21574
21840
|
});
|
|
21575
21841
|
}
|
|
21576
21842
|
}
|
|
21577
|
-
/**
|
|
21578
|
-
* Properties that requires a text layout recalculation when changed
|
|
21579
|
-
* @type string[]
|
|
21580
|
-
* @protected
|
|
21843
|
+
/**
|
|
21844
|
+
* Properties that requires a text layout recalculation when changed
|
|
21845
|
+
* @type string[]
|
|
21846
|
+
* @protected
|
|
21581
21847
|
*/
|
|
21582
21848
|
_defineProperty(FabricText, "textLayoutProperties", textLayoutProperties);
|
|
21583
21849
|
_defineProperty(FabricText, "cacheProperties", [...cacheProperties, ...additionalProps]);
|
|
@@ -21585,9 +21851,9 @@ _defineProperty(FabricText, "ownDefaults", textDefaultValues);
|
|
|
21585
21851
|
_defineProperty(FabricText, "type", 'Text');
|
|
21586
21852
|
_defineProperty(FabricText, "genericFonts", ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif', 'ui-monospace', 'ui-rounded', 'math', 'emoji', 'fangsong']);
|
|
21587
21853
|
/* _FROM_SVG_START_ */
|
|
21588
|
-
/**
|
|
21589
|
-
* List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
|
|
21590
|
-
* @see: http://www.w3.org/TR/SVG/text.html#TextElement
|
|
21854
|
+
/**
|
|
21855
|
+
* List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
|
|
21856
|
+
* @see: http://www.w3.org/TR/SVG/text.html#TextElement
|
|
21591
21857
|
*/
|
|
21592
21858
|
_defineProperty(FabricText, "ATTRIBUTE_NAMES", SHARED_ATTRIBUTES.concat('x', 'y', 'dx', 'dy', 'font-family', 'font-style', 'font-weight', 'font-size', 'letter-spacing', 'text-decoration', 'text-anchor'));
|
|
21593
21859
|
applyMixins(FabricText, [TextSVGExportMixin]);
|
|
@@ -21974,8 +22240,8 @@ class OverlayEditor {
|
|
|
21974
22240
|
// We don't need to save/restore them here as it would conflict with IText's restoration
|
|
21975
22241
|
}
|
|
21976
22242
|
|
|
21977
|
-
/**
|
|
21978
|
-
* Get the container element for the overlay (parent of upperCanvasEl)
|
|
22243
|
+
/**
|
|
22244
|
+
* Get the container element for the overlay (parent of upperCanvasEl)
|
|
21979
22245
|
*/
|
|
21980
22246
|
getCanvasContainer() {
|
|
21981
22247
|
const upperCanvas = this.canvas.upperCanvasEl;
|
|
@@ -21989,8 +22255,8 @@ class OverlayEditor {
|
|
|
21989
22255
|
return container;
|
|
21990
22256
|
}
|
|
21991
22257
|
|
|
21992
|
-
/**
|
|
21993
|
-
* Create the overlay DOM structure
|
|
22258
|
+
/**
|
|
22259
|
+
* Create the overlay DOM structure
|
|
21994
22260
|
*/
|
|
21995
22261
|
createOverlayDOM() {
|
|
21996
22262
|
// Host div for positioning and overflow control
|
|
@@ -22045,8 +22311,8 @@ class OverlayEditor {
|
|
|
22045
22311
|
document.body.appendChild(this.hostDiv);
|
|
22046
22312
|
}
|
|
22047
22313
|
|
|
22048
|
-
/**
|
|
22049
|
-
* Attach all event listeners
|
|
22314
|
+
/**
|
|
22315
|
+
* Attach all event listeners
|
|
22050
22316
|
*/
|
|
22051
22317
|
attachEventListeners() {
|
|
22052
22318
|
// Textarea events
|
|
@@ -22066,8 +22332,8 @@ class OverlayEditor {
|
|
|
22066
22332
|
this.setupViewportChangeDetection();
|
|
22067
22333
|
}
|
|
22068
22334
|
|
|
22069
|
-
/**
|
|
22070
|
-
* Remove all event listeners
|
|
22335
|
+
/**
|
|
22336
|
+
* Remove all event listeners
|
|
22071
22337
|
*/
|
|
22072
22338
|
removeEventListeners() {
|
|
22073
22339
|
this.textarea.removeEventListener('input', this.boundHandlers.onInput);
|
|
@@ -22084,16 +22350,16 @@ class OverlayEditor {
|
|
|
22084
22350
|
this.restoreViewportChangeDetection();
|
|
22085
22351
|
}
|
|
22086
22352
|
|
|
22087
|
-
/**
|
|
22088
|
-
* Simple method to refresh positioning when canvas changes
|
|
22353
|
+
/**
|
|
22354
|
+
* Simple method to refresh positioning when canvas changes
|
|
22089
22355
|
*/
|
|
22090
22356
|
updatePosition() {
|
|
22091
22357
|
this.applyOverlayStyle();
|
|
22092
22358
|
}
|
|
22093
22359
|
|
|
22094
|
-
/**
|
|
22095
|
-
* Update the Fabric object bounds to match current textarea size
|
|
22096
|
-
* This ensures Fabric.js selection controls follow the growing textbox
|
|
22360
|
+
/**
|
|
22361
|
+
* Update the Fabric object bounds to match current textarea size
|
|
22362
|
+
* This ensures Fabric.js selection controls follow the growing textbox
|
|
22097
22363
|
*/
|
|
22098
22364
|
updateObjectBounds() {
|
|
22099
22365
|
if (this.isDestroyed) return;
|
|
@@ -22127,15 +22393,15 @@ class OverlayEditor {
|
|
|
22127
22393
|
}
|
|
22128
22394
|
}
|
|
22129
22395
|
|
|
22130
|
-
/**
|
|
22131
|
-
* Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
|
|
22396
|
+
/**
|
|
22397
|
+
* Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
|
|
22132
22398
|
*/
|
|
22133
22399
|
letterSpacingPx(charSpacing, fontSize) {
|
|
22134
22400
|
return charSpacing / 1000 * fontSize;
|
|
22135
22401
|
}
|
|
22136
22402
|
|
|
22137
|
-
/**
|
|
22138
|
-
* Detect text direction using first strong directional character
|
|
22403
|
+
/**
|
|
22404
|
+
* Detect text direction using first strong directional character
|
|
22139
22405
|
*/
|
|
22140
22406
|
firstStrongDir(text) {
|
|
22141
22407
|
// Hebrew: \u0590-\u05FF, Arabic: \u0600-\u06FF, \u0750-\u077F, \uFB50-\uFDFF, \uFE70-\uFEFF
|
|
@@ -22365,8 +22631,8 @@ class OverlayEditor {
|
|
|
22365
22631
|
// Initial bounds are set correctly by Fabric.js - don't force update here
|
|
22366
22632
|
}
|
|
22367
22633
|
|
|
22368
|
-
/**
|
|
22369
|
-
* Debug method to compare textarea and canvas object bounding boxes
|
|
22634
|
+
/**
|
|
22635
|
+
* Debug method to compare textarea and canvas object bounding boxes
|
|
22370
22636
|
*/
|
|
22371
22637
|
debugBoundingBoxComparison() {
|
|
22372
22638
|
const target = this.target;
|
|
@@ -22436,8 +22702,8 @@ class OverlayEditor {
|
|
|
22436
22702
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
22437
22703
|
}
|
|
22438
22704
|
|
|
22439
|
-
/**
|
|
22440
|
-
* Debug method to compare text wrapping between textarea and Fabric text object
|
|
22705
|
+
/**
|
|
22706
|
+
* Debug method to compare text wrapping between textarea and Fabric text object
|
|
22441
22707
|
*/
|
|
22442
22708
|
debugTextWrapping() {
|
|
22443
22709
|
const target = this.target;
|
|
@@ -22522,8 +22788,8 @@ class OverlayEditor {
|
|
|
22522
22788
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
22523
22789
|
}
|
|
22524
22790
|
|
|
22525
|
-
/**
|
|
22526
|
-
* Focus the textarea and position cursor at end
|
|
22791
|
+
/**
|
|
22792
|
+
* Focus the textarea and position cursor at end
|
|
22527
22793
|
*/
|
|
22528
22794
|
focusTextarea() {
|
|
22529
22795
|
// For overlay editing, we want to keep the object in "selection mode" not "editing mode"
|
|
@@ -22558,8 +22824,8 @@ class OverlayEditor {
|
|
|
22558
22824
|
this.canvas.requestRenderAll();
|
|
22559
22825
|
}
|
|
22560
22826
|
|
|
22561
|
-
/**
|
|
22562
|
-
* Refresh overlay positioning and styling
|
|
22827
|
+
/**
|
|
22828
|
+
* Refresh overlay positioning and styling
|
|
22563
22829
|
*/
|
|
22564
22830
|
refresh() {
|
|
22565
22831
|
if (this.isDestroyed) return;
|
|
@@ -22567,8 +22833,8 @@ class OverlayEditor {
|
|
|
22567
22833
|
// Don't update object bounds on every refresh - only when textarea actually resizes
|
|
22568
22834
|
}
|
|
22569
22835
|
|
|
22570
|
-
/**
|
|
22571
|
-
* Destroy the overlay editor
|
|
22836
|
+
/**
|
|
22837
|
+
* Destroy the overlay editor
|
|
22572
22838
|
*/
|
|
22573
22839
|
destroy() {
|
|
22574
22840
|
let commit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
@@ -22736,8 +23002,8 @@ class OverlayEditor {
|
|
|
22736
23002
|
}
|
|
22737
23003
|
}
|
|
22738
23004
|
|
|
22739
|
-
/**
|
|
22740
|
-
* Setup detection for viewport changes (zoom/pan)
|
|
23005
|
+
/**
|
|
23006
|
+
* Setup detection for viewport changes (zoom/pan)
|
|
22741
23007
|
*/
|
|
22742
23008
|
setupViewportChangeDetection() {
|
|
22743
23009
|
// Store original methods
|
|
@@ -22766,8 +23032,8 @@ class OverlayEditor {
|
|
|
22766
23032
|
};
|
|
22767
23033
|
}
|
|
22768
23034
|
|
|
22769
|
-
/**
|
|
22770
|
-
* Restore original viewport methods
|
|
23035
|
+
/**
|
|
23036
|
+
* Restore original viewport methods
|
|
22771
23037
|
*/
|
|
22772
23038
|
restoreViewportChangeDetection() {
|
|
22773
23039
|
if (this.canvas.__originalSetZoom) {
|
|
@@ -22782,8 +23048,8 @@ class OverlayEditor {
|
|
|
22782
23048
|
}
|
|
22783
23049
|
}
|
|
22784
23050
|
|
|
22785
|
-
/**
|
|
22786
|
-
* Enter overlay text editing mode for a text object
|
|
23051
|
+
/**
|
|
23052
|
+
* Enter overlay text editing mode for a text object
|
|
22787
23053
|
*/
|
|
22788
23054
|
function enterTextOverlayEdit(canvas, target, options) {
|
|
22789
23055
|
// If already in overlay editing, destroy existing editor first
|
|
@@ -22807,35 +23073,35 @@ function enterTextOverlayEdit(canvas, target, options) {
|
|
|
22807
23073
|
return editor;
|
|
22808
23074
|
}
|
|
22809
23075
|
|
|
22810
|
-
/**
|
|
22811
|
-
* extend this regex to support non english languages
|
|
22812
|
-
*
|
|
22813
|
-
* - ` ` Matches a SPACE character (char code 32).
|
|
22814
|
-
* - `\n` Matches a LINE FEED character (char code 10).
|
|
22815
|
-
* - `.` Matches a "." character (char code 46).
|
|
22816
|
-
* - `,` Matches a "," character (char code 44).
|
|
22817
|
-
* - `;` Matches a ";" character (char code 59).
|
|
22818
|
-
* - `!` Matches a "!" character (char code 33).
|
|
22819
|
-
* - `\?` Matches a "?" character (char code 63).
|
|
22820
|
-
* - `\-` Matches a "-" character (char code 45).
|
|
23076
|
+
/**
|
|
23077
|
+
* extend this regex to support non english languages
|
|
23078
|
+
*
|
|
23079
|
+
* - ` ` Matches a SPACE character (char code 32).
|
|
23080
|
+
* - `\n` Matches a LINE FEED character (char code 10).
|
|
23081
|
+
* - `.` Matches a "." character (char code 46).
|
|
23082
|
+
* - `,` Matches a "," character (char code 44).
|
|
23083
|
+
* - `;` Matches a ";" character (char code 59).
|
|
23084
|
+
* - `!` Matches a "!" character (char code 33).
|
|
23085
|
+
* - `\?` Matches a "?" character (char code 63).
|
|
23086
|
+
* - `\-` Matches a "-" character (char code 45).
|
|
22821
23087
|
*/
|
|
22822
23088
|
// eslint-disable-next-line no-useless-escape
|
|
22823
23089
|
const reNonWord = /[ \n\.,;!\?\-]/;
|
|
22824
23090
|
class ITextBehavior extends FabricText {
|
|
22825
23091
|
constructor() {
|
|
22826
23092
|
super(...arguments);
|
|
22827
|
-
/**
|
|
22828
|
-
* Helps determining when the text is in composition, so that the cursor
|
|
22829
|
-
* rendering is altered.
|
|
23093
|
+
/**
|
|
23094
|
+
* Helps determining when the text is in composition, so that the cursor
|
|
23095
|
+
* rendering is altered.
|
|
22830
23096
|
*/
|
|
22831
23097
|
_defineProperty(this, "_currentCursorOpacity", 1);
|
|
22832
23098
|
}
|
|
22833
|
-
/**
|
|
22834
|
-
* Keeps track if the IText object was selected before the actual click.
|
|
22835
|
-
* This because we want to delay enter editing by a click.
|
|
23099
|
+
/**
|
|
23100
|
+
* Keeps track if the IText object was selected before the actual click.
|
|
23101
|
+
* This because we want to delay enter editing by a click.
|
|
22836
23102
|
*/
|
|
22837
|
-
/**
|
|
22838
|
-
* Initializes all the interactive behavior of IText
|
|
23103
|
+
/**
|
|
23104
|
+
* Initializes all the interactive behavior of IText
|
|
22839
23105
|
*/
|
|
22840
23106
|
initBehavior() {
|
|
22841
23107
|
this._tick = this._tick.bind(this);
|
|
@@ -22848,8 +23114,8 @@ class ITextBehavior extends FabricText {
|
|
|
22848
23114
|
return super.onDeselect(options);
|
|
22849
23115
|
}
|
|
22850
23116
|
|
|
22851
|
-
/**
|
|
22852
|
-
* @private
|
|
23117
|
+
/**
|
|
23118
|
+
* @private
|
|
22853
23119
|
*/
|
|
22854
23120
|
_animateCursor(_ref) {
|
|
22855
23121
|
let {
|
|
@@ -22874,8 +23140,8 @@ class ITextBehavior extends FabricText {
|
|
|
22874
23140
|
});
|
|
22875
23141
|
}
|
|
22876
23142
|
|
|
22877
|
-
/**
|
|
22878
|
-
* changes the cursor from visible to invisible
|
|
23143
|
+
/**
|
|
23144
|
+
* changes the cursor from visible to invisible
|
|
22879
23145
|
*/
|
|
22880
23146
|
_tick(delay) {
|
|
22881
23147
|
this._currentTickState = this._animateCursor({
|
|
@@ -22886,8 +23152,8 @@ class ITextBehavior extends FabricText {
|
|
|
22886
23152
|
});
|
|
22887
23153
|
}
|
|
22888
23154
|
|
|
22889
|
-
/**
|
|
22890
|
-
* Changes the cursor from invisible to visible
|
|
23155
|
+
/**
|
|
23156
|
+
* Changes the cursor from invisible to visible
|
|
22891
23157
|
*/
|
|
22892
23158
|
_onTickComplete() {
|
|
22893
23159
|
var _this$_currentTickCom;
|
|
@@ -22899,16 +23165,16 @@ class ITextBehavior extends FabricText {
|
|
|
22899
23165
|
});
|
|
22900
23166
|
}
|
|
22901
23167
|
|
|
22902
|
-
/**
|
|
22903
|
-
* Initializes delayed cursor
|
|
23168
|
+
/**
|
|
23169
|
+
* Initializes delayed cursor
|
|
22904
23170
|
*/
|
|
22905
23171
|
initDelayedCursor(restart) {
|
|
22906
23172
|
this.abortCursorAnimation();
|
|
22907
23173
|
this._tick(restart ? 0 : this.cursorDelay);
|
|
22908
23174
|
}
|
|
22909
23175
|
|
|
22910
|
-
/**
|
|
22911
|
-
* Aborts cursor animation, clears all timeouts and clear textarea context if necessary
|
|
23176
|
+
/**
|
|
23177
|
+
* Aborts cursor animation, clears all timeouts and clear textarea context if necessary
|
|
22912
23178
|
*/
|
|
22913
23179
|
abortCursorAnimation() {
|
|
22914
23180
|
let shouldClear = false;
|
|
@@ -22926,9 +23192,9 @@ class ITextBehavior extends FabricText {
|
|
|
22926
23192
|
}
|
|
22927
23193
|
}
|
|
22928
23194
|
|
|
22929
|
-
/**
|
|
22930
|
-
* Restart tue cursor animation if either is in complete state ( between animations )
|
|
22931
|
-
* or if it never started before
|
|
23195
|
+
/**
|
|
23196
|
+
* Restart tue cursor animation if either is in complete state ( between animations )
|
|
23197
|
+
* or if it never started before
|
|
22932
23198
|
*/
|
|
22933
23199
|
restartCursorIfNeeded() {
|
|
22934
23200
|
if ([this._currentTickState, this._currentTickCompleteState].some(cursorAnimation => !cursorAnimation || cursorAnimation.isDone())) {
|
|
@@ -22936,8 +23202,8 @@ class ITextBehavior extends FabricText {
|
|
|
22936
23202
|
}
|
|
22937
23203
|
}
|
|
22938
23204
|
|
|
22939
|
-
/**
|
|
22940
|
-
* Selects entire text
|
|
23205
|
+
/**
|
|
23206
|
+
* Selects entire text
|
|
22941
23207
|
*/
|
|
22942
23208
|
selectAll() {
|
|
22943
23209
|
this.selectionStart = 0;
|
|
@@ -22947,26 +23213,26 @@ class ITextBehavior extends FabricText {
|
|
|
22947
23213
|
return this;
|
|
22948
23214
|
}
|
|
22949
23215
|
|
|
22950
|
-
/**
|
|
22951
|
-
* Selects entire text and updates the visual state
|
|
23216
|
+
/**
|
|
23217
|
+
* Selects entire text and updates the visual state
|
|
22952
23218
|
*/
|
|
22953
23219
|
cmdAll() {
|
|
22954
23220
|
this.selectAll();
|
|
22955
23221
|
this.renderCursorOrSelection();
|
|
22956
23222
|
}
|
|
22957
23223
|
|
|
22958
|
-
/**
|
|
22959
|
-
* Returns selected text
|
|
22960
|
-
* @return {String}
|
|
23224
|
+
/**
|
|
23225
|
+
* Returns selected text
|
|
23226
|
+
* @return {String}
|
|
22961
23227
|
*/
|
|
22962
23228
|
getSelectedText() {
|
|
22963
23229
|
return this._text.slice(this.selectionStart, this.selectionEnd).join('');
|
|
22964
23230
|
}
|
|
22965
23231
|
|
|
22966
|
-
/**
|
|
22967
|
-
* Find new selection index representing start of current word according to current selection index
|
|
22968
|
-
* @param {Number} startFrom Current selection index
|
|
22969
|
-
* @return {Number} New selection index
|
|
23232
|
+
/**
|
|
23233
|
+
* Find new selection index representing start of current word according to current selection index
|
|
23234
|
+
* @param {Number} startFrom Current selection index
|
|
23235
|
+
* @return {Number} New selection index
|
|
22970
23236
|
*/
|
|
22971
23237
|
findWordBoundaryLeft(startFrom) {
|
|
22972
23238
|
let offset = 0,
|
|
@@ -22986,10 +23252,10 @@ class ITextBehavior extends FabricText {
|
|
|
22986
23252
|
return startFrom - offset;
|
|
22987
23253
|
}
|
|
22988
23254
|
|
|
22989
|
-
/**
|
|
22990
|
-
* Find new selection index representing end of current word according to current selection index
|
|
22991
|
-
* @param {Number} startFrom Current selection index
|
|
22992
|
-
* @return {Number} New selection index
|
|
23255
|
+
/**
|
|
23256
|
+
* Find new selection index representing end of current word according to current selection index
|
|
23257
|
+
* @param {Number} startFrom Current selection index
|
|
23258
|
+
* @return {Number} New selection index
|
|
22993
23259
|
*/
|
|
22994
23260
|
findWordBoundaryRight(startFrom) {
|
|
22995
23261
|
let offset = 0,
|
|
@@ -23009,10 +23275,10 @@ class ITextBehavior extends FabricText {
|
|
|
23009
23275
|
return startFrom + offset;
|
|
23010
23276
|
}
|
|
23011
23277
|
|
|
23012
|
-
/**
|
|
23013
|
-
* Find new selection index representing start of current line according to current selection index
|
|
23014
|
-
* @param {Number} startFrom Current selection index
|
|
23015
|
-
* @return {Number} New selection index
|
|
23278
|
+
/**
|
|
23279
|
+
* Find new selection index representing start of current line according to current selection index
|
|
23280
|
+
* @param {Number} startFrom Current selection index
|
|
23281
|
+
* @return {Number} New selection index
|
|
23016
23282
|
*/
|
|
23017
23283
|
findLineBoundaryLeft(startFrom) {
|
|
23018
23284
|
let offset = 0,
|
|
@@ -23024,10 +23290,10 @@ class ITextBehavior extends FabricText {
|
|
|
23024
23290
|
return startFrom - offset;
|
|
23025
23291
|
}
|
|
23026
23292
|
|
|
23027
|
-
/**
|
|
23028
|
-
* Find new selection index representing end of current line according to current selection index
|
|
23029
|
-
* @param {Number} startFrom Current selection index
|
|
23030
|
-
* @return {Number} New selection index
|
|
23293
|
+
/**
|
|
23294
|
+
* Find new selection index representing end of current line according to current selection index
|
|
23295
|
+
* @param {Number} startFrom Current selection index
|
|
23296
|
+
* @return {Number} New selection index
|
|
23031
23297
|
*/
|
|
23032
23298
|
findLineBoundaryRight(startFrom) {
|
|
23033
23299
|
let offset = 0,
|
|
@@ -23039,11 +23305,11 @@ class ITextBehavior extends FabricText {
|
|
|
23039
23305
|
return startFrom + offset;
|
|
23040
23306
|
}
|
|
23041
23307
|
|
|
23042
|
-
/**
|
|
23043
|
-
* Finds index corresponding to beginning or end of a word
|
|
23044
|
-
* @param {Number} selectionStart Index of a character
|
|
23045
|
-
* @param {Number} direction 1 or -1
|
|
23046
|
-
* @return {Number} Index of the beginning or end of a word
|
|
23308
|
+
/**
|
|
23309
|
+
* Finds index corresponding to beginning or end of a word
|
|
23310
|
+
* @param {Number} selectionStart Index of a character
|
|
23311
|
+
* @param {Number} direction 1 or -1
|
|
23312
|
+
* @return {Number} Index of the beginning or end of a word
|
|
23047
23313
|
*/
|
|
23048
23314
|
searchWordBoundary(selectionStart, direction) {
|
|
23049
23315
|
const text = this._text;
|
|
@@ -23061,9 +23327,9 @@ class ITextBehavior extends FabricText {
|
|
|
23061
23327
|
return index;
|
|
23062
23328
|
}
|
|
23063
23329
|
|
|
23064
|
-
/**
|
|
23065
|
-
* Selects the word that contains the char at index selectionStart
|
|
23066
|
-
* @param {Number} selectionStart Index of a character
|
|
23330
|
+
/**
|
|
23331
|
+
* Selects the word that contains the char at index selectionStart
|
|
23332
|
+
* @param {Number} selectionStart Index of a character
|
|
23067
23333
|
*/
|
|
23068
23334
|
selectWord(selectionStart) {
|
|
23069
23335
|
selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
|
|
@@ -23079,9 +23345,9 @@ class ITextBehavior extends FabricText {
|
|
|
23079
23345
|
this.renderCursorOrSelection();
|
|
23080
23346
|
}
|
|
23081
23347
|
|
|
23082
|
-
/**
|
|
23083
|
-
* Selects the line that contains selectionStart
|
|
23084
|
-
* @param {Number} selectionStart Index of a character
|
|
23348
|
+
/**
|
|
23349
|
+
* Selects the line that contains selectionStart
|
|
23350
|
+
* @param {Number} selectionStart Index of a character
|
|
23085
23351
|
*/
|
|
23086
23352
|
selectLine(selectionStart) {
|
|
23087
23353
|
selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
|
|
@@ -23093,8 +23359,8 @@ class ITextBehavior extends FabricText {
|
|
|
23093
23359
|
this._updateTextarea();
|
|
23094
23360
|
}
|
|
23095
23361
|
|
|
23096
|
-
/**
|
|
23097
|
-
* Enters editing state
|
|
23362
|
+
/**
|
|
23363
|
+
* Enters editing state
|
|
23098
23364
|
*/
|
|
23099
23365
|
enterEditing(e) {
|
|
23100
23366
|
if (this.isEditing || !this.editable) {
|
|
@@ -23114,8 +23380,8 @@ class ITextBehavior extends FabricText {
|
|
|
23114
23380
|
}
|
|
23115
23381
|
}
|
|
23116
23382
|
|
|
23117
|
-
/**
|
|
23118
|
-
* runs the actual logic that enter from editing state, see {@link enterEditing}
|
|
23383
|
+
/**
|
|
23384
|
+
* runs the actual logic that enter from editing state, see {@link enterEditing}
|
|
23119
23385
|
*/
|
|
23120
23386
|
enterEditingImpl() {
|
|
23121
23387
|
if (this.canvas) {
|
|
@@ -23139,8 +23405,8 @@ class ITextBehavior extends FabricText {
|
|
|
23139
23405
|
}
|
|
23140
23406
|
}
|
|
23141
23407
|
|
|
23142
|
-
/**
|
|
23143
|
-
* Enter overlay editing mode using DOM textarea overlay
|
|
23408
|
+
/**
|
|
23409
|
+
* Enter overlay editing mode using DOM textarea overlay
|
|
23144
23410
|
*/
|
|
23145
23411
|
enterOverlayEditing() {
|
|
23146
23412
|
this._saveEditingProps();
|
|
@@ -23161,8 +23427,8 @@ class ITextBehavior extends FabricText {
|
|
|
23161
23427
|
});
|
|
23162
23428
|
}
|
|
23163
23429
|
|
|
23164
|
-
/**
|
|
23165
|
-
* Commit overlay editing changes
|
|
23430
|
+
/**
|
|
23431
|
+
* Commit overlay editing changes
|
|
23166
23432
|
*/
|
|
23167
23433
|
commitOverlayEdit(text) {
|
|
23168
23434
|
const overlayEditor = this.__overlayEditor;
|
|
@@ -23186,8 +23452,8 @@ class ITextBehavior extends FabricText {
|
|
|
23186
23452
|
this.canvas && this.canvas.requestRenderAll();
|
|
23187
23453
|
}
|
|
23188
23454
|
|
|
23189
|
-
/**
|
|
23190
|
-
* Cancel overlay editing without changes
|
|
23455
|
+
/**
|
|
23456
|
+
* Cancel overlay editing without changes
|
|
23191
23457
|
*/
|
|
23192
23458
|
cancelOverlayEdit() {
|
|
23193
23459
|
// Restore original text
|
|
@@ -23195,8 +23461,8 @@ class ITextBehavior extends FabricText {
|
|
|
23195
23461
|
this.exitEditing();
|
|
23196
23462
|
}
|
|
23197
23463
|
|
|
23198
|
-
/**
|
|
23199
|
-
* called by {@link Canvas#textEditingManager}
|
|
23464
|
+
/**
|
|
23465
|
+
* called by {@link Canvas#textEditingManager}
|
|
23200
23466
|
*/
|
|
23201
23467
|
updateSelectionOnMouseMove(e) {
|
|
23202
23468
|
if (this.getActiveControl()) {
|
|
@@ -23224,8 +23490,8 @@ class ITextBehavior extends FabricText {
|
|
|
23224
23490
|
}
|
|
23225
23491
|
}
|
|
23226
23492
|
|
|
23227
|
-
/**
|
|
23228
|
-
* @private
|
|
23493
|
+
/**
|
|
23494
|
+
* @private
|
|
23229
23495
|
*/
|
|
23230
23496
|
_setEditingProps() {
|
|
23231
23497
|
this.hoverCursor = 'text';
|
|
@@ -23237,8 +23503,8 @@ class ITextBehavior extends FabricText {
|
|
|
23237
23503
|
this.lockMovementX = this.lockMovementY = true;
|
|
23238
23504
|
}
|
|
23239
23505
|
|
|
23240
|
-
/**
|
|
23241
|
-
* convert from textarea to grapheme indexes
|
|
23506
|
+
/**
|
|
23507
|
+
* convert from textarea to grapheme indexes
|
|
23242
23508
|
*/
|
|
23243
23509
|
fromStringToGraphemeSelection(start, end, text) {
|
|
23244
23510
|
const smallerTextStart = text.slice(0, start),
|
|
@@ -23257,8 +23523,8 @@ class ITextBehavior extends FabricText {
|
|
|
23257
23523
|
};
|
|
23258
23524
|
}
|
|
23259
23525
|
|
|
23260
|
-
/**
|
|
23261
|
-
* convert from fabric to textarea values
|
|
23526
|
+
/**
|
|
23527
|
+
* convert from fabric to textarea values
|
|
23262
23528
|
*/
|
|
23263
23529
|
fromGraphemeToStringSelection(start, end, graphemes) {
|
|
23264
23530
|
const smallerTextStart = graphemes.slice(0, start),
|
|
@@ -23277,8 +23543,8 @@ class ITextBehavior extends FabricText {
|
|
|
23277
23543
|
};
|
|
23278
23544
|
}
|
|
23279
23545
|
|
|
23280
|
-
/**
|
|
23281
|
-
* @private
|
|
23546
|
+
/**
|
|
23547
|
+
* @private
|
|
23282
23548
|
*/
|
|
23283
23549
|
_updateTextarea() {
|
|
23284
23550
|
this.cursorOffsetCache = {};
|
|
@@ -23293,8 +23559,8 @@ class ITextBehavior extends FabricText {
|
|
|
23293
23559
|
this.updateTextareaPosition();
|
|
23294
23560
|
}
|
|
23295
23561
|
|
|
23296
|
-
/**
|
|
23297
|
-
* @private
|
|
23562
|
+
/**
|
|
23563
|
+
* @private
|
|
23298
23564
|
*/
|
|
23299
23565
|
updateFromTextArea() {
|
|
23300
23566
|
if (!this.hiddenTextarea) {
|
|
@@ -23314,8 +23580,8 @@ class ITextBehavior extends FabricText {
|
|
|
23314
23580
|
this.updateTextareaPosition();
|
|
23315
23581
|
}
|
|
23316
23582
|
|
|
23317
|
-
/**
|
|
23318
|
-
* @private
|
|
23583
|
+
/**
|
|
23584
|
+
* @private
|
|
23319
23585
|
*/
|
|
23320
23586
|
updateTextareaPosition() {
|
|
23321
23587
|
if (this.selectionStart === this.selectionEnd) {
|
|
@@ -23325,9 +23591,9 @@ class ITextBehavior extends FabricText {
|
|
|
23325
23591
|
}
|
|
23326
23592
|
}
|
|
23327
23593
|
|
|
23328
|
-
/**
|
|
23329
|
-
* @private
|
|
23330
|
-
* @return {Object} style contains style for hiddenTextarea
|
|
23594
|
+
/**
|
|
23595
|
+
* @private
|
|
23596
|
+
* @return {Object} style contains style for hiddenTextarea
|
|
23331
23597
|
*/
|
|
23332
23598
|
_calcTextareaPosition() {
|
|
23333
23599
|
if (!this.canvas) {
|
|
@@ -23374,8 +23640,8 @@ class ITextBehavior extends FabricText {
|
|
|
23374
23640
|
};
|
|
23375
23641
|
}
|
|
23376
23642
|
|
|
23377
|
-
/**
|
|
23378
|
-
* @private
|
|
23643
|
+
/**
|
|
23644
|
+
* @private
|
|
23379
23645
|
*/
|
|
23380
23646
|
_saveEditingProps() {
|
|
23381
23647
|
this._savedProps = {
|
|
@@ -23392,8 +23658,8 @@ class ITextBehavior extends FabricText {
|
|
|
23392
23658
|
};
|
|
23393
23659
|
}
|
|
23394
23660
|
|
|
23395
|
-
/**
|
|
23396
|
-
* @private
|
|
23661
|
+
/**
|
|
23662
|
+
* @private
|
|
23397
23663
|
*/
|
|
23398
23664
|
_restoreEditingProps() {
|
|
23399
23665
|
if (!this._savedProps) {
|
|
@@ -23413,9 +23679,9 @@ class ITextBehavior extends FabricText {
|
|
|
23413
23679
|
delete this._savedProps;
|
|
23414
23680
|
}
|
|
23415
23681
|
|
|
23416
|
-
/**
|
|
23417
|
-
* runs the actual logic that exits from editing state, see {@link exitEditing}
|
|
23418
|
-
* But it does not fire events
|
|
23682
|
+
/**
|
|
23683
|
+
* runs the actual logic that exits from editing state, see {@link exitEditing}
|
|
23684
|
+
* But it does not fire events
|
|
23419
23685
|
*/
|
|
23420
23686
|
exitEditingImpl() {
|
|
23421
23687
|
const hiddenTextarea = this.hiddenTextarea;
|
|
@@ -23436,8 +23702,8 @@ class ITextBehavior extends FabricText {
|
|
|
23436
23702
|
}
|
|
23437
23703
|
}
|
|
23438
23704
|
|
|
23439
|
-
/**
|
|
23440
|
-
* Exits from editing state and fires relevant events
|
|
23705
|
+
/**
|
|
23706
|
+
* Exits from editing state and fires relevant events
|
|
23441
23707
|
*/
|
|
23442
23708
|
exitEditing() {
|
|
23443
23709
|
const isTextChanged = this._textBeforeEdit !== this.text;
|
|
@@ -23456,8 +23722,8 @@ class ITextBehavior extends FabricText {
|
|
|
23456
23722
|
return this;
|
|
23457
23723
|
}
|
|
23458
23724
|
|
|
23459
|
-
/**
|
|
23460
|
-
* @private
|
|
23725
|
+
/**
|
|
23726
|
+
* @private
|
|
23461
23727
|
*/
|
|
23462
23728
|
_removeExtraneousStyles() {
|
|
23463
23729
|
for (const prop in this.styles) {
|
|
@@ -23467,10 +23733,10 @@ class ITextBehavior extends FabricText {
|
|
|
23467
23733
|
}
|
|
23468
23734
|
}
|
|
23469
23735
|
|
|
23470
|
-
/**
|
|
23471
|
-
* remove and reflow a style block from start to end.
|
|
23472
|
-
* @param {Number} start linear start position for removal (included in removal)
|
|
23473
|
-
* @param {Number} end linear end position for removal ( excluded from removal )
|
|
23736
|
+
/**
|
|
23737
|
+
* remove and reflow a style block from start to end.
|
|
23738
|
+
* @param {Number} start linear start position for removal (included in removal)
|
|
23739
|
+
* @param {Number} end linear end position for removal ( excluded from removal )
|
|
23474
23740
|
*/
|
|
23475
23741
|
removeStyleFromTo(start, end) {
|
|
23476
23742
|
const {
|
|
@@ -23523,10 +23789,10 @@ class ITextBehavior extends FabricText {
|
|
|
23523
23789
|
}
|
|
23524
23790
|
}
|
|
23525
23791
|
|
|
23526
|
-
/**
|
|
23527
|
-
* Shifts line styles up or down
|
|
23528
|
-
* @param {Number} lineIndex Index of a line
|
|
23529
|
-
* @param {Number} offset Can any number?
|
|
23792
|
+
/**
|
|
23793
|
+
* Shifts line styles up or down
|
|
23794
|
+
* @param {Number} lineIndex Index of a line
|
|
23795
|
+
* @param {Number} offset Can any number?
|
|
23530
23796
|
*/
|
|
23531
23797
|
shiftLineStyles(lineIndex, offset) {
|
|
23532
23798
|
const clonedStyles = Object.assign({}, this.styles);
|
|
@@ -23541,15 +23807,15 @@ class ITextBehavior extends FabricText {
|
|
|
23541
23807
|
}
|
|
23542
23808
|
}
|
|
23543
23809
|
|
|
23544
|
-
/**
|
|
23545
|
-
* Handle insertion of more consecutive style lines for when one or more
|
|
23546
|
-
* newlines gets added to the text. Since current style needs to be shifted
|
|
23547
|
-
* first we shift the current style of the number lines needed, then we add
|
|
23548
|
-
* new lines from the last to the first.
|
|
23549
|
-
* @param {Number} lineIndex Index of a line
|
|
23550
|
-
* @param {Number} charIndex Index of a char
|
|
23551
|
-
* @param {Number} qty number of lines to add
|
|
23552
|
-
* @param {Array} copiedStyle Array of objects styles
|
|
23810
|
+
/**
|
|
23811
|
+
* Handle insertion of more consecutive style lines for when one or more
|
|
23812
|
+
* newlines gets added to the text. Since current style needs to be shifted
|
|
23813
|
+
* first we shift the current style of the number lines needed, then we add
|
|
23814
|
+
* new lines from the last to the first.
|
|
23815
|
+
* @param {Number} lineIndex Index of a line
|
|
23816
|
+
* @param {Number} charIndex Index of a char
|
|
23817
|
+
* @param {Number} qty number of lines to add
|
|
23818
|
+
* @param {Array} copiedStyle Array of objects styles
|
|
23553
23819
|
*/
|
|
23554
23820
|
insertNewlineStyleObject(lineIndex, charIndex, qty, copiedStyle) {
|
|
23555
23821
|
const newLineStyles = {};
|
|
@@ -23609,12 +23875,12 @@ class ITextBehavior extends FabricText {
|
|
|
23609
23875
|
this._forceClearCache = true;
|
|
23610
23876
|
}
|
|
23611
23877
|
|
|
23612
|
-
/**
|
|
23613
|
-
* Inserts style object for a given line/char index
|
|
23614
|
-
* @param {Number} lineIndex Index of a line
|
|
23615
|
-
* @param {Number} charIndex Index of a char
|
|
23616
|
-
* @param {Number} quantity number Style object to insert, if given
|
|
23617
|
-
* @param {Array} copiedStyle array of style objects
|
|
23878
|
+
/**
|
|
23879
|
+
* Inserts style object for a given line/char index
|
|
23880
|
+
* @param {Number} lineIndex Index of a line
|
|
23881
|
+
* @param {Number} charIndex Index of a char
|
|
23882
|
+
* @param {Number} quantity number Style object to insert, if given
|
|
23883
|
+
* @param {Array} copiedStyle array of style objects
|
|
23618
23884
|
*/
|
|
23619
23885
|
insertCharStyleObject(lineIndex, charIndex, quantity, copiedStyle) {
|
|
23620
23886
|
if (!this.styles) {
|
|
@@ -23663,11 +23929,11 @@ class ITextBehavior extends FabricText {
|
|
|
23663
23929
|
}
|
|
23664
23930
|
}
|
|
23665
23931
|
|
|
23666
|
-
/**
|
|
23667
|
-
* Inserts style object(s)
|
|
23668
|
-
* @param {Array} insertedText Characters at the location where style is inserted
|
|
23669
|
-
* @param {Number} start cursor index for inserting style
|
|
23670
|
-
* @param {Array} [copiedStyle] array of style objects to insert.
|
|
23932
|
+
/**
|
|
23933
|
+
* Inserts style object(s)
|
|
23934
|
+
* @param {Array} insertedText Characters at the location where style is inserted
|
|
23935
|
+
* @param {Number} start cursor index for inserting style
|
|
23936
|
+
* @param {Array} [copiedStyle] array of style objects to insert.
|
|
23671
23937
|
*/
|
|
23672
23938
|
insertNewStyleBlock(insertedText, start, copiedStyle) {
|
|
23673
23939
|
const cursorLoc = this.get2DCursorLocation(start, true),
|
|
@@ -23708,12 +23974,12 @@ class ITextBehavior extends FabricText {
|
|
|
23708
23974
|
}
|
|
23709
23975
|
}
|
|
23710
23976
|
|
|
23711
|
-
/**
|
|
23712
|
-
* Removes characters from start/end
|
|
23713
|
-
* start/end ar per grapheme position in _text array.
|
|
23714
|
-
*
|
|
23715
|
-
* @param {Number} start
|
|
23716
|
-
* @param {Number} end default to start + 1
|
|
23977
|
+
/**
|
|
23978
|
+
* Removes characters from start/end
|
|
23979
|
+
* start/end ar per grapheme position in _text array.
|
|
23980
|
+
*
|
|
23981
|
+
* @param {Number} start
|
|
23982
|
+
* @param {Number} end default to start + 1
|
|
23717
23983
|
*/
|
|
23718
23984
|
removeChars(start) {
|
|
23719
23985
|
let end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : start + 1;
|
|
@@ -23726,17 +23992,17 @@ class ITextBehavior extends FabricText {
|
|
|
23726
23992
|
this._removeExtraneousStyles();
|
|
23727
23993
|
}
|
|
23728
23994
|
|
|
23729
|
-
/**
|
|
23730
|
-
* insert characters at start position, before start position.
|
|
23731
|
-
* start equal 1 it means the text get inserted between actual grapheme 0 and 1
|
|
23732
|
-
* if style array is provided, it must be as the same length of text in graphemes
|
|
23733
|
-
* if end is provided and is bigger than start, old text is replaced.
|
|
23734
|
-
* start/end ar per grapheme position in _text array.
|
|
23735
|
-
*
|
|
23736
|
-
* @param {String} text text to insert
|
|
23737
|
-
* @param {Array} style array of style objects
|
|
23738
|
-
* @param {Number} start
|
|
23739
|
-
* @param {Number} end default to start + 1
|
|
23995
|
+
/**
|
|
23996
|
+
* insert characters at start position, before start position.
|
|
23997
|
+
* start equal 1 it means the text get inserted between actual grapheme 0 and 1
|
|
23998
|
+
* if style array is provided, it must be as the same length of text in graphemes
|
|
23999
|
+
* if end is provided and is bigger than start, old text is replaced.
|
|
24000
|
+
* start/end ar per grapheme position in _text array.
|
|
24001
|
+
*
|
|
24002
|
+
* @param {String} text text to insert
|
|
24003
|
+
* @param {Array} style array of style objects
|
|
24004
|
+
* @param {Number} start
|
|
24005
|
+
* @param {Number} end default to start + 1
|
|
23740
24006
|
*/
|
|
23741
24007
|
insertChars(text, style, start) {
|
|
23742
24008
|
let end = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : start;
|
|
@@ -23753,9 +24019,9 @@ class ITextBehavior extends FabricText {
|
|
|
23753
24019
|
this._removeExtraneousStyles();
|
|
23754
24020
|
}
|
|
23755
24021
|
|
|
23756
|
-
/**
|
|
23757
|
-
* Set the selectionStart and selectionEnd according to the new position of cursor
|
|
23758
|
-
* mimic the key - mouse navigation when shift is pressed.
|
|
24022
|
+
/**
|
|
24023
|
+
* Set the selectionStart and selectionEnd according to the new position of cursor
|
|
24024
|
+
* mimic the key - mouse navigation when shift is pressed.
|
|
23759
24025
|
*/
|
|
23760
24026
|
setSelectionStartEndWithShift(start, end, newSelection) {
|
|
23761
24027
|
if (newSelection <= start) {
|
|
@@ -24378,8 +24644,8 @@ class ITextKeyBehavior extends ITextBehavior {
|
|
|
24378
24644
|
}
|
|
24379
24645
|
}
|
|
24380
24646
|
|
|
24381
|
-
/**
|
|
24382
|
-
* `LEFT_CLICK === 0`
|
|
24647
|
+
/**
|
|
24648
|
+
* `LEFT_CLICK === 0`
|
|
24383
24649
|
*/
|
|
24384
24650
|
const notALeftClick = e => !!e.button;
|
|
24385
24651
|
class ITextClickBehavior extends ITextKeyBehavior {
|
|
@@ -24397,36 +24663,36 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24397
24663
|
super.initBehavior();
|
|
24398
24664
|
}
|
|
24399
24665
|
|
|
24400
|
-
/**
|
|
24401
|
-
* If this method returns true a mouse move operation over a text selection
|
|
24402
|
-
* will not prevent the native mouse event allowing the browser to start a drag operation.
|
|
24403
|
-
* shouldStartDragging can be read 'do not prevent default for mouse move event'
|
|
24404
|
-
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24405
|
-
* @returns
|
|
24666
|
+
/**
|
|
24667
|
+
* If this method returns true a mouse move operation over a text selection
|
|
24668
|
+
* will not prevent the native mouse event allowing the browser to start a drag operation.
|
|
24669
|
+
* shouldStartDragging can be read 'do not prevent default for mouse move event'
|
|
24670
|
+
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24671
|
+
* @returns
|
|
24406
24672
|
*/
|
|
24407
24673
|
shouldStartDragging() {
|
|
24408
24674
|
return this.draggableTextDelegate.isActive();
|
|
24409
24675
|
}
|
|
24410
24676
|
|
|
24411
|
-
/**
|
|
24412
|
-
* @public override this method to control whether instance should/shouldn't become a drag source,
|
|
24413
|
-
* @see also {@link DraggableTextDelegate#isActive}
|
|
24414
|
-
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24415
|
-
* @returns {boolean} should handle event
|
|
24677
|
+
/**
|
|
24678
|
+
* @public override this method to control whether instance should/shouldn't become a drag source,
|
|
24679
|
+
* @see also {@link DraggableTextDelegate#isActive}
|
|
24680
|
+
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24681
|
+
* @returns {boolean} should handle event
|
|
24416
24682
|
*/
|
|
24417
24683
|
onDragStart(e) {
|
|
24418
24684
|
return this.draggableTextDelegate.onDragStart(e);
|
|
24419
24685
|
}
|
|
24420
24686
|
|
|
24421
|
-
/**
|
|
24422
|
-
* @public override this method to control whether instance should/shouldn't become a drop target
|
|
24687
|
+
/**
|
|
24688
|
+
* @public override this method to control whether instance should/shouldn't become a drop target
|
|
24423
24689
|
*/
|
|
24424
24690
|
canDrop(e) {
|
|
24425
24691
|
return this.draggableTextDelegate.canDrop(e);
|
|
24426
24692
|
}
|
|
24427
24693
|
|
|
24428
|
-
/**
|
|
24429
|
-
* Default handler for double click, select a word or enter overlay editing
|
|
24694
|
+
/**
|
|
24695
|
+
* Default handler for double click, select a word or enter overlay editing
|
|
24430
24696
|
*/
|
|
24431
24697
|
doubleClickHandler(options) {
|
|
24432
24698
|
// Check if we should enter overlay editing mode
|
|
@@ -24443,8 +24709,8 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24443
24709
|
this.renderCursorOrSelection();
|
|
24444
24710
|
}
|
|
24445
24711
|
|
|
24446
|
-
/**
|
|
24447
|
-
* Default handler for triple click, select a line
|
|
24712
|
+
/**
|
|
24713
|
+
* Default handler for triple click, select a line
|
|
24448
24714
|
*/
|
|
24449
24715
|
tripleClickHandler(options) {
|
|
24450
24716
|
if (!this.isEditing) {
|
|
@@ -24454,13 +24720,13 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24454
24720
|
this.renderCursorOrSelection();
|
|
24455
24721
|
}
|
|
24456
24722
|
|
|
24457
|
-
/**
|
|
24458
|
-
* Default event handler for the basic functionalities needed on _mouseDown
|
|
24459
|
-
* can be overridden to do something different.
|
|
24460
|
-
* Scope of this implementation is: find the click position, set selectionStart
|
|
24461
|
-
* find selectionEnd, initialize the drawing of either cursor or selection area
|
|
24462
|
-
* initializing a mousedDown on a text area will cancel fabricjs knowledge of
|
|
24463
|
-
* current compositionMode. It will be set to false.
|
|
24723
|
+
/**
|
|
24724
|
+
* Default event handler for the basic functionalities needed on _mouseDown
|
|
24725
|
+
* can be overridden to do something different.
|
|
24726
|
+
* Scope of this implementation is: find the click position, set selectionStart
|
|
24727
|
+
* find selectionEnd, initialize the drawing of either cursor or selection area
|
|
24728
|
+
* initializing a mousedDown on a text area will cancel fabricjs knowledge of
|
|
24729
|
+
* current compositionMode. It will be set to false.
|
|
24464
24730
|
*/
|
|
24465
24731
|
_mouseDownHandler(_ref) {
|
|
24466
24732
|
let {
|
|
@@ -24488,9 +24754,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24488
24754
|
this.selected || (this.selected = alreadySelected || this.isEditing);
|
|
24489
24755
|
}
|
|
24490
24756
|
|
|
24491
|
-
/**
|
|
24492
|
-
* standard handler for mouse up, overridable
|
|
24493
|
-
* @private
|
|
24757
|
+
/**
|
|
24758
|
+
* standard handler for mouse up, overridable
|
|
24759
|
+
* @private
|
|
24494
24760
|
*/
|
|
24495
24761
|
mouseUpHandler(_ref2) {
|
|
24496
24762
|
let {
|
|
@@ -24521,9 +24787,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24521
24787
|
}
|
|
24522
24788
|
}
|
|
24523
24789
|
|
|
24524
|
-
/**
|
|
24525
|
-
* Changes cursor location in a text depending on passed pointer (x/y) object
|
|
24526
|
-
* @param {TPointerEvent} e Event object
|
|
24790
|
+
/**
|
|
24791
|
+
* Changes cursor location in a text depending on passed pointer (x/y) object
|
|
24792
|
+
* @param {TPointerEvent} e Event object
|
|
24527
24793
|
*/
|
|
24528
24794
|
setCursorByClick(e) {
|
|
24529
24795
|
const newSelection = this.getSelectionStartFromPointer(e),
|
|
@@ -24541,10 +24807,10 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24541
24807
|
}
|
|
24542
24808
|
}
|
|
24543
24809
|
|
|
24544
|
-
/**
|
|
24545
|
-
* Returns index of a character corresponding to where an object was clicked
|
|
24546
|
-
* @param {TPointerEvent} e Event object
|
|
24547
|
-
* @return {Number} Index of a character
|
|
24810
|
+
/**
|
|
24811
|
+
* Returns index of a character corresponding to where an object was clicked
|
|
24812
|
+
* @param {TPointerEvent} e Event object
|
|
24813
|
+
* @return {Number} Index of a character
|
|
24548
24814
|
*/
|
|
24549
24815
|
getSelectionStartFromPointer(e) {
|
|
24550
24816
|
const mouseOffset = this.canvas.getScenePoint(e).transform(invertTransform(this.calcTransformMatrix())).add(new Point(-this._getLeftOffset(), -this._getTopOffset()));
|
|
@@ -24590,15 +24856,15 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24590
24856
|
}
|
|
24591
24857
|
}
|
|
24592
24858
|
|
|
24593
|
-
/**
|
|
24594
|
-
* Hit Testing and Cursor Positioning System
|
|
24595
|
-
*
|
|
24596
|
-
* Maps pointer coordinates to text positions and provides cursor rectangles
|
|
24597
|
-
* for interactive text editing with grapheme-aware boundaries.
|
|
24859
|
+
/**
|
|
24860
|
+
* Hit Testing and Cursor Positioning System
|
|
24861
|
+
*
|
|
24862
|
+
* Maps pointer coordinates to text positions and provides cursor rectangles
|
|
24863
|
+
* for interactive text editing with grapheme-aware boundaries.
|
|
24598
24864
|
*/
|
|
24599
24865
|
|
|
24600
|
-
/**
|
|
24601
|
-
* Hit test a point against laid out text to find insertion position
|
|
24866
|
+
/**
|
|
24867
|
+
* Hit test a point against laid out text to find insertion position
|
|
24602
24868
|
*/
|
|
24603
24869
|
function hitTest(x, y, layout, options) {
|
|
24604
24870
|
if (layout.lines.length === 0) {
|
|
@@ -24642,8 +24908,8 @@ function hitTest(x, y, layout, options) {
|
|
|
24642
24908
|
};
|
|
24643
24909
|
}
|
|
24644
24910
|
|
|
24645
|
-
/**
|
|
24646
|
-
* Get cursor rectangle for a given insertion index
|
|
24911
|
+
/**
|
|
24912
|
+
* Get cursor rectangle for a given insertion index
|
|
24647
24913
|
*/
|
|
24648
24914
|
function getCursorRect(insertionIndex, layout, options) {
|
|
24649
24915
|
if (layout.lines.length === 0) {
|
|
@@ -24690,8 +24956,8 @@ function getCursorRect(insertionIndex, layout, options) {
|
|
|
24690
24956
|
|
|
24691
24957
|
// Private helper functions
|
|
24692
24958
|
|
|
24693
|
-
/**
|
|
24694
|
-
* Find which line contains the given Y coordinate
|
|
24959
|
+
/**
|
|
24960
|
+
* Find which line contains the given Y coordinate
|
|
24695
24961
|
*/
|
|
24696
24962
|
function findLineAtY(y, lines) {
|
|
24697
24963
|
var _lines;
|
|
@@ -24714,8 +24980,8 @@ function findLineAtY(y, lines) {
|
|
|
24714
24980
|
};
|
|
24715
24981
|
}
|
|
24716
24982
|
|
|
24717
|
-
/**
|
|
24718
|
-
* Find character position within a line at given X coordinate
|
|
24983
|
+
/**
|
|
24984
|
+
* Find character position within a line at given X coordinate
|
|
24719
24985
|
*/
|
|
24720
24986
|
function findCharAtX(x, line, options) {
|
|
24721
24987
|
if (line.bounds.length === 0) {
|
|
@@ -24821,8 +25087,8 @@ function findCharAtX(x, line, options) {
|
|
|
24821
25087
|
};
|
|
24822
25088
|
}
|
|
24823
25089
|
|
|
24824
|
-
/**
|
|
24825
|
-
* Calculate total insertion index from line and character indices
|
|
25090
|
+
/**
|
|
25091
|
+
* Calculate total insertion index from line and character indices
|
|
24826
25092
|
*/
|
|
24827
25093
|
function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
|
|
24828
25094
|
let insertionIndex = 0;
|
|
@@ -24841,8 +25107,8 @@ function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
|
|
|
24841
25107
|
return insertionIndex;
|
|
24842
25108
|
}
|
|
24843
25109
|
|
|
24844
|
-
/**
|
|
24845
|
-
* Find line and grapheme position from insertion index
|
|
25110
|
+
/**
|
|
25111
|
+
* Find line and grapheme position from insertion index
|
|
24846
25112
|
*/
|
|
24847
25113
|
function findPositionFromIndex(insertionIndex, layout) {
|
|
24848
25114
|
let currentIndex = 0;
|
|
@@ -24884,8 +25150,8 @@ function findPositionFromIndex(insertionIndex, layout) {
|
|
|
24884
25150
|
};
|
|
24885
25151
|
}
|
|
24886
25152
|
|
|
24887
|
-
/**
|
|
24888
|
-
* Calculate Y position of a line
|
|
25153
|
+
/**
|
|
25154
|
+
* Calculate Y position of a line
|
|
24889
25155
|
*/
|
|
24890
25156
|
function calculateLineY(lineIndex, layout, options) {
|
|
24891
25157
|
let y = 0;
|
|
@@ -24988,48 +25254,48 @@ const iTextDefaultValues = {
|
|
|
24988
25254
|
|
|
24989
25255
|
// @TODO this is not complete
|
|
24990
25256
|
|
|
24991
|
-
/**
|
|
24992
|
-
* @fires changed
|
|
24993
|
-
* @fires selection:changed
|
|
24994
|
-
* @fires editing:entered
|
|
24995
|
-
* @fires editing:exited
|
|
24996
|
-
* @fires dragstart
|
|
24997
|
-
* @fires drag drag event firing on the drag source
|
|
24998
|
-
* @fires dragend
|
|
24999
|
-
* @fires copy
|
|
25000
|
-
* @fires cut
|
|
25001
|
-
* @fires paste
|
|
25002
|
-
*
|
|
25003
|
-
* #### Supported key combinations
|
|
25004
|
-
* ```
|
|
25005
|
-
* Move cursor: left, right, up, down
|
|
25006
|
-
* Select character: shift + left, shift + right
|
|
25007
|
-
* Select text vertically: shift + up, shift + down
|
|
25008
|
-
* Move cursor by word: alt + left, alt + right
|
|
25009
|
-
* Select words: shift + alt + left, shift + alt + right
|
|
25010
|
-
* Move cursor to line start/end: cmd + left, cmd + right or home, end
|
|
25011
|
-
* Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
|
|
25012
|
-
* Jump to start/end of text: cmd + up, cmd + down
|
|
25013
|
-
* Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
|
|
25014
|
-
* Delete character: backspace
|
|
25015
|
-
* Delete word: alt + backspace
|
|
25016
|
-
* Delete line: cmd + backspace
|
|
25017
|
-
* Forward delete: delete
|
|
25018
|
-
* Copy text: ctrl/cmd + c
|
|
25019
|
-
* Paste text: ctrl/cmd + v
|
|
25020
|
-
* Cut text: ctrl/cmd + x
|
|
25021
|
-
* Select entire text: ctrl/cmd + a
|
|
25022
|
-
* Quit editing tab or esc
|
|
25023
|
-
* ```
|
|
25024
|
-
*
|
|
25025
|
-
* #### Supported mouse/touch combination
|
|
25026
|
-
* ```
|
|
25027
|
-
* Position cursor: click/touch
|
|
25028
|
-
* Create selection: click/touch & drag
|
|
25029
|
-
* Create selection: click & shift + click
|
|
25030
|
-
* Select word: double click
|
|
25031
|
-
* Select line: triple click
|
|
25032
|
-
* ```
|
|
25257
|
+
/**
|
|
25258
|
+
* @fires changed
|
|
25259
|
+
* @fires selection:changed
|
|
25260
|
+
* @fires editing:entered
|
|
25261
|
+
* @fires editing:exited
|
|
25262
|
+
* @fires dragstart
|
|
25263
|
+
* @fires drag drag event firing on the drag source
|
|
25264
|
+
* @fires dragend
|
|
25265
|
+
* @fires copy
|
|
25266
|
+
* @fires cut
|
|
25267
|
+
* @fires paste
|
|
25268
|
+
*
|
|
25269
|
+
* #### Supported key combinations
|
|
25270
|
+
* ```
|
|
25271
|
+
* Move cursor: left, right, up, down
|
|
25272
|
+
* Select character: shift + left, shift + right
|
|
25273
|
+
* Select text vertically: shift + up, shift + down
|
|
25274
|
+
* Move cursor by word: alt + left, alt + right
|
|
25275
|
+
* Select words: shift + alt + left, shift + alt + right
|
|
25276
|
+
* Move cursor to line start/end: cmd + left, cmd + right or home, end
|
|
25277
|
+
* Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
|
|
25278
|
+
* Jump to start/end of text: cmd + up, cmd + down
|
|
25279
|
+
* Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
|
|
25280
|
+
* Delete character: backspace
|
|
25281
|
+
* Delete word: alt + backspace
|
|
25282
|
+
* Delete line: cmd + backspace
|
|
25283
|
+
* Forward delete: delete
|
|
25284
|
+
* Copy text: ctrl/cmd + c
|
|
25285
|
+
* Paste text: ctrl/cmd + v
|
|
25286
|
+
* Cut text: ctrl/cmd + x
|
|
25287
|
+
* Select entire text: ctrl/cmd + a
|
|
25288
|
+
* Quit editing tab or esc
|
|
25289
|
+
* ```
|
|
25290
|
+
*
|
|
25291
|
+
* #### Supported mouse/touch combination
|
|
25292
|
+
* ```
|
|
25293
|
+
* Position cursor: click/touch
|
|
25294
|
+
* Create selection: click/touch & drag
|
|
25295
|
+
* Create selection: click & shift + click
|
|
25296
|
+
* Select word: double click
|
|
25297
|
+
* Select line: triple click
|
|
25298
|
+
* ```
|
|
25033
25299
|
*/
|
|
25034
25300
|
class IText extends ITextClickBehavior {
|
|
25035
25301
|
static getDefaults() {
|
|
@@ -25044,10 +25310,10 @@ class IText extends ITextClickBehavior {
|
|
|
25044
25310
|
return type === 'itext' ? 'i-text' : type;
|
|
25045
25311
|
}
|
|
25046
25312
|
|
|
25047
|
-
/**
|
|
25048
|
-
* Constructor
|
|
25049
|
-
* @param {String} text Text string
|
|
25050
|
-
* @param {Object} [options] Options object
|
|
25313
|
+
/**
|
|
25314
|
+
* Constructor
|
|
25315
|
+
* @param {String} text Text string
|
|
25316
|
+
* @param {Object} [options] Options object
|
|
25051
25317
|
*/
|
|
25052
25318
|
constructor(text, options) {
|
|
25053
25319
|
super(text, {
|
|
@@ -25057,11 +25323,11 @@ class IText extends ITextClickBehavior {
|
|
|
25057
25323
|
this.initBehavior();
|
|
25058
25324
|
}
|
|
25059
25325
|
|
|
25060
|
-
/**
|
|
25061
|
-
* While editing handle differently
|
|
25062
|
-
* @private
|
|
25063
|
-
* @param {string} key
|
|
25064
|
-
* @param {*} value
|
|
25326
|
+
/**
|
|
25327
|
+
* While editing handle differently
|
|
25328
|
+
* @private
|
|
25329
|
+
* @param {string} key
|
|
25330
|
+
* @param {*} value
|
|
25065
25331
|
*/
|
|
25066
25332
|
_set(key, value) {
|
|
25067
25333
|
if (this.isEditing && this._savedProps && key in this._savedProps) {
|
|
@@ -25076,28 +25342,28 @@ class IText extends ITextClickBehavior {
|
|
|
25076
25342
|
return super._set(key, value);
|
|
25077
25343
|
}
|
|
25078
25344
|
|
|
25079
|
-
/**
|
|
25080
|
-
* Sets selection start (left boundary of a selection)
|
|
25081
|
-
* @param {Number} index Index to set selection start to
|
|
25345
|
+
/**
|
|
25346
|
+
* Sets selection start (left boundary of a selection)
|
|
25347
|
+
* @param {Number} index Index to set selection start to
|
|
25082
25348
|
*/
|
|
25083
25349
|
setSelectionStart(index) {
|
|
25084
25350
|
index = Math.max(index, 0);
|
|
25085
25351
|
this._updateAndFire('selectionStart', index);
|
|
25086
25352
|
}
|
|
25087
25353
|
|
|
25088
|
-
/**
|
|
25089
|
-
* Sets selection end (right boundary of a selection)
|
|
25090
|
-
* @param {Number} index Index to set selection end to
|
|
25354
|
+
/**
|
|
25355
|
+
* Sets selection end (right boundary of a selection)
|
|
25356
|
+
* @param {Number} index Index to set selection end to
|
|
25091
25357
|
*/
|
|
25092
25358
|
setSelectionEnd(index) {
|
|
25093
25359
|
index = Math.min(index, this.text.length);
|
|
25094
25360
|
this._updateAndFire('selectionEnd', index);
|
|
25095
25361
|
}
|
|
25096
25362
|
|
|
25097
|
-
/**
|
|
25098
|
-
* @private
|
|
25099
|
-
* @param {String} property 'selectionStart' or 'selectionEnd'
|
|
25100
|
-
* @param {Number} index new position of property
|
|
25363
|
+
/**
|
|
25364
|
+
* @private
|
|
25365
|
+
* @param {String} property 'selectionStart' or 'selectionEnd'
|
|
25366
|
+
* @param {Number} index new position of property
|
|
25101
25367
|
*/
|
|
25102
25368
|
_updateAndFire(property, index) {
|
|
25103
25369
|
if (this[property] !== index) {
|
|
@@ -25107,9 +25373,9 @@ class IText extends ITextClickBehavior {
|
|
|
25107
25373
|
this._updateTextarea();
|
|
25108
25374
|
}
|
|
25109
25375
|
|
|
25110
|
-
/**
|
|
25111
|
-
* Fires the even of selection changed
|
|
25112
|
-
* @private
|
|
25376
|
+
/**
|
|
25377
|
+
* Fires the even of selection changed
|
|
25378
|
+
* @private
|
|
25113
25379
|
*/
|
|
25114
25380
|
_fireSelectionChanged() {
|
|
25115
25381
|
this.fire('selection:changed');
|
|
@@ -25118,25 +25384,25 @@ class IText extends ITextClickBehavior {
|
|
|
25118
25384
|
});
|
|
25119
25385
|
}
|
|
25120
25386
|
|
|
25121
|
-
/**
|
|
25122
|
-
* Initialize text dimensions. Render all text on given context
|
|
25123
|
-
* or on a offscreen canvas to get the text width with measureText.
|
|
25124
|
-
* Updates this.width and this.height with the proper values.
|
|
25125
|
-
* Does not return dimensions.
|
|
25126
|
-
* @private
|
|
25387
|
+
/**
|
|
25388
|
+
* Initialize text dimensions. Render all text on given context
|
|
25389
|
+
* or on a offscreen canvas to get the text width with measureText.
|
|
25390
|
+
* Updates this.width and this.height with the proper values.
|
|
25391
|
+
* Does not return dimensions.
|
|
25392
|
+
* @private
|
|
25127
25393
|
*/
|
|
25128
25394
|
initDimensions() {
|
|
25129
25395
|
this.isEditing && this.initDelayedCursor();
|
|
25130
25396
|
super.initDimensions();
|
|
25131
25397
|
}
|
|
25132
25398
|
|
|
25133
|
-
/**
|
|
25134
|
-
* Gets style of a current selection/cursor (at the start position)
|
|
25135
|
-
* if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
|
|
25136
|
-
* @param {Number} startIndex Start index to get styles at
|
|
25137
|
-
* @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25138
|
-
* @param {Boolean} [complete] get full style or not
|
|
25139
|
-
* @return {Array} styles an array with one, zero or more Style objects
|
|
25399
|
+
/**
|
|
25400
|
+
* Gets style of a current selection/cursor (at the start position)
|
|
25401
|
+
* if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
|
|
25402
|
+
* @param {Number} startIndex Start index to get styles at
|
|
25403
|
+
* @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25404
|
+
* @param {Boolean} [complete] get full style or not
|
|
25405
|
+
* @return {Array} styles an array with one, zero or more Style objects
|
|
25140
25406
|
*/
|
|
25141
25407
|
getSelectionStyles() {
|
|
25142
25408
|
let startIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart || 0;
|
|
@@ -25145,11 +25411,11 @@ class IText extends ITextClickBehavior {
|
|
|
25145
25411
|
return super.getSelectionStyles(startIndex, endIndex, complete);
|
|
25146
25412
|
}
|
|
25147
25413
|
|
|
25148
|
-
/**
|
|
25149
|
-
* Sets style of a current selection, if no selection exist, do not set anything.
|
|
25150
|
-
* @param {Object} [styles] Styles object
|
|
25151
|
-
* @param {Number} [startIndex] Start index to get styles at
|
|
25152
|
-
* @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25414
|
+
/**
|
|
25415
|
+
* Sets style of a current selection, if no selection exist, do not set anything.
|
|
25416
|
+
* @param {Object} [styles] Styles object
|
|
25417
|
+
* @param {Number} [startIndex] Start index to get styles at
|
|
25418
|
+
* @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25153
25419
|
*/
|
|
25154
25420
|
setSelectionStyles(styles) {
|
|
25155
25421
|
let startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selectionStart || 0;
|
|
@@ -25157,10 +25423,10 @@ class IText extends ITextClickBehavior {
|
|
|
25157
25423
|
return super.setSelectionStyles(styles, startIndex, endIndex);
|
|
25158
25424
|
}
|
|
25159
25425
|
|
|
25160
|
-
/**
|
|
25161
|
-
* Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
|
|
25162
|
-
* @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
|
|
25163
|
-
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
25426
|
+
/**
|
|
25427
|
+
* Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
|
|
25428
|
+
* @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
|
|
25429
|
+
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
25164
25430
|
*/
|
|
25165
25431
|
get2DCursorLocation() {
|
|
25166
25432
|
let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -25168,9 +25434,9 @@ class IText extends ITextClickBehavior {
|
|
|
25168
25434
|
return super.get2DCursorLocation(selectionStart, skipWrapping);
|
|
25169
25435
|
}
|
|
25170
25436
|
|
|
25171
|
-
/**
|
|
25172
|
-
* @private
|
|
25173
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
25437
|
+
/**
|
|
25438
|
+
* @private
|
|
25439
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
25174
25440
|
*/
|
|
25175
25441
|
render(ctx) {
|
|
25176
25442
|
super.render(ctx);
|
|
@@ -25180,9 +25446,9 @@ class IText extends ITextClickBehavior {
|
|
|
25180
25446
|
this.renderCursorOrSelection();
|
|
25181
25447
|
}
|
|
25182
25448
|
|
|
25183
|
-
/**
|
|
25184
|
-
* @override block cursor/selection logic while rendering the exported canvas
|
|
25185
|
-
* @todo this workaround should be replaced with a more robust solution
|
|
25449
|
+
/**
|
|
25450
|
+
* @override block cursor/selection logic while rendering the exported canvas
|
|
25451
|
+
* @todo this workaround should be replaced with a more robust solution
|
|
25186
25452
|
*/
|
|
25187
25453
|
toCanvasElement(options) {
|
|
25188
25454
|
const isEditing = this.isEditing;
|
|
@@ -25192,9 +25458,9 @@ class IText extends ITextClickBehavior {
|
|
|
25192
25458
|
return canvas;
|
|
25193
25459
|
}
|
|
25194
25460
|
|
|
25195
|
-
/**
|
|
25196
|
-
* Renders cursor or selection (depending on what exists)
|
|
25197
|
-
* it does on the contextTop. If contextTop is not available, do nothing.
|
|
25461
|
+
/**
|
|
25462
|
+
* Renders cursor or selection (depending on what exists)
|
|
25463
|
+
* it does on the contextTop. If contextTop is not available, do nothing.
|
|
25198
25464
|
*/
|
|
25199
25465
|
renderCursorOrSelection() {
|
|
25200
25466
|
if (!this.isEditing || !this.canvas) {
|
|
@@ -25250,12 +25516,12 @@ class IText extends ITextClickBehavior {
|
|
|
25250
25516
|
ctx.restore();
|
|
25251
25517
|
}
|
|
25252
25518
|
|
|
25253
|
-
/**
|
|
25254
|
-
* Finds and returns an array of clip paths that are applied to the parent
|
|
25255
|
-
* group(s) of the current FabricObject instance. The object's hierarchy is
|
|
25256
|
-
* traversed upwards (from the current object towards the root of the canvas),
|
|
25257
|
-
* checking each parent object for the presence of a `clipPath` that is not
|
|
25258
|
-
* absolutely positioned.
|
|
25519
|
+
/**
|
|
25520
|
+
* Finds and returns an array of clip paths that are applied to the parent
|
|
25521
|
+
* group(s) of the current FabricObject instance. The object's hierarchy is
|
|
25522
|
+
* traversed upwards (from the current object towards the root of the canvas),
|
|
25523
|
+
* checking each parent object for the presence of a `clipPath` that is not
|
|
25524
|
+
* absolutely positioned.
|
|
25259
25525
|
*/
|
|
25260
25526
|
findAncestorsWithClipPath() {
|
|
25261
25527
|
const clipPathAncestors = [];
|
|
@@ -25270,13 +25536,13 @@ class IText extends ITextClickBehavior {
|
|
|
25270
25536
|
return clipPathAncestors;
|
|
25271
25537
|
}
|
|
25272
25538
|
|
|
25273
|
-
/**
|
|
25274
|
-
* Returns cursor boundaries (left, top, leftOffset, topOffset)
|
|
25275
|
-
* left/top are left/top of entire text box
|
|
25276
|
-
* leftOffset/topOffset are offset from that left/top point of a text box
|
|
25277
|
-
* @private
|
|
25278
|
-
* @param {number} [index] index from start
|
|
25279
|
-
* @param {boolean} [skipCaching]
|
|
25539
|
+
/**
|
|
25540
|
+
* Returns cursor boundaries (left, top, leftOffset, topOffset)
|
|
25541
|
+
* left/top are left/top of entire text box
|
|
25542
|
+
* leftOffset/topOffset are offset from that left/top point of a text box
|
|
25543
|
+
* @private
|
|
25544
|
+
* @param {number} [index] index from start
|
|
25545
|
+
* @param {boolean} [skipCaching]
|
|
25280
25546
|
*/
|
|
25281
25547
|
_getCursorBoundaries() {
|
|
25282
25548
|
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -25290,11 +25556,11 @@ class IText extends ITextClickBehavior {
|
|
|
25290
25556
|
return this._getCursorBoundariesOriginal(index, skipCaching);
|
|
25291
25557
|
}
|
|
25292
25558
|
|
|
25293
|
-
/**
|
|
25294
|
-
* Caches and returns cursor left/top offset relative to instance's center point
|
|
25295
|
-
* @private
|
|
25296
|
-
* @param {number} index index from start
|
|
25297
|
-
* @param {boolean} [skipCaching]
|
|
25559
|
+
/**
|
|
25560
|
+
* Caches and returns cursor left/top offset relative to instance's center point
|
|
25561
|
+
* @private
|
|
25562
|
+
* @param {number} index index from start
|
|
25563
|
+
* @param {boolean} [skipCaching]
|
|
25298
25564
|
*/
|
|
25299
25565
|
_getCursorBoundariesOffsets(index, skipCaching) {
|
|
25300
25566
|
if (skipCaching) {
|
|
@@ -25306,9 +25572,9 @@ class IText extends ITextClickBehavior {
|
|
|
25306
25572
|
return this.cursorOffsetCache = this.__getCursorBoundariesOffsets(index);
|
|
25307
25573
|
}
|
|
25308
25574
|
|
|
25309
|
-
/**
|
|
25310
|
-
* Enhanced cursor boundaries using advanced hit testing when available
|
|
25311
|
-
* @private
|
|
25575
|
+
/**
|
|
25576
|
+
* Enhanced cursor boundaries using advanced hit testing when available
|
|
25577
|
+
* @private
|
|
25312
25578
|
*/
|
|
25313
25579
|
_getCursorBoundariesAdvanced(index) {
|
|
25314
25580
|
if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
|
|
@@ -25324,9 +25590,9 @@ class IText extends ITextClickBehavior {
|
|
|
25324
25590
|
};
|
|
25325
25591
|
}
|
|
25326
25592
|
|
|
25327
|
-
/**
|
|
25328
|
-
* Enhanced selection start from pointer using BiDi-aware hit testing
|
|
25329
|
-
* @override
|
|
25593
|
+
/**
|
|
25594
|
+
* Enhanced selection start from pointer using BiDi-aware hit testing
|
|
25595
|
+
* @override
|
|
25330
25596
|
*/
|
|
25331
25597
|
getSelectionStartFromPointer(e) {
|
|
25332
25598
|
if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
|
|
@@ -25340,9 +25606,9 @@ class IText extends ITextClickBehavior {
|
|
|
25340
25606
|
return Math.min(hitResult.charIndex, this._text.length);
|
|
25341
25607
|
}
|
|
25342
25608
|
|
|
25343
|
-
/**
|
|
25344
|
-
* Original cursor boundaries implementation
|
|
25345
|
-
* @private
|
|
25609
|
+
/**
|
|
25610
|
+
* Original cursor boundaries implementation
|
|
25611
|
+
* @private
|
|
25346
25612
|
*/
|
|
25347
25613
|
_getCursorBoundariesOriginal(index, skipCaching) {
|
|
25348
25614
|
const left = this._getLeftOffset(),
|
|
@@ -25356,10 +25622,10 @@ class IText extends ITextClickBehavior {
|
|
|
25356
25622
|
};
|
|
25357
25623
|
}
|
|
25358
25624
|
|
|
25359
|
-
/**
|
|
25360
|
-
* Calculates cursor left/top offset relative to instance's center point
|
|
25361
|
-
* @private
|
|
25362
|
-
* @param {number} index index from start
|
|
25625
|
+
/**
|
|
25626
|
+
* Calculates cursor left/top offset relative to instance's center point
|
|
25627
|
+
* @private
|
|
25628
|
+
* @param {number} index index from start
|
|
25363
25629
|
*/
|
|
25364
25630
|
__getCursorBoundariesOffsets(index) {
|
|
25365
25631
|
let topOffset = 0,
|
|
@@ -25393,29 +25659,29 @@ class IText extends ITextClickBehavior {
|
|
|
25393
25659
|
return boundaries;
|
|
25394
25660
|
}
|
|
25395
25661
|
|
|
25396
|
-
/**
|
|
25397
|
-
* Renders cursor on context Top, outside the animation cycle, on request
|
|
25398
|
-
* Used for the drag/drop effect.
|
|
25399
|
-
* If contextTop is not available, do nothing.
|
|
25662
|
+
/**
|
|
25663
|
+
* Renders cursor on context Top, outside the animation cycle, on request
|
|
25664
|
+
* Used for the drag/drop effect.
|
|
25665
|
+
* If contextTop is not available, do nothing.
|
|
25400
25666
|
*/
|
|
25401
25667
|
renderCursorAt(selectionStart) {
|
|
25402
25668
|
this._renderCursor(this.canvas.contextTop, this._getCursorBoundaries(selectionStart, true), selectionStart);
|
|
25403
25669
|
}
|
|
25404
25670
|
|
|
25405
|
-
/**
|
|
25406
|
-
* Renders cursor
|
|
25407
|
-
* @param {Object} boundaries
|
|
25408
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25671
|
+
/**
|
|
25672
|
+
* Renders cursor
|
|
25673
|
+
* @param {Object} boundaries
|
|
25674
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25409
25675
|
*/
|
|
25410
25676
|
renderCursor(ctx, boundaries) {
|
|
25411
25677
|
this._renderCursor(ctx, boundaries, this.selectionStart);
|
|
25412
25678
|
}
|
|
25413
25679
|
|
|
25414
|
-
/**
|
|
25415
|
-
* Return the data needed to render the cursor for given selection start
|
|
25416
|
-
* The left,top are relative to the object, while width and height are prescaled
|
|
25417
|
-
* to look think with canvas zoom and object scaling,
|
|
25418
|
-
* so they depend on canvas and object scaling
|
|
25680
|
+
/**
|
|
25681
|
+
* Return the data needed to render the cursor for given selection start
|
|
25682
|
+
* The left,top are relative to the object, while width and height are prescaled
|
|
25683
|
+
* to look think with canvas zoom and object scaling,
|
|
25684
|
+
* so they depend on canvas and object scaling
|
|
25419
25685
|
*/
|
|
25420
25686
|
getCursorRenderingData() {
|
|
25421
25687
|
let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -25438,9 +25704,9 @@ class IText extends ITextClickBehavior {
|
|
|
25438
25704
|
};
|
|
25439
25705
|
}
|
|
25440
25706
|
|
|
25441
|
-
/**
|
|
25442
|
-
* Render the cursor at the given selectionStart.
|
|
25443
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25707
|
+
/**
|
|
25708
|
+
* Render the cursor at the given selectionStart.
|
|
25709
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25444
25710
|
*/
|
|
25445
25711
|
_renderCursor(ctx, boundaries, selectionStart) {
|
|
25446
25712
|
const {
|
|
@@ -25456,10 +25722,10 @@ class IText extends ITextClickBehavior {
|
|
|
25456
25722
|
ctx.fillRect(left, top, width, height);
|
|
25457
25723
|
}
|
|
25458
25724
|
|
|
25459
|
-
/**
|
|
25460
|
-
* Renders text selection
|
|
25461
|
-
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25462
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25725
|
+
/**
|
|
25726
|
+
* Renders text selection
|
|
25727
|
+
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25728
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25463
25729
|
*/
|
|
25464
25730
|
renderSelection(ctx, boundaries) {
|
|
25465
25731
|
const selection = {
|
|
@@ -25469,8 +25735,8 @@ class IText extends ITextClickBehavior {
|
|
|
25469
25735
|
this._renderSelection(ctx, selection, boundaries);
|
|
25470
25736
|
}
|
|
25471
25737
|
|
|
25472
|
-
/**
|
|
25473
|
-
* Renders drag start text selection
|
|
25738
|
+
/**
|
|
25739
|
+
* Renders drag start text selection
|
|
25474
25740
|
*/
|
|
25475
25741
|
renderDragSourceEffect() {
|
|
25476
25742
|
const dragStartSelection = this.draggableTextDelegate.getDragStartSelection();
|
|
@@ -25481,12 +25747,12 @@ class IText extends ITextClickBehavior {
|
|
|
25481
25747
|
this.renderCursorAt(dragSelection);
|
|
25482
25748
|
}
|
|
25483
25749
|
|
|
25484
|
-
/**
|
|
25485
|
-
* Renders text selection
|
|
25486
|
-
* @private
|
|
25487
|
-
* @param {{ selectionStart: number, selectionEnd: number }} selection
|
|
25488
|
-
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25489
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25750
|
+
/**
|
|
25751
|
+
* Renders text selection
|
|
25752
|
+
* @private
|
|
25753
|
+
* @param {{ selectionStart: number, selectionEnd: number }} selection
|
|
25754
|
+
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25755
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25490
25756
|
*/
|
|
25491
25757
|
_renderSelection(ctx, selection, boundaries) {
|
|
25492
25758
|
const selectionStart = selection.selectionStart,
|
|
@@ -25548,34 +25814,34 @@ class IText extends ITextClickBehavior {
|
|
|
25548
25814
|
}
|
|
25549
25815
|
}
|
|
25550
25816
|
|
|
25551
|
-
/**
|
|
25552
|
-
* High level function to know the height of the cursor.
|
|
25553
|
-
* the currentChar is the one that precedes the cursor
|
|
25554
|
-
* Returns fontSize of char at the current cursor
|
|
25555
|
-
* Unused from the library, is for the end user
|
|
25556
|
-
* @return {Number} Character font size
|
|
25817
|
+
/**
|
|
25818
|
+
* High level function to know the height of the cursor.
|
|
25819
|
+
* the currentChar is the one that precedes the cursor
|
|
25820
|
+
* Returns fontSize of char at the current cursor
|
|
25821
|
+
* Unused from the library, is for the end user
|
|
25822
|
+
* @return {Number} Character font size
|
|
25557
25823
|
*/
|
|
25558
25824
|
getCurrentCharFontSize() {
|
|
25559
25825
|
const cp = this._getCurrentCharIndex();
|
|
25560
25826
|
return this.getValueOfPropertyAt(cp.l, cp.c, 'fontSize');
|
|
25561
25827
|
}
|
|
25562
25828
|
|
|
25563
|
-
/**
|
|
25564
|
-
* High level function to know the color of the cursor.
|
|
25565
|
-
* the currentChar is the one that precedes the cursor
|
|
25566
|
-
* Returns color (fill) of char at the current cursor
|
|
25567
|
-
* if the text object has a pattern or gradient for filler, it will return that.
|
|
25568
|
-
* Unused by the library, is for the end user
|
|
25569
|
-
* @return {String | TFiller} Character color (fill)
|
|
25829
|
+
/**
|
|
25830
|
+
* High level function to know the color of the cursor.
|
|
25831
|
+
* the currentChar is the one that precedes the cursor
|
|
25832
|
+
* Returns color (fill) of char at the current cursor
|
|
25833
|
+
* if the text object has a pattern or gradient for filler, it will return that.
|
|
25834
|
+
* Unused by the library, is for the end user
|
|
25835
|
+
* @return {String | TFiller} Character color (fill)
|
|
25570
25836
|
*/
|
|
25571
25837
|
getCurrentCharColor() {
|
|
25572
25838
|
const cp = this._getCurrentCharIndex();
|
|
25573
25839
|
return this.getValueOfPropertyAt(cp.l, cp.c, FILL);
|
|
25574
25840
|
}
|
|
25575
25841
|
|
|
25576
|
-
/**
|
|
25577
|
-
* Returns the cursor position for the getCurrent.. functions
|
|
25578
|
-
* @private
|
|
25842
|
+
/**
|
|
25843
|
+
* Returns the cursor position for the getCurrent.. functions
|
|
25844
|
+
* @private
|
|
25579
25845
|
*/
|
|
25580
25846
|
_getCurrentCharIndex() {
|
|
25581
25847
|
const cursorPosition = this.get2DCursorLocation(this.selectionStart, true),
|
|
@@ -25591,52 +25857,52 @@ class IText extends ITextClickBehavior {
|
|
|
25591
25857
|
super.dispose();
|
|
25592
25858
|
}
|
|
25593
25859
|
}
|
|
25594
|
-
/**
|
|
25595
|
-
* Index where text selection starts (or where cursor is when there is no selection)
|
|
25596
|
-
* @type Number
|
|
25860
|
+
/**
|
|
25861
|
+
* Index where text selection starts (or where cursor is when there is no selection)
|
|
25862
|
+
* @type Number
|
|
25597
25863
|
*/
|
|
25598
|
-
/**
|
|
25599
|
-
* Index where text selection ends
|
|
25600
|
-
* @type Number
|
|
25864
|
+
/**
|
|
25865
|
+
* Index where text selection ends
|
|
25866
|
+
* @type Number
|
|
25601
25867
|
*/
|
|
25602
|
-
/**
|
|
25603
|
-
* Color of text selection
|
|
25604
|
-
* @type String
|
|
25868
|
+
/**
|
|
25869
|
+
* Color of text selection
|
|
25870
|
+
* @type String
|
|
25605
25871
|
*/
|
|
25606
|
-
/**
|
|
25607
|
-
* Indicates whether text is in editing mode
|
|
25608
|
-
* @type Boolean
|
|
25872
|
+
/**
|
|
25873
|
+
* Indicates whether text is in editing mode
|
|
25874
|
+
* @type Boolean
|
|
25609
25875
|
*/
|
|
25610
|
-
/**
|
|
25611
|
-
* Indicates whether a text can be edited
|
|
25612
|
-
* @type Boolean
|
|
25876
|
+
/**
|
|
25877
|
+
* Indicates whether a text can be edited
|
|
25878
|
+
* @type Boolean
|
|
25613
25879
|
*/
|
|
25614
|
-
/**
|
|
25615
|
-
* Border color of text object while it's in editing mode
|
|
25616
|
-
* @type String
|
|
25880
|
+
/**
|
|
25881
|
+
* Border color of text object while it's in editing mode
|
|
25882
|
+
* @type String
|
|
25617
25883
|
*/
|
|
25618
|
-
/**
|
|
25619
|
-
* Width of cursor (in px)
|
|
25620
|
-
* @type Number
|
|
25884
|
+
/**
|
|
25885
|
+
* Width of cursor (in px)
|
|
25886
|
+
* @type Number
|
|
25621
25887
|
*/
|
|
25622
|
-
/**
|
|
25623
|
-
* Color of text cursor color in editing mode.
|
|
25624
|
-
* if not set (default) will take color from the text.
|
|
25625
|
-
* if set to a color value that fabric can understand, it will
|
|
25626
|
-
* be used instead of the color of the text at the current position.
|
|
25627
|
-
* @type String
|
|
25888
|
+
/**
|
|
25889
|
+
* Color of text cursor color in editing mode.
|
|
25890
|
+
* if not set (default) will take color from the text.
|
|
25891
|
+
* if set to a color value that fabric can understand, it will
|
|
25892
|
+
* be used instead of the color of the text at the current position.
|
|
25893
|
+
* @type String
|
|
25628
25894
|
*/
|
|
25629
|
-
/**
|
|
25630
|
-
* Delay between cursor blink (in ms)
|
|
25631
|
-
* @type Number
|
|
25895
|
+
/**
|
|
25896
|
+
* Delay between cursor blink (in ms)
|
|
25897
|
+
* @type Number
|
|
25632
25898
|
*/
|
|
25633
|
-
/**
|
|
25634
|
-
* Duration of cursor fade in (in ms)
|
|
25635
|
-
* @type Number
|
|
25899
|
+
/**
|
|
25900
|
+
* Duration of cursor fade in (in ms)
|
|
25901
|
+
* @type Number
|
|
25636
25902
|
*/
|
|
25637
|
-
/**
|
|
25638
|
-
* Indicates whether internal text char widths can be cached
|
|
25639
|
-
* @type Boolean
|
|
25903
|
+
/**
|
|
25904
|
+
* Indicates whether internal text char widths can be cached
|
|
25905
|
+
* @type Boolean
|
|
25640
25906
|
*/
|
|
25641
25907
|
_defineProperty(IText, "ownDefaults", iTextDefaultValues);
|
|
25642
25908
|
_defineProperty(IText, "type", 'IText');
|
|
@@ -25658,11 +25924,11 @@ const textboxDefaultValues = {
|
|
|
25658
25924
|
|
|
25659
25925
|
// @TODO this is not complete
|
|
25660
25926
|
|
|
25661
|
-
/**
|
|
25662
|
-
* Textbox class, based on IText, allows the user to resize the text rectangle
|
|
25663
|
-
* and wraps lines automatically. Textboxes have their Y scaling locked, the
|
|
25664
|
-
* user can only change width. Height is adjusted automatically based on the
|
|
25665
|
-
* wrapping of lines.
|
|
25927
|
+
/**
|
|
25928
|
+
* Textbox class, based on IText, allows the user to resize the text rectangle
|
|
25929
|
+
* and wraps lines automatically. Textboxes have their Y scaling locked, the
|
|
25930
|
+
* user can only change width. Height is adjusted automatically based on the
|
|
25931
|
+
* wrapping of lines.
|
|
25666
25932
|
*/
|
|
25667
25933
|
class Textbox extends IText {
|
|
25668
25934
|
static getDefaults() {
|
|
@@ -25672,10 +25938,10 @@ class Textbox extends IText {
|
|
|
25672
25938
|
};
|
|
25673
25939
|
}
|
|
25674
25940
|
|
|
25675
|
-
/**
|
|
25676
|
-
* Constructor
|
|
25677
|
-
* @param {String} text Text string
|
|
25678
|
-
* @param {Object} [options] Options object
|
|
25941
|
+
/**
|
|
25942
|
+
* Constructor
|
|
25943
|
+
* @param {String} text Text string
|
|
25944
|
+
* @param {Object} [options] Options object
|
|
25679
25945
|
*/
|
|
25680
25946
|
constructor(text, options) {
|
|
25681
25947
|
super(text, {
|
|
@@ -25685,10 +25951,10 @@ class Textbox extends IText {
|
|
|
25685
25951
|
this.initializeEventListeners();
|
|
25686
25952
|
}
|
|
25687
25953
|
|
|
25688
|
-
/**
|
|
25689
|
-
* Creates the default control object.
|
|
25690
|
-
* If you prefer to have on instance of controls shared among all objects
|
|
25691
|
-
* make this function return an empty object and add controls to the ownDefaults object
|
|
25954
|
+
/**
|
|
25955
|
+
* Creates the default control object.
|
|
25956
|
+
* If you prefer to have on instance of controls shared among all objects
|
|
25957
|
+
* make this function return an empty object and add controls to the ownDefaults object
|
|
25692
25958
|
*/
|
|
25693
25959
|
static createControls() {
|
|
25694
25960
|
return {
|
|
@@ -25696,11 +25962,11 @@ class Textbox extends IText {
|
|
|
25696
25962
|
};
|
|
25697
25963
|
}
|
|
25698
25964
|
|
|
25699
|
-
/**
|
|
25700
|
-
* Unlike superclass's version of this function, Textbox does not update
|
|
25701
|
-
* its width.
|
|
25702
|
-
* @private
|
|
25703
|
-
* @override
|
|
25965
|
+
/**
|
|
25966
|
+
* Unlike superclass's version of this function, Textbox does not update
|
|
25967
|
+
* its width.
|
|
25968
|
+
* @private
|
|
25969
|
+
* @override
|
|
25704
25970
|
*/
|
|
25705
25971
|
initDimensions() {
|
|
25706
25972
|
if (!this.initialized) {
|
|
@@ -25729,9 +25995,9 @@ class Textbox extends IText {
|
|
|
25729
25995
|
this.height = this.calcTextHeight();
|
|
25730
25996
|
}
|
|
25731
25997
|
|
|
25732
|
-
/**
|
|
25733
|
-
* Advanced dimensions calculation using new layout engine
|
|
25734
|
-
* @private
|
|
25998
|
+
/**
|
|
25999
|
+
* Advanced dimensions calculation using new layout engine
|
|
26000
|
+
* @private
|
|
25735
26001
|
*/
|
|
25736
26002
|
initDimensionsAdvanced() {
|
|
25737
26003
|
if (!this.initialized) {
|
|
@@ -25786,9 +26052,9 @@ class Textbox extends IText {
|
|
|
25786
26052
|
this.dirty = true;
|
|
25787
26053
|
}
|
|
25788
26054
|
|
|
25789
|
-
/**
|
|
25790
|
-
* Generate style map from new layout format
|
|
25791
|
-
* @private
|
|
26055
|
+
/**
|
|
26056
|
+
* Generate style map from new layout format
|
|
26057
|
+
* @private
|
|
25792
26058
|
*/
|
|
25793
26059
|
_generateStyleMapFromLayout(layout) {
|
|
25794
26060
|
const map = {};
|
|
@@ -25810,12 +26076,12 @@ class Textbox extends IText {
|
|
|
25810
26076
|
return map;
|
|
25811
26077
|
}
|
|
25812
26078
|
|
|
25813
|
-
/**
|
|
25814
|
-
* Generate an object that translates the style object so that it is
|
|
25815
|
-
* broken up by visual lines (new lines and automatic wrapping).
|
|
25816
|
-
* The original text styles object is broken up by actual lines (new lines only),
|
|
25817
|
-
* which is only sufficient for Text / IText
|
|
25818
|
-
* @private
|
|
26079
|
+
/**
|
|
26080
|
+
* Generate an object that translates the style object so that it is
|
|
26081
|
+
* broken up by visual lines (new lines and automatic wrapping).
|
|
26082
|
+
* The original text styles object is broken up by actual lines (new lines only),
|
|
26083
|
+
* which is only sufficient for Text / IText
|
|
26084
|
+
* @private
|
|
25819
26085
|
*/
|
|
25820
26086
|
_generateStyleMap(textInfo) {
|
|
25821
26087
|
let realLineCount = 0,
|
|
@@ -25842,10 +26108,10 @@ class Textbox extends IText {
|
|
|
25842
26108
|
return map;
|
|
25843
26109
|
}
|
|
25844
26110
|
|
|
25845
|
-
/**
|
|
25846
|
-
* Returns true if object has a style property or has it on a specified line
|
|
25847
|
-
* @param {Number} lineIndex
|
|
25848
|
-
* @return {Boolean}
|
|
26111
|
+
/**
|
|
26112
|
+
* Returns true if object has a style property or has it on a specified line
|
|
26113
|
+
* @param {Number} lineIndex
|
|
26114
|
+
* @return {Boolean}
|
|
25849
26115
|
*/
|
|
25850
26116
|
styleHas(property, lineIndex) {
|
|
25851
26117
|
if (this._styleMap && !this.isWrapping) {
|
|
@@ -25857,10 +26123,10 @@ class Textbox extends IText {
|
|
|
25857
26123
|
return super.styleHas(property, lineIndex);
|
|
25858
26124
|
}
|
|
25859
26125
|
|
|
25860
|
-
/**
|
|
25861
|
-
* Returns true if object has no styling or no styling in a line
|
|
25862
|
-
* @param {Number} lineIndex , lineIndex is on wrapped lines.
|
|
25863
|
-
* @return {Boolean}
|
|
26126
|
+
/**
|
|
26127
|
+
* Returns true if object has no styling or no styling in a line
|
|
26128
|
+
* @param {Number} lineIndex , lineIndex is on wrapped lines.
|
|
26129
|
+
* @return {Boolean}
|
|
25864
26130
|
*/
|
|
25865
26131
|
isEmptyStyles(lineIndex) {
|
|
25866
26132
|
if (!this.styles) {
|
|
@@ -25897,11 +26163,11 @@ class Textbox extends IText {
|
|
|
25897
26163
|
return true;
|
|
25898
26164
|
}
|
|
25899
26165
|
|
|
25900
|
-
/**
|
|
25901
|
-
* @protected
|
|
25902
|
-
* @param {Number} lineIndex
|
|
25903
|
-
* @param {Number} charIndex
|
|
25904
|
-
* @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
|
|
26166
|
+
/**
|
|
26167
|
+
* @protected
|
|
26168
|
+
* @param {Number} lineIndex
|
|
26169
|
+
* @param {Number} charIndex
|
|
26170
|
+
* @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
|
|
25905
26171
|
*/
|
|
25906
26172
|
_getStyleDeclaration(lineIndex, charIndex) {
|
|
25907
26173
|
if (this._styleMap && !this.isWrapping) {
|
|
@@ -25915,59 +26181,59 @@ class Textbox extends IText {
|
|
|
25915
26181
|
return super._getStyleDeclaration(lineIndex, charIndex);
|
|
25916
26182
|
}
|
|
25917
26183
|
|
|
25918
|
-
/**
|
|
25919
|
-
* @param {Number} lineIndex
|
|
25920
|
-
* @param {Number} charIndex
|
|
25921
|
-
* @param {Object} style
|
|
25922
|
-
* @private
|
|
26184
|
+
/**
|
|
26185
|
+
* @param {Number} lineIndex
|
|
26186
|
+
* @param {Number} charIndex
|
|
26187
|
+
* @param {Object} style
|
|
26188
|
+
* @private
|
|
25923
26189
|
*/
|
|
25924
26190
|
_setStyleDeclaration(lineIndex, charIndex, style) {
|
|
25925
26191
|
const map = this._styleMap[lineIndex];
|
|
25926
26192
|
super._setStyleDeclaration(map.line, map.offset + charIndex, style);
|
|
25927
26193
|
}
|
|
25928
26194
|
|
|
25929
|
-
/**
|
|
25930
|
-
* @param {Number} lineIndex
|
|
25931
|
-
* @param {Number} charIndex
|
|
25932
|
-
* @private
|
|
26195
|
+
/**
|
|
26196
|
+
* @param {Number} lineIndex
|
|
26197
|
+
* @param {Number} charIndex
|
|
26198
|
+
* @private
|
|
25933
26199
|
*/
|
|
25934
26200
|
_deleteStyleDeclaration(lineIndex, charIndex) {
|
|
25935
26201
|
const map = this._styleMap[lineIndex];
|
|
25936
26202
|
super._deleteStyleDeclaration(map.line, map.offset + charIndex);
|
|
25937
26203
|
}
|
|
25938
26204
|
|
|
25939
|
-
/**
|
|
25940
|
-
* probably broken need a fix
|
|
25941
|
-
* Returns the real style line that correspond to the wrapped lineIndex line
|
|
25942
|
-
* Used just to verify if the line does exist or not.
|
|
25943
|
-
* @param {Number} lineIndex
|
|
25944
|
-
* @returns {Boolean} if the line exists or not
|
|
25945
|
-
* @private
|
|
26205
|
+
/**
|
|
26206
|
+
* probably broken need a fix
|
|
26207
|
+
* Returns the real style line that correspond to the wrapped lineIndex line
|
|
26208
|
+
* Used just to verify if the line does exist or not.
|
|
26209
|
+
* @param {Number} lineIndex
|
|
26210
|
+
* @returns {Boolean} if the line exists or not
|
|
26211
|
+
* @private
|
|
25946
26212
|
*/
|
|
25947
26213
|
_getLineStyle(lineIndex) {
|
|
25948
26214
|
const map = this._styleMap[lineIndex];
|
|
25949
26215
|
return !!this.styles[map.line];
|
|
25950
26216
|
}
|
|
25951
26217
|
|
|
25952
|
-
/**
|
|
25953
|
-
* Set the line style to an empty object so that is initialized
|
|
25954
|
-
* @param {Number} lineIndex
|
|
25955
|
-
* @param {Object} style
|
|
25956
|
-
* @private
|
|
26218
|
+
/**
|
|
26219
|
+
* Set the line style to an empty object so that is initialized
|
|
26220
|
+
* @param {Number} lineIndex
|
|
26221
|
+
* @param {Object} style
|
|
26222
|
+
* @private
|
|
25957
26223
|
*/
|
|
25958
26224
|
_setLineStyle(lineIndex) {
|
|
25959
26225
|
const map = this._styleMap[lineIndex];
|
|
25960
26226
|
super._setLineStyle(map.line);
|
|
25961
26227
|
}
|
|
25962
26228
|
|
|
25963
|
-
/**
|
|
25964
|
-
* Wraps text using the 'width' property of Textbox. First this function
|
|
25965
|
-
* splits text on newlines, so we preserve newlines entered by the user.
|
|
25966
|
-
* Then it wraps each line using the width of the Textbox by calling
|
|
25967
|
-
* _wrapLine().
|
|
25968
|
-
* @param {Array} lines The string array of text that is split into lines
|
|
25969
|
-
* @param {Number} desiredWidth width you want to wrap to
|
|
25970
|
-
* @returns {Array} Array of lines
|
|
26229
|
+
/**
|
|
26230
|
+
* Wraps text using the 'width' property of Textbox. First this function
|
|
26231
|
+
* splits text on newlines, so we preserve newlines entered by the user.
|
|
26232
|
+
* Then it wraps each line using the width of the Textbox by calling
|
|
26233
|
+
* _wrapLine().
|
|
26234
|
+
* @param {Array} lines The string array of text that is split into lines
|
|
26235
|
+
* @param {Number} desiredWidth width you want to wrap to
|
|
26236
|
+
* @returns {Array} Array of lines
|
|
25971
26237
|
*/
|
|
25972
26238
|
_wrapText(lines, desiredWidth) {
|
|
25973
26239
|
this.isWrapping = true;
|
|
@@ -25981,12 +26247,12 @@ class Textbox extends IText {
|
|
|
25981
26247
|
return wrapped;
|
|
25982
26248
|
}
|
|
25983
26249
|
|
|
25984
|
-
/**
|
|
25985
|
-
* For each line of text terminated by an hard line stop,
|
|
25986
|
-
* measure each word width and extract the largest word from all.
|
|
25987
|
-
* The returned words here are the one that at the end will be rendered.
|
|
25988
|
-
* @param {string[]} lines the lines we need to measure
|
|
25989
|
-
*
|
|
26250
|
+
/**
|
|
26251
|
+
* For each line of text terminated by an hard line stop,
|
|
26252
|
+
* measure each word width and extract the largest word from all.
|
|
26253
|
+
* The returned words here are the one that at the end will be rendered.
|
|
26254
|
+
* @param {string[]} lines the lines we need to measure
|
|
26255
|
+
*
|
|
25990
26256
|
*/
|
|
25991
26257
|
getGraphemeDataForRender(lines) {
|
|
25992
26258
|
const splitByGrapheme = this.splitByGrapheme,
|
|
@@ -26019,17 +26285,17 @@ class Textbox extends IText {
|
|
|
26019
26285
|
};
|
|
26020
26286
|
}
|
|
26021
26287
|
|
|
26022
|
-
/**
|
|
26023
|
-
* Helper function to measure a string of text, given its lineIndex and charIndex offset
|
|
26024
|
-
* It gets called when charBounds are not available yet.
|
|
26025
|
-
* Override if necessary
|
|
26026
|
-
* Use with {@link Textbox#wordSplit}
|
|
26027
|
-
*
|
|
26028
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
26029
|
-
* @param {String} text
|
|
26030
|
-
* @param {number} lineIndex
|
|
26031
|
-
* @param {number} charOffset
|
|
26032
|
-
* @returns {number}
|
|
26288
|
+
/**
|
|
26289
|
+
* Helper function to measure a string of text, given its lineIndex and charIndex offset
|
|
26290
|
+
* It gets called when charBounds are not available yet.
|
|
26291
|
+
* Override if necessary
|
|
26292
|
+
* Use with {@link Textbox#wordSplit}
|
|
26293
|
+
*
|
|
26294
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
26295
|
+
* @param {String} text
|
|
26296
|
+
* @param {number} lineIndex
|
|
26297
|
+
* @param {number} charOffset
|
|
26298
|
+
* @returns {number}
|
|
26033
26299
|
*/
|
|
26034
26300
|
_measureWord(word, lineIndex) {
|
|
26035
26301
|
let charOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -26044,26 +26310,26 @@ class Textbox extends IText {
|
|
|
26044
26310
|
return width;
|
|
26045
26311
|
}
|
|
26046
26312
|
|
|
26047
|
-
/**
|
|
26048
|
-
* Override this method to customize word splitting
|
|
26049
|
-
* Use with {@link Textbox#_measureWord}
|
|
26050
|
-
* @param {string} value
|
|
26051
|
-
* @returns {string[]} array of words
|
|
26313
|
+
/**
|
|
26314
|
+
* Override this method to customize word splitting
|
|
26315
|
+
* Use with {@link Textbox#_measureWord}
|
|
26316
|
+
* @param {string} value
|
|
26317
|
+
* @returns {string[]} array of words
|
|
26052
26318
|
*/
|
|
26053
26319
|
wordSplit(value) {
|
|
26054
26320
|
return value.split(this._wordJoiners);
|
|
26055
26321
|
}
|
|
26056
26322
|
|
|
26057
|
-
/**
|
|
26058
|
-
* Wraps a line of text using the width of the Textbox as desiredWidth
|
|
26059
|
-
* and leveraging the known width o words from GraphemeData
|
|
26060
|
-
* @private
|
|
26061
|
-
* @param {Number} lineIndex
|
|
26062
|
-
* @param {Number} desiredWidth width you want to wrap the line to
|
|
26063
|
-
* @param {GraphemeData} graphemeData an object containing all the lines' words width.
|
|
26064
|
-
* @param {Number} reservedSpace space to remove from wrapping for custom functionalities
|
|
26065
|
-
* @returns {Array} Array of line(s) into which the given text is wrapped
|
|
26066
|
-
* to.
|
|
26323
|
+
/**
|
|
26324
|
+
* Wraps a line of text using the width of the Textbox as desiredWidth
|
|
26325
|
+
* and leveraging the known width o words from GraphemeData
|
|
26326
|
+
* @private
|
|
26327
|
+
* @param {Number} lineIndex
|
|
26328
|
+
* @param {Number} desiredWidth width you want to wrap the line to
|
|
26329
|
+
* @param {GraphemeData} graphemeData an object containing all the lines' words width.
|
|
26330
|
+
* @param {Number} reservedSpace space to remove from wrapping for custom functionalities
|
|
26331
|
+
* @returns {Array} Array of line(s) into which the given text is wrapped
|
|
26332
|
+
* to.
|
|
26067
26333
|
*/
|
|
26068
26334
|
_wrapLine(lineIndex, desiredWidth, _ref) {
|
|
26069
26335
|
let {
|
|
@@ -26121,11 +26387,11 @@ class Textbox extends IText {
|
|
|
26121
26387
|
return graphemeLines;
|
|
26122
26388
|
}
|
|
26123
26389
|
|
|
26124
|
-
/**
|
|
26125
|
-
* Detect if the text line is ended with an hard break
|
|
26126
|
-
* text and itext do not have wrapping, return false
|
|
26127
|
-
* @param {Number} lineIndex text to split
|
|
26128
|
-
* @return {Boolean}
|
|
26390
|
+
/**
|
|
26391
|
+
* Detect if the text line is ended with an hard break
|
|
26392
|
+
* text and itext do not have wrapping, return false
|
|
26393
|
+
* @param {Number} lineIndex text to split
|
|
26394
|
+
* @return {Boolean}
|
|
26129
26395
|
*/
|
|
26130
26396
|
isEndOfWrapping(lineIndex) {
|
|
26131
26397
|
if (!this._styleMap[lineIndex + 1]) {
|
|
@@ -26139,12 +26405,12 @@ class Textbox extends IText {
|
|
|
26139
26405
|
return false;
|
|
26140
26406
|
}
|
|
26141
26407
|
|
|
26142
|
-
/**
|
|
26143
|
-
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
26144
|
-
* and counting style.
|
|
26145
|
-
* This is important only for splitByGrapheme at the end of wrapping.
|
|
26146
|
-
* If we are not wrapping the offset is always 1
|
|
26147
|
-
* @return Number
|
|
26408
|
+
/**
|
|
26409
|
+
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
26410
|
+
* and counting style.
|
|
26411
|
+
* This is important only for splitByGrapheme at the end of wrapping.
|
|
26412
|
+
* If we are not wrapping the offset is always 1
|
|
26413
|
+
* @return Number
|
|
26148
26414
|
*/
|
|
26149
26415
|
missingNewlineOffset(lineIndex, skipWrapping) {
|
|
26150
26416
|
if (this.splitByGrapheme && !skipWrapping) {
|
|
@@ -26153,12 +26419,12 @@ class Textbox extends IText {
|
|
|
26153
26419
|
return 1;
|
|
26154
26420
|
}
|
|
26155
26421
|
|
|
26156
|
-
/**
|
|
26157
|
-
* Gets lines of text to render in the Textbox. This function calculates
|
|
26158
|
-
* text wrapping on the fly every time it is called.
|
|
26159
|
-
* @param {String} text text to split
|
|
26160
|
-
* @returns {Array} Array of lines in the Textbox.
|
|
26161
|
-
* @override
|
|
26422
|
+
/**
|
|
26423
|
+
* Gets lines of text to render in the Textbox. This function calculates
|
|
26424
|
+
* text wrapping on the fly every time it is called.
|
|
26425
|
+
* @param {String} text text to split
|
|
26426
|
+
* @returns {Array} Array of lines in the Textbox.
|
|
26427
|
+
* @override
|
|
26162
26428
|
*/
|
|
26163
26429
|
_splitTextIntoLines(text) {
|
|
26164
26430
|
const newText = super._splitTextIntoLines(text),
|
|
@@ -26190,9 +26456,9 @@ class Textbox extends IText {
|
|
|
26190
26456
|
}
|
|
26191
26457
|
}
|
|
26192
26458
|
|
|
26193
|
-
/**
|
|
26194
|
-
* Initialize event listeners for safety snap functionality
|
|
26195
|
-
* @private
|
|
26459
|
+
/**
|
|
26460
|
+
* Initialize event listeners for safety snap functionality
|
|
26461
|
+
* @private
|
|
26196
26462
|
*/
|
|
26197
26463
|
initializeEventListeners() {
|
|
26198
26464
|
var _this$canvas;
|
|
@@ -26235,12 +26501,12 @@ class Textbox extends IText {
|
|
|
26235
26501
|
});
|
|
26236
26502
|
}
|
|
26237
26503
|
|
|
26238
|
-
/**
|
|
26239
|
-
* Safety snap to prevent glyph clipping after manual resize.
|
|
26240
|
-
* Similar to Polotno - checks if any glyphs are too close to edges
|
|
26241
|
-
* and automatically expands width if needed.
|
|
26242
|
-
* @private
|
|
26243
|
-
* @param resizeOrigin - Which side was used for resizing ('left' or 'right')
|
|
26504
|
+
/**
|
|
26505
|
+
* Safety snap to prevent glyph clipping after manual resize.
|
|
26506
|
+
* Similar to Polotno - checks if any glyphs are too close to edges
|
|
26507
|
+
* and automatically expands width if needed.
|
|
26508
|
+
* @private
|
|
26509
|
+
* @param resizeOrigin - Which side was used for resizing ('left' or 'right')
|
|
26244
26510
|
*/
|
|
26245
26511
|
safetySnapWidth(resizeOrigin) {
|
|
26246
26512
|
// For Textbox objects, we always want to check for clipping regardless of isWrapping flag
|
|
@@ -26307,31 +26573,31 @@ class Textbox extends IText {
|
|
|
26307
26573
|
}
|
|
26308
26574
|
}
|
|
26309
26575
|
|
|
26310
|
-
/**
|
|
26311
|
-
* Returns object representation of an instance
|
|
26312
|
-
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
26313
|
-
* @return {Object} object representation of an instance
|
|
26576
|
+
/**
|
|
26577
|
+
* Returns object representation of an instance
|
|
26578
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
26579
|
+
* @return {Object} object representation of an instance
|
|
26314
26580
|
*/
|
|
26315
26581
|
toObject() {
|
|
26316
26582
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
26317
26583
|
return super.toObject(['minWidth', 'splitByGrapheme', ...propertiesToInclude]);
|
|
26318
26584
|
}
|
|
26319
26585
|
}
|
|
26320
|
-
/**
|
|
26321
|
-
* Minimum width of textbox, in pixels.
|
|
26322
|
-
* @type Number
|
|
26323
|
-
*/
|
|
26324
|
-
/**
|
|
26325
|
-
* Minimum calculated width of a textbox, in pixels.
|
|
26326
|
-
* fixed to 2 so that an empty textbox cannot go to 0
|
|
26327
|
-
* and is still selectable without text.
|
|
26328
|
-
* @type Number
|
|
26329
|
-
*/
|
|
26330
|
-
/**
|
|
26331
|
-
* Use this boolean property in order to split strings that have no white space concept.
|
|
26332
|
-
* this is a cheap way to help with chinese/japanese
|
|
26333
|
-
* @type Boolean
|
|
26334
|
-
* @since 2.6.0
|
|
26586
|
+
/**
|
|
26587
|
+
* Minimum width of textbox, in pixels.
|
|
26588
|
+
* @type Number
|
|
26589
|
+
*/
|
|
26590
|
+
/**
|
|
26591
|
+
* Minimum calculated width of a textbox, in pixels.
|
|
26592
|
+
* fixed to 2 so that an empty textbox cannot go to 0
|
|
26593
|
+
* and is still selectable without text.
|
|
26594
|
+
* @type Number
|
|
26595
|
+
*/
|
|
26596
|
+
/**
|
|
26597
|
+
* Use this boolean property in order to split strings that have no white space concept.
|
|
26598
|
+
* this is a cheap way to help with chinese/japanese
|
|
26599
|
+
* @type Boolean
|
|
26600
|
+
* @since 2.6.0
|
|
26335
26601
|
*/
|
|
26336
26602
|
_defineProperty(Textbox, "type", 'Textbox');
|
|
26337
26603
|
_defineProperty(Textbox, "textLayoutProperties", [...IText.textLayoutProperties, 'width']);
|