@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.cjs
CHANGED
|
@@ -412,7 +412,7 @@ class Cache {
|
|
|
412
412
|
}
|
|
413
413
|
const cache = new Cache();
|
|
414
414
|
|
|
415
|
-
var version = "7.0.1-
|
|
415
|
+
var version = "7.0.1-beta2";
|
|
416
416
|
|
|
417
417
|
// use this syntax so babel plugin see this import here
|
|
418
418
|
const VERSION = version;
|
|
@@ -17892,10 +17892,189 @@ _defineProperty(Line, "ATTRIBUTE_NAMES", SHARED_ATTRIBUTES.concat(coordProps));
|
|
|
17892
17892
|
classRegistry.setClass(Line);
|
|
17893
17893
|
classRegistry.setSVGClass(Line);
|
|
17894
17894
|
|
|
17895
|
+
/**
|
|
17896
|
+
* Calculate the distance between two points
|
|
17897
|
+
*/
|
|
17898
|
+
function pointDistance(p1, p2) {
|
|
17899
|
+
return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
|
|
17900
|
+
}
|
|
17901
|
+
|
|
17902
|
+
/**
|
|
17903
|
+
* Normalize a vector
|
|
17904
|
+
*/
|
|
17905
|
+
function normalizeVector(vector) {
|
|
17906
|
+
const length = Math.sqrt(vector.x * vector.x + vector.y * vector.y);
|
|
17907
|
+
if (length === 0) return {
|
|
17908
|
+
x: 0,
|
|
17909
|
+
y: 0
|
|
17910
|
+
};
|
|
17911
|
+
return {
|
|
17912
|
+
x: vector.x / length,
|
|
17913
|
+
y: vector.y / length
|
|
17914
|
+
};
|
|
17915
|
+
}
|
|
17916
|
+
|
|
17917
|
+
/**
|
|
17918
|
+
* Get the maximum allowed radius for a corner based on adjacent edge lengths
|
|
17919
|
+
*/
|
|
17920
|
+
function getMaxRadius(prevPoint, currentPoint, nextPoint) {
|
|
17921
|
+
const dist1 = pointDistance(prevPoint, currentPoint);
|
|
17922
|
+
const dist2 = pointDistance(currentPoint, nextPoint);
|
|
17923
|
+
return Math.min(dist1, dist2) / 2;
|
|
17924
|
+
}
|
|
17925
|
+
|
|
17926
|
+
/**
|
|
17927
|
+
* Calculate rounded corner data for a single corner
|
|
17928
|
+
*/
|
|
17929
|
+
function calculateRoundedCorner(prevPoint, currentPoint, nextPoint, radius) {
|
|
17930
|
+
// Calculate edge vectors
|
|
17931
|
+
const edge1 = {
|
|
17932
|
+
x: currentPoint.x - prevPoint.x,
|
|
17933
|
+
y: currentPoint.y - prevPoint.y
|
|
17934
|
+
};
|
|
17935
|
+
const edge2 = {
|
|
17936
|
+
x: nextPoint.x - currentPoint.x,
|
|
17937
|
+
y: nextPoint.y - currentPoint.y
|
|
17938
|
+
};
|
|
17939
|
+
|
|
17940
|
+
// Normalize edge vectors
|
|
17941
|
+
const norm1 = normalizeVector(edge1);
|
|
17942
|
+
const norm2 = normalizeVector(edge2);
|
|
17943
|
+
|
|
17944
|
+
// Calculate the maximum allowed radius
|
|
17945
|
+
const maxRadius = getMaxRadius(prevPoint, currentPoint, nextPoint);
|
|
17946
|
+
const actualRadius = Math.min(radius, maxRadius);
|
|
17947
|
+
|
|
17948
|
+
// Calculate start and end points of the rounded corner
|
|
17949
|
+
const startPoint = {
|
|
17950
|
+
x: currentPoint.x - norm1.x * actualRadius,
|
|
17951
|
+
y: currentPoint.y - norm1.y * actualRadius
|
|
17952
|
+
};
|
|
17953
|
+
const endPoint = {
|
|
17954
|
+
x: currentPoint.x + norm2.x * actualRadius,
|
|
17955
|
+
y: currentPoint.y + norm2.y * actualRadius
|
|
17956
|
+
};
|
|
17957
|
+
|
|
17958
|
+
// Calculate control points for bezier curve
|
|
17959
|
+
// Using the magic number kRect for optimal circular approximation
|
|
17960
|
+
const controlOffset = actualRadius * kRect;
|
|
17961
|
+
const cp1 = {
|
|
17962
|
+
x: startPoint.x + norm1.x * controlOffset,
|
|
17963
|
+
y: startPoint.y + norm1.y * controlOffset
|
|
17964
|
+
};
|
|
17965
|
+
const cp2 = {
|
|
17966
|
+
x: endPoint.x - norm2.x * controlOffset,
|
|
17967
|
+
y: endPoint.y - norm2.y * controlOffset
|
|
17968
|
+
};
|
|
17969
|
+
return {
|
|
17970
|
+
corner: currentPoint,
|
|
17971
|
+
start: startPoint,
|
|
17972
|
+
end: endPoint,
|
|
17973
|
+
cp1,
|
|
17974
|
+
cp2,
|
|
17975
|
+
actualRadius
|
|
17976
|
+
};
|
|
17977
|
+
}
|
|
17978
|
+
|
|
17979
|
+
/**
|
|
17980
|
+
* Apply corner radius to a polygon defined by points
|
|
17981
|
+
*/
|
|
17982
|
+
function applyCornerRadiusToPolygon(points, radius) {
|
|
17983
|
+
let radiusAsPercentage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
17984
|
+
if (points.length < 3) {
|
|
17985
|
+
throw new Error('Polygon must have at least 3 points');
|
|
17986
|
+
}
|
|
17987
|
+
|
|
17988
|
+
// Calculate bounding box if radius is percentage-based
|
|
17989
|
+
let actualRadius = radius;
|
|
17990
|
+
if (radiusAsPercentage) {
|
|
17991
|
+
const minX = Math.min(...points.map(p => p.x));
|
|
17992
|
+
const maxX = Math.max(...points.map(p => p.x));
|
|
17993
|
+
const minY = Math.min(...points.map(p => p.y));
|
|
17994
|
+
const maxY = Math.max(...points.map(p => p.y));
|
|
17995
|
+
const width = maxX - minX;
|
|
17996
|
+
const height = maxY - minY;
|
|
17997
|
+
const minDimension = Math.min(width, height);
|
|
17998
|
+
actualRadius = radius / 100 * minDimension;
|
|
17999
|
+
}
|
|
18000
|
+
const roundedCorners = [];
|
|
18001
|
+
for (let i = 0; i < points.length; i++) {
|
|
18002
|
+
const prevIndex = (i - 1 + points.length) % points.length;
|
|
18003
|
+
const nextIndex = (i + 1) % points.length;
|
|
18004
|
+
const prevPoint = points[prevIndex];
|
|
18005
|
+
const currentPoint = points[i];
|
|
18006
|
+
const nextPoint = points[nextIndex];
|
|
18007
|
+
const roundedCorner = calculateRoundedCorner(prevPoint, currentPoint, nextPoint, actualRadius);
|
|
18008
|
+
roundedCorners.push(roundedCorner);
|
|
18009
|
+
}
|
|
18010
|
+
return roundedCorners;
|
|
18011
|
+
}
|
|
18012
|
+
|
|
18013
|
+
/**
|
|
18014
|
+
* Render a rounded polygon to a canvas context
|
|
18015
|
+
*/
|
|
18016
|
+
function renderRoundedPolygon(ctx, roundedCorners) {
|
|
18017
|
+
let closed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
18018
|
+
if (roundedCorners.length === 0) return;
|
|
18019
|
+
ctx.beginPath();
|
|
18020
|
+
|
|
18021
|
+
// Start at the first corner's start point
|
|
18022
|
+
const firstCorner = roundedCorners[0];
|
|
18023
|
+
ctx.moveTo(firstCorner.start.x, firstCorner.start.y);
|
|
18024
|
+
for (let i = 0; i < roundedCorners.length; i++) {
|
|
18025
|
+
const corner = roundedCorners[i];
|
|
18026
|
+
const nextIndex = (i + 1) % roundedCorners.length;
|
|
18027
|
+
const nextCorner = roundedCorners[nextIndex];
|
|
18028
|
+
|
|
18029
|
+
// Draw the rounded corner using bezier curve
|
|
18030
|
+
ctx.bezierCurveTo(corner.cp1.x, corner.cp1.y, corner.cp2.x, corner.cp2.y, corner.end.x, corner.end.y);
|
|
18031
|
+
|
|
18032
|
+
// Draw line to next corner's start point (if not the last segment in open path)
|
|
18033
|
+
if (i < roundedCorners.length - 1 || closed) {
|
|
18034
|
+
ctx.lineTo(nextCorner.start.x, nextCorner.start.y);
|
|
18035
|
+
}
|
|
18036
|
+
}
|
|
18037
|
+
if (closed) {
|
|
18038
|
+
ctx.closePath();
|
|
18039
|
+
}
|
|
18040
|
+
}
|
|
18041
|
+
|
|
18042
|
+
/**
|
|
18043
|
+
* Generate SVG path data for a rounded polygon
|
|
18044
|
+
*/
|
|
18045
|
+
function generateRoundedPolygonPath(roundedCorners) {
|
|
18046
|
+
let closed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
18047
|
+
if (roundedCorners.length === 0) return '';
|
|
18048
|
+
const pathData = [];
|
|
18049
|
+
const firstCorner = roundedCorners[0];
|
|
18050
|
+
|
|
18051
|
+
// Move to first corner's start point
|
|
18052
|
+
pathData.push(`M ${firstCorner.start.x} ${firstCorner.start.y}`);
|
|
18053
|
+
for (let i = 0; i < roundedCorners.length; i++) {
|
|
18054
|
+
const corner = roundedCorners[i];
|
|
18055
|
+
const nextIndex = (i + 1) % roundedCorners.length;
|
|
18056
|
+
const nextCorner = roundedCorners[nextIndex];
|
|
18057
|
+
|
|
18058
|
+
// Add bezier curve for the rounded corner
|
|
18059
|
+
pathData.push(`C ${corner.cp1.x} ${corner.cp1.y} ${corner.cp2.x} ${corner.cp2.y} ${corner.end.x} ${corner.end.y}`);
|
|
18060
|
+
|
|
18061
|
+
// Add line to next corner's start point (if not the last segment in open path)
|
|
18062
|
+
if (i < roundedCorners.length - 1 || closed) {
|
|
18063
|
+
pathData.push(`L ${nextCorner.start.x} ${nextCorner.start.y}`);
|
|
18064
|
+
}
|
|
18065
|
+
}
|
|
18066
|
+
if (closed) {
|
|
18067
|
+
pathData.push('Z');
|
|
18068
|
+
}
|
|
18069
|
+
return pathData.join(' ');
|
|
18070
|
+
}
|
|
18071
|
+
|
|
17895
18072
|
const triangleDefaultValues = {
|
|
17896
18073
|
width: 100,
|
|
17897
|
-
height: 100
|
|
18074
|
+
height: 100,
|
|
18075
|
+
cornerRadius: 0
|
|
17898
18076
|
};
|
|
18077
|
+
const TRIANGLE_PROPS = ['cornerRadius'];
|
|
17899
18078
|
class Triangle extends FabricObject {
|
|
17900
18079
|
static getDefaults() {
|
|
17901
18080
|
return {
|
|
@@ -17914,34 +18093,90 @@ class Triangle extends FabricObject {
|
|
|
17914
18093
|
this.setOptions(options);
|
|
17915
18094
|
}
|
|
17916
18095
|
|
|
18096
|
+
/**
|
|
18097
|
+
* Get triangle points as an array of XY coordinates
|
|
18098
|
+
* @private
|
|
18099
|
+
*/
|
|
18100
|
+
_getTrianglePoints() {
|
|
18101
|
+
const widthBy2 = this.width / 2;
|
|
18102
|
+
const heightBy2 = this.height / 2;
|
|
18103
|
+
return [{
|
|
18104
|
+
x: -widthBy2,
|
|
18105
|
+
y: heightBy2
|
|
18106
|
+
},
|
|
18107
|
+
// bottom left
|
|
18108
|
+
{
|
|
18109
|
+
x: 0,
|
|
18110
|
+
y: -heightBy2
|
|
18111
|
+
},
|
|
18112
|
+
// top center
|
|
18113
|
+
{
|
|
18114
|
+
x: widthBy2,
|
|
18115
|
+
y: heightBy2
|
|
18116
|
+
} // bottom right
|
|
18117
|
+
];
|
|
18118
|
+
}
|
|
18119
|
+
|
|
17917
18120
|
/**
|
|
17918
18121
|
* @private
|
|
17919
18122
|
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
17920
18123
|
*/
|
|
17921
18124
|
_render(ctx) {
|
|
17922
|
-
|
|
17923
|
-
|
|
17924
|
-
|
|
17925
|
-
|
|
17926
|
-
|
|
17927
|
-
|
|
17928
|
-
|
|
18125
|
+
if (this.cornerRadius > 0) {
|
|
18126
|
+
// Render rounded triangle
|
|
18127
|
+
const points = this._getTrianglePoints();
|
|
18128
|
+
const roundedCorners = applyCornerRadiusToPolygon(points, this.cornerRadius);
|
|
18129
|
+
renderRoundedPolygon(ctx, roundedCorners, true);
|
|
18130
|
+
} else {
|
|
18131
|
+
// Render sharp triangle (original implementation)
|
|
18132
|
+
const widthBy2 = this.width / 2;
|
|
18133
|
+
const heightBy2 = this.height / 2;
|
|
18134
|
+
ctx.beginPath();
|
|
18135
|
+
ctx.moveTo(-widthBy2, heightBy2);
|
|
18136
|
+
ctx.lineTo(0, -heightBy2);
|
|
18137
|
+
ctx.lineTo(widthBy2, heightBy2);
|
|
18138
|
+
ctx.closePath();
|
|
18139
|
+
}
|
|
17929
18140
|
this._renderPaintInOrder(ctx);
|
|
17930
18141
|
}
|
|
17931
18142
|
|
|
18143
|
+
/**
|
|
18144
|
+
* Returns object representation of an instance
|
|
18145
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
18146
|
+
* @return {Object} object representation of an instance
|
|
18147
|
+
*/
|
|
18148
|
+
toObject() {
|
|
18149
|
+
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
18150
|
+
return super.toObject([...TRIANGLE_PROPS, ...propertiesToInclude]);
|
|
18151
|
+
}
|
|
18152
|
+
|
|
17932
18153
|
/**
|
|
17933
18154
|
* Returns svg representation of an instance
|
|
17934
18155
|
* @return {Array} an array of strings with the specific svg representation
|
|
17935
18156
|
* of the instance
|
|
17936
18157
|
*/
|
|
17937
18158
|
_toSVG() {
|
|
17938
|
-
|
|
17939
|
-
|
|
17940
|
-
points =
|
|
17941
|
-
|
|
18159
|
+
if (this.cornerRadius > 0) {
|
|
18160
|
+
// Generate rounded triangle as path
|
|
18161
|
+
const points = this._getTrianglePoints();
|
|
18162
|
+
const roundedCorners = applyCornerRadiusToPolygon(points, this.cornerRadius);
|
|
18163
|
+
const pathData = generateRoundedPolygonPath(roundedCorners, true);
|
|
18164
|
+
return ['<path ', 'COMMON_PARTS', `d="${pathData}" />`];
|
|
18165
|
+
} else {
|
|
18166
|
+
// Original sharp triangle implementation
|
|
18167
|
+
const widthBy2 = this.width / 2;
|
|
18168
|
+
const heightBy2 = this.height / 2;
|
|
18169
|
+
const points = `${-widthBy2} ${heightBy2},0 ${-heightBy2},${widthBy2} ${heightBy2}`;
|
|
18170
|
+
return ['<polygon ', 'COMMON_PARTS', 'points="', points, '" />'];
|
|
18171
|
+
}
|
|
17942
18172
|
}
|
|
17943
18173
|
}
|
|
18174
|
+
/**
|
|
18175
|
+
* Corner radius for rounded triangle corners
|
|
18176
|
+
* @type Number
|
|
18177
|
+
*/
|
|
17944
18178
|
_defineProperty(Triangle, "type", 'Triangle');
|
|
18179
|
+
_defineProperty(Triangle, "cacheProperties", [...cacheProperties, ...TRIANGLE_PROPS]);
|
|
17945
18180
|
_defineProperty(Triangle, "ownDefaults", triangleDefaultValues);
|
|
17946
18181
|
classRegistry.setClass(Triangle);
|
|
17947
18182
|
classRegistry.setSVGClass(Triangle);
|
|
@@ -18106,7 +18341,8 @@ const polylineDefaultValues = {
|
|
|
18106
18341
|
/**
|
|
18107
18342
|
* @deprecated transient option soon to be removed in favor of a different design
|
|
18108
18343
|
*/
|
|
18109
|
-
exactBoundingBox: false
|
|
18344
|
+
exactBoundingBox: false,
|
|
18345
|
+
cornerRadius: 0
|
|
18110
18346
|
};
|
|
18111
18347
|
class Polyline extends FabricObject {
|
|
18112
18348
|
static getDefaults() {
|
|
@@ -18320,7 +18556,7 @@ class Polyline extends FabricObject {
|
|
|
18320
18556
|
toObject() {
|
|
18321
18557
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
18322
18558
|
return {
|
|
18323
|
-
...super.toObject(propertiesToInclude),
|
|
18559
|
+
...super.toObject(['cornerRadius', ...propertiesToInclude]),
|
|
18324
18560
|
points: this.points.map(_ref => {
|
|
18325
18561
|
let {
|
|
18326
18562
|
x,
|
|
@@ -18340,14 +18576,28 @@ class Polyline extends FabricObject {
|
|
|
18340
18576
|
* of the instance
|
|
18341
18577
|
*/
|
|
18342
18578
|
_toSVG() {
|
|
18343
|
-
|
|
18344
|
-
|
|
18345
|
-
|
|
18346
|
-
|
|
18347
|
-
|
|
18348
|
-
|
|
18579
|
+
if (this.cornerRadius > 0 && this.points.length >= 3) {
|
|
18580
|
+
// Generate rounded polygon/polyline as path
|
|
18581
|
+
const diffX = this.pathOffset.x;
|
|
18582
|
+
const diffY = this.pathOffset.y;
|
|
18583
|
+
const adjustedPoints = this.points.map(point => ({
|
|
18584
|
+
x: point.x - diffX,
|
|
18585
|
+
y: point.y - diffY
|
|
18586
|
+
}));
|
|
18587
|
+
const roundedCorners = applyCornerRadiusToPolygon(adjustedPoints, this.cornerRadius);
|
|
18588
|
+
const pathData = generateRoundedPolygonPath(roundedCorners, !this.isOpen());
|
|
18589
|
+
return ['<path ', 'COMMON_PARTS', `d="${pathData}" />\n`];
|
|
18590
|
+
} else {
|
|
18591
|
+
// Original sharp corners implementation
|
|
18592
|
+
const points = [];
|
|
18593
|
+
const diffX = this.pathOffset.x;
|
|
18594
|
+
const diffY = this.pathOffset.y;
|
|
18595
|
+
const NUM_FRACTION_DIGITS = config.NUM_FRACTION_DIGITS;
|
|
18596
|
+
for (let i = 0, len = this.points.length; i < len; i++) {
|
|
18597
|
+
points.push(toFixed(this.points[i].x - diffX, NUM_FRACTION_DIGITS), ',', toFixed(this.points[i].y - diffY, NUM_FRACTION_DIGITS), ' ');
|
|
18598
|
+
}
|
|
18599
|
+
return [`<${this.constructor.type.toLowerCase()} `, 'COMMON_PARTS', `points="${points.join('')}" />\n`];
|
|
18349
18600
|
}
|
|
18350
|
-
return [`<${this.constructor.type.toLowerCase()} `, 'COMMON_PARTS', `points="${points.join('')}" />\n`];
|
|
18351
18601
|
}
|
|
18352
18602
|
|
|
18353
18603
|
/**
|
|
@@ -18363,13 +18613,24 @@ class Polyline extends FabricObject {
|
|
|
18363
18613
|
// NaN comes from parseFloat of a empty string in parser
|
|
18364
18614
|
return;
|
|
18365
18615
|
}
|
|
18366
|
-
|
|
18367
|
-
|
|
18368
|
-
|
|
18369
|
-
|
|
18370
|
-
|
|
18616
|
+
if (this.cornerRadius > 0 && len >= 3) {
|
|
18617
|
+
// Render with rounded corners
|
|
18618
|
+
const adjustedPoints = this.points.map(point => ({
|
|
18619
|
+
x: point.x - x,
|
|
18620
|
+
y: point.y - y
|
|
18621
|
+
}));
|
|
18622
|
+
const roundedCorners = applyCornerRadiusToPolygon(adjustedPoints, this.cornerRadius);
|
|
18623
|
+
renderRoundedPolygon(ctx, roundedCorners, !this.isOpen());
|
|
18624
|
+
} else {
|
|
18625
|
+
// Original sharp corners implementation
|
|
18626
|
+
ctx.beginPath();
|
|
18627
|
+
ctx.moveTo(this.points[0].x - x, this.points[0].y - y);
|
|
18628
|
+
for (let i = 0; i < len; i++) {
|
|
18629
|
+
const point = this.points[i];
|
|
18630
|
+
ctx.lineTo(point.x - x, point.y - y);
|
|
18631
|
+
}
|
|
18632
|
+
!this.isOpen() && ctx.closePath();
|
|
18371
18633
|
}
|
|
18372
|
-
!this.isOpen() && ctx.closePath();
|
|
18373
18634
|
this._renderPaintInOrder(ctx);
|
|
18374
18635
|
}
|
|
18375
18636
|
|
|
@@ -18434,10 +18695,15 @@ class Polyline extends FabricObject {
|
|
|
18434
18695
|
* @type Boolean
|
|
18435
18696
|
* @default false
|
|
18436
18697
|
*/
|
|
18698
|
+
/**
|
|
18699
|
+
* Corner radius for rounded corners
|
|
18700
|
+
* @type Number
|
|
18701
|
+
* @default 0
|
|
18702
|
+
*/
|
|
18437
18703
|
_defineProperty(Polyline, "ownDefaults", polylineDefaultValues);
|
|
18438
18704
|
_defineProperty(Polyline, "type", 'Polyline');
|
|
18439
18705
|
_defineProperty(Polyline, "layoutProperties", [SKEW_X, SKEW_Y, 'strokeLineCap', 'strokeLineJoin', 'strokeMiterLimit', 'strokeWidth', 'strokeUniform', 'points']);
|
|
18440
|
-
_defineProperty(Polyline, "cacheProperties", [...cacheProperties, 'points']);
|
|
18706
|
+
_defineProperty(Polyline, "cacheProperties", [...cacheProperties, 'points', 'cornerRadius']);
|
|
18441
18707
|
_defineProperty(Polyline, "ATTRIBUTE_NAMES", [...SHARED_ATTRIBUTES]);
|
|
18442
18708
|
classRegistry.setClass(Polyline);
|
|
18443
18709
|
classRegistry.setSVGClass(Polyline);
|
|
@@ -18731,8 +18997,8 @@ _defineProperty(StyledText, "_styleProperties", styleProperties);
|
|
|
18731
18997
|
// Global measurement context - reused for performance
|
|
18732
18998
|
let measurementContext = null;
|
|
18733
18999
|
|
|
18734
|
-
/**
|
|
18735
|
-
* Get or create the shared measurement context
|
|
19000
|
+
/**
|
|
19001
|
+
* Get or create the shared measurement context
|
|
18736
19002
|
*/
|
|
18737
19003
|
function getMeasurementContext() {
|
|
18738
19004
|
if (!measurementContext) {
|
|
@@ -18745,8 +19011,8 @@ function getMeasurementContext() {
|
|
|
18745
19011
|
return measurementContext;
|
|
18746
19012
|
}
|
|
18747
19013
|
|
|
18748
|
-
/**
|
|
18749
|
-
* Measure a single grapheme
|
|
19014
|
+
/**
|
|
19015
|
+
* Measure a single grapheme
|
|
18750
19016
|
*/
|
|
18751
19017
|
function measureGrapheme(grapheme, options, ctx) {
|
|
18752
19018
|
// Check cache first
|
|
@@ -18779,8 +19045,8 @@ function measureGrapheme(grapheme, options, ctx) {
|
|
|
18779
19045
|
return measurement;
|
|
18780
19046
|
}
|
|
18781
19047
|
|
|
18782
|
-
/**
|
|
18783
|
-
* Measure a grapheme with kerning relative to previous character
|
|
19048
|
+
/**
|
|
19049
|
+
* Measure a grapheme with kerning relative to previous character
|
|
18784
19050
|
*/
|
|
18785
19051
|
function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
|
|
18786
19052
|
// Get individual measurement
|
|
@@ -18821,8 +19087,8 @@ function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
|
|
|
18821
19087
|
};
|
|
18822
19088
|
}
|
|
18823
19089
|
|
|
18824
|
-
/**
|
|
18825
|
-
* Get font metrics for layout calculations
|
|
19090
|
+
/**
|
|
19091
|
+
* Get font metrics for layout calculations
|
|
18826
19092
|
*/
|
|
18827
19093
|
function getFontMetrics(options) {
|
|
18828
19094
|
var _metrics$fontBounding, _metrics$fontBounding2, _metrics$actualBoundi, _metrics$actualBoundi2;
|
|
@@ -18857,8 +19123,8 @@ function getFontMetrics(options) {
|
|
|
18857
19123
|
return result;
|
|
18858
19124
|
}
|
|
18859
19125
|
|
|
18860
|
-
/**
|
|
18861
|
-
* Apply font styling to canvas context
|
|
19126
|
+
/**
|
|
19127
|
+
* Apply font styling to canvas context
|
|
18862
19128
|
*/
|
|
18863
19129
|
function applyFontStyle(ctx, options) {
|
|
18864
19130
|
const fontDeclaration = getFontDeclaration(options);
|
|
@@ -18875,8 +19141,8 @@ function applyFontStyle(ctx, options) {
|
|
|
18875
19141
|
ctx.textBaseline = 'alphabetic';
|
|
18876
19142
|
}
|
|
18877
19143
|
|
|
18878
|
-
/**
|
|
18879
|
-
* Generate font declaration string
|
|
19144
|
+
/**
|
|
19145
|
+
* Generate font declaration string
|
|
18880
19146
|
*/
|
|
18881
19147
|
function getFontDeclaration(options) {
|
|
18882
19148
|
const {
|
|
@@ -18891,8 +19157,8 @@ function getFontDeclaration(options) {
|
|
|
18891
19157
|
return `${fontStyle} ${fontWeight} ${fontSize}px ${normalizedFamily}`;
|
|
18892
19158
|
}
|
|
18893
19159
|
|
|
18894
|
-
/**
|
|
18895
|
-
* LRU Cache implementation for measurements
|
|
19160
|
+
/**
|
|
19161
|
+
* LRU Cache implementation for measurements
|
|
18896
19162
|
*/
|
|
18897
19163
|
class LRUCache {
|
|
18898
19164
|
constructor() {
|
|
@@ -18954,8 +19220,8 @@ class LRUCache {
|
|
|
18954
19220
|
}
|
|
18955
19221
|
}
|
|
18956
19222
|
|
|
18957
|
-
/**
|
|
18958
|
-
* Advanced measurement cache with font-aware keys
|
|
19223
|
+
/**
|
|
19224
|
+
* Advanced measurement cache with font-aware keys
|
|
18959
19225
|
*/
|
|
18960
19226
|
class MeasurementCache {
|
|
18961
19227
|
constructor() {
|
|
@@ -18982,8 +19248,8 @@ class MeasurementCache {
|
|
|
18982
19248
|
}
|
|
18983
19249
|
}
|
|
18984
19250
|
|
|
18985
|
-
/**
|
|
18986
|
-
* Kerning cache for character pairs
|
|
19251
|
+
/**
|
|
19252
|
+
* Kerning cache for character pairs
|
|
18987
19253
|
*/
|
|
18988
19254
|
class KerningCache {
|
|
18989
19255
|
constructor() {
|
|
@@ -19011,8 +19277,8 @@ class KerningCache {
|
|
|
19011
19277
|
}
|
|
19012
19278
|
}
|
|
19013
19279
|
|
|
19014
|
-
/**
|
|
19015
|
-
* Font metrics cache
|
|
19280
|
+
/**
|
|
19281
|
+
* Font metrics cache
|
|
19016
19282
|
*/
|
|
19017
19283
|
class FontMetricsCache {
|
|
19018
19284
|
constructor() {
|
|
@@ -19039,17 +19305,17 @@ const measurementCache = new MeasurementCache();
|
|
|
19039
19305
|
const kerningCache = new KerningCache();
|
|
19040
19306
|
const fontMetricsCache = new FontMetricsCache();
|
|
19041
19307
|
|
|
19042
|
-
/**
|
|
19043
|
-
* Unicode and Internationalization Support
|
|
19044
|
-
*
|
|
19045
|
-
* Enhanced Unicode handling for complex scripts, RTL/LTR text,
|
|
19046
|
-
* and grapheme cluster boundary detection.
|
|
19308
|
+
/**
|
|
19309
|
+
* Unicode and Internationalization Support
|
|
19310
|
+
*
|
|
19311
|
+
* Enhanced Unicode handling for complex scripts, RTL/LTR text,
|
|
19312
|
+
* and grapheme cluster boundary detection.
|
|
19047
19313
|
*/
|
|
19048
19314
|
|
|
19049
19315
|
|
|
19050
|
-
/**
|
|
19051
|
-
* Enhanced grapheme segmentation using Intl.Segmenter when available
|
|
19052
|
-
* with fallback to existing graphemeSplit implementation
|
|
19316
|
+
/**
|
|
19317
|
+
* Enhanced grapheme segmentation using Intl.Segmenter when available
|
|
19318
|
+
* with fallback to existing graphemeSplit implementation
|
|
19053
19319
|
*/
|
|
19054
19320
|
function segmentGraphemes(text) {
|
|
19055
19321
|
// Use native Intl.Segmenter if available
|
|
@@ -19069,15 +19335,15 @@ function segmentGraphemes(text) {
|
|
|
19069
19335
|
return graphemeSplit(text);
|
|
19070
19336
|
}
|
|
19071
19337
|
|
|
19072
|
-
/**
|
|
19073
|
-
* Ellipsis Text Truncation System
|
|
19074
|
-
*
|
|
19075
|
-
* Implements text truncation with ellipsis when content exceeds bounds,
|
|
19076
|
-
* using binary search for optimal truncation points.
|
|
19338
|
+
/**
|
|
19339
|
+
* Ellipsis Text Truncation System
|
|
19340
|
+
*
|
|
19341
|
+
* Implements text truncation with ellipsis when content exceeds bounds,
|
|
19342
|
+
* using binary search for optimal truncation points.
|
|
19077
19343
|
*/
|
|
19078
19344
|
|
|
19079
|
-
/**
|
|
19080
|
-
* Apply ellipsis truncation to text based on width/height constraints
|
|
19345
|
+
/**
|
|
19346
|
+
* Apply ellipsis truncation to text based on width/height constraints
|
|
19081
19347
|
*/
|
|
19082
19348
|
function applyEllipsis(text, options) {
|
|
19083
19349
|
const {
|
|
@@ -19147,8 +19413,8 @@ function applyEllipsis(text, options) {
|
|
|
19147
19413
|
};
|
|
19148
19414
|
}
|
|
19149
19415
|
|
|
19150
|
-
/**
|
|
19151
|
-
* Truncate text based on width constraint using binary search
|
|
19416
|
+
/**
|
|
19417
|
+
* Truncate text based on width constraint using binary search
|
|
19152
19418
|
*/
|
|
19153
19419
|
function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn) {
|
|
19154
19420
|
const graphemes = segmentGraphemes(text);
|
|
@@ -19198,8 +19464,8 @@ function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn)
|
|
|
19198
19464
|
};
|
|
19199
19465
|
}
|
|
19200
19466
|
|
|
19201
|
-
/**
|
|
19202
|
-
* Truncate text based on height constraint
|
|
19467
|
+
/**
|
|
19468
|
+
* Truncate text based on height constraint
|
|
19203
19469
|
*/
|
|
19204
19470
|
function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
|
|
19205
19471
|
var _measureFn;
|
|
@@ -19247,19 +19513,19 @@ function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
|
|
|
19247
19513
|
return truncateByWidth(lines[0], firstLineWidth, ellipsisChar, 0, measureFn);
|
|
19248
19514
|
}
|
|
19249
19515
|
|
|
19250
|
-
/**
|
|
19251
|
-
* Core Text Layout Engine
|
|
19252
|
-
*
|
|
19253
|
-
* Implements Konva-compatible text layout with support for:
|
|
19254
|
-
* - Multiple wrap modes (word/char/none)
|
|
19255
|
-
* - Ellipsis truncation
|
|
19256
|
-
* - Justify alignment with proper space distribution
|
|
19257
|
-
* - RTL/LTR text direction
|
|
19258
|
-
* - Advanced grapheme handling
|
|
19516
|
+
/**
|
|
19517
|
+
* Core Text Layout Engine
|
|
19518
|
+
*
|
|
19519
|
+
* Implements Konva-compatible text layout with support for:
|
|
19520
|
+
* - Multiple wrap modes (word/char/none)
|
|
19521
|
+
* - Ellipsis truncation
|
|
19522
|
+
* - Justify alignment with proper space distribution
|
|
19523
|
+
* - RTL/LTR text direction
|
|
19524
|
+
* - Advanced grapheme handling
|
|
19259
19525
|
*/
|
|
19260
19526
|
|
|
19261
|
-
/**
|
|
19262
|
-
* Main text layout function - converts text and options into positioned layout
|
|
19527
|
+
/**
|
|
19528
|
+
* Main text layout function - converts text and options into positioned layout
|
|
19263
19529
|
*/
|
|
19264
19530
|
function layoutText(options) {
|
|
19265
19531
|
var _ellipsisResult;
|
|
@@ -19378,8 +19644,8 @@ function layoutText(options) {
|
|
|
19378
19644
|
};
|
|
19379
19645
|
}
|
|
19380
19646
|
|
|
19381
|
-
/**
|
|
19382
|
-
* Layout a single paragraph with wrapping
|
|
19647
|
+
/**
|
|
19648
|
+
* Layout a single paragraph with wrapping
|
|
19383
19649
|
*/
|
|
19384
19650
|
function layoutParagraph(text, options) {
|
|
19385
19651
|
const {
|
|
@@ -19414,8 +19680,8 @@ function layoutParagraph(text, options) {
|
|
|
19414
19680
|
return layoutLines;
|
|
19415
19681
|
}
|
|
19416
19682
|
|
|
19417
|
-
/**
|
|
19418
|
-
* Layout a single line of text (no wrapping)
|
|
19683
|
+
/**
|
|
19684
|
+
* Layout a single line of text (no wrapping)
|
|
19419
19685
|
*/
|
|
19420
19686
|
function layoutSingleLine(text, options) {
|
|
19421
19687
|
let textOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -19485,8 +19751,8 @@ function layoutSingleLine(text, options) {
|
|
|
19485
19751
|
};
|
|
19486
19752
|
}
|
|
19487
19753
|
|
|
19488
|
-
/**
|
|
19489
|
-
* Word-based wrapping algorithm
|
|
19754
|
+
/**
|
|
19755
|
+
* Word-based wrapping algorithm
|
|
19490
19756
|
*/
|
|
19491
19757
|
function wrapByWords(text, maxWidth, options) {
|
|
19492
19758
|
const lines = [];
|
|
@@ -19519,8 +19785,8 @@ function wrapByWords(text, maxWidth, options) {
|
|
|
19519
19785
|
return lines.length > 0 ? lines : [''];
|
|
19520
19786
|
}
|
|
19521
19787
|
|
|
19522
|
-
/**
|
|
19523
|
-
* Character-based wrapping algorithm
|
|
19788
|
+
/**
|
|
19789
|
+
* Character-based wrapping algorithm
|
|
19524
19790
|
*/
|
|
19525
19791
|
function wrapByCharacters(text, maxWidth, options) {
|
|
19526
19792
|
const lines = [];
|
|
@@ -19542,8 +19808,8 @@ function wrapByCharacters(text, maxWidth, options) {
|
|
|
19542
19808
|
return lines.length > 0 ? lines : [''];
|
|
19543
19809
|
}
|
|
19544
19810
|
|
|
19545
|
-
/**
|
|
19546
|
-
* Apply text alignment to lines
|
|
19811
|
+
/**
|
|
19812
|
+
* Apply text alignment to lines
|
|
19547
19813
|
*/
|
|
19548
19814
|
function applyAlignment(lines, align, containerWidth, options) {
|
|
19549
19815
|
return lines.map(line => {
|
|
@@ -19577,8 +19843,8 @@ function applyAlignment(lines, align, containerWidth, options) {
|
|
|
19577
19843
|
});
|
|
19578
19844
|
}
|
|
19579
19845
|
|
|
19580
|
-
/**
|
|
19581
|
-
* Apply justify alignment by expanding spaces
|
|
19846
|
+
/**
|
|
19847
|
+
* Apply justify alignment by expanding spaces
|
|
19582
19848
|
*/
|
|
19583
19849
|
function applyJustification(line, containerWidth, options) {
|
|
19584
19850
|
const spaces = line.graphemes.filter(g => /\s/.test(g)).length;
|
|
@@ -19601,8 +19867,8 @@ function applyJustification(line, containerWidth, options) {
|
|
|
19601
19867
|
return line;
|
|
19602
19868
|
}
|
|
19603
19869
|
|
|
19604
|
-
/**
|
|
19605
|
-
* Calculate vertical alignment offset
|
|
19870
|
+
/**
|
|
19871
|
+
* Calculate vertical alignment offset
|
|
19606
19872
|
*/
|
|
19607
19873
|
function calculateVerticalOffset(contentHeight, containerHeight, align) {
|
|
19608
19874
|
switch (align) {
|
|
@@ -19616,8 +19882,8 @@ function calculateVerticalOffset(contentHeight, containerHeight, align) {
|
|
|
19616
19882
|
}
|
|
19617
19883
|
}
|
|
19618
19884
|
|
|
19619
|
-
/**
|
|
19620
|
-
* Handle height overflow with ellipsis
|
|
19885
|
+
/**
|
|
19886
|
+
* Handle height overflow with ellipsis
|
|
19621
19887
|
*/
|
|
19622
19888
|
function handleHeightOverflow(existingLines, overflowLine, remainingHeight, options) {
|
|
19623
19889
|
// If ellipsis is enabled, try to fit part of the overflow line
|
|
@@ -19646,8 +19912,8 @@ function handleHeightOverflow(existingLines, overflowLine, remainingHeight, opti
|
|
|
19646
19912
|
};
|
|
19647
19913
|
}
|
|
19648
19914
|
|
|
19649
|
-
/**
|
|
19650
|
-
* Create empty line for empty paragraphs
|
|
19915
|
+
/**
|
|
19916
|
+
* Create empty line for empty paragraphs
|
|
19651
19917
|
*/
|
|
19652
19918
|
function createEmptyLine(options) {
|
|
19653
19919
|
const height = options.fontSize * options.lineHeight;
|
|
@@ -19663,8 +19929,8 @@ function createEmptyLine(options) {
|
|
|
19663
19929
|
};
|
|
19664
19930
|
}
|
|
19665
19931
|
|
|
19666
|
-
/**
|
|
19667
|
-
* Measure width of a line of text
|
|
19932
|
+
/**
|
|
19933
|
+
* Measure width of a line of text
|
|
19668
19934
|
*/
|
|
19669
19935
|
function measureLineWidth(text, options) {
|
|
19670
19936
|
const graphemes = segmentGraphemes(text);
|
|
@@ -19681,8 +19947,8 @@ function measureLineWidth(text, options) {
|
|
|
19681
19947
|
return width;
|
|
19682
19948
|
}
|
|
19683
19949
|
|
|
19684
|
-
/**
|
|
19685
|
-
* Convert layout options to measurement options
|
|
19950
|
+
/**
|
|
19951
|
+
* Convert layout options to measurement options
|
|
19686
19952
|
*/
|
|
19687
19953
|
function createMeasurementOptions(options) {
|
|
19688
19954
|
return {
|
|
@@ -19925,15 +20191,15 @@ class TextSVGExportMixin extends FabricObjectSVGExportMixin {
|
|
|
19925
20191
|
}
|
|
19926
20192
|
}
|
|
19927
20193
|
|
|
19928
|
-
/**
|
|
19929
|
-
* Browser Line Break Extraction
|
|
19930
|
-
*
|
|
19931
|
-
* Captures exact line breaks as rendered by the browser to ensure
|
|
19932
|
-
* pixel-perfect consistency between DOM editing and canvas rendering.
|
|
20194
|
+
/**
|
|
20195
|
+
* Browser Line Break Extraction
|
|
20196
|
+
*
|
|
20197
|
+
* Captures exact line breaks as rendered by the browser to ensure
|
|
20198
|
+
* pixel-perfect consistency between DOM editing and canvas rendering.
|
|
19933
20199
|
*/
|
|
19934
20200
|
|
|
19935
|
-
/**
|
|
19936
|
-
* Segment text into graphemes safely using Intl.Segmenter or fallback
|
|
20201
|
+
/**
|
|
20202
|
+
* Segment text into graphemes safely using Intl.Segmenter or fallback
|
|
19937
20203
|
*/
|
|
19938
20204
|
function segmentIntoGraphemes(text) {
|
|
19939
20205
|
if (typeof Intl !== 'undefined' && Intl.Segmenter) {
|
|
@@ -19947,9 +20213,9 @@ function segmentIntoGraphemes(text) {
|
|
|
19947
20213
|
return Array.from(text);
|
|
19948
20214
|
}
|
|
19949
20215
|
|
|
19950
|
-
/**
|
|
19951
|
-
* Extract line break information from a textarea by creating a mirror element
|
|
19952
|
-
* with identical computed styles and measuring grapheme positions.
|
|
20216
|
+
/**
|
|
20217
|
+
* Extract line break information from a textarea by creating a mirror element
|
|
20218
|
+
* with identical computed styles and measuring grapheme positions.
|
|
19953
20219
|
*/
|
|
19954
20220
|
function extractLinesFromDOM(textarea) {
|
|
19955
20221
|
const text = textarea.value;
|
|
@@ -20044,16 +20310,16 @@ function extractLinesFromDOM(textarea) {
|
|
|
20044
20310
|
}
|
|
20045
20311
|
}
|
|
20046
20312
|
|
|
20047
|
-
/**
|
|
20048
|
-
* Create a hash of layout-affecting properties to detect when browser lines are still valid
|
|
20313
|
+
/**
|
|
20314
|
+
* Create a hash of layout-affecting properties to detect when browser lines are still valid
|
|
20049
20315
|
*/
|
|
20050
20316
|
function createLayoutHash(target) {
|
|
20051
20317
|
const properties = [target.text, target.width, target.height, target.fontFamily, target.fontSize, target.fontWeight, target.fontStyle, target.lineHeight, target.charSpacing, target.textAlign, target.direction];
|
|
20052
20318
|
return properties.map(p => String(p)).join('|');
|
|
20053
20319
|
}
|
|
20054
20320
|
|
|
20055
|
-
/**
|
|
20056
|
-
* Check if stored browser lines are still valid for the current target state
|
|
20321
|
+
/**
|
|
20322
|
+
* Check if stored browser lines are still valid for the current target state
|
|
20057
20323
|
*/
|
|
20058
20324
|
function areBrowserLinesValid(target, storedHash) {
|
|
20059
20325
|
if (!storedHash || !target.__lastBrowserLines) {
|
|
@@ -20063,24 +20329,24 @@ function areBrowserLinesValid(target, storedHash) {
|
|
|
20063
20329
|
return currentHash === storedHash;
|
|
20064
20330
|
}
|
|
20065
20331
|
|
|
20066
|
-
/**
|
|
20067
|
-
* Store browser lines on a target object with validity hash
|
|
20332
|
+
/**
|
|
20333
|
+
* Store browser lines on a target object with validity hash
|
|
20068
20334
|
*/
|
|
20069
20335
|
function storeBrowserLines(target, lines, layoutHash) {
|
|
20070
20336
|
target.__lastBrowserLines = lines;
|
|
20071
20337
|
target.__lastBrowserLinesHash = createLayoutHash(target);
|
|
20072
20338
|
}
|
|
20073
20339
|
|
|
20074
|
-
/**
|
|
20075
|
-
* Clear stored browser lines from a target object
|
|
20340
|
+
/**
|
|
20341
|
+
* Clear stored browser lines from a target object
|
|
20076
20342
|
*/
|
|
20077
20343
|
function clearBrowserLines(target) {
|
|
20078
20344
|
delete target.__lastBrowserLines;
|
|
20079
20345
|
delete target.__lastBrowserLinesHash;
|
|
20080
20346
|
}
|
|
20081
20347
|
|
|
20082
|
-
/**
|
|
20083
|
-
* Get stored browser lines if they're still valid
|
|
20348
|
+
/**
|
|
20349
|
+
* Get stored browser lines if they're still valid
|
|
20084
20350
|
*/
|
|
20085
20351
|
function getBrowserLines(target) {
|
|
20086
20352
|
const lines = target.__lastBrowserLines;
|
|
@@ -20093,9 +20359,9 @@ function getBrowserLines(target) {
|
|
|
20093
20359
|
|
|
20094
20360
|
let measuringContext;
|
|
20095
20361
|
|
|
20096
|
-
/**
|
|
20097
|
-
* Return a context for measurement of text string.
|
|
20098
|
-
* if created it gets stored for reuse
|
|
20362
|
+
/**
|
|
20363
|
+
* Return a context for measurement of text string.
|
|
20364
|
+
* if created it gets stored for reuse
|
|
20099
20365
|
*/
|
|
20100
20366
|
function getMeasuringContext() {
|
|
20101
20367
|
if (!measuringContext) {
|
|
@@ -20108,17 +20374,17 @@ function getMeasuringContext() {
|
|
|
20108
20374
|
return measuringContext;
|
|
20109
20375
|
}
|
|
20110
20376
|
|
|
20111
|
-
/**
|
|
20112
|
-
* Measure and return the info of a single grapheme.
|
|
20113
|
-
* needs the the info of previous graphemes already filled
|
|
20114
|
-
* Override to customize measuring
|
|
20377
|
+
/**
|
|
20378
|
+
* Measure and return the info of a single grapheme.
|
|
20379
|
+
* needs the the info of previous graphemes already filled
|
|
20380
|
+
* Override to customize measuring
|
|
20115
20381
|
*/
|
|
20116
20382
|
|
|
20117
20383
|
// @TODO this is not complete
|
|
20118
20384
|
|
|
20119
|
-
/**
|
|
20120
|
-
* Text class
|
|
20121
|
-
* @see {@link http://fabricjs.com/fabric-intro-part-2#text}
|
|
20385
|
+
/**
|
|
20386
|
+
* Text class
|
|
20387
|
+
* @see {@link http://fabricjs.com/fabric-intro-part-2#text}
|
|
20122
20388
|
*/
|
|
20123
20389
|
class FabricText extends StyledText {
|
|
20124
20390
|
static getDefaults() {
|
|
@@ -20129,11 +20395,11 @@ class FabricText extends StyledText {
|
|
|
20129
20395
|
}
|
|
20130
20396
|
constructor(text, options) {
|
|
20131
20397
|
super();
|
|
20132
|
-
/**
|
|
20133
|
-
* contains characters bounding boxes
|
|
20134
|
-
* This variable is considered to be protected.
|
|
20135
|
-
* But for how mixins are implemented right now, we can't leave it private
|
|
20136
|
-
* @protected
|
|
20398
|
+
/**
|
|
20399
|
+
* contains characters bounding boxes
|
|
20400
|
+
* This variable is considered to be protected.
|
|
20401
|
+
* But for how mixins are implemented right now, we can't leave it private
|
|
20402
|
+
* @protected
|
|
20137
20403
|
*/
|
|
20138
20404
|
_defineProperty(this, "__charBounds", []);
|
|
20139
20405
|
Object.assign(this, FabricText.ownDefaults);
|
|
@@ -20150,9 +20416,9 @@ class FabricText extends StyledText {
|
|
|
20150
20416
|
this.setCoords();
|
|
20151
20417
|
}
|
|
20152
20418
|
|
|
20153
|
-
/**
|
|
20154
|
-
* If text has a path, it will add the extra information needed
|
|
20155
|
-
* for path and text calculations
|
|
20419
|
+
/**
|
|
20420
|
+
* If text has a path, it will add the extra information needed
|
|
20421
|
+
* for path and text calculations
|
|
20156
20422
|
*/
|
|
20157
20423
|
setPathInfo() {
|
|
20158
20424
|
const path = this.path;
|
|
@@ -20161,10 +20427,10 @@ class FabricText extends StyledText {
|
|
|
20161
20427
|
}
|
|
20162
20428
|
}
|
|
20163
20429
|
|
|
20164
|
-
/**
|
|
20165
|
-
* @private
|
|
20166
|
-
* Divides text into lines of text and lines of graphemes.
|
|
20167
|
-
* Uses browser lines when available for pixel-perfect consistency.
|
|
20430
|
+
/**
|
|
20431
|
+
* @private
|
|
20432
|
+
* Divides text into lines of text and lines of graphemes.
|
|
20433
|
+
* Uses browser lines when available for pixel-perfect consistency.
|
|
20168
20434
|
*/
|
|
20169
20435
|
_splitText() {
|
|
20170
20436
|
// Check if we have valid browser lines and should use them
|
|
@@ -20180,9 +20446,9 @@ class FabricText extends StyledText {
|
|
|
20180
20446
|
return newLines;
|
|
20181
20447
|
}
|
|
20182
20448
|
|
|
20183
|
-
/**
|
|
20184
|
-
* Create TextLinesInfo from browser-extracted lines
|
|
20185
|
-
* @private
|
|
20449
|
+
/**
|
|
20450
|
+
* Create TextLinesInfo from browser-extracted lines
|
|
20451
|
+
* @private
|
|
20186
20452
|
*/
|
|
20187
20453
|
_splitTextFromBrowserLines(browserLines) {
|
|
20188
20454
|
const lines = [];
|
|
@@ -20216,10 +20482,10 @@ class FabricText extends StyledText {
|
|
|
20216
20482
|
return result;
|
|
20217
20483
|
}
|
|
20218
20484
|
|
|
20219
|
-
/**
|
|
20220
|
-
* Initialize or update text dimensions.
|
|
20221
|
-
* Updates this.width and this.height with the proper values.
|
|
20222
|
-
* Does not return dimensions.
|
|
20485
|
+
/**
|
|
20486
|
+
* Initialize or update text dimensions.
|
|
20487
|
+
* Updates this.width and this.height with the proper values.
|
|
20488
|
+
* Does not return dimensions.
|
|
20223
20489
|
*/
|
|
20224
20490
|
initDimensions() {
|
|
20225
20491
|
// Use advanced layout if enabled
|
|
@@ -20242,8 +20508,8 @@ class FabricText extends StyledText {
|
|
|
20242
20508
|
}
|
|
20243
20509
|
}
|
|
20244
20510
|
|
|
20245
|
-
/**
|
|
20246
|
-
* Enlarge space boxes and shift the others
|
|
20511
|
+
/**
|
|
20512
|
+
* Enlarge space boxes and shift the others
|
|
20247
20513
|
*/
|
|
20248
20514
|
enlargeSpaces() {
|
|
20249
20515
|
let diffSpace, currentLineWidth, numberOfSpaces, accumulatedSpace, line, charBound, spaces;
|
|
@@ -20302,18 +20568,18 @@ class FabricText extends StyledText {
|
|
|
20302
20568
|
}
|
|
20303
20569
|
}
|
|
20304
20570
|
|
|
20305
|
-
/**
|
|
20306
|
-
* Advanced layout using new text engine (Konva-compatible)
|
|
20307
|
-
* @private
|
|
20571
|
+
/**
|
|
20572
|
+
* Advanced layout using new text engine (Konva-compatible)
|
|
20573
|
+
* @private
|
|
20308
20574
|
*/
|
|
20309
20575
|
_layoutTextAdvanced() {
|
|
20310
20576
|
const options = this._getAdvancedLayoutOptions();
|
|
20311
20577
|
return layoutText(options);
|
|
20312
20578
|
}
|
|
20313
20579
|
|
|
20314
|
-
/**
|
|
20315
|
-
* Get advanced layout options from current text properties
|
|
20316
|
-
* @private
|
|
20580
|
+
/**
|
|
20581
|
+
* Get advanced layout options from current text properties
|
|
20582
|
+
* @private
|
|
20317
20583
|
*/
|
|
20318
20584
|
_getAdvancedLayoutOptions() {
|
|
20319
20585
|
return {
|
|
@@ -20335,9 +20601,9 @@ class FabricText extends StyledText {
|
|
|
20335
20601
|
};
|
|
20336
20602
|
}
|
|
20337
20603
|
|
|
20338
|
-
/**
|
|
20339
|
-
* Map Fabric textAlign to Konva align format
|
|
20340
|
-
* @private
|
|
20604
|
+
/**
|
|
20605
|
+
* Map Fabric textAlign to Konva align format
|
|
20606
|
+
* @private
|
|
20341
20607
|
*/
|
|
20342
20608
|
_mapTextAlignToAlign(textAlign) {
|
|
20343
20609
|
switch (textAlign) {
|
|
@@ -20358,8 +20624,8 @@ class FabricText extends StyledText {
|
|
|
20358
20624
|
}
|
|
20359
20625
|
}
|
|
20360
20626
|
|
|
20361
|
-
/**
|
|
20362
|
-
* Enhanced initDimensions that uses advanced layout when enabled
|
|
20627
|
+
/**
|
|
20628
|
+
* Enhanced initDimensions that uses advanced layout when enabled
|
|
20363
20629
|
*/
|
|
20364
20630
|
initDimensionsAdvanced() {
|
|
20365
20631
|
if (!this.enableAdvancedLayout) {
|
|
@@ -20376,9 +20642,9 @@ class FabricText extends StyledText {
|
|
|
20376
20642
|
this.dirty = true;
|
|
20377
20643
|
}
|
|
20378
20644
|
|
|
20379
|
-
/**
|
|
20380
|
-
* Convert new layout format to legacy _textLines and __charBounds format
|
|
20381
|
-
* @private
|
|
20645
|
+
/**
|
|
20646
|
+
* Convert new layout format to legacy _textLines and __charBounds format
|
|
20647
|
+
* @private
|
|
20382
20648
|
*/
|
|
20383
20649
|
_convertLayoutToLegacyFormat(layout) {
|
|
20384
20650
|
this._textLines = layout.lines.map(line => line.graphemes);
|
|
@@ -20400,30 +20666,30 @@ class FabricText extends StyledText {
|
|
|
20400
20666
|
}
|
|
20401
20667
|
}
|
|
20402
20668
|
|
|
20403
|
-
/**
|
|
20404
|
-
* Detect if the text line is ended with an hard break
|
|
20405
|
-
* text and itext do not have wrapping, return false
|
|
20406
|
-
* @return {Boolean}
|
|
20669
|
+
/**
|
|
20670
|
+
* Detect if the text line is ended with an hard break
|
|
20671
|
+
* text and itext do not have wrapping, return false
|
|
20672
|
+
* @return {Boolean}
|
|
20407
20673
|
*/
|
|
20408
20674
|
isEndOfWrapping(lineIndex) {
|
|
20409
20675
|
return lineIndex === this._textLines.length - 1;
|
|
20410
20676
|
}
|
|
20411
20677
|
|
|
20412
|
-
/**
|
|
20413
|
-
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
20414
|
-
* and counting style.
|
|
20415
|
-
* It return always 1 for text and Itext. Textbox has its own implementation
|
|
20416
|
-
* @return Number
|
|
20678
|
+
/**
|
|
20679
|
+
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
20680
|
+
* and counting style.
|
|
20681
|
+
* It return always 1 for text and Itext. Textbox has its own implementation
|
|
20682
|
+
* @return Number
|
|
20417
20683
|
*/
|
|
20418
20684
|
|
|
20419
20685
|
missingNewlineOffset(_lineIndex) {
|
|
20420
20686
|
return 1;
|
|
20421
20687
|
}
|
|
20422
20688
|
|
|
20423
|
-
/**
|
|
20424
|
-
* Returns 2d representation (lineIndex and charIndex) of cursor
|
|
20425
|
-
* @param {Number} selectionStart
|
|
20426
|
-
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
20689
|
+
/**
|
|
20690
|
+
* Returns 2d representation (lineIndex and charIndex) of cursor
|
|
20691
|
+
* @param {Number} selectionStart
|
|
20692
|
+
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
20427
20693
|
*/
|
|
20428
20694
|
get2DCursorLocation(selectionStart, skipWrapping) {
|
|
20429
20695
|
const lines = skipWrapping ? this._unwrappedTextLines : this._textLines;
|
|
@@ -20443,24 +20709,24 @@ class FabricText extends StyledText {
|
|
|
20443
20709
|
};
|
|
20444
20710
|
}
|
|
20445
20711
|
|
|
20446
|
-
/**
|
|
20447
|
-
* Returns string representation of an instance
|
|
20448
|
-
* @return {String} String representation of text object
|
|
20712
|
+
/**
|
|
20713
|
+
* Returns string representation of an instance
|
|
20714
|
+
* @return {String} String representation of text object
|
|
20449
20715
|
*/
|
|
20450
20716
|
toString() {
|
|
20451
20717
|
return `#<Text (${this.complexity()}): { "text": "${this.text}", "fontFamily": "${this.fontFamily}" }>`;
|
|
20452
20718
|
}
|
|
20453
20719
|
|
|
20454
|
-
/**
|
|
20455
|
-
* Return the dimension and the zoom level needed to create a cache canvas
|
|
20456
|
-
* big enough to host the object to be cached.
|
|
20457
|
-
* @private
|
|
20458
|
-
* @param {Object} dim.x width of object to be cached
|
|
20459
|
-
* @param {Object} dim.y height of object to be cached
|
|
20460
|
-
* @return {Object}.width width of canvas
|
|
20461
|
-
* @return {Object}.height height of canvas
|
|
20462
|
-
* @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
|
|
20463
|
-
* @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
|
|
20720
|
+
/**
|
|
20721
|
+
* Return the dimension and the zoom level needed to create a cache canvas
|
|
20722
|
+
* big enough to host the object to be cached.
|
|
20723
|
+
* @private
|
|
20724
|
+
* @param {Object} dim.x width of object to be cached
|
|
20725
|
+
* @param {Object} dim.y height of object to be cached
|
|
20726
|
+
* @return {Object}.width width of canvas
|
|
20727
|
+
* @return {Object}.height height of canvas
|
|
20728
|
+
* @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
|
|
20729
|
+
* @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
|
|
20464
20730
|
*/
|
|
20465
20731
|
_getCacheCanvasDimensions() {
|
|
20466
20732
|
const dims = super._getCacheCanvasDimensions();
|
|
@@ -20470,9 +20736,9 @@ class FabricText extends StyledText {
|
|
|
20470
20736
|
return dims;
|
|
20471
20737
|
}
|
|
20472
20738
|
|
|
20473
|
-
/**
|
|
20474
|
-
* @private
|
|
20475
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20739
|
+
/**
|
|
20740
|
+
* @private
|
|
20741
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20476
20742
|
*/
|
|
20477
20743
|
_render(ctx) {
|
|
20478
20744
|
const path = this.path;
|
|
@@ -20485,9 +20751,9 @@ class FabricText extends StyledText {
|
|
|
20485
20751
|
this._renderTextDecoration(ctx, 'linethrough');
|
|
20486
20752
|
}
|
|
20487
20753
|
|
|
20488
|
-
/**
|
|
20489
|
-
* @private
|
|
20490
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20754
|
+
/**
|
|
20755
|
+
* @private
|
|
20756
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20491
20757
|
*/
|
|
20492
20758
|
_renderText(ctx) {
|
|
20493
20759
|
// Skip text rendering if in overlay editing mode
|
|
@@ -20503,15 +20769,15 @@ class FabricText extends StyledText {
|
|
|
20503
20769
|
}
|
|
20504
20770
|
}
|
|
20505
20771
|
|
|
20506
|
-
/**
|
|
20507
|
-
* Set the font parameter of the context with the object properties or with charStyle
|
|
20508
|
-
* @private
|
|
20509
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20510
|
-
* @param {Object} [charStyle] object with font style properties
|
|
20511
|
-
* @param {String} [charStyle.fontFamily] Font Family
|
|
20512
|
-
* @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
|
|
20513
|
-
* @param {String} [charStyle.fontWeight] Font weight
|
|
20514
|
-
* @param {String} [charStyle.fontStyle] Font style (italic|normal)
|
|
20772
|
+
/**
|
|
20773
|
+
* Set the font parameter of the context with the object properties or with charStyle
|
|
20774
|
+
* @private
|
|
20775
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20776
|
+
* @param {Object} [charStyle] object with font style properties
|
|
20777
|
+
* @param {String} [charStyle.fontFamily] Font Family
|
|
20778
|
+
* @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
|
|
20779
|
+
* @param {String} [charStyle.fontWeight] Font weight
|
|
20780
|
+
* @param {String} [charStyle.fontStyle] Font style (italic|normal)
|
|
20515
20781
|
*/
|
|
20516
20782
|
_setTextStyles(ctx, charStyle, forMeasuring) {
|
|
20517
20783
|
ctx.textBaseline = 'alphabetic';
|
|
@@ -20531,11 +20797,11 @@ class FabricText extends StyledText {
|
|
|
20531
20797
|
ctx.font = this._getFontDeclaration(charStyle, forMeasuring);
|
|
20532
20798
|
}
|
|
20533
20799
|
|
|
20534
|
-
/**
|
|
20535
|
-
* calculate and return the text Width measuring each line.
|
|
20536
|
-
* @private
|
|
20537
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20538
|
-
* @return {Number} Maximum width of Text object
|
|
20800
|
+
/**
|
|
20801
|
+
* calculate and return the text Width measuring each line.
|
|
20802
|
+
* @private
|
|
20803
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20804
|
+
* @return {Number} Maximum width of Text object
|
|
20539
20805
|
*/
|
|
20540
20806
|
calcTextWidth() {
|
|
20541
20807
|
let maxWidth = this.getLineWidth(0);
|
|
@@ -20548,23 +20814,23 @@ class FabricText extends StyledText {
|
|
|
20548
20814
|
return maxWidth;
|
|
20549
20815
|
}
|
|
20550
20816
|
|
|
20551
|
-
/**
|
|
20552
|
-
* @private
|
|
20553
|
-
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20554
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20555
|
-
* @param {String} line Text to render
|
|
20556
|
-
* @param {Number} left Left position of text
|
|
20557
|
-
* @param {Number} top Top position of text
|
|
20558
|
-
* @param {Number} lineIndex Index of a line in a text
|
|
20817
|
+
/**
|
|
20818
|
+
* @private
|
|
20819
|
+
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20820
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20821
|
+
* @param {String} line Text to render
|
|
20822
|
+
* @param {Number} left Left position of text
|
|
20823
|
+
* @param {Number} top Top position of text
|
|
20824
|
+
* @param {Number} lineIndex Index of a line in a text
|
|
20559
20825
|
*/
|
|
20560
20826
|
_renderTextLine(method, ctx, line, left, top, lineIndex) {
|
|
20561
20827
|
this._renderChars(method, ctx, line, left, top, lineIndex);
|
|
20562
20828
|
}
|
|
20563
20829
|
|
|
20564
|
-
/**
|
|
20565
|
-
* Renders the text background for lines, taking care of style
|
|
20566
|
-
* @private
|
|
20567
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20830
|
+
/**
|
|
20831
|
+
* Renders the text background for lines, taking care of style
|
|
20832
|
+
* @private
|
|
20833
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20568
20834
|
*/
|
|
20569
20835
|
_renderTextLinesBackground(ctx) {
|
|
20570
20836
|
if (!this.textBackgroundColor && !this.styleHas('textBackgroundColor')) {
|
|
@@ -20627,15 +20893,15 @@ class FabricText extends StyledText {
|
|
|
20627
20893
|
this._removeShadow(ctx);
|
|
20628
20894
|
}
|
|
20629
20895
|
|
|
20630
|
-
/**
|
|
20631
|
-
* measure and return the width of a single character.
|
|
20632
|
-
* possibly overridden to accommodate different measure logic or
|
|
20633
|
-
* to hook some external lib for character measurement
|
|
20634
|
-
* @private
|
|
20635
|
-
* @param {String} _char, char to be measured
|
|
20636
|
-
* @param {Object} charStyle style of char to be measured
|
|
20637
|
-
* @param {String} [previousChar] previous char
|
|
20638
|
-
* @param {Object} [prevCharStyle] style of previous char
|
|
20896
|
+
/**
|
|
20897
|
+
* measure and return the width of a single character.
|
|
20898
|
+
* possibly overridden to accommodate different measure logic or
|
|
20899
|
+
* to hook some external lib for character measurement
|
|
20900
|
+
* @private
|
|
20901
|
+
* @param {String} _char, char to be measured
|
|
20902
|
+
* @param {Object} charStyle style of char to be measured
|
|
20903
|
+
* @param {String} [previousChar] previous char
|
|
20904
|
+
* @param {Object} [prevCharStyle] style of previous char
|
|
20639
20905
|
*/
|
|
20640
20906
|
_measureChar(_char, charStyle, previousChar, prevCharStyle) {
|
|
20641
20907
|
const fontCache = cache.getFontCache(charStyle),
|
|
@@ -20680,19 +20946,19 @@ class FabricText extends StyledText {
|
|
|
20680
20946
|
};
|
|
20681
20947
|
}
|
|
20682
20948
|
|
|
20683
|
-
/**
|
|
20684
|
-
* Computes height of character at given position
|
|
20685
|
-
* @param {Number} line the line index number
|
|
20686
|
-
* @param {Number} _char the character index number
|
|
20687
|
-
* @return {Number} fontSize of the character
|
|
20949
|
+
/**
|
|
20950
|
+
* Computes height of character at given position
|
|
20951
|
+
* @param {Number} line the line index number
|
|
20952
|
+
* @param {Number} _char the character index number
|
|
20953
|
+
* @return {Number} fontSize of the character
|
|
20688
20954
|
*/
|
|
20689
20955
|
getHeightOfChar(line, _char) {
|
|
20690
20956
|
return this.getValueOfPropertyAt(line, _char, 'fontSize');
|
|
20691
20957
|
}
|
|
20692
20958
|
|
|
20693
|
-
/**
|
|
20694
|
-
* measure a text line measuring all characters.
|
|
20695
|
-
* @param {Number} lineIndex line number
|
|
20959
|
+
/**
|
|
20960
|
+
* measure a text line measuring all characters.
|
|
20961
|
+
* @param {Number} lineIndex line number
|
|
20696
20962
|
*/
|
|
20697
20963
|
measureLine(lineIndex) {
|
|
20698
20964
|
const lineInfo = this._measureLine(lineIndex);
|
|
@@ -20705,11 +20971,11 @@ class FabricText extends StyledText {
|
|
|
20705
20971
|
return lineInfo;
|
|
20706
20972
|
}
|
|
20707
20973
|
|
|
20708
|
-
/**
|
|
20709
|
-
* measure every grapheme of a line, populating __charBounds
|
|
20710
|
-
* @param {Number} lineIndex
|
|
20711
|
-
* @return {Object} object.width total width of characters
|
|
20712
|
-
* @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
|
|
20974
|
+
/**
|
|
20975
|
+
* measure every grapheme of a line, populating __charBounds
|
|
20976
|
+
* @param {Number} lineIndex
|
|
20977
|
+
* @return {Object} object.width total width of characters
|
|
20978
|
+
* @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
|
|
20713
20979
|
*/
|
|
20714
20980
|
_measureLine(lineIndex) {
|
|
20715
20981
|
let width = 0,
|
|
@@ -20772,13 +21038,13 @@ class FabricText extends StyledText {
|
|
|
20772
21038
|
};
|
|
20773
21039
|
}
|
|
20774
21040
|
|
|
20775
|
-
/**
|
|
20776
|
-
* Calculate the angle and the left,top position of the char that follow a path.
|
|
20777
|
-
* It appends it to graphemeInfo to be reused later at rendering
|
|
20778
|
-
* @private
|
|
20779
|
-
* @param {Number} positionInPath to be measured
|
|
20780
|
-
* @param {GraphemeBBox} graphemeInfo current grapheme box information
|
|
20781
|
-
* @param {Object} startingPoint position of the point
|
|
21041
|
+
/**
|
|
21042
|
+
* Calculate the angle and the left,top position of the char that follow a path.
|
|
21043
|
+
* It appends it to graphemeInfo to be reused later at rendering
|
|
21044
|
+
* @private
|
|
21045
|
+
* @param {Number} positionInPath to be measured
|
|
21046
|
+
* @param {GraphemeBBox} graphemeInfo current grapheme box information
|
|
21047
|
+
* @param {Object} startingPoint position of the point
|
|
20782
21048
|
*/
|
|
20783
21049
|
_setGraphemeOnPath(positionInPath, graphemeInfo) {
|
|
20784
21050
|
const centerPosition = positionInPath + graphemeInfo.kernedWidth / 2,
|
|
@@ -20791,13 +21057,13 @@ class FabricText extends StyledText {
|
|
|
20791
21057
|
graphemeInfo.angle = info.angle + (this.pathSide === RIGHT ? Math.PI : 0);
|
|
20792
21058
|
}
|
|
20793
21059
|
|
|
20794
|
-
/**
|
|
20795
|
-
*
|
|
20796
|
-
* @param {String} grapheme to be measured
|
|
20797
|
-
* @param {Number} lineIndex index of the line where the char is
|
|
20798
|
-
* @param {Number} charIndex position in the line
|
|
20799
|
-
* @param {String} [prevGrapheme] character preceding the one to be measured
|
|
20800
|
-
* @returns {GraphemeBBox} grapheme bbox
|
|
21060
|
+
/**
|
|
21061
|
+
*
|
|
21062
|
+
* @param {String} grapheme to be measured
|
|
21063
|
+
* @param {Number} lineIndex index of the line where the char is
|
|
21064
|
+
* @param {Number} charIndex position in the line
|
|
21065
|
+
* @param {String} [prevGrapheme] character preceding the one to be measured
|
|
21066
|
+
* @returns {GraphemeBBox} grapheme bbox
|
|
20801
21067
|
*/
|
|
20802
21068
|
_getGraphemeBox(grapheme, lineIndex, charIndex, prevGrapheme, skipLeft) {
|
|
20803
21069
|
const style = this.getCompleteStyleDeclaration(lineIndex, charIndex),
|
|
@@ -20825,10 +21091,10 @@ class FabricText extends StyledText {
|
|
|
20825
21091
|
return box;
|
|
20826
21092
|
}
|
|
20827
21093
|
|
|
20828
|
-
/**
|
|
20829
|
-
* Calculate height of line at 'lineIndex'
|
|
20830
|
-
* @param {Number} lineIndex index of line to calculate
|
|
20831
|
-
* @return {Number}
|
|
21094
|
+
/**
|
|
21095
|
+
* Calculate height of line at 'lineIndex'
|
|
21096
|
+
* @param {Number} lineIndex index of line to calculate
|
|
21097
|
+
* @return {Number}
|
|
20832
21098
|
*/
|
|
20833
21099
|
getHeightOfLine(lineIndex) {
|
|
20834
21100
|
if (this.__lineHeights[lineIndex]) {
|
|
@@ -20844,8 +21110,8 @@ class FabricText extends StyledText {
|
|
|
20844
21110
|
return this.__lineHeights[lineIndex] = maxHeight * this.lineHeight * this._fontSizeMult;
|
|
20845
21111
|
}
|
|
20846
21112
|
|
|
20847
|
-
/**
|
|
20848
|
-
* Calculate text box height
|
|
21113
|
+
/**
|
|
21114
|
+
* Calculate text box height
|
|
20849
21115
|
*/
|
|
20850
21116
|
calcTextHeight() {
|
|
20851
21117
|
let lineHeight,
|
|
@@ -20857,26 +21123,26 @@ class FabricText extends StyledText {
|
|
|
20857
21123
|
return height;
|
|
20858
21124
|
}
|
|
20859
21125
|
|
|
20860
|
-
/**
|
|
20861
|
-
* @private
|
|
20862
|
-
* @return {Number} Left offset
|
|
21126
|
+
/**
|
|
21127
|
+
* @private
|
|
21128
|
+
* @return {Number} Left offset
|
|
20863
21129
|
*/
|
|
20864
21130
|
_getLeftOffset() {
|
|
20865
21131
|
return this.direction === 'ltr' ? -this.width / 2 : this.width / 2;
|
|
20866
21132
|
}
|
|
20867
21133
|
|
|
20868
|
-
/**
|
|
20869
|
-
* @private
|
|
20870
|
-
* @return {Number} Top offset
|
|
21134
|
+
/**
|
|
21135
|
+
* @private
|
|
21136
|
+
* @return {Number} Top offset
|
|
20871
21137
|
*/
|
|
20872
21138
|
_getTopOffset() {
|
|
20873
21139
|
return -this.height / 2;
|
|
20874
21140
|
}
|
|
20875
21141
|
|
|
20876
|
-
/**
|
|
20877
|
-
* @private
|
|
20878
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20879
|
-
* @param {String} method Method name ("fillText" or "strokeText")
|
|
21142
|
+
/**
|
|
21143
|
+
* @private
|
|
21144
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21145
|
+
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20880
21146
|
*/
|
|
20881
21147
|
_renderTextCommon(ctx, method) {
|
|
20882
21148
|
ctx.save();
|
|
@@ -20893,9 +21159,9 @@ class FabricText extends StyledText {
|
|
|
20893
21159
|
ctx.restore();
|
|
20894
21160
|
}
|
|
20895
21161
|
|
|
20896
|
-
/**
|
|
20897
|
-
* @private
|
|
20898
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21162
|
+
/**
|
|
21163
|
+
* @private
|
|
21164
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20899
21165
|
*/
|
|
20900
21166
|
_renderTextFill(ctx) {
|
|
20901
21167
|
if (!this.fill && !this.styleHas(FILL)) {
|
|
@@ -20904,9 +21170,9 @@ class FabricText extends StyledText {
|
|
|
20904
21170
|
this._renderTextCommon(ctx, 'fillText');
|
|
20905
21171
|
}
|
|
20906
21172
|
|
|
20907
|
-
/**
|
|
20908
|
-
* @private
|
|
20909
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21173
|
+
/**
|
|
21174
|
+
* @private
|
|
21175
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20910
21176
|
*/
|
|
20911
21177
|
_renderTextStroke(ctx) {
|
|
20912
21178
|
if ((!this.stroke || this.strokeWidth === 0) && this.isEmptyStyles()) {
|
|
@@ -20923,14 +21189,14 @@ class FabricText extends StyledText {
|
|
|
20923
21189
|
ctx.restore();
|
|
20924
21190
|
}
|
|
20925
21191
|
|
|
20926
|
-
/**
|
|
20927
|
-
* @private
|
|
20928
|
-
* @param {String} method fillText or strokeText.
|
|
20929
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20930
|
-
* @param {Array} line Content of the line, splitted in an array by grapheme
|
|
20931
|
-
* @param {Number} left
|
|
20932
|
-
* @param {Number} top
|
|
20933
|
-
* @param {Number} lineIndex
|
|
21192
|
+
/**
|
|
21193
|
+
* @private
|
|
21194
|
+
* @param {String} method fillText or strokeText.
|
|
21195
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21196
|
+
* @param {Array} line Content of the line, splitted in an array by grapheme
|
|
21197
|
+
* @param {Number} left
|
|
21198
|
+
* @param {Number} top
|
|
21199
|
+
* @param {Number} lineIndex
|
|
20934
21200
|
*/
|
|
20935
21201
|
_renderChars(method, ctx, line, left, top, lineIndex) {
|
|
20936
21202
|
const lineHeight = this.getHeightOfLine(lineIndex),
|
|
@@ -21012,16 +21278,16 @@ class FabricText extends StyledText {
|
|
|
21012
21278
|
ctx.restore();
|
|
21013
21279
|
}
|
|
21014
21280
|
|
|
21015
|
-
/**
|
|
21016
|
-
* This function try to patch the missing gradientTransform on canvas gradients.
|
|
21017
|
-
* transforming a context to transform the gradient, is going to transform the stroke too.
|
|
21018
|
-
* we want to transform the gradient but not the stroke operation, so we create
|
|
21019
|
-
* a transformed gradient on a pattern and then we use the pattern instead of the gradient.
|
|
21020
|
-
* this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
|
|
21021
|
-
* is limited.
|
|
21022
|
-
* @private
|
|
21023
|
-
* @param {TFiller} filler a fabric gradient instance
|
|
21024
|
-
* @return {CanvasPattern} a pattern to use as fill/stroke style
|
|
21281
|
+
/**
|
|
21282
|
+
* This function try to patch the missing gradientTransform on canvas gradients.
|
|
21283
|
+
* transforming a context to transform the gradient, is going to transform the stroke too.
|
|
21284
|
+
* we want to transform the gradient but not the stroke operation, so we create
|
|
21285
|
+
* a transformed gradient on a pattern and then we use the pattern instead of the gradient.
|
|
21286
|
+
* this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
|
|
21287
|
+
* is limited.
|
|
21288
|
+
* @private
|
|
21289
|
+
* @param {TFiller} filler a fabric gradient instance
|
|
21290
|
+
* @return {CanvasPattern} a pattern to use as fill/stroke style
|
|
21025
21291
|
*/
|
|
21026
21292
|
_applyPatternGradientTransformText(filler) {
|
|
21027
21293
|
// TODO: verify compatibility with strokeUniform
|
|
@@ -21077,12 +21343,12 @@ class FabricText extends StyledText {
|
|
|
21077
21343
|
};
|
|
21078
21344
|
}
|
|
21079
21345
|
|
|
21080
|
-
/**
|
|
21081
|
-
* This function prepare the canvas for a stroke style, and stroke and strokeWidth
|
|
21082
|
-
* need to be sent in as defined
|
|
21083
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
21084
|
-
* @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
|
|
21085
|
-
* @returns
|
|
21346
|
+
/**
|
|
21347
|
+
* This function prepare the canvas for a stroke style, and stroke and strokeWidth
|
|
21348
|
+
* need to be sent in as defined
|
|
21349
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
21350
|
+
* @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
|
|
21351
|
+
* @returns
|
|
21086
21352
|
*/
|
|
21087
21353
|
_setStrokeStyles(ctx, _ref) {
|
|
21088
21354
|
let {
|
|
@@ -21097,12 +21363,12 @@ class FabricText extends StyledText {
|
|
|
21097
21363
|
return this.handleFiller(ctx, 'strokeStyle', stroke);
|
|
21098
21364
|
}
|
|
21099
21365
|
|
|
21100
|
-
/**
|
|
21101
|
-
* This function prepare the canvas for a ill style, and fill
|
|
21102
|
-
* need to be sent in as defined
|
|
21103
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
21104
|
-
* @param {CompleteTextStyleDeclaration} style with ill defined
|
|
21105
|
-
* @returns
|
|
21366
|
+
/**
|
|
21367
|
+
* This function prepare the canvas for a ill style, and fill
|
|
21368
|
+
* need to be sent in as defined
|
|
21369
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
21370
|
+
* @param {CompleteTextStyleDeclaration} style with ill defined
|
|
21371
|
+
* @returns
|
|
21106
21372
|
*/
|
|
21107
21373
|
_setFillStyles(ctx, _ref2) {
|
|
21108
21374
|
let {
|
|
@@ -21111,16 +21377,16 @@ class FabricText extends StyledText {
|
|
|
21111
21377
|
return this.handleFiller(ctx, 'fillStyle', fill);
|
|
21112
21378
|
}
|
|
21113
21379
|
|
|
21114
|
-
/**
|
|
21115
|
-
* @private
|
|
21116
|
-
* @param {String} method
|
|
21117
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21118
|
-
* @param {Number} lineIndex
|
|
21119
|
-
* @param {Number} charIndex
|
|
21120
|
-
* @param {String} _char
|
|
21121
|
-
* @param {Number} left Left coordinate
|
|
21122
|
-
* @param {Number} top Top coordinate
|
|
21123
|
-
* @param {Number} lineHeight Height of the line
|
|
21380
|
+
/**
|
|
21381
|
+
* @private
|
|
21382
|
+
* @param {String} method
|
|
21383
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21384
|
+
* @param {Number} lineIndex
|
|
21385
|
+
* @param {Number} charIndex
|
|
21386
|
+
* @param {String} _char
|
|
21387
|
+
* @param {Number} left Left coordinate
|
|
21388
|
+
* @param {Number} top Top coordinate
|
|
21389
|
+
* @param {Number} lineHeight Height of the line
|
|
21124
21390
|
*/
|
|
21125
21391
|
_renderChar(method, ctx, lineIndex, charIndex, _char, left, top) {
|
|
21126
21392
|
const decl = this._getStyleDeclaration(lineIndex, charIndex),
|
|
@@ -21149,30 +21415,30 @@ class FabricText extends StyledText {
|
|
|
21149
21415
|
ctx.restore();
|
|
21150
21416
|
}
|
|
21151
21417
|
|
|
21152
|
-
/**
|
|
21153
|
-
* Turns the character into a 'superior figure' (i.e. 'superscript')
|
|
21154
|
-
* @param {Number} start selection start
|
|
21155
|
-
* @param {Number} end selection end
|
|
21418
|
+
/**
|
|
21419
|
+
* Turns the character into a 'superior figure' (i.e. 'superscript')
|
|
21420
|
+
* @param {Number} start selection start
|
|
21421
|
+
* @param {Number} end selection end
|
|
21156
21422
|
*/
|
|
21157
21423
|
setSuperscript(start, end) {
|
|
21158
21424
|
this._setScript(start, end, this.superscript);
|
|
21159
21425
|
}
|
|
21160
21426
|
|
|
21161
|
-
/**
|
|
21162
|
-
* Turns the character into an 'inferior figure' (i.e. 'subscript')
|
|
21163
|
-
* @param {Number} start selection start
|
|
21164
|
-
* @param {Number} end selection end
|
|
21427
|
+
/**
|
|
21428
|
+
* Turns the character into an 'inferior figure' (i.e. 'subscript')
|
|
21429
|
+
* @param {Number} start selection start
|
|
21430
|
+
* @param {Number} end selection end
|
|
21165
21431
|
*/
|
|
21166
21432
|
setSubscript(start, end) {
|
|
21167
21433
|
this._setScript(start, end, this.subscript);
|
|
21168
21434
|
}
|
|
21169
21435
|
|
|
21170
|
-
/**
|
|
21171
|
-
* Applies 'schema' at given position
|
|
21172
|
-
* @private
|
|
21173
|
-
* @param {Number} start selection start
|
|
21174
|
-
* @param {Number} end selection end
|
|
21175
|
-
* @param {Number} schema
|
|
21436
|
+
/**
|
|
21437
|
+
* Applies 'schema' at given position
|
|
21438
|
+
* @private
|
|
21439
|
+
* @param {Number} start selection start
|
|
21440
|
+
* @param {Number} end selection end
|
|
21441
|
+
* @param {Number} schema
|
|
21176
21442
|
*/
|
|
21177
21443
|
_setScript(start, end, schema) {
|
|
21178
21444
|
const loc = this.get2DCursorLocation(start, true),
|
|
@@ -21185,10 +21451,10 @@ class FabricText extends StyledText {
|
|
|
21185
21451
|
this.setSelectionStyles(style, start, end);
|
|
21186
21452
|
}
|
|
21187
21453
|
|
|
21188
|
-
/**
|
|
21189
|
-
* @private
|
|
21190
|
-
* @param {Number} lineIndex index text line
|
|
21191
|
-
* @return {Number} Line left offset
|
|
21454
|
+
/**
|
|
21455
|
+
* @private
|
|
21456
|
+
* @param {Number} lineIndex index text line
|
|
21457
|
+
* @return {Number} Line left offset
|
|
21192
21458
|
*/
|
|
21193
21459
|
_getLineLeftOffset(lineIndex) {
|
|
21194
21460
|
const lineWidth = this.getLineWidth(lineIndex),
|
|
@@ -21238,8 +21504,8 @@ class FabricText extends StyledText {
|
|
|
21238
21504
|
return leftOffset;
|
|
21239
21505
|
}
|
|
21240
21506
|
|
|
21241
|
-
/**
|
|
21242
|
-
* @private
|
|
21507
|
+
/**
|
|
21508
|
+
* @private
|
|
21243
21509
|
*/
|
|
21244
21510
|
_clearCache() {
|
|
21245
21511
|
this._forceClearCache = false;
|
|
@@ -21248,12 +21514,12 @@ class FabricText extends StyledText {
|
|
|
21248
21514
|
this.__charBounds = [];
|
|
21249
21515
|
}
|
|
21250
21516
|
|
|
21251
|
-
/**
|
|
21252
|
-
* Measure a single line given its index. Used to calculate the initial
|
|
21253
|
-
* text bounding box. The values are calculated and stored in __lineWidths cache.
|
|
21254
|
-
* @private
|
|
21255
|
-
* @param {Number} lineIndex line number
|
|
21256
|
-
* @return {Number} Line width
|
|
21517
|
+
/**
|
|
21518
|
+
* Measure a single line given its index. Used to calculate the initial
|
|
21519
|
+
* text bounding box. The values are calculated and stored in __lineWidths cache.
|
|
21520
|
+
* @private
|
|
21521
|
+
* @param {Number} lineIndex line number
|
|
21522
|
+
* @return {Number} Line width
|
|
21257
21523
|
*/
|
|
21258
21524
|
getLineWidth(lineIndex) {
|
|
21259
21525
|
if (this.__lineWidths[lineIndex] !== undefined) {
|
|
@@ -21272,12 +21538,12 @@ class FabricText extends StyledText {
|
|
|
21272
21538
|
return 0;
|
|
21273
21539
|
}
|
|
21274
21540
|
|
|
21275
|
-
/**
|
|
21276
|
-
* Retrieves the value of property at given character position
|
|
21277
|
-
* @param {Number} lineIndex the line number
|
|
21278
|
-
* @param {Number} charIndex the character number
|
|
21279
|
-
* @param {String} property the property name
|
|
21280
|
-
* @returns the value of 'property'
|
|
21541
|
+
/**
|
|
21542
|
+
* Retrieves the value of property at given character position
|
|
21543
|
+
* @param {Number} lineIndex the line number
|
|
21544
|
+
* @param {Number} charIndex the character number
|
|
21545
|
+
* @param {String} property the property name
|
|
21546
|
+
* @returns the value of 'property'
|
|
21281
21547
|
*/
|
|
21282
21548
|
getValueOfPropertyAt(lineIndex, charIndex, property) {
|
|
21283
21549
|
var _charStyle$property;
|
|
@@ -21285,9 +21551,9 @@ class FabricText extends StyledText {
|
|
|
21285
21551
|
return (_charStyle$property = charStyle[property]) !== null && _charStyle$property !== void 0 ? _charStyle$property : this[property];
|
|
21286
21552
|
}
|
|
21287
21553
|
|
|
21288
|
-
/**
|
|
21289
|
-
* @private
|
|
21290
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21554
|
+
/**
|
|
21555
|
+
* @private
|
|
21556
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21291
21557
|
*/
|
|
21292
21558
|
_renderTextDecoration(ctx, type) {
|
|
21293
21559
|
if (!this[type] && !this.styleHas(type)) {
|
|
@@ -21371,10 +21637,10 @@ class FabricText extends StyledText {
|
|
|
21371
21637
|
this._removeShadow(ctx);
|
|
21372
21638
|
}
|
|
21373
21639
|
|
|
21374
|
-
/**
|
|
21375
|
-
* return font declaration string for canvas context
|
|
21376
|
-
* @param {Object} [styleObject] object
|
|
21377
|
-
* @returns {String} font declaration formatted for canvas context.
|
|
21640
|
+
/**
|
|
21641
|
+
* return font declaration string for canvas context
|
|
21642
|
+
* @param {Object} [styleObject] object
|
|
21643
|
+
* @returns {String} font declaration formatted for canvas context.
|
|
21378
21644
|
*/
|
|
21379
21645
|
_getFontDeclaration() {
|
|
21380
21646
|
let {
|
|
@@ -21388,9 +21654,9 @@ class FabricText extends StyledText {
|
|
|
21388
21654
|
return [fontStyle, fontWeight, `${forMeasuring ? this.CACHE_FONT_SIZE : fontSize}px`, parsedFontFamily].join(' ');
|
|
21389
21655
|
}
|
|
21390
21656
|
|
|
21391
|
-
/**
|
|
21392
|
-
* Renders text instance on a specified context
|
|
21393
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21657
|
+
/**
|
|
21658
|
+
* Renders text instance on a specified context
|
|
21659
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21394
21660
|
*/
|
|
21395
21661
|
render(ctx) {
|
|
21396
21662
|
if (!this.visible) {
|
|
@@ -21405,22 +21671,22 @@ class FabricText extends StyledText {
|
|
|
21405
21671
|
super.render(ctx);
|
|
21406
21672
|
}
|
|
21407
21673
|
|
|
21408
|
-
/**
|
|
21409
|
-
* Override this method to customize grapheme splitting
|
|
21410
|
-
* @todo the util `graphemeSplit` needs to be injectable in some way.
|
|
21411
|
-
* is more comfortable to inject the correct util rather than having to override text
|
|
21412
|
-
* in the middle of the prototype chain
|
|
21413
|
-
* @param {string} value
|
|
21414
|
-
* @returns {string[]} array of graphemes
|
|
21674
|
+
/**
|
|
21675
|
+
* Override this method to customize grapheme splitting
|
|
21676
|
+
* @todo the util `graphemeSplit` needs to be injectable in some way.
|
|
21677
|
+
* is more comfortable to inject the correct util rather than having to override text
|
|
21678
|
+
* in the middle of the prototype chain
|
|
21679
|
+
* @param {string} value
|
|
21680
|
+
* @returns {string[]} array of graphemes
|
|
21415
21681
|
*/
|
|
21416
21682
|
graphemeSplit(value) {
|
|
21417
21683
|
return graphemeSplit(value);
|
|
21418
21684
|
}
|
|
21419
21685
|
|
|
21420
|
-
/**
|
|
21421
|
-
* Returns the text as an array of lines.
|
|
21422
|
-
* @param {String} text text to split
|
|
21423
|
-
* @returns Lines in the text
|
|
21686
|
+
/**
|
|
21687
|
+
* Returns the text as an array of lines.
|
|
21688
|
+
* @param {String} text text to split
|
|
21689
|
+
* @returns Lines in the text
|
|
21424
21690
|
*/
|
|
21425
21691
|
_splitTextIntoLines(text) {
|
|
21426
21692
|
const lines = text.split(this._reNewline),
|
|
@@ -21440,10 +21706,10 @@ class FabricText extends StyledText {
|
|
|
21440
21706
|
};
|
|
21441
21707
|
}
|
|
21442
21708
|
|
|
21443
|
-
/**
|
|
21444
|
-
* Returns object representation of an instance
|
|
21445
|
-
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
21446
|
-
* @return {Object} Object representation of an instance
|
|
21709
|
+
/**
|
|
21710
|
+
* Returns object representation of an instance
|
|
21711
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
21712
|
+
* @return {Object} Object representation of an instance
|
|
21447
21713
|
*/
|
|
21448
21714
|
toObject() {
|
|
21449
21715
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -21486,23 +21752,23 @@ class FabricText extends StyledText {
|
|
|
21486
21752
|
return this;
|
|
21487
21753
|
}
|
|
21488
21754
|
|
|
21489
|
-
/**
|
|
21490
|
-
* Returns complexity of an instance
|
|
21491
|
-
* @return {Number} complexity
|
|
21755
|
+
/**
|
|
21756
|
+
* Returns complexity of an instance
|
|
21757
|
+
* @return {Number} complexity
|
|
21492
21758
|
*/
|
|
21493
21759
|
complexity() {
|
|
21494
21760
|
return 1;
|
|
21495
21761
|
}
|
|
21496
21762
|
|
|
21497
|
-
/**
|
|
21498
|
-
* List of generic font families
|
|
21499
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
|
|
21763
|
+
/**
|
|
21764
|
+
* List of generic font families
|
|
21765
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
|
|
21500
21766
|
*/
|
|
21501
|
-
|
|
21502
|
-
/**
|
|
21503
|
-
* Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
|
|
21504
|
-
* @param {HTMLElement} element Element to parse
|
|
21505
|
-
* @param {Object} [options] Options object
|
|
21767
|
+
|
|
21768
|
+
/**
|
|
21769
|
+
* Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
|
|
21770
|
+
* @param {HTMLElement} element Element to parse
|
|
21771
|
+
* @param {Object} [options] Options object
|
|
21506
21772
|
*/
|
|
21507
21773
|
static async fromElement(element, options, cssRules) {
|
|
21508
21774
|
const parsedAttributes = parseAttributes(element, FabricText.ATTRIBUTE_NAMES, cssRules);
|
|
@@ -21541,10 +21807,10 @@ class FabricText extends StyledText {
|
|
|
21541
21807
|
scaledDiff = lineHeightDiff * textHeightScaleFactor,
|
|
21542
21808
|
textHeight = text.getScaledHeight() + scaledDiff;
|
|
21543
21809
|
let offX = 0;
|
|
21544
|
-
/*
|
|
21545
|
-
Adjust positioning:
|
|
21546
|
-
x/y attributes in SVG correspond to the bottom-left corner of text bounding box
|
|
21547
|
-
fabric output by default at top, left.
|
|
21810
|
+
/*
|
|
21811
|
+
Adjust positioning:
|
|
21812
|
+
x/y attributes in SVG correspond to the bottom-left corner of text bounding box
|
|
21813
|
+
fabric output by default at top, left.
|
|
21548
21814
|
*/
|
|
21549
21815
|
if (textAnchor === CENTER) {
|
|
21550
21816
|
offX = text.getScaledWidth() / 2;
|
|
@@ -21562,10 +21828,10 @@ class FabricText extends StyledText {
|
|
|
21562
21828
|
|
|
21563
21829
|
/* _FROM_SVG_END_ */
|
|
21564
21830
|
|
|
21565
|
-
/**
|
|
21566
|
-
* Returns FabricText instance from an object representation
|
|
21567
|
-
* @param {Object} object plain js Object to create an instance from
|
|
21568
|
-
* @returns {Promise<FabricText>}
|
|
21831
|
+
/**
|
|
21832
|
+
* Returns FabricText instance from an object representation
|
|
21833
|
+
* @param {Object} object plain js Object to create an instance from
|
|
21834
|
+
* @returns {Promise<FabricText>}
|
|
21569
21835
|
*/
|
|
21570
21836
|
static fromObject(object) {
|
|
21571
21837
|
return this._fromObject({
|
|
@@ -21576,10 +21842,10 @@ class FabricText extends StyledText {
|
|
|
21576
21842
|
});
|
|
21577
21843
|
}
|
|
21578
21844
|
}
|
|
21579
|
-
/**
|
|
21580
|
-
* Properties that requires a text layout recalculation when changed
|
|
21581
|
-
* @type string[]
|
|
21582
|
-
* @protected
|
|
21845
|
+
/**
|
|
21846
|
+
* Properties that requires a text layout recalculation when changed
|
|
21847
|
+
* @type string[]
|
|
21848
|
+
* @protected
|
|
21583
21849
|
*/
|
|
21584
21850
|
_defineProperty(FabricText, "textLayoutProperties", textLayoutProperties);
|
|
21585
21851
|
_defineProperty(FabricText, "cacheProperties", [...cacheProperties, ...additionalProps]);
|
|
@@ -21587,9 +21853,9 @@ _defineProperty(FabricText, "ownDefaults", textDefaultValues);
|
|
|
21587
21853
|
_defineProperty(FabricText, "type", 'Text');
|
|
21588
21854
|
_defineProperty(FabricText, "genericFonts", ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif', 'ui-monospace', 'ui-rounded', 'math', 'emoji', 'fangsong']);
|
|
21589
21855
|
/* _FROM_SVG_START_ */
|
|
21590
|
-
/**
|
|
21591
|
-
* List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
|
|
21592
|
-
* @see: http://www.w3.org/TR/SVG/text.html#TextElement
|
|
21856
|
+
/**
|
|
21857
|
+
* List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
|
|
21858
|
+
* @see: http://www.w3.org/TR/SVG/text.html#TextElement
|
|
21593
21859
|
*/
|
|
21594
21860
|
_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'));
|
|
21595
21861
|
applyMixins(FabricText, [TextSVGExportMixin]);
|
|
@@ -21976,8 +22242,8 @@ class OverlayEditor {
|
|
|
21976
22242
|
// We don't need to save/restore them here as it would conflict with IText's restoration
|
|
21977
22243
|
}
|
|
21978
22244
|
|
|
21979
|
-
/**
|
|
21980
|
-
* Get the container element for the overlay (parent of upperCanvasEl)
|
|
22245
|
+
/**
|
|
22246
|
+
* Get the container element for the overlay (parent of upperCanvasEl)
|
|
21981
22247
|
*/
|
|
21982
22248
|
getCanvasContainer() {
|
|
21983
22249
|
const upperCanvas = this.canvas.upperCanvasEl;
|
|
@@ -21991,8 +22257,8 @@ class OverlayEditor {
|
|
|
21991
22257
|
return container;
|
|
21992
22258
|
}
|
|
21993
22259
|
|
|
21994
|
-
/**
|
|
21995
|
-
* Create the overlay DOM structure
|
|
22260
|
+
/**
|
|
22261
|
+
* Create the overlay DOM structure
|
|
21996
22262
|
*/
|
|
21997
22263
|
createOverlayDOM() {
|
|
21998
22264
|
// Host div for positioning and overflow control
|
|
@@ -22047,8 +22313,8 @@ class OverlayEditor {
|
|
|
22047
22313
|
document.body.appendChild(this.hostDiv);
|
|
22048
22314
|
}
|
|
22049
22315
|
|
|
22050
|
-
/**
|
|
22051
|
-
* Attach all event listeners
|
|
22316
|
+
/**
|
|
22317
|
+
* Attach all event listeners
|
|
22052
22318
|
*/
|
|
22053
22319
|
attachEventListeners() {
|
|
22054
22320
|
// Textarea events
|
|
@@ -22068,8 +22334,8 @@ class OverlayEditor {
|
|
|
22068
22334
|
this.setupViewportChangeDetection();
|
|
22069
22335
|
}
|
|
22070
22336
|
|
|
22071
|
-
/**
|
|
22072
|
-
* Remove all event listeners
|
|
22337
|
+
/**
|
|
22338
|
+
* Remove all event listeners
|
|
22073
22339
|
*/
|
|
22074
22340
|
removeEventListeners() {
|
|
22075
22341
|
this.textarea.removeEventListener('input', this.boundHandlers.onInput);
|
|
@@ -22086,16 +22352,16 @@ class OverlayEditor {
|
|
|
22086
22352
|
this.restoreViewportChangeDetection();
|
|
22087
22353
|
}
|
|
22088
22354
|
|
|
22089
|
-
/**
|
|
22090
|
-
* Simple method to refresh positioning when canvas changes
|
|
22355
|
+
/**
|
|
22356
|
+
* Simple method to refresh positioning when canvas changes
|
|
22091
22357
|
*/
|
|
22092
22358
|
updatePosition() {
|
|
22093
22359
|
this.applyOverlayStyle();
|
|
22094
22360
|
}
|
|
22095
22361
|
|
|
22096
|
-
/**
|
|
22097
|
-
* Update the Fabric object bounds to match current textarea size
|
|
22098
|
-
* This ensures Fabric.js selection controls follow the growing textbox
|
|
22362
|
+
/**
|
|
22363
|
+
* Update the Fabric object bounds to match current textarea size
|
|
22364
|
+
* This ensures Fabric.js selection controls follow the growing textbox
|
|
22099
22365
|
*/
|
|
22100
22366
|
updateObjectBounds() {
|
|
22101
22367
|
if (this.isDestroyed) return;
|
|
@@ -22129,15 +22395,15 @@ class OverlayEditor {
|
|
|
22129
22395
|
}
|
|
22130
22396
|
}
|
|
22131
22397
|
|
|
22132
|
-
/**
|
|
22133
|
-
* Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
|
|
22398
|
+
/**
|
|
22399
|
+
* Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
|
|
22134
22400
|
*/
|
|
22135
22401
|
letterSpacingPx(charSpacing, fontSize) {
|
|
22136
22402
|
return charSpacing / 1000 * fontSize;
|
|
22137
22403
|
}
|
|
22138
22404
|
|
|
22139
|
-
/**
|
|
22140
|
-
* Detect text direction using first strong directional character
|
|
22405
|
+
/**
|
|
22406
|
+
* Detect text direction using first strong directional character
|
|
22141
22407
|
*/
|
|
22142
22408
|
firstStrongDir(text) {
|
|
22143
22409
|
// Hebrew: \u0590-\u05FF, Arabic: \u0600-\u06FF, \u0750-\u077F, \uFB50-\uFDFF, \uFE70-\uFEFF
|
|
@@ -22367,8 +22633,8 @@ class OverlayEditor {
|
|
|
22367
22633
|
// Initial bounds are set correctly by Fabric.js - don't force update here
|
|
22368
22634
|
}
|
|
22369
22635
|
|
|
22370
|
-
/**
|
|
22371
|
-
* Debug method to compare textarea and canvas object bounding boxes
|
|
22636
|
+
/**
|
|
22637
|
+
* Debug method to compare textarea and canvas object bounding boxes
|
|
22372
22638
|
*/
|
|
22373
22639
|
debugBoundingBoxComparison() {
|
|
22374
22640
|
const target = this.target;
|
|
@@ -22438,8 +22704,8 @@ class OverlayEditor {
|
|
|
22438
22704
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
22439
22705
|
}
|
|
22440
22706
|
|
|
22441
|
-
/**
|
|
22442
|
-
* Debug method to compare text wrapping between textarea and Fabric text object
|
|
22707
|
+
/**
|
|
22708
|
+
* Debug method to compare text wrapping between textarea and Fabric text object
|
|
22443
22709
|
*/
|
|
22444
22710
|
debugTextWrapping() {
|
|
22445
22711
|
const target = this.target;
|
|
@@ -22524,8 +22790,8 @@ class OverlayEditor {
|
|
|
22524
22790
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
22525
22791
|
}
|
|
22526
22792
|
|
|
22527
|
-
/**
|
|
22528
|
-
* Focus the textarea and position cursor at end
|
|
22793
|
+
/**
|
|
22794
|
+
* Focus the textarea and position cursor at end
|
|
22529
22795
|
*/
|
|
22530
22796
|
focusTextarea() {
|
|
22531
22797
|
// For overlay editing, we want to keep the object in "selection mode" not "editing mode"
|
|
@@ -22560,8 +22826,8 @@ class OverlayEditor {
|
|
|
22560
22826
|
this.canvas.requestRenderAll();
|
|
22561
22827
|
}
|
|
22562
22828
|
|
|
22563
|
-
/**
|
|
22564
|
-
* Refresh overlay positioning and styling
|
|
22829
|
+
/**
|
|
22830
|
+
* Refresh overlay positioning and styling
|
|
22565
22831
|
*/
|
|
22566
22832
|
refresh() {
|
|
22567
22833
|
if (this.isDestroyed) return;
|
|
@@ -22569,8 +22835,8 @@ class OverlayEditor {
|
|
|
22569
22835
|
// Don't update object bounds on every refresh - only when textarea actually resizes
|
|
22570
22836
|
}
|
|
22571
22837
|
|
|
22572
|
-
/**
|
|
22573
|
-
* Destroy the overlay editor
|
|
22838
|
+
/**
|
|
22839
|
+
* Destroy the overlay editor
|
|
22574
22840
|
*/
|
|
22575
22841
|
destroy() {
|
|
22576
22842
|
let commit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
@@ -22738,8 +23004,8 @@ class OverlayEditor {
|
|
|
22738
23004
|
}
|
|
22739
23005
|
}
|
|
22740
23006
|
|
|
22741
|
-
/**
|
|
22742
|
-
* Setup detection for viewport changes (zoom/pan)
|
|
23007
|
+
/**
|
|
23008
|
+
* Setup detection for viewport changes (zoom/pan)
|
|
22743
23009
|
*/
|
|
22744
23010
|
setupViewportChangeDetection() {
|
|
22745
23011
|
// Store original methods
|
|
@@ -22768,8 +23034,8 @@ class OverlayEditor {
|
|
|
22768
23034
|
};
|
|
22769
23035
|
}
|
|
22770
23036
|
|
|
22771
|
-
/**
|
|
22772
|
-
* Restore original viewport methods
|
|
23037
|
+
/**
|
|
23038
|
+
* Restore original viewport methods
|
|
22773
23039
|
*/
|
|
22774
23040
|
restoreViewportChangeDetection() {
|
|
22775
23041
|
if (this.canvas.__originalSetZoom) {
|
|
@@ -22784,8 +23050,8 @@ class OverlayEditor {
|
|
|
22784
23050
|
}
|
|
22785
23051
|
}
|
|
22786
23052
|
|
|
22787
|
-
/**
|
|
22788
|
-
* Enter overlay text editing mode for a text object
|
|
23053
|
+
/**
|
|
23054
|
+
* Enter overlay text editing mode for a text object
|
|
22789
23055
|
*/
|
|
22790
23056
|
function enterTextOverlayEdit(canvas, target, options) {
|
|
22791
23057
|
// If already in overlay editing, destroy existing editor first
|
|
@@ -22809,35 +23075,35 @@ function enterTextOverlayEdit(canvas, target, options) {
|
|
|
22809
23075
|
return editor;
|
|
22810
23076
|
}
|
|
22811
23077
|
|
|
22812
|
-
/**
|
|
22813
|
-
* extend this regex to support non english languages
|
|
22814
|
-
*
|
|
22815
|
-
* - ` ` Matches a SPACE character (char code 32).
|
|
22816
|
-
* - `\n` Matches a LINE FEED character (char code 10).
|
|
22817
|
-
* - `.` Matches a "." character (char code 46).
|
|
22818
|
-
* - `,` Matches a "," character (char code 44).
|
|
22819
|
-
* - `;` Matches a ";" character (char code 59).
|
|
22820
|
-
* - `!` Matches a "!" character (char code 33).
|
|
22821
|
-
* - `\?` Matches a "?" character (char code 63).
|
|
22822
|
-
* - `\-` Matches a "-" character (char code 45).
|
|
23078
|
+
/**
|
|
23079
|
+
* extend this regex to support non english languages
|
|
23080
|
+
*
|
|
23081
|
+
* - ` ` Matches a SPACE character (char code 32).
|
|
23082
|
+
* - `\n` Matches a LINE FEED character (char code 10).
|
|
23083
|
+
* - `.` Matches a "." character (char code 46).
|
|
23084
|
+
* - `,` Matches a "," character (char code 44).
|
|
23085
|
+
* - `;` Matches a ";" character (char code 59).
|
|
23086
|
+
* - `!` Matches a "!" character (char code 33).
|
|
23087
|
+
* - `\?` Matches a "?" character (char code 63).
|
|
23088
|
+
* - `\-` Matches a "-" character (char code 45).
|
|
22823
23089
|
*/
|
|
22824
23090
|
// eslint-disable-next-line no-useless-escape
|
|
22825
23091
|
const reNonWord = /[ \n\.,;!\?\-]/;
|
|
22826
23092
|
class ITextBehavior extends FabricText {
|
|
22827
23093
|
constructor() {
|
|
22828
23094
|
super(...arguments);
|
|
22829
|
-
/**
|
|
22830
|
-
* Helps determining when the text is in composition, so that the cursor
|
|
22831
|
-
* rendering is altered.
|
|
23095
|
+
/**
|
|
23096
|
+
* Helps determining when the text is in composition, so that the cursor
|
|
23097
|
+
* rendering is altered.
|
|
22832
23098
|
*/
|
|
22833
23099
|
_defineProperty(this, "_currentCursorOpacity", 1);
|
|
22834
23100
|
}
|
|
22835
|
-
/**
|
|
22836
|
-
* Keeps track if the IText object was selected before the actual click.
|
|
22837
|
-
* This because we want to delay enter editing by a click.
|
|
23101
|
+
/**
|
|
23102
|
+
* Keeps track if the IText object was selected before the actual click.
|
|
23103
|
+
* This because we want to delay enter editing by a click.
|
|
22838
23104
|
*/
|
|
22839
|
-
/**
|
|
22840
|
-
* Initializes all the interactive behavior of IText
|
|
23105
|
+
/**
|
|
23106
|
+
* Initializes all the interactive behavior of IText
|
|
22841
23107
|
*/
|
|
22842
23108
|
initBehavior() {
|
|
22843
23109
|
this._tick = this._tick.bind(this);
|
|
@@ -22850,8 +23116,8 @@ class ITextBehavior extends FabricText {
|
|
|
22850
23116
|
return super.onDeselect(options);
|
|
22851
23117
|
}
|
|
22852
23118
|
|
|
22853
|
-
/**
|
|
22854
|
-
* @private
|
|
23119
|
+
/**
|
|
23120
|
+
* @private
|
|
22855
23121
|
*/
|
|
22856
23122
|
_animateCursor(_ref) {
|
|
22857
23123
|
let {
|
|
@@ -22876,8 +23142,8 @@ class ITextBehavior extends FabricText {
|
|
|
22876
23142
|
});
|
|
22877
23143
|
}
|
|
22878
23144
|
|
|
22879
|
-
/**
|
|
22880
|
-
* changes the cursor from visible to invisible
|
|
23145
|
+
/**
|
|
23146
|
+
* changes the cursor from visible to invisible
|
|
22881
23147
|
*/
|
|
22882
23148
|
_tick(delay) {
|
|
22883
23149
|
this._currentTickState = this._animateCursor({
|
|
@@ -22888,8 +23154,8 @@ class ITextBehavior extends FabricText {
|
|
|
22888
23154
|
});
|
|
22889
23155
|
}
|
|
22890
23156
|
|
|
22891
|
-
/**
|
|
22892
|
-
* Changes the cursor from invisible to visible
|
|
23157
|
+
/**
|
|
23158
|
+
* Changes the cursor from invisible to visible
|
|
22893
23159
|
*/
|
|
22894
23160
|
_onTickComplete() {
|
|
22895
23161
|
var _this$_currentTickCom;
|
|
@@ -22901,16 +23167,16 @@ class ITextBehavior extends FabricText {
|
|
|
22901
23167
|
});
|
|
22902
23168
|
}
|
|
22903
23169
|
|
|
22904
|
-
/**
|
|
22905
|
-
* Initializes delayed cursor
|
|
23170
|
+
/**
|
|
23171
|
+
* Initializes delayed cursor
|
|
22906
23172
|
*/
|
|
22907
23173
|
initDelayedCursor(restart) {
|
|
22908
23174
|
this.abortCursorAnimation();
|
|
22909
23175
|
this._tick(restart ? 0 : this.cursorDelay);
|
|
22910
23176
|
}
|
|
22911
23177
|
|
|
22912
|
-
/**
|
|
22913
|
-
* Aborts cursor animation, clears all timeouts and clear textarea context if necessary
|
|
23178
|
+
/**
|
|
23179
|
+
* Aborts cursor animation, clears all timeouts and clear textarea context if necessary
|
|
22914
23180
|
*/
|
|
22915
23181
|
abortCursorAnimation() {
|
|
22916
23182
|
let shouldClear = false;
|
|
@@ -22928,9 +23194,9 @@ class ITextBehavior extends FabricText {
|
|
|
22928
23194
|
}
|
|
22929
23195
|
}
|
|
22930
23196
|
|
|
22931
|
-
/**
|
|
22932
|
-
* Restart tue cursor animation if either is in complete state ( between animations )
|
|
22933
|
-
* or if it never started before
|
|
23197
|
+
/**
|
|
23198
|
+
* Restart tue cursor animation if either is in complete state ( between animations )
|
|
23199
|
+
* or if it never started before
|
|
22934
23200
|
*/
|
|
22935
23201
|
restartCursorIfNeeded() {
|
|
22936
23202
|
if ([this._currentTickState, this._currentTickCompleteState].some(cursorAnimation => !cursorAnimation || cursorAnimation.isDone())) {
|
|
@@ -22938,8 +23204,8 @@ class ITextBehavior extends FabricText {
|
|
|
22938
23204
|
}
|
|
22939
23205
|
}
|
|
22940
23206
|
|
|
22941
|
-
/**
|
|
22942
|
-
* Selects entire text
|
|
23207
|
+
/**
|
|
23208
|
+
* Selects entire text
|
|
22943
23209
|
*/
|
|
22944
23210
|
selectAll() {
|
|
22945
23211
|
this.selectionStart = 0;
|
|
@@ -22949,26 +23215,26 @@ class ITextBehavior extends FabricText {
|
|
|
22949
23215
|
return this;
|
|
22950
23216
|
}
|
|
22951
23217
|
|
|
22952
|
-
/**
|
|
22953
|
-
* Selects entire text and updates the visual state
|
|
23218
|
+
/**
|
|
23219
|
+
* Selects entire text and updates the visual state
|
|
22954
23220
|
*/
|
|
22955
23221
|
cmdAll() {
|
|
22956
23222
|
this.selectAll();
|
|
22957
23223
|
this.renderCursorOrSelection();
|
|
22958
23224
|
}
|
|
22959
23225
|
|
|
22960
|
-
/**
|
|
22961
|
-
* Returns selected text
|
|
22962
|
-
* @return {String}
|
|
23226
|
+
/**
|
|
23227
|
+
* Returns selected text
|
|
23228
|
+
* @return {String}
|
|
22963
23229
|
*/
|
|
22964
23230
|
getSelectedText() {
|
|
22965
23231
|
return this._text.slice(this.selectionStart, this.selectionEnd).join('');
|
|
22966
23232
|
}
|
|
22967
23233
|
|
|
22968
|
-
/**
|
|
22969
|
-
* Find new selection index representing start of current word according to current selection index
|
|
22970
|
-
* @param {Number} startFrom Current selection index
|
|
22971
|
-
* @return {Number} New selection index
|
|
23234
|
+
/**
|
|
23235
|
+
* Find new selection index representing start of current word according to current selection index
|
|
23236
|
+
* @param {Number} startFrom Current selection index
|
|
23237
|
+
* @return {Number} New selection index
|
|
22972
23238
|
*/
|
|
22973
23239
|
findWordBoundaryLeft(startFrom) {
|
|
22974
23240
|
let offset = 0,
|
|
@@ -22988,10 +23254,10 @@ class ITextBehavior extends FabricText {
|
|
|
22988
23254
|
return startFrom - offset;
|
|
22989
23255
|
}
|
|
22990
23256
|
|
|
22991
|
-
/**
|
|
22992
|
-
* Find new selection index representing end of current word according to current selection index
|
|
22993
|
-
* @param {Number} startFrom Current selection index
|
|
22994
|
-
* @return {Number} New selection index
|
|
23257
|
+
/**
|
|
23258
|
+
* Find new selection index representing end of current word according to current selection index
|
|
23259
|
+
* @param {Number} startFrom Current selection index
|
|
23260
|
+
* @return {Number} New selection index
|
|
22995
23261
|
*/
|
|
22996
23262
|
findWordBoundaryRight(startFrom) {
|
|
22997
23263
|
let offset = 0,
|
|
@@ -23011,10 +23277,10 @@ class ITextBehavior extends FabricText {
|
|
|
23011
23277
|
return startFrom + offset;
|
|
23012
23278
|
}
|
|
23013
23279
|
|
|
23014
|
-
/**
|
|
23015
|
-
* Find new selection index representing start of current line according to current selection index
|
|
23016
|
-
* @param {Number} startFrom Current selection index
|
|
23017
|
-
* @return {Number} New selection index
|
|
23280
|
+
/**
|
|
23281
|
+
* Find new selection index representing start of current line according to current selection index
|
|
23282
|
+
* @param {Number} startFrom Current selection index
|
|
23283
|
+
* @return {Number} New selection index
|
|
23018
23284
|
*/
|
|
23019
23285
|
findLineBoundaryLeft(startFrom) {
|
|
23020
23286
|
let offset = 0,
|
|
@@ -23026,10 +23292,10 @@ class ITextBehavior extends FabricText {
|
|
|
23026
23292
|
return startFrom - offset;
|
|
23027
23293
|
}
|
|
23028
23294
|
|
|
23029
|
-
/**
|
|
23030
|
-
* Find new selection index representing end of current line according to current selection index
|
|
23031
|
-
* @param {Number} startFrom Current selection index
|
|
23032
|
-
* @return {Number} New selection index
|
|
23295
|
+
/**
|
|
23296
|
+
* Find new selection index representing end of current line according to current selection index
|
|
23297
|
+
* @param {Number} startFrom Current selection index
|
|
23298
|
+
* @return {Number} New selection index
|
|
23033
23299
|
*/
|
|
23034
23300
|
findLineBoundaryRight(startFrom) {
|
|
23035
23301
|
let offset = 0,
|
|
@@ -23041,11 +23307,11 @@ class ITextBehavior extends FabricText {
|
|
|
23041
23307
|
return startFrom + offset;
|
|
23042
23308
|
}
|
|
23043
23309
|
|
|
23044
|
-
/**
|
|
23045
|
-
* Finds index corresponding to beginning or end of a word
|
|
23046
|
-
* @param {Number} selectionStart Index of a character
|
|
23047
|
-
* @param {Number} direction 1 or -1
|
|
23048
|
-
* @return {Number} Index of the beginning or end of a word
|
|
23310
|
+
/**
|
|
23311
|
+
* Finds index corresponding to beginning or end of a word
|
|
23312
|
+
* @param {Number} selectionStart Index of a character
|
|
23313
|
+
* @param {Number} direction 1 or -1
|
|
23314
|
+
* @return {Number} Index of the beginning or end of a word
|
|
23049
23315
|
*/
|
|
23050
23316
|
searchWordBoundary(selectionStart, direction) {
|
|
23051
23317
|
const text = this._text;
|
|
@@ -23063,9 +23329,9 @@ class ITextBehavior extends FabricText {
|
|
|
23063
23329
|
return index;
|
|
23064
23330
|
}
|
|
23065
23331
|
|
|
23066
|
-
/**
|
|
23067
|
-
* Selects the word that contains the char at index selectionStart
|
|
23068
|
-
* @param {Number} selectionStart Index of a character
|
|
23332
|
+
/**
|
|
23333
|
+
* Selects the word that contains the char at index selectionStart
|
|
23334
|
+
* @param {Number} selectionStart Index of a character
|
|
23069
23335
|
*/
|
|
23070
23336
|
selectWord(selectionStart) {
|
|
23071
23337
|
selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
|
|
@@ -23081,9 +23347,9 @@ class ITextBehavior extends FabricText {
|
|
|
23081
23347
|
this.renderCursorOrSelection();
|
|
23082
23348
|
}
|
|
23083
23349
|
|
|
23084
|
-
/**
|
|
23085
|
-
* Selects the line that contains selectionStart
|
|
23086
|
-
* @param {Number} selectionStart Index of a character
|
|
23350
|
+
/**
|
|
23351
|
+
* Selects the line that contains selectionStart
|
|
23352
|
+
* @param {Number} selectionStart Index of a character
|
|
23087
23353
|
*/
|
|
23088
23354
|
selectLine(selectionStart) {
|
|
23089
23355
|
selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
|
|
@@ -23095,8 +23361,8 @@ class ITextBehavior extends FabricText {
|
|
|
23095
23361
|
this._updateTextarea();
|
|
23096
23362
|
}
|
|
23097
23363
|
|
|
23098
|
-
/**
|
|
23099
|
-
* Enters editing state
|
|
23364
|
+
/**
|
|
23365
|
+
* Enters editing state
|
|
23100
23366
|
*/
|
|
23101
23367
|
enterEditing(e) {
|
|
23102
23368
|
if (this.isEditing || !this.editable) {
|
|
@@ -23116,8 +23382,8 @@ class ITextBehavior extends FabricText {
|
|
|
23116
23382
|
}
|
|
23117
23383
|
}
|
|
23118
23384
|
|
|
23119
|
-
/**
|
|
23120
|
-
* runs the actual logic that enter from editing state, see {@link enterEditing}
|
|
23385
|
+
/**
|
|
23386
|
+
* runs the actual logic that enter from editing state, see {@link enterEditing}
|
|
23121
23387
|
*/
|
|
23122
23388
|
enterEditingImpl() {
|
|
23123
23389
|
if (this.canvas) {
|
|
@@ -23141,8 +23407,8 @@ class ITextBehavior extends FabricText {
|
|
|
23141
23407
|
}
|
|
23142
23408
|
}
|
|
23143
23409
|
|
|
23144
|
-
/**
|
|
23145
|
-
* Enter overlay editing mode using DOM textarea overlay
|
|
23410
|
+
/**
|
|
23411
|
+
* Enter overlay editing mode using DOM textarea overlay
|
|
23146
23412
|
*/
|
|
23147
23413
|
enterOverlayEditing() {
|
|
23148
23414
|
this._saveEditingProps();
|
|
@@ -23163,8 +23429,8 @@ class ITextBehavior extends FabricText {
|
|
|
23163
23429
|
});
|
|
23164
23430
|
}
|
|
23165
23431
|
|
|
23166
|
-
/**
|
|
23167
|
-
* Commit overlay editing changes
|
|
23432
|
+
/**
|
|
23433
|
+
* Commit overlay editing changes
|
|
23168
23434
|
*/
|
|
23169
23435
|
commitOverlayEdit(text) {
|
|
23170
23436
|
const overlayEditor = this.__overlayEditor;
|
|
@@ -23188,8 +23454,8 @@ class ITextBehavior extends FabricText {
|
|
|
23188
23454
|
this.canvas && this.canvas.requestRenderAll();
|
|
23189
23455
|
}
|
|
23190
23456
|
|
|
23191
|
-
/**
|
|
23192
|
-
* Cancel overlay editing without changes
|
|
23457
|
+
/**
|
|
23458
|
+
* Cancel overlay editing without changes
|
|
23193
23459
|
*/
|
|
23194
23460
|
cancelOverlayEdit() {
|
|
23195
23461
|
// Restore original text
|
|
@@ -23197,8 +23463,8 @@ class ITextBehavior extends FabricText {
|
|
|
23197
23463
|
this.exitEditing();
|
|
23198
23464
|
}
|
|
23199
23465
|
|
|
23200
|
-
/**
|
|
23201
|
-
* called by {@link Canvas#textEditingManager}
|
|
23466
|
+
/**
|
|
23467
|
+
* called by {@link Canvas#textEditingManager}
|
|
23202
23468
|
*/
|
|
23203
23469
|
updateSelectionOnMouseMove(e) {
|
|
23204
23470
|
if (this.getActiveControl()) {
|
|
@@ -23226,8 +23492,8 @@ class ITextBehavior extends FabricText {
|
|
|
23226
23492
|
}
|
|
23227
23493
|
}
|
|
23228
23494
|
|
|
23229
|
-
/**
|
|
23230
|
-
* @private
|
|
23495
|
+
/**
|
|
23496
|
+
* @private
|
|
23231
23497
|
*/
|
|
23232
23498
|
_setEditingProps() {
|
|
23233
23499
|
this.hoverCursor = 'text';
|
|
@@ -23239,8 +23505,8 @@ class ITextBehavior extends FabricText {
|
|
|
23239
23505
|
this.lockMovementX = this.lockMovementY = true;
|
|
23240
23506
|
}
|
|
23241
23507
|
|
|
23242
|
-
/**
|
|
23243
|
-
* convert from textarea to grapheme indexes
|
|
23508
|
+
/**
|
|
23509
|
+
* convert from textarea to grapheme indexes
|
|
23244
23510
|
*/
|
|
23245
23511
|
fromStringToGraphemeSelection(start, end, text) {
|
|
23246
23512
|
const smallerTextStart = text.slice(0, start),
|
|
@@ -23259,8 +23525,8 @@ class ITextBehavior extends FabricText {
|
|
|
23259
23525
|
};
|
|
23260
23526
|
}
|
|
23261
23527
|
|
|
23262
|
-
/**
|
|
23263
|
-
* convert from fabric to textarea values
|
|
23528
|
+
/**
|
|
23529
|
+
* convert from fabric to textarea values
|
|
23264
23530
|
*/
|
|
23265
23531
|
fromGraphemeToStringSelection(start, end, graphemes) {
|
|
23266
23532
|
const smallerTextStart = graphemes.slice(0, start),
|
|
@@ -23279,8 +23545,8 @@ class ITextBehavior extends FabricText {
|
|
|
23279
23545
|
};
|
|
23280
23546
|
}
|
|
23281
23547
|
|
|
23282
|
-
/**
|
|
23283
|
-
* @private
|
|
23548
|
+
/**
|
|
23549
|
+
* @private
|
|
23284
23550
|
*/
|
|
23285
23551
|
_updateTextarea() {
|
|
23286
23552
|
this.cursorOffsetCache = {};
|
|
@@ -23295,8 +23561,8 @@ class ITextBehavior extends FabricText {
|
|
|
23295
23561
|
this.updateTextareaPosition();
|
|
23296
23562
|
}
|
|
23297
23563
|
|
|
23298
|
-
/**
|
|
23299
|
-
* @private
|
|
23564
|
+
/**
|
|
23565
|
+
* @private
|
|
23300
23566
|
*/
|
|
23301
23567
|
updateFromTextArea() {
|
|
23302
23568
|
if (!this.hiddenTextarea) {
|
|
@@ -23316,8 +23582,8 @@ class ITextBehavior extends FabricText {
|
|
|
23316
23582
|
this.updateTextareaPosition();
|
|
23317
23583
|
}
|
|
23318
23584
|
|
|
23319
|
-
/**
|
|
23320
|
-
* @private
|
|
23585
|
+
/**
|
|
23586
|
+
* @private
|
|
23321
23587
|
*/
|
|
23322
23588
|
updateTextareaPosition() {
|
|
23323
23589
|
if (this.selectionStart === this.selectionEnd) {
|
|
@@ -23327,9 +23593,9 @@ class ITextBehavior extends FabricText {
|
|
|
23327
23593
|
}
|
|
23328
23594
|
}
|
|
23329
23595
|
|
|
23330
|
-
/**
|
|
23331
|
-
* @private
|
|
23332
|
-
* @return {Object} style contains style for hiddenTextarea
|
|
23596
|
+
/**
|
|
23597
|
+
* @private
|
|
23598
|
+
* @return {Object} style contains style for hiddenTextarea
|
|
23333
23599
|
*/
|
|
23334
23600
|
_calcTextareaPosition() {
|
|
23335
23601
|
if (!this.canvas) {
|
|
@@ -23376,8 +23642,8 @@ class ITextBehavior extends FabricText {
|
|
|
23376
23642
|
};
|
|
23377
23643
|
}
|
|
23378
23644
|
|
|
23379
|
-
/**
|
|
23380
|
-
* @private
|
|
23645
|
+
/**
|
|
23646
|
+
* @private
|
|
23381
23647
|
*/
|
|
23382
23648
|
_saveEditingProps() {
|
|
23383
23649
|
this._savedProps = {
|
|
@@ -23394,8 +23660,8 @@ class ITextBehavior extends FabricText {
|
|
|
23394
23660
|
};
|
|
23395
23661
|
}
|
|
23396
23662
|
|
|
23397
|
-
/**
|
|
23398
|
-
* @private
|
|
23663
|
+
/**
|
|
23664
|
+
* @private
|
|
23399
23665
|
*/
|
|
23400
23666
|
_restoreEditingProps() {
|
|
23401
23667
|
if (!this._savedProps) {
|
|
@@ -23415,9 +23681,9 @@ class ITextBehavior extends FabricText {
|
|
|
23415
23681
|
delete this._savedProps;
|
|
23416
23682
|
}
|
|
23417
23683
|
|
|
23418
|
-
/**
|
|
23419
|
-
* runs the actual logic that exits from editing state, see {@link exitEditing}
|
|
23420
|
-
* But it does not fire events
|
|
23684
|
+
/**
|
|
23685
|
+
* runs the actual logic that exits from editing state, see {@link exitEditing}
|
|
23686
|
+
* But it does not fire events
|
|
23421
23687
|
*/
|
|
23422
23688
|
exitEditingImpl() {
|
|
23423
23689
|
const hiddenTextarea = this.hiddenTextarea;
|
|
@@ -23438,8 +23704,8 @@ class ITextBehavior extends FabricText {
|
|
|
23438
23704
|
}
|
|
23439
23705
|
}
|
|
23440
23706
|
|
|
23441
|
-
/**
|
|
23442
|
-
* Exits from editing state and fires relevant events
|
|
23707
|
+
/**
|
|
23708
|
+
* Exits from editing state and fires relevant events
|
|
23443
23709
|
*/
|
|
23444
23710
|
exitEditing() {
|
|
23445
23711
|
const isTextChanged = this._textBeforeEdit !== this.text;
|
|
@@ -23458,8 +23724,8 @@ class ITextBehavior extends FabricText {
|
|
|
23458
23724
|
return this;
|
|
23459
23725
|
}
|
|
23460
23726
|
|
|
23461
|
-
/**
|
|
23462
|
-
* @private
|
|
23727
|
+
/**
|
|
23728
|
+
* @private
|
|
23463
23729
|
*/
|
|
23464
23730
|
_removeExtraneousStyles() {
|
|
23465
23731
|
for (const prop in this.styles) {
|
|
@@ -23469,10 +23735,10 @@ class ITextBehavior extends FabricText {
|
|
|
23469
23735
|
}
|
|
23470
23736
|
}
|
|
23471
23737
|
|
|
23472
|
-
/**
|
|
23473
|
-
* remove and reflow a style block from start to end.
|
|
23474
|
-
* @param {Number} start linear start position for removal (included in removal)
|
|
23475
|
-
* @param {Number} end linear end position for removal ( excluded from removal )
|
|
23738
|
+
/**
|
|
23739
|
+
* remove and reflow a style block from start to end.
|
|
23740
|
+
* @param {Number} start linear start position for removal (included in removal)
|
|
23741
|
+
* @param {Number} end linear end position for removal ( excluded from removal )
|
|
23476
23742
|
*/
|
|
23477
23743
|
removeStyleFromTo(start, end) {
|
|
23478
23744
|
const {
|
|
@@ -23525,10 +23791,10 @@ class ITextBehavior extends FabricText {
|
|
|
23525
23791
|
}
|
|
23526
23792
|
}
|
|
23527
23793
|
|
|
23528
|
-
/**
|
|
23529
|
-
* Shifts line styles up or down
|
|
23530
|
-
* @param {Number} lineIndex Index of a line
|
|
23531
|
-
* @param {Number} offset Can any number?
|
|
23794
|
+
/**
|
|
23795
|
+
* Shifts line styles up or down
|
|
23796
|
+
* @param {Number} lineIndex Index of a line
|
|
23797
|
+
* @param {Number} offset Can any number?
|
|
23532
23798
|
*/
|
|
23533
23799
|
shiftLineStyles(lineIndex, offset) {
|
|
23534
23800
|
const clonedStyles = Object.assign({}, this.styles);
|
|
@@ -23543,15 +23809,15 @@ class ITextBehavior extends FabricText {
|
|
|
23543
23809
|
}
|
|
23544
23810
|
}
|
|
23545
23811
|
|
|
23546
|
-
/**
|
|
23547
|
-
* Handle insertion of more consecutive style lines for when one or more
|
|
23548
|
-
* newlines gets added to the text. Since current style needs to be shifted
|
|
23549
|
-
* first we shift the current style of the number lines needed, then we add
|
|
23550
|
-
* new lines from the last to the first.
|
|
23551
|
-
* @param {Number} lineIndex Index of a line
|
|
23552
|
-
* @param {Number} charIndex Index of a char
|
|
23553
|
-
* @param {Number} qty number of lines to add
|
|
23554
|
-
* @param {Array} copiedStyle Array of objects styles
|
|
23812
|
+
/**
|
|
23813
|
+
* Handle insertion of more consecutive style lines for when one or more
|
|
23814
|
+
* newlines gets added to the text. Since current style needs to be shifted
|
|
23815
|
+
* first we shift the current style of the number lines needed, then we add
|
|
23816
|
+
* new lines from the last to the first.
|
|
23817
|
+
* @param {Number} lineIndex Index of a line
|
|
23818
|
+
* @param {Number} charIndex Index of a char
|
|
23819
|
+
* @param {Number} qty number of lines to add
|
|
23820
|
+
* @param {Array} copiedStyle Array of objects styles
|
|
23555
23821
|
*/
|
|
23556
23822
|
insertNewlineStyleObject(lineIndex, charIndex, qty, copiedStyle) {
|
|
23557
23823
|
const newLineStyles = {};
|
|
@@ -23611,12 +23877,12 @@ class ITextBehavior extends FabricText {
|
|
|
23611
23877
|
this._forceClearCache = true;
|
|
23612
23878
|
}
|
|
23613
23879
|
|
|
23614
|
-
/**
|
|
23615
|
-
* Inserts style object for a given line/char index
|
|
23616
|
-
* @param {Number} lineIndex Index of a line
|
|
23617
|
-
* @param {Number} charIndex Index of a char
|
|
23618
|
-
* @param {Number} quantity number Style object to insert, if given
|
|
23619
|
-
* @param {Array} copiedStyle array of style objects
|
|
23880
|
+
/**
|
|
23881
|
+
* Inserts style object for a given line/char index
|
|
23882
|
+
* @param {Number} lineIndex Index of a line
|
|
23883
|
+
* @param {Number} charIndex Index of a char
|
|
23884
|
+
* @param {Number} quantity number Style object to insert, if given
|
|
23885
|
+
* @param {Array} copiedStyle array of style objects
|
|
23620
23886
|
*/
|
|
23621
23887
|
insertCharStyleObject(lineIndex, charIndex, quantity, copiedStyle) {
|
|
23622
23888
|
if (!this.styles) {
|
|
@@ -23665,11 +23931,11 @@ class ITextBehavior extends FabricText {
|
|
|
23665
23931
|
}
|
|
23666
23932
|
}
|
|
23667
23933
|
|
|
23668
|
-
/**
|
|
23669
|
-
* Inserts style object(s)
|
|
23670
|
-
* @param {Array} insertedText Characters at the location where style is inserted
|
|
23671
|
-
* @param {Number} start cursor index for inserting style
|
|
23672
|
-
* @param {Array} [copiedStyle] array of style objects to insert.
|
|
23934
|
+
/**
|
|
23935
|
+
* Inserts style object(s)
|
|
23936
|
+
* @param {Array} insertedText Characters at the location where style is inserted
|
|
23937
|
+
* @param {Number} start cursor index for inserting style
|
|
23938
|
+
* @param {Array} [copiedStyle] array of style objects to insert.
|
|
23673
23939
|
*/
|
|
23674
23940
|
insertNewStyleBlock(insertedText, start, copiedStyle) {
|
|
23675
23941
|
const cursorLoc = this.get2DCursorLocation(start, true),
|
|
@@ -23710,12 +23976,12 @@ class ITextBehavior extends FabricText {
|
|
|
23710
23976
|
}
|
|
23711
23977
|
}
|
|
23712
23978
|
|
|
23713
|
-
/**
|
|
23714
|
-
* Removes characters from start/end
|
|
23715
|
-
* start/end ar per grapheme position in _text array.
|
|
23716
|
-
*
|
|
23717
|
-
* @param {Number} start
|
|
23718
|
-
* @param {Number} end default to start + 1
|
|
23979
|
+
/**
|
|
23980
|
+
* Removes characters from start/end
|
|
23981
|
+
* start/end ar per grapheme position in _text array.
|
|
23982
|
+
*
|
|
23983
|
+
* @param {Number} start
|
|
23984
|
+
* @param {Number} end default to start + 1
|
|
23719
23985
|
*/
|
|
23720
23986
|
removeChars(start) {
|
|
23721
23987
|
let end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : start + 1;
|
|
@@ -23728,17 +23994,17 @@ class ITextBehavior extends FabricText {
|
|
|
23728
23994
|
this._removeExtraneousStyles();
|
|
23729
23995
|
}
|
|
23730
23996
|
|
|
23731
|
-
/**
|
|
23732
|
-
* insert characters at start position, before start position.
|
|
23733
|
-
* start equal 1 it means the text get inserted between actual grapheme 0 and 1
|
|
23734
|
-
* if style array is provided, it must be as the same length of text in graphemes
|
|
23735
|
-
* if end is provided and is bigger than start, old text is replaced.
|
|
23736
|
-
* start/end ar per grapheme position in _text array.
|
|
23737
|
-
*
|
|
23738
|
-
* @param {String} text text to insert
|
|
23739
|
-
* @param {Array} style array of style objects
|
|
23740
|
-
* @param {Number} start
|
|
23741
|
-
* @param {Number} end default to start + 1
|
|
23997
|
+
/**
|
|
23998
|
+
* insert characters at start position, before start position.
|
|
23999
|
+
* start equal 1 it means the text get inserted between actual grapheme 0 and 1
|
|
24000
|
+
* if style array is provided, it must be as the same length of text in graphemes
|
|
24001
|
+
* if end is provided and is bigger than start, old text is replaced.
|
|
24002
|
+
* start/end ar per grapheme position in _text array.
|
|
24003
|
+
*
|
|
24004
|
+
* @param {String} text text to insert
|
|
24005
|
+
* @param {Array} style array of style objects
|
|
24006
|
+
* @param {Number} start
|
|
24007
|
+
* @param {Number} end default to start + 1
|
|
23742
24008
|
*/
|
|
23743
24009
|
insertChars(text, style, start) {
|
|
23744
24010
|
let end = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : start;
|
|
@@ -23755,9 +24021,9 @@ class ITextBehavior extends FabricText {
|
|
|
23755
24021
|
this._removeExtraneousStyles();
|
|
23756
24022
|
}
|
|
23757
24023
|
|
|
23758
|
-
/**
|
|
23759
|
-
* Set the selectionStart and selectionEnd according to the new position of cursor
|
|
23760
|
-
* mimic the key - mouse navigation when shift is pressed.
|
|
24024
|
+
/**
|
|
24025
|
+
* Set the selectionStart and selectionEnd according to the new position of cursor
|
|
24026
|
+
* mimic the key - mouse navigation when shift is pressed.
|
|
23761
24027
|
*/
|
|
23762
24028
|
setSelectionStartEndWithShift(start, end, newSelection) {
|
|
23763
24029
|
if (newSelection <= start) {
|
|
@@ -24380,8 +24646,8 @@ class ITextKeyBehavior extends ITextBehavior {
|
|
|
24380
24646
|
}
|
|
24381
24647
|
}
|
|
24382
24648
|
|
|
24383
|
-
/**
|
|
24384
|
-
* `LEFT_CLICK === 0`
|
|
24649
|
+
/**
|
|
24650
|
+
* `LEFT_CLICK === 0`
|
|
24385
24651
|
*/
|
|
24386
24652
|
const notALeftClick = e => !!e.button;
|
|
24387
24653
|
class ITextClickBehavior extends ITextKeyBehavior {
|
|
@@ -24399,36 +24665,36 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24399
24665
|
super.initBehavior();
|
|
24400
24666
|
}
|
|
24401
24667
|
|
|
24402
|
-
/**
|
|
24403
|
-
* If this method returns true a mouse move operation over a text selection
|
|
24404
|
-
* will not prevent the native mouse event allowing the browser to start a drag operation.
|
|
24405
|
-
* shouldStartDragging can be read 'do not prevent default for mouse move event'
|
|
24406
|
-
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24407
|
-
* @returns
|
|
24668
|
+
/**
|
|
24669
|
+
* If this method returns true a mouse move operation over a text selection
|
|
24670
|
+
* will not prevent the native mouse event allowing the browser to start a drag operation.
|
|
24671
|
+
* shouldStartDragging can be read 'do not prevent default for mouse move event'
|
|
24672
|
+
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24673
|
+
* @returns
|
|
24408
24674
|
*/
|
|
24409
24675
|
shouldStartDragging() {
|
|
24410
24676
|
return this.draggableTextDelegate.isActive();
|
|
24411
24677
|
}
|
|
24412
24678
|
|
|
24413
|
-
/**
|
|
24414
|
-
* @public override this method to control whether instance should/shouldn't become a drag source,
|
|
24415
|
-
* @see also {@link DraggableTextDelegate#isActive}
|
|
24416
|
-
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24417
|
-
* @returns {boolean} should handle event
|
|
24679
|
+
/**
|
|
24680
|
+
* @public override this method to control whether instance should/shouldn't become a drag source,
|
|
24681
|
+
* @see also {@link DraggableTextDelegate#isActive}
|
|
24682
|
+
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24683
|
+
* @returns {boolean} should handle event
|
|
24418
24684
|
*/
|
|
24419
24685
|
onDragStart(e) {
|
|
24420
24686
|
return this.draggableTextDelegate.onDragStart(e);
|
|
24421
24687
|
}
|
|
24422
24688
|
|
|
24423
|
-
/**
|
|
24424
|
-
* @public override this method to control whether instance should/shouldn't become a drop target
|
|
24689
|
+
/**
|
|
24690
|
+
* @public override this method to control whether instance should/shouldn't become a drop target
|
|
24425
24691
|
*/
|
|
24426
24692
|
canDrop(e) {
|
|
24427
24693
|
return this.draggableTextDelegate.canDrop(e);
|
|
24428
24694
|
}
|
|
24429
24695
|
|
|
24430
|
-
/**
|
|
24431
|
-
* Default handler for double click, select a word or enter overlay editing
|
|
24696
|
+
/**
|
|
24697
|
+
* Default handler for double click, select a word or enter overlay editing
|
|
24432
24698
|
*/
|
|
24433
24699
|
doubleClickHandler(options) {
|
|
24434
24700
|
// Check if we should enter overlay editing mode
|
|
@@ -24445,8 +24711,8 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24445
24711
|
this.renderCursorOrSelection();
|
|
24446
24712
|
}
|
|
24447
24713
|
|
|
24448
|
-
/**
|
|
24449
|
-
* Default handler for triple click, select a line
|
|
24714
|
+
/**
|
|
24715
|
+
* Default handler for triple click, select a line
|
|
24450
24716
|
*/
|
|
24451
24717
|
tripleClickHandler(options) {
|
|
24452
24718
|
if (!this.isEditing) {
|
|
@@ -24456,13 +24722,13 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24456
24722
|
this.renderCursorOrSelection();
|
|
24457
24723
|
}
|
|
24458
24724
|
|
|
24459
|
-
/**
|
|
24460
|
-
* Default event handler for the basic functionalities needed on _mouseDown
|
|
24461
|
-
* can be overridden to do something different.
|
|
24462
|
-
* Scope of this implementation is: find the click position, set selectionStart
|
|
24463
|
-
* find selectionEnd, initialize the drawing of either cursor or selection area
|
|
24464
|
-
* initializing a mousedDown on a text area will cancel fabricjs knowledge of
|
|
24465
|
-
* current compositionMode. It will be set to false.
|
|
24725
|
+
/**
|
|
24726
|
+
* Default event handler for the basic functionalities needed on _mouseDown
|
|
24727
|
+
* can be overridden to do something different.
|
|
24728
|
+
* Scope of this implementation is: find the click position, set selectionStart
|
|
24729
|
+
* find selectionEnd, initialize the drawing of either cursor or selection area
|
|
24730
|
+
* initializing a mousedDown on a text area will cancel fabricjs knowledge of
|
|
24731
|
+
* current compositionMode. It will be set to false.
|
|
24466
24732
|
*/
|
|
24467
24733
|
_mouseDownHandler(_ref) {
|
|
24468
24734
|
let {
|
|
@@ -24490,9 +24756,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24490
24756
|
this.selected || (this.selected = alreadySelected || this.isEditing);
|
|
24491
24757
|
}
|
|
24492
24758
|
|
|
24493
|
-
/**
|
|
24494
|
-
* standard handler for mouse up, overridable
|
|
24495
|
-
* @private
|
|
24759
|
+
/**
|
|
24760
|
+
* standard handler for mouse up, overridable
|
|
24761
|
+
* @private
|
|
24496
24762
|
*/
|
|
24497
24763
|
mouseUpHandler(_ref2) {
|
|
24498
24764
|
let {
|
|
@@ -24523,9 +24789,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24523
24789
|
}
|
|
24524
24790
|
}
|
|
24525
24791
|
|
|
24526
|
-
/**
|
|
24527
|
-
* Changes cursor location in a text depending on passed pointer (x/y) object
|
|
24528
|
-
* @param {TPointerEvent} e Event object
|
|
24792
|
+
/**
|
|
24793
|
+
* Changes cursor location in a text depending on passed pointer (x/y) object
|
|
24794
|
+
* @param {TPointerEvent} e Event object
|
|
24529
24795
|
*/
|
|
24530
24796
|
setCursorByClick(e) {
|
|
24531
24797
|
const newSelection = this.getSelectionStartFromPointer(e),
|
|
@@ -24543,10 +24809,10 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24543
24809
|
}
|
|
24544
24810
|
}
|
|
24545
24811
|
|
|
24546
|
-
/**
|
|
24547
|
-
* Returns index of a character corresponding to where an object was clicked
|
|
24548
|
-
* @param {TPointerEvent} e Event object
|
|
24549
|
-
* @return {Number} Index of a character
|
|
24812
|
+
/**
|
|
24813
|
+
* Returns index of a character corresponding to where an object was clicked
|
|
24814
|
+
* @param {TPointerEvent} e Event object
|
|
24815
|
+
* @return {Number} Index of a character
|
|
24550
24816
|
*/
|
|
24551
24817
|
getSelectionStartFromPointer(e) {
|
|
24552
24818
|
const mouseOffset = this.canvas.getScenePoint(e).transform(invertTransform(this.calcTransformMatrix())).add(new Point(-this._getLeftOffset(), -this._getTopOffset()));
|
|
@@ -24592,15 +24858,15 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24592
24858
|
}
|
|
24593
24859
|
}
|
|
24594
24860
|
|
|
24595
|
-
/**
|
|
24596
|
-
* Hit Testing and Cursor Positioning System
|
|
24597
|
-
*
|
|
24598
|
-
* Maps pointer coordinates to text positions and provides cursor rectangles
|
|
24599
|
-
* for interactive text editing with grapheme-aware boundaries.
|
|
24861
|
+
/**
|
|
24862
|
+
* Hit Testing and Cursor Positioning System
|
|
24863
|
+
*
|
|
24864
|
+
* Maps pointer coordinates to text positions and provides cursor rectangles
|
|
24865
|
+
* for interactive text editing with grapheme-aware boundaries.
|
|
24600
24866
|
*/
|
|
24601
24867
|
|
|
24602
|
-
/**
|
|
24603
|
-
* Hit test a point against laid out text to find insertion position
|
|
24868
|
+
/**
|
|
24869
|
+
* Hit test a point against laid out text to find insertion position
|
|
24604
24870
|
*/
|
|
24605
24871
|
function hitTest(x, y, layout, options) {
|
|
24606
24872
|
if (layout.lines.length === 0) {
|
|
@@ -24644,8 +24910,8 @@ function hitTest(x, y, layout, options) {
|
|
|
24644
24910
|
};
|
|
24645
24911
|
}
|
|
24646
24912
|
|
|
24647
|
-
/**
|
|
24648
|
-
* Get cursor rectangle for a given insertion index
|
|
24913
|
+
/**
|
|
24914
|
+
* Get cursor rectangle for a given insertion index
|
|
24649
24915
|
*/
|
|
24650
24916
|
function getCursorRect(insertionIndex, layout, options) {
|
|
24651
24917
|
if (layout.lines.length === 0) {
|
|
@@ -24692,8 +24958,8 @@ function getCursorRect(insertionIndex, layout, options) {
|
|
|
24692
24958
|
|
|
24693
24959
|
// Private helper functions
|
|
24694
24960
|
|
|
24695
|
-
/**
|
|
24696
|
-
* Find which line contains the given Y coordinate
|
|
24961
|
+
/**
|
|
24962
|
+
* Find which line contains the given Y coordinate
|
|
24697
24963
|
*/
|
|
24698
24964
|
function findLineAtY(y, lines) {
|
|
24699
24965
|
var _lines;
|
|
@@ -24716,8 +24982,8 @@ function findLineAtY(y, lines) {
|
|
|
24716
24982
|
};
|
|
24717
24983
|
}
|
|
24718
24984
|
|
|
24719
|
-
/**
|
|
24720
|
-
* Find character position within a line at given X coordinate
|
|
24985
|
+
/**
|
|
24986
|
+
* Find character position within a line at given X coordinate
|
|
24721
24987
|
*/
|
|
24722
24988
|
function findCharAtX(x, line, options) {
|
|
24723
24989
|
if (line.bounds.length === 0) {
|
|
@@ -24823,8 +25089,8 @@ function findCharAtX(x, line, options) {
|
|
|
24823
25089
|
};
|
|
24824
25090
|
}
|
|
24825
25091
|
|
|
24826
|
-
/**
|
|
24827
|
-
* Calculate total insertion index from line and character indices
|
|
25092
|
+
/**
|
|
25093
|
+
* Calculate total insertion index from line and character indices
|
|
24828
25094
|
*/
|
|
24829
25095
|
function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
|
|
24830
25096
|
let insertionIndex = 0;
|
|
@@ -24843,8 +25109,8 @@ function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
|
|
|
24843
25109
|
return insertionIndex;
|
|
24844
25110
|
}
|
|
24845
25111
|
|
|
24846
|
-
/**
|
|
24847
|
-
* Find line and grapheme position from insertion index
|
|
25112
|
+
/**
|
|
25113
|
+
* Find line and grapheme position from insertion index
|
|
24848
25114
|
*/
|
|
24849
25115
|
function findPositionFromIndex(insertionIndex, layout) {
|
|
24850
25116
|
let currentIndex = 0;
|
|
@@ -24886,8 +25152,8 @@ function findPositionFromIndex(insertionIndex, layout) {
|
|
|
24886
25152
|
};
|
|
24887
25153
|
}
|
|
24888
25154
|
|
|
24889
|
-
/**
|
|
24890
|
-
* Calculate Y position of a line
|
|
25155
|
+
/**
|
|
25156
|
+
* Calculate Y position of a line
|
|
24891
25157
|
*/
|
|
24892
25158
|
function calculateLineY(lineIndex, layout, options) {
|
|
24893
25159
|
let y = 0;
|
|
@@ -24990,48 +25256,48 @@ const iTextDefaultValues = {
|
|
|
24990
25256
|
|
|
24991
25257
|
// @TODO this is not complete
|
|
24992
25258
|
|
|
24993
|
-
/**
|
|
24994
|
-
* @fires changed
|
|
24995
|
-
* @fires selection:changed
|
|
24996
|
-
* @fires editing:entered
|
|
24997
|
-
* @fires editing:exited
|
|
24998
|
-
* @fires dragstart
|
|
24999
|
-
* @fires drag drag event firing on the drag source
|
|
25000
|
-
* @fires dragend
|
|
25001
|
-
* @fires copy
|
|
25002
|
-
* @fires cut
|
|
25003
|
-
* @fires paste
|
|
25004
|
-
*
|
|
25005
|
-
* #### Supported key combinations
|
|
25006
|
-
* ```
|
|
25007
|
-
* Move cursor: left, right, up, down
|
|
25008
|
-
* Select character: shift + left, shift + right
|
|
25009
|
-
* Select text vertically: shift + up, shift + down
|
|
25010
|
-
* Move cursor by word: alt + left, alt + right
|
|
25011
|
-
* Select words: shift + alt + left, shift + alt + right
|
|
25012
|
-
* Move cursor to line start/end: cmd + left, cmd + right or home, end
|
|
25013
|
-
* Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
|
|
25014
|
-
* Jump to start/end of text: cmd + up, cmd + down
|
|
25015
|
-
* Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
|
|
25016
|
-
* Delete character: backspace
|
|
25017
|
-
* Delete word: alt + backspace
|
|
25018
|
-
* Delete line: cmd + backspace
|
|
25019
|
-
* Forward delete: delete
|
|
25020
|
-
* Copy text: ctrl/cmd + c
|
|
25021
|
-
* Paste text: ctrl/cmd + v
|
|
25022
|
-
* Cut text: ctrl/cmd + x
|
|
25023
|
-
* Select entire text: ctrl/cmd + a
|
|
25024
|
-
* Quit editing tab or esc
|
|
25025
|
-
* ```
|
|
25026
|
-
*
|
|
25027
|
-
* #### Supported mouse/touch combination
|
|
25028
|
-
* ```
|
|
25029
|
-
* Position cursor: click/touch
|
|
25030
|
-
* Create selection: click/touch & drag
|
|
25031
|
-
* Create selection: click & shift + click
|
|
25032
|
-
* Select word: double click
|
|
25033
|
-
* Select line: triple click
|
|
25034
|
-
* ```
|
|
25259
|
+
/**
|
|
25260
|
+
* @fires changed
|
|
25261
|
+
* @fires selection:changed
|
|
25262
|
+
* @fires editing:entered
|
|
25263
|
+
* @fires editing:exited
|
|
25264
|
+
* @fires dragstart
|
|
25265
|
+
* @fires drag drag event firing on the drag source
|
|
25266
|
+
* @fires dragend
|
|
25267
|
+
* @fires copy
|
|
25268
|
+
* @fires cut
|
|
25269
|
+
* @fires paste
|
|
25270
|
+
*
|
|
25271
|
+
* #### Supported key combinations
|
|
25272
|
+
* ```
|
|
25273
|
+
* Move cursor: left, right, up, down
|
|
25274
|
+
* Select character: shift + left, shift + right
|
|
25275
|
+
* Select text vertically: shift + up, shift + down
|
|
25276
|
+
* Move cursor by word: alt + left, alt + right
|
|
25277
|
+
* Select words: shift + alt + left, shift + alt + right
|
|
25278
|
+
* Move cursor to line start/end: cmd + left, cmd + right or home, end
|
|
25279
|
+
* Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
|
|
25280
|
+
* Jump to start/end of text: cmd + up, cmd + down
|
|
25281
|
+
* Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
|
|
25282
|
+
* Delete character: backspace
|
|
25283
|
+
* Delete word: alt + backspace
|
|
25284
|
+
* Delete line: cmd + backspace
|
|
25285
|
+
* Forward delete: delete
|
|
25286
|
+
* Copy text: ctrl/cmd + c
|
|
25287
|
+
* Paste text: ctrl/cmd + v
|
|
25288
|
+
* Cut text: ctrl/cmd + x
|
|
25289
|
+
* Select entire text: ctrl/cmd + a
|
|
25290
|
+
* Quit editing tab or esc
|
|
25291
|
+
* ```
|
|
25292
|
+
*
|
|
25293
|
+
* #### Supported mouse/touch combination
|
|
25294
|
+
* ```
|
|
25295
|
+
* Position cursor: click/touch
|
|
25296
|
+
* Create selection: click/touch & drag
|
|
25297
|
+
* Create selection: click & shift + click
|
|
25298
|
+
* Select word: double click
|
|
25299
|
+
* Select line: triple click
|
|
25300
|
+
* ```
|
|
25035
25301
|
*/
|
|
25036
25302
|
class IText extends ITextClickBehavior {
|
|
25037
25303
|
static getDefaults() {
|
|
@@ -25046,10 +25312,10 @@ class IText extends ITextClickBehavior {
|
|
|
25046
25312
|
return type === 'itext' ? 'i-text' : type;
|
|
25047
25313
|
}
|
|
25048
25314
|
|
|
25049
|
-
/**
|
|
25050
|
-
* Constructor
|
|
25051
|
-
* @param {String} text Text string
|
|
25052
|
-
* @param {Object} [options] Options object
|
|
25315
|
+
/**
|
|
25316
|
+
* Constructor
|
|
25317
|
+
* @param {String} text Text string
|
|
25318
|
+
* @param {Object} [options] Options object
|
|
25053
25319
|
*/
|
|
25054
25320
|
constructor(text, options) {
|
|
25055
25321
|
super(text, {
|
|
@@ -25059,11 +25325,11 @@ class IText extends ITextClickBehavior {
|
|
|
25059
25325
|
this.initBehavior();
|
|
25060
25326
|
}
|
|
25061
25327
|
|
|
25062
|
-
/**
|
|
25063
|
-
* While editing handle differently
|
|
25064
|
-
* @private
|
|
25065
|
-
* @param {string} key
|
|
25066
|
-
* @param {*} value
|
|
25328
|
+
/**
|
|
25329
|
+
* While editing handle differently
|
|
25330
|
+
* @private
|
|
25331
|
+
* @param {string} key
|
|
25332
|
+
* @param {*} value
|
|
25067
25333
|
*/
|
|
25068
25334
|
_set(key, value) {
|
|
25069
25335
|
if (this.isEditing && this._savedProps && key in this._savedProps) {
|
|
@@ -25078,28 +25344,28 @@ class IText extends ITextClickBehavior {
|
|
|
25078
25344
|
return super._set(key, value);
|
|
25079
25345
|
}
|
|
25080
25346
|
|
|
25081
|
-
/**
|
|
25082
|
-
* Sets selection start (left boundary of a selection)
|
|
25083
|
-
* @param {Number} index Index to set selection start to
|
|
25347
|
+
/**
|
|
25348
|
+
* Sets selection start (left boundary of a selection)
|
|
25349
|
+
* @param {Number} index Index to set selection start to
|
|
25084
25350
|
*/
|
|
25085
25351
|
setSelectionStart(index) {
|
|
25086
25352
|
index = Math.max(index, 0);
|
|
25087
25353
|
this._updateAndFire('selectionStart', index);
|
|
25088
25354
|
}
|
|
25089
25355
|
|
|
25090
|
-
/**
|
|
25091
|
-
* Sets selection end (right boundary of a selection)
|
|
25092
|
-
* @param {Number} index Index to set selection end to
|
|
25356
|
+
/**
|
|
25357
|
+
* Sets selection end (right boundary of a selection)
|
|
25358
|
+
* @param {Number} index Index to set selection end to
|
|
25093
25359
|
*/
|
|
25094
25360
|
setSelectionEnd(index) {
|
|
25095
25361
|
index = Math.min(index, this.text.length);
|
|
25096
25362
|
this._updateAndFire('selectionEnd', index);
|
|
25097
25363
|
}
|
|
25098
25364
|
|
|
25099
|
-
/**
|
|
25100
|
-
* @private
|
|
25101
|
-
* @param {String} property 'selectionStart' or 'selectionEnd'
|
|
25102
|
-
* @param {Number} index new position of property
|
|
25365
|
+
/**
|
|
25366
|
+
* @private
|
|
25367
|
+
* @param {String} property 'selectionStart' or 'selectionEnd'
|
|
25368
|
+
* @param {Number} index new position of property
|
|
25103
25369
|
*/
|
|
25104
25370
|
_updateAndFire(property, index) {
|
|
25105
25371
|
if (this[property] !== index) {
|
|
@@ -25109,9 +25375,9 @@ class IText extends ITextClickBehavior {
|
|
|
25109
25375
|
this._updateTextarea();
|
|
25110
25376
|
}
|
|
25111
25377
|
|
|
25112
|
-
/**
|
|
25113
|
-
* Fires the even of selection changed
|
|
25114
|
-
* @private
|
|
25378
|
+
/**
|
|
25379
|
+
* Fires the even of selection changed
|
|
25380
|
+
* @private
|
|
25115
25381
|
*/
|
|
25116
25382
|
_fireSelectionChanged() {
|
|
25117
25383
|
this.fire('selection:changed');
|
|
@@ -25120,25 +25386,25 @@ class IText extends ITextClickBehavior {
|
|
|
25120
25386
|
});
|
|
25121
25387
|
}
|
|
25122
25388
|
|
|
25123
|
-
/**
|
|
25124
|
-
* Initialize text dimensions. Render all text on given context
|
|
25125
|
-
* or on a offscreen canvas to get the text width with measureText.
|
|
25126
|
-
* Updates this.width and this.height with the proper values.
|
|
25127
|
-
* Does not return dimensions.
|
|
25128
|
-
* @private
|
|
25389
|
+
/**
|
|
25390
|
+
* Initialize text dimensions. Render all text on given context
|
|
25391
|
+
* or on a offscreen canvas to get the text width with measureText.
|
|
25392
|
+
* Updates this.width and this.height with the proper values.
|
|
25393
|
+
* Does not return dimensions.
|
|
25394
|
+
* @private
|
|
25129
25395
|
*/
|
|
25130
25396
|
initDimensions() {
|
|
25131
25397
|
this.isEditing && this.initDelayedCursor();
|
|
25132
25398
|
super.initDimensions();
|
|
25133
25399
|
}
|
|
25134
25400
|
|
|
25135
|
-
/**
|
|
25136
|
-
* Gets style of a current selection/cursor (at the start position)
|
|
25137
|
-
* if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
|
|
25138
|
-
* @param {Number} startIndex Start index to get styles at
|
|
25139
|
-
* @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25140
|
-
* @param {Boolean} [complete] get full style or not
|
|
25141
|
-
* @return {Array} styles an array with one, zero or more Style objects
|
|
25401
|
+
/**
|
|
25402
|
+
* Gets style of a current selection/cursor (at the start position)
|
|
25403
|
+
* if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
|
|
25404
|
+
* @param {Number} startIndex Start index to get styles at
|
|
25405
|
+
* @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25406
|
+
* @param {Boolean} [complete] get full style or not
|
|
25407
|
+
* @return {Array} styles an array with one, zero or more Style objects
|
|
25142
25408
|
*/
|
|
25143
25409
|
getSelectionStyles() {
|
|
25144
25410
|
let startIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart || 0;
|
|
@@ -25147,11 +25413,11 @@ class IText extends ITextClickBehavior {
|
|
|
25147
25413
|
return super.getSelectionStyles(startIndex, endIndex, complete);
|
|
25148
25414
|
}
|
|
25149
25415
|
|
|
25150
|
-
/**
|
|
25151
|
-
* Sets style of a current selection, if no selection exist, do not set anything.
|
|
25152
|
-
* @param {Object} [styles] Styles object
|
|
25153
|
-
* @param {Number} [startIndex] Start index to get styles at
|
|
25154
|
-
* @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25416
|
+
/**
|
|
25417
|
+
* Sets style of a current selection, if no selection exist, do not set anything.
|
|
25418
|
+
* @param {Object} [styles] Styles object
|
|
25419
|
+
* @param {Number} [startIndex] Start index to get styles at
|
|
25420
|
+
* @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25155
25421
|
*/
|
|
25156
25422
|
setSelectionStyles(styles) {
|
|
25157
25423
|
let startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selectionStart || 0;
|
|
@@ -25159,10 +25425,10 @@ class IText extends ITextClickBehavior {
|
|
|
25159
25425
|
return super.setSelectionStyles(styles, startIndex, endIndex);
|
|
25160
25426
|
}
|
|
25161
25427
|
|
|
25162
|
-
/**
|
|
25163
|
-
* Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
|
|
25164
|
-
* @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
|
|
25165
|
-
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
25428
|
+
/**
|
|
25429
|
+
* Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
|
|
25430
|
+
* @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
|
|
25431
|
+
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
25166
25432
|
*/
|
|
25167
25433
|
get2DCursorLocation() {
|
|
25168
25434
|
let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -25170,9 +25436,9 @@ class IText extends ITextClickBehavior {
|
|
|
25170
25436
|
return super.get2DCursorLocation(selectionStart, skipWrapping);
|
|
25171
25437
|
}
|
|
25172
25438
|
|
|
25173
|
-
/**
|
|
25174
|
-
* @private
|
|
25175
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
25439
|
+
/**
|
|
25440
|
+
* @private
|
|
25441
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
25176
25442
|
*/
|
|
25177
25443
|
render(ctx) {
|
|
25178
25444
|
super.render(ctx);
|
|
@@ -25182,9 +25448,9 @@ class IText extends ITextClickBehavior {
|
|
|
25182
25448
|
this.renderCursorOrSelection();
|
|
25183
25449
|
}
|
|
25184
25450
|
|
|
25185
|
-
/**
|
|
25186
|
-
* @override block cursor/selection logic while rendering the exported canvas
|
|
25187
|
-
* @todo this workaround should be replaced with a more robust solution
|
|
25451
|
+
/**
|
|
25452
|
+
* @override block cursor/selection logic while rendering the exported canvas
|
|
25453
|
+
* @todo this workaround should be replaced with a more robust solution
|
|
25188
25454
|
*/
|
|
25189
25455
|
toCanvasElement(options) {
|
|
25190
25456
|
const isEditing = this.isEditing;
|
|
@@ -25194,9 +25460,9 @@ class IText extends ITextClickBehavior {
|
|
|
25194
25460
|
return canvas;
|
|
25195
25461
|
}
|
|
25196
25462
|
|
|
25197
|
-
/**
|
|
25198
|
-
* Renders cursor or selection (depending on what exists)
|
|
25199
|
-
* it does on the contextTop. If contextTop is not available, do nothing.
|
|
25463
|
+
/**
|
|
25464
|
+
* Renders cursor or selection (depending on what exists)
|
|
25465
|
+
* it does on the contextTop. If contextTop is not available, do nothing.
|
|
25200
25466
|
*/
|
|
25201
25467
|
renderCursorOrSelection() {
|
|
25202
25468
|
if (!this.isEditing || !this.canvas) {
|
|
@@ -25252,12 +25518,12 @@ class IText extends ITextClickBehavior {
|
|
|
25252
25518
|
ctx.restore();
|
|
25253
25519
|
}
|
|
25254
25520
|
|
|
25255
|
-
/**
|
|
25256
|
-
* Finds and returns an array of clip paths that are applied to the parent
|
|
25257
|
-
* group(s) of the current FabricObject instance. The object's hierarchy is
|
|
25258
|
-
* traversed upwards (from the current object towards the root of the canvas),
|
|
25259
|
-
* checking each parent object for the presence of a `clipPath` that is not
|
|
25260
|
-
* absolutely positioned.
|
|
25521
|
+
/**
|
|
25522
|
+
* Finds and returns an array of clip paths that are applied to the parent
|
|
25523
|
+
* group(s) of the current FabricObject instance. The object's hierarchy is
|
|
25524
|
+
* traversed upwards (from the current object towards the root of the canvas),
|
|
25525
|
+
* checking each parent object for the presence of a `clipPath` that is not
|
|
25526
|
+
* absolutely positioned.
|
|
25261
25527
|
*/
|
|
25262
25528
|
findAncestorsWithClipPath() {
|
|
25263
25529
|
const clipPathAncestors = [];
|
|
@@ -25272,13 +25538,13 @@ class IText extends ITextClickBehavior {
|
|
|
25272
25538
|
return clipPathAncestors;
|
|
25273
25539
|
}
|
|
25274
25540
|
|
|
25275
|
-
/**
|
|
25276
|
-
* Returns cursor boundaries (left, top, leftOffset, topOffset)
|
|
25277
|
-
* left/top are left/top of entire text box
|
|
25278
|
-
* leftOffset/topOffset are offset from that left/top point of a text box
|
|
25279
|
-
* @private
|
|
25280
|
-
* @param {number} [index] index from start
|
|
25281
|
-
* @param {boolean} [skipCaching]
|
|
25541
|
+
/**
|
|
25542
|
+
* Returns cursor boundaries (left, top, leftOffset, topOffset)
|
|
25543
|
+
* left/top are left/top of entire text box
|
|
25544
|
+
* leftOffset/topOffset are offset from that left/top point of a text box
|
|
25545
|
+
* @private
|
|
25546
|
+
* @param {number} [index] index from start
|
|
25547
|
+
* @param {boolean} [skipCaching]
|
|
25282
25548
|
*/
|
|
25283
25549
|
_getCursorBoundaries() {
|
|
25284
25550
|
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -25292,11 +25558,11 @@ class IText extends ITextClickBehavior {
|
|
|
25292
25558
|
return this._getCursorBoundariesOriginal(index, skipCaching);
|
|
25293
25559
|
}
|
|
25294
25560
|
|
|
25295
|
-
/**
|
|
25296
|
-
* Caches and returns cursor left/top offset relative to instance's center point
|
|
25297
|
-
* @private
|
|
25298
|
-
* @param {number} index index from start
|
|
25299
|
-
* @param {boolean} [skipCaching]
|
|
25561
|
+
/**
|
|
25562
|
+
* Caches and returns cursor left/top offset relative to instance's center point
|
|
25563
|
+
* @private
|
|
25564
|
+
* @param {number} index index from start
|
|
25565
|
+
* @param {boolean} [skipCaching]
|
|
25300
25566
|
*/
|
|
25301
25567
|
_getCursorBoundariesOffsets(index, skipCaching) {
|
|
25302
25568
|
if (skipCaching) {
|
|
@@ -25308,9 +25574,9 @@ class IText extends ITextClickBehavior {
|
|
|
25308
25574
|
return this.cursorOffsetCache = this.__getCursorBoundariesOffsets(index);
|
|
25309
25575
|
}
|
|
25310
25576
|
|
|
25311
|
-
/**
|
|
25312
|
-
* Enhanced cursor boundaries using advanced hit testing when available
|
|
25313
|
-
* @private
|
|
25577
|
+
/**
|
|
25578
|
+
* Enhanced cursor boundaries using advanced hit testing when available
|
|
25579
|
+
* @private
|
|
25314
25580
|
*/
|
|
25315
25581
|
_getCursorBoundariesAdvanced(index) {
|
|
25316
25582
|
if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
|
|
@@ -25326,9 +25592,9 @@ class IText extends ITextClickBehavior {
|
|
|
25326
25592
|
};
|
|
25327
25593
|
}
|
|
25328
25594
|
|
|
25329
|
-
/**
|
|
25330
|
-
* Enhanced selection start from pointer using BiDi-aware hit testing
|
|
25331
|
-
* @override
|
|
25595
|
+
/**
|
|
25596
|
+
* Enhanced selection start from pointer using BiDi-aware hit testing
|
|
25597
|
+
* @override
|
|
25332
25598
|
*/
|
|
25333
25599
|
getSelectionStartFromPointer(e) {
|
|
25334
25600
|
if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
|
|
@@ -25342,9 +25608,9 @@ class IText extends ITextClickBehavior {
|
|
|
25342
25608
|
return Math.min(hitResult.charIndex, this._text.length);
|
|
25343
25609
|
}
|
|
25344
25610
|
|
|
25345
|
-
/**
|
|
25346
|
-
* Original cursor boundaries implementation
|
|
25347
|
-
* @private
|
|
25611
|
+
/**
|
|
25612
|
+
* Original cursor boundaries implementation
|
|
25613
|
+
* @private
|
|
25348
25614
|
*/
|
|
25349
25615
|
_getCursorBoundariesOriginal(index, skipCaching) {
|
|
25350
25616
|
const left = this._getLeftOffset(),
|
|
@@ -25358,10 +25624,10 @@ class IText extends ITextClickBehavior {
|
|
|
25358
25624
|
};
|
|
25359
25625
|
}
|
|
25360
25626
|
|
|
25361
|
-
/**
|
|
25362
|
-
* Calculates cursor left/top offset relative to instance's center point
|
|
25363
|
-
* @private
|
|
25364
|
-
* @param {number} index index from start
|
|
25627
|
+
/**
|
|
25628
|
+
* Calculates cursor left/top offset relative to instance's center point
|
|
25629
|
+
* @private
|
|
25630
|
+
* @param {number} index index from start
|
|
25365
25631
|
*/
|
|
25366
25632
|
__getCursorBoundariesOffsets(index) {
|
|
25367
25633
|
let topOffset = 0,
|
|
@@ -25395,29 +25661,29 @@ class IText extends ITextClickBehavior {
|
|
|
25395
25661
|
return boundaries;
|
|
25396
25662
|
}
|
|
25397
25663
|
|
|
25398
|
-
/**
|
|
25399
|
-
* Renders cursor on context Top, outside the animation cycle, on request
|
|
25400
|
-
* Used for the drag/drop effect.
|
|
25401
|
-
* If contextTop is not available, do nothing.
|
|
25664
|
+
/**
|
|
25665
|
+
* Renders cursor on context Top, outside the animation cycle, on request
|
|
25666
|
+
* Used for the drag/drop effect.
|
|
25667
|
+
* If contextTop is not available, do nothing.
|
|
25402
25668
|
*/
|
|
25403
25669
|
renderCursorAt(selectionStart) {
|
|
25404
25670
|
this._renderCursor(this.canvas.contextTop, this._getCursorBoundaries(selectionStart, true), selectionStart);
|
|
25405
25671
|
}
|
|
25406
25672
|
|
|
25407
|
-
/**
|
|
25408
|
-
* Renders cursor
|
|
25409
|
-
* @param {Object} boundaries
|
|
25410
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25673
|
+
/**
|
|
25674
|
+
* Renders cursor
|
|
25675
|
+
* @param {Object} boundaries
|
|
25676
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25411
25677
|
*/
|
|
25412
25678
|
renderCursor(ctx, boundaries) {
|
|
25413
25679
|
this._renderCursor(ctx, boundaries, this.selectionStart);
|
|
25414
25680
|
}
|
|
25415
25681
|
|
|
25416
|
-
/**
|
|
25417
|
-
* Return the data needed to render the cursor for given selection start
|
|
25418
|
-
* The left,top are relative to the object, while width and height are prescaled
|
|
25419
|
-
* to look think with canvas zoom and object scaling,
|
|
25420
|
-
* so they depend on canvas and object scaling
|
|
25682
|
+
/**
|
|
25683
|
+
* Return the data needed to render the cursor for given selection start
|
|
25684
|
+
* The left,top are relative to the object, while width and height are prescaled
|
|
25685
|
+
* to look think with canvas zoom and object scaling,
|
|
25686
|
+
* so they depend on canvas and object scaling
|
|
25421
25687
|
*/
|
|
25422
25688
|
getCursorRenderingData() {
|
|
25423
25689
|
let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -25440,9 +25706,9 @@ class IText extends ITextClickBehavior {
|
|
|
25440
25706
|
};
|
|
25441
25707
|
}
|
|
25442
25708
|
|
|
25443
|
-
/**
|
|
25444
|
-
* Render the cursor at the given selectionStart.
|
|
25445
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25709
|
+
/**
|
|
25710
|
+
* Render the cursor at the given selectionStart.
|
|
25711
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25446
25712
|
*/
|
|
25447
25713
|
_renderCursor(ctx, boundaries, selectionStart) {
|
|
25448
25714
|
const {
|
|
@@ -25458,10 +25724,10 @@ class IText extends ITextClickBehavior {
|
|
|
25458
25724
|
ctx.fillRect(left, top, width, height);
|
|
25459
25725
|
}
|
|
25460
25726
|
|
|
25461
|
-
/**
|
|
25462
|
-
* Renders text selection
|
|
25463
|
-
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25464
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25727
|
+
/**
|
|
25728
|
+
* Renders text selection
|
|
25729
|
+
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25730
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25465
25731
|
*/
|
|
25466
25732
|
renderSelection(ctx, boundaries) {
|
|
25467
25733
|
const selection = {
|
|
@@ -25471,8 +25737,8 @@ class IText extends ITextClickBehavior {
|
|
|
25471
25737
|
this._renderSelection(ctx, selection, boundaries);
|
|
25472
25738
|
}
|
|
25473
25739
|
|
|
25474
|
-
/**
|
|
25475
|
-
* Renders drag start text selection
|
|
25740
|
+
/**
|
|
25741
|
+
* Renders drag start text selection
|
|
25476
25742
|
*/
|
|
25477
25743
|
renderDragSourceEffect() {
|
|
25478
25744
|
const dragStartSelection = this.draggableTextDelegate.getDragStartSelection();
|
|
@@ -25483,12 +25749,12 @@ class IText extends ITextClickBehavior {
|
|
|
25483
25749
|
this.renderCursorAt(dragSelection);
|
|
25484
25750
|
}
|
|
25485
25751
|
|
|
25486
|
-
/**
|
|
25487
|
-
* Renders text selection
|
|
25488
|
-
* @private
|
|
25489
|
-
* @param {{ selectionStart: number, selectionEnd: number }} selection
|
|
25490
|
-
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25491
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25752
|
+
/**
|
|
25753
|
+
* Renders text selection
|
|
25754
|
+
* @private
|
|
25755
|
+
* @param {{ selectionStart: number, selectionEnd: number }} selection
|
|
25756
|
+
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25757
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25492
25758
|
*/
|
|
25493
25759
|
_renderSelection(ctx, selection, boundaries) {
|
|
25494
25760
|
const selectionStart = selection.selectionStart,
|
|
@@ -25550,34 +25816,34 @@ class IText extends ITextClickBehavior {
|
|
|
25550
25816
|
}
|
|
25551
25817
|
}
|
|
25552
25818
|
|
|
25553
|
-
/**
|
|
25554
|
-
* High level function to know the height of the cursor.
|
|
25555
|
-
* the currentChar is the one that precedes the cursor
|
|
25556
|
-
* Returns fontSize of char at the current cursor
|
|
25557
|
-
* Unused from the library, is for the end user
|
|
25558
|
-
* @return {Number} Character font size
|
|
25819
|
+
/**
|
|
25820
|
+
* High level function to know the height of the cursor.
|
|
25821
|
+
* the currentChar is the one that precedes the cursor
|
|
25822
|
+
* Returns fontSize of char at the current cursor
|
|
25823
|
+
* Unused from the library, is for the end user
|
|
25824
|
+
* @return {Number} Character font size
|
|
25559
25825
|
*/
|
|
25560
25826
|
getCurrentCharFontSize() {
|
|
25561
25827
|
const cp = this._getCurrentCharIndex();
|
|
25562
25828
|
return this.getValueOfPropertyAt(cp.l, cp.c, 'fontSize');
|
|
25563
25829
|
}
|
|
25564
25830
|
|
|
25565
|
-
/**
|
|
25566
|
-
* High level function to know the color of the cursor.
|
|
25567
|
-
* the currentChar is the one that precedes the cursor
|
|
25568
|
-
* Returns color (fill) of char at the current cursor
|
|
25569
|
-
* if the text object has a pattern or gradient for filler, it will return that.
|
|
25570
|
-
* Unused by the library, is for the end user
|
|
25571
|
-
* @return {String | TFiller} Character color (fill)
|
|
25831
|
+
/**
|
|
25832
|
+
* High level function to know the color of the cursor.
|
|
25833
|
+
* the currentChar is the one that precedes the cursor
|
|
25834
|
+
* Returns color (fill) of char at the current cursor
|
|
25835
|
+
* if the text object has a pattern or gradient for filler, it will return that.
|
|
25836
|
+
* Unused by the library, is for the end user
|
|
25837
|
+
* @return {String | TFiller} Character color (fill)
|
|
25572
25838
|
*/
|
|
25573
25839
|
getCurrentCharColor() {
|
|
25574
25840
|
const cp = this._getCurrentCharIndex();
|
|
25575
25841
|
return this.getValueOfPropertyAt(cp.l, cp.c, FILL);
|
|
25576
25842
|
}
|
|
25577
25843
|
|
|
25578
|
-
/**
|
|
25579
|
-
* Returns the cursor position for the getCurrent.. functions
|
|
25580
|
-
* @private
|
|
25844
|
+
/**
|
|
25845
|
+
* Returns the cursor position for the getCurrent.. functions
|
|
25846
|
+
* @private
|
|
25581
25847
|
*/
|
|
25582
25848
|
_getCurrentCharIndex() {
|
|
25583
25849
|
const cursorPosition = this.get2DCursorLocation(this.selectionStart, true),
|
|
@@ -25593,52 +25859,52 @@ class IText extends ITextClickBehavior {
|
|
|
25593
25859
|
super.dispose();
|
|
25594
25860
|
}
|
|
25595
25861
|
}
|
|
25596
|
-
/**
|
|
25597
|
-
* Index where text selection starts (or where cursor is when there is no selection)
|
|
25598
|
-
* @type Number
|
|
25862
|
+
/**
|
|
25863
|
+
* Index where text selection starts (or where cursor is when there is no selection)
|
|
25864
|
+
* @type Number
|
|
25599
25865
|
*/
|
|
25600
|
-
/**
|
|
25601
|
-
* Index where text selection ends
|
|
25602
|
-
* @type Number
|
|
25866
|
+
/**
|
|
25867
|
+
* Index where text selection ends
|
|
25868
|
+
* @type Number
|
|
25603
25869
|
*/
|
|
25604
|
-
/**
|
|
25605
|
-
* Color of text selection
|
|
25606
|
-
* @type String
|
|
25870
|
+
/**
|
|
25871
|
+
* Color of text selection
|
|
25872
|
+
* @type String
|
|
25607
25873
|
*/
|
|
25608
|
-
/**
|
|
25609
|
-
* Indicates whether text is in editing mode
|
|
25610
|
-
* @type Boolean
|
|
25874
|
+
/**
|
|
25875
|
+
* Indicates whether text is in editing mode
|
|
25876
|
+
* @type Boolean
|
|
25611
25877
|
*/
|
|
25612
|
-
/**
|
|
25613
|
-
* Indicates whether a text can be edited
|
|
25614
|
-
* @type Boolean
|
|
25878
|
+
/**
|
|
25879
|
+
* Indicates whether a text can be edited
|
|
25880
|
+
* @type Boolean
|
|
25615
25881
|
*/
|
|
25616
|
-
/**
|
|
25617
|
-
* Border color of text object while it's in editing mode
|
|
25618
|
-
* @type String
|
|
25882
|
+
/**
|
|
25883
|
+
* Border color of text object while it's in editing mode
|
|
25884
|
+
* @type String
|
|
25619
25885
|
*/
|
|
25620
|
-
/**
|
|
25621
|
-
* Width of cursor (in px)
|
|
25622
|
-
* @type Number
|
|
25886
|
+
/**
|
|
25887
|
+
* Width of cursor (in px)
|
|
25888
|
+
* @type Number
|
|
25623
25889
|
*/
|
|
25624
|
-
/**
|
|
25625
|
-
* Color of text cursor color in editing mode.
|
|
25626
|
-
* if not set (default) will take color from the text.
|
|
25627
|
-
* if set to a color value that fabric can understand, it will
|
|
25628
|
-
* be used instead of the color of the text at the current position.
|
|
25629
|
-
* @type String
|
|
25890
|
+
/**
|
|
25891
|
+
* Color of text cursor color in editing mode.
|
|
25892
|
+
* if not set (default) will take color from the text.
|
|
25893
|
+
* if set to a color value that fabric can understand, it will
|
|
25894
|
+
* be used instead of the color of the text at the current position.
|
|
25895
|
+
* @type String
|
|
25630
25896
|
*/
|
|
25631
|
-
/**
|
|
25632
|
-
* Delay between cursor blink (in ms)
|
|
25633
|
-
* @type Number
|
|
25897
|
+
/**
|
|
25898
|
+
* Delay between cursor blink (in ms)
|
|
25899
|
+
* @type Number
|
|
25634
25900
|
*/
|
|
25635
|
-
/**
|
|
25636
|
-
* Duration of cursor fade in (in ms)
|
|
25637
|
-
* @type Number
|
|
25901
|
+
/**
|
|
25902
|
+
* Duration of cursor fade in (in ms)
|
|
25903
|
+
* @type Number
|
|
25638
25904
|
*/
|
|
25639
|
-
/**
|
|
25640
|
-
* Indicates whether internal text char widths can be cached
|
|
25641
|
-
* @type Boolean
|
|
25905
|
+
/**
|
|
25906
|
+
* Indicates whether internal text char widths can be cached
|
|
25907
|
+
* @type Boolean
|
|
25642
25908
|
*/
|
|
25643
25909
|
_defineProperty(IText, "ownDefaults", iTextDefaultValues);
|
|
25644
25910
|
_defineProperty(IText, "type", 'IText');
|
|
@@ -25660,11 +25926,11 @@ const textboxDefaultValues = {
|
|
|
25660
25926
|
|
|
25661
25927
|
// @TODO this is not complete
|
|
25662
25928
|
|
|
25663
|
-
/**
|
|
25664
|
-
* Textbox class, based on IText, allows the user to resize the text rectangle
|
|
25665
|
-
* and wraps lines automatically. Textboxes have their Y scaling locked, the
|
|
25666
|
-
* user can only change width. Height is adjusted automatically based on the
|
|
25667
|
-
* wrapping of lines.
|
|
25929
|
+
/**
|
|
25930
|
+
* Textbox class, based on IText, allows the user to resize the text rectangle
|
|
25931
|
+
* and wraps lines automatically. Textboxes have their Y scaling locked, the
|
|
25932
|
+
* user can only change width. Height is adjusted automatically based on the
|
|
25933
|
+
* wrapping of lines.
|
|
25668
25934
|
*/
|
|
25669
25935
|
class Textbox extends IText {
|
|
25670
25936
|
static getDefaults() {
|
|
@@ -25674,10 +25940,10 @@ class Textbox extends IText {
|
|
|
25674
25940
|
};
|
|
25675
25941
|
}
|
|
25676
25942
|
|
|
25677
|
-
/**
|
|
25678
|
-
* Constructor
|
|
25679
|
-
* @param {String} text Text string
|
|
25680
|
-
* @param {Object} [options] Options object
|
|
25943
|
+
/**
|
|
25944
|
+
* Constructor
|
|
25945
|
+
* @param {String} text Text string
|
|
25946
|
+
* @param {Object} [options] Options object
|
|
25681
25947
|
*/
|
|
25682
25948
|
constructor(text, options) {
|
|
25683
25949
|
super(text, {
|
|
@@ -25687,10 +25953,10 @@ class Textbox extends IText {
|
|
|
25687
25953
|
this.initializeEventListeners();
|
|
25688
25954
|
}
|
|
25689
25955
|
|
|
25690
|
-
/**
|
|
25691
|
-
* Creates the default control object.
|
|
25692
|
-
* If you prefer to have on instance of controls shared among all objects
|
|
25693
|
-
* make this function return an empty object and add controls to the ownDefaults object
|
|
25956
|
+
/**
|
|
25957
|
+
* Creates the default control object.
|
|
25958
|
+
* If you prefer to have on instance of controls shared among all objects
|
|
25959
|
+
* make this function return an empty object and add controls to the ownDefaults object
|
|
25694
25960
|
*/
|
|
25695
25961
|
static createControls() {
|
|
25696
25962
|
return {
|
|
@@ -25698,11 +25964,11 @@ class Textbox extends IText {
|
|
|
25698
25964
|
};
|
|
25699
25965
|
}
|
|
25700
25966
|
|
|
25701
|
-
/**
|
|
25702
|
-
* Unlike superclass's version of this function, Textbox does not update
|
|
25703
|
-
* its width.
|
|
25704
|
-
* @private
|
|
25705
|
-
* @override
|
|
25967
|
+
/**
|
|
25968
|
+
* Unlike superclass's version of this function, Textbox does not update
|
|
25969
|
+
* its width.
|
|
25970
|
+
* @private
|
|
25971
|
+
* @override
|
|
25706
25972
|
*/
|
|
25707
25973
|
initDimensions() {
|
|
25708
25974
|
if (!this.initialized) {
|
|
@@ -25731,9 +25997,9 @@ class Textbox extends IText {
|
|
|
25731
25997
|
this.height = this.calcTextHeight();
|
|
25732
25998
|
}
|
|
25733
25999
|
|
|
25734
|
-
/**
|
|
25735
|
-
* Advanced dimensions calculation using new layout engine
|
|
25736
|
-
* @private
|
|
26000
|
+
/**
|
|
26001
|
+
* Advanced dimensions calculation using new layout engine
|
|
26002
|
+
* @private
|
|
25737
26003
|
*/
|
|
25738
26004
|
initDimensionsAdvanced() {
|
|
25739
26005
|
if (!this.initialized) {
|
|
@@ -25788,9 +26054,9 @@ class Textbox extends IText {
|
|
|
25788
26054
|
this.dirty = true;
|
|
25789
26055
|
}
|
|
25790
26056
|
|
|
25791
|
-
/**
|
|
25792
|
-
* Generate style map from new layout format
|
|
25793
|
-
* @private
|
|
26057
|
+
/**
|
|
26058
|
+
* Generate style map from new layout format
|
|
26059
|
+
* @private
|
|
25794
26060
|
*/
|
|
25795
26061
|
_generateStyleMapFromLayout(layout) {
|
|
25796
26062
|
const map = {};
|
|
@@ -25812,12 +26078,12 @@ class Textbox extends IText {
|
|
|
25812
26078
|
return map;
|
|
25813
26079
|
}
|
|
25814
26080
|
|
|
25815
|
-
/**
|
|
25816
|
-
* Generate an object that translates the style object so that it is
|
|
25817
|
-
* broken up by visual lines (new lines and automatic wrapping).
|
|
25818
|
-
* The original text styles object is broken up by actual lines (new lines only),
|
|
25819
|
-
* which is only sufficient for Text / IText
|
|
25820
|
-
* @private
|
|
26081
|
+
/**
|
|
26082
|
+
* Generate an object that translates the style object so that it is
|
|
26083
|
+
* broken up by visual lines (new lines and automatic wrapping).
|
|
26084
|
+
* The original text styles object is broken up by actual lines (new lines only),
|
|
26085
|
+
* which is only sufficient for Text / IText
|
|
26086
|
+
* @private
|
|
25821
26087
|
*/
|
|
25822
26088
|
_generateStyleMap(textInfo) {
|
|
25823
26089
|
let realLineCount = 0,
|
|
@@ -25844,10 +26110,10 @@ class Textbox extends IText {
|
|
|
25844
26110
|
return map;
|
|
25845
26111
|
}
|
|
25846
26112
|
|
|
25847
|
-
/**
|
|
25848
|
-
* Returns true if object has a style property or has it on a specified line
|
|
25849
|
-
* @param {Number} lineIndex
|
|
25850
|
-
* @return {Boolean}
|
|
26113
|
+
/**
|
|
26114
|
+
* Returns true if object has a style property or has it on a specified line
|
|
26115
|
+
* @param {Number} lineIndex
|
|
26116
|
+
* @return {Boolean}
|
|
25851
26117
|
*/
|
|
25852
26118
|
styleHas(property, lineIndex) {
|
|
25853
26119
|
if (this._styleMap && !this.isWrapping) {
|
|
@@ -25859,10 +26125,10 @@ class Textbox extends IText {
|
|
|
25859
26125
|
return super.styleHas(property, lineIndex);
|
|
25860
26126
|
}
|
|
25861
26127
|
|
|
25862
|
-
/**
|
|
25863
|
-
* Returns true if object has no styling or no styling in a line
|
|
25864
|
-
* @param {Number} lineIndex , lineIndex is on wrapped lines.
|
|
25865
|
-
* @return {Boolean}
|
|
26128
|
+
/**
|
|
26129
|
+
* Returns true if object has no styling or no styling in a line
|
|
26130
|
+
* @param {Number} lineIndex , lineIndex is on wrapped lines.
|
|
26131
|
+
* @return {Boolean}
|
|
25866
26132
|
*/
|
|
25867
26133
|
isEmptyStyles(lineIndex) {
|
|
25868
26134
|
if (!this.styles) {
|
|
@@ -25899,11 +26165,11 @@ class Textbox extends IText {
|
|
|
25899
26165
|
return true;
|
|
25900
26166
|
}
|
|
25901
26167
|
|
|
25902
|
-
/**
|
|
25903
|
-
* @protected
|
|
25904
|
-
* @param {Number} lineIndex
|
|
25905
|
-
* @param {Number} charIndex
|
|
25906
|
-
* @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
|
|
26168
|
+
/**
|
|
26169
|
+
* @protected
|
|
26170
|
+
* @param {Number} lineIndex
|
|
26171
|
+
* @param {Number} charIndex
|
|
26172
|
+
* @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
|
|
25907
26173
|
*/
|
|
25908
26174
|
_getStyleDeclaration(lineIndex, charIndex) {
|
|
25909
26175
|
if (this._styleMap && !this.isWrapping) {
|
|
@@ -25917,59 +26183,59 @@ class Textbox extends IText {
|
|
|
25917
26183
|
return super._getStyleDeclaration(lineIndex, charIndex);
|
|
25918
26184
|
}
|
|
25919
26185
|
|
|
25920
|
-
/**
|
|
25921
|
-
* @param {Number} lineIndex
|
|
25922
|
-
* @param {Number} charIndex
|
|
25923
|
-
* @param {Object} style
|
|
25924
|
-
* @private
|
|
26186
|
+
/**
|
|
26187
|
+
* @param {Number} lineIndex
|
|
26188
|
+
* @param {Number} charIndex
|
|
26189
|
+
* @param {Object} style
|
|
26190
|
+
* @private
|
|
25925
26191
|
*/
|
|
25926
26192
|
_setStyleDeclaration(lineIndex, charIndex, style) {
|
|
25927
26193
|
const map = this._styleMap[lineIndex];
|
|
25928
26194
|
super._setStyleDeclaration(map.line, map.offset + charIndex, style);
|
|
25929
26195
|
}
|
|
25930
26196
|
|
|
25931
|
-
/**
|
|
25932
|
-
* @param {Number} lineIndex
|
|
25933
|
-
* @param {Number} charIndex
|
|
25934
|
-
* @private
|
|
26197
|
+
/**
|
|
26198
|
+
* @param {Number} lineIndex
|
|
26199
|
+
* @param {Number} charIndex
|
|
26200
|
+
* @private
|
|
25935
26201
|
*/
|
|
25936
26202
|
_deleteStyleDeclaration(lineIndex, charIndex) {
|
|
25937
26203
|
const map = this._styleMap[lineIndex];
|
|
25938
26204
|
super._deleteStyleDeclaration(map.line, map.offset + charIndex);
|
|
25939
26205
|
}
|
|
25940
26206
|
|
|
25941
|
-
/**
|
|
25942
|
-
* probably broken need a fix
|
|
25943
|
-
* Returns the real style line that correspond to the wrapped lineIndex line
|
|
25944
|
-
* Used just to verify if the line does exist or not.
|
|
25945
|
-
* @param {Number} lineIndex
|
|
25946
|
-
* @returns {Boolean} if the line exists or not
|
|
25947
|
-
* @private
|
|
26207
|
+
/**
|
|
26208
|
+
* probably broken need a fix
|
|
26209
|
+
* Returns the real style line that correspond to the wrapped lineIndex line
|
|
26210
|
+
* Used just to verify if the line does exist or not.
|
|
26211
|
+
* @param {Number} lineIndex
|
|
26212
|
+
* @returns {Boolean} if the line exists or not
|
|
26213
|
+
* @private
|
|
25948
26214
|
*/
|
|
25949
26215
|
_getLineStyle(lineIndex) {
|
|
25950
26216
|
const map = this._styleMap[lineIndex];
|
|
25951
26217
|
return !!this.styles[map.line];
|
|
25952
26218
|
}
|
|
25953
26219
|
|
|
25954
|
-
/**
|
|
25955
|
-
* Set the line style to an empty object so that is initialized
|
|
25956
|
-
* @param {Number} lineIndex
|
|
25957
|
-
* @param {Object} style
|
|
25958
|
-
* @private
|
|
26220
|
+
/**
|
|
26221
|
+
* Set the line style to an empty object so that is initialized
|
|
26222
|
+
* @param {Number} lineIndex
|
|
26223
|
+
* @param {Object} style
|
|
26224
|
+
* @private
|
|
25959
26225
|
*/
|
|
25960
26226
|
_setLineStyle(lineIndex) {
|
|
25961
26227
|
const map = this._styleMap[lineIndex];
|
|
25962
26228
|
super._setLineStyle(map.line);
|
|
25963
26229
|
}
|
|
25964
26230
|
|
|
25965
|
-
/**
|
|
25966
|
-
* Wraps text using the 'width' property of Textbox. First this function
|
|
25967
|
-
* splits text on newlines, so we preserve newlines entered by the user.
|
|
25968
|
-
* Then it wraps each line using the width of the Textbox by calling
|
|
25969
|
-
* _wrapLine().
|
|
25970
|
-
* @param {Array} lines The string array of text that is split into lines
|
|
25971
|
-
* @param {Number} desiredWidth width you want to wrap to
|
|
25972
|
-
* @returns {Array} Array of lines
|
|
26231
|
+
/**
|
|
26232
|
+
* Wraps text using the 'width' property of Textbox. First this function
|
|
26233
|
+
* splits text on newlines, so we preserve newlines entered by the user.
|
|
26234
|
+
* Then it wraps each line using the width of the Textbox by calling
|
|
26235
|
+
* _wrapLine().
|
|
26236
|
+
* @param {Array} lines The string array of text that is split into lines
|
|
26237
|
+
* @param {Number} desiredWidth width you want to wrap to
|
|
26238
|
+
* @returns {Array} Array of lines
|
|
25973
26239
|
*/
|
|
25974
26240
|
_wrapText(lines, desiredWidth) {
|
|
25975
26241
|
this.isWrapping = true;
|
|
@@ -25983,12 +26249,12 @@ class Textbox extends IText {
|
|
|
25983
26249
|
return wrapped;
|
|
25984
26250
|
}
|
|
25985
26251
|
|
|
25986
|
-
/**
|
|
25987
|
-
* For each line of text terminated by an hard line stop,
|
|
25988
|
-
* measure each word width and extract the largest word from all.
|
|
25989
|
-
* The returned words here are the one that at the end will be rendered.
|
|
25990
|
-
* @param {string[]} lines the lines we need to measure
|
|
25991
|
-
*
|
|
26252
|
+
/**
|
|
26253
|
+
* For each line of text terminated by an hard line stop,
|
|
26254
|
+
* measure each word width and extract the largest word from all.
|
|
26255
|
+
* The returned words here are the one that at the end will be rendered.
|
|
26256
|
+
* @param {string[]} lines the lines we need to measure
|
|
26257
|
+
*
|
|
25992
26258
|
*/
|
|
25993
26259
|
getGraphemeDataForRender(lines) {
|
|
25994
26260
|
const splitByGrapheme = this.splitByGrapheme,
|
|
@@ -26021,17 +26287,17 @@ class Textbox extends IText {
|
|
|
26021
26287
|
};
|
|
26022
26288
|
}
|
|
26023
26289
|
|
|
26024
|
-
/**
|
|
26025
|
-
* Helper function to measure a string of text, given its lineIndex and charIndex offset
|
|
26026
|
-
* It gets called when charBounds are not available yet.
|
|
26027
|
-
* Override if necessary
|
|
26028
|
-
* Use with {@link Textbox#wordSplit}
|
|
26029
|
-
*
|
|
26030
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
26031
|
-
* @param {String} text
|
|
26032
|
-
* @param {number} lineIndex
|
|
26033
|
-
* @param {number} charOffset
|
|
26034
|
-
* @returns {number}
|
|
26290
|
+
/**
|
|
26291
|
+
* Helper function to measure a string of text, given its lineIndex and charIndex offset
|
|
26292
|
+
* It gets called when charBounds are not available yet.
|
|
26293
|
+
* Override if necessary
|
|
26294
|
+
* Use with {@link Textbox#wordSplit}
|
|
26295
|
+
*
|
|
26296
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
26297
|
+
* @param {String} text
|
|
26298
|
+
* @param {number} lineIndex
|
|
26299
|
+
* @param {number} charOffset
|
|
26300
|
+
* @returns {number}
|
|
26035
26301
|
*/
|
|
26036
26302
|
_measureWord(word, lineIndex) {
|
|
26037
26303
|
let charOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -26046,26 +26312,26 @@ class Textbox extends IText {
|
|
|
26046
26312
|
return width;
|
|
26047
26313
|
}
|
|
26048
26314
|
|
|
26049
|
-
/**
|
|
26050
|
-
* Override this method to customize word splitting
|
|
26051
|
-
* Use with {@link Textbox#_measureWord}
|
|
26052
|
-
* @param {string} value
|
|
26053
|
-
* @returns {string[]} array of words
|
|
26315
|
+
/**
|
|
26316
|
+
* Override this method to customize word splitting
|
|
26317
|
+
* Use with {@link Textbox#_measureWord}
|
|
26318
|
+
* @param {string} value
|
|
26319
|
+
* @returns {string[]} array of words
|
|
26054
26320
|
*/
|
|
26055
26321
|
wordSplit(value) {
|
|
26056
26322
|
return value.split(this._wordJoiners);
|
|
26057
26323
|
}
|
|
26058
26324
|
|
|
26059
|
-
/**
|
|
26060
|
-
* Wraps a line of text using the width of the Textbox as desiredWidth
|
|
26061
|
-
* and leveraging the known width o words from GraphemeData
|
|
26062
|
-
* @private
|
|
26063
|
-
* @param {Number} lineIndex
|
|
26064
|
-
* @param {Number} desiredWidth width you want to wrap the line to
|
|
26065
|
-
* @param {GraphemeData} graphemeData an object containing all the lines' words width.
|
|
26066
|
-
* @param {Number} reservedSpace space to remove from wrapping for custom functionalities
|
|
26067
|
-
* @returns {Array} Array of line(s) into which the given text is wrapped
|
|
26068
|
-
* to.
|
|
26325
|
+
/**
|
|
26326
|
+
* Wraps a line of text using the width of the Textbox as desiredWidth
|
|
26327
|
+
* and leveraging the known width o words from GraphemeData
|
|
26328
|
+
* @private
|
|
26329
|
+
* @param {Number} lineIndex
|
|
26330
|
+
* @param {Number} desiredWidth width you want to wrap the line to
|
|
26331
|
+
* @param {GraphemeData} graphemeData an object containing all the lines' words width.
|
|
26332
|
+
* @param {Number} reservedSpace space to remove from wrapping for custom functionalities
|
|
26333
|
+
* @returns {Array} Array of line(s) into which the given text is wrapped
|
|
26334
|
+
* to.
|
|
26069
26335
|
*/
|
|
26070
26336
|
_wrapLine(lineIndex, desiredWidth, _ref) {
|
|
26071
26337
|
let {
|
|
@@ -26123,11 +26389,11 @@ class Textbox extends IText {
|
|
|
26123
26389
|
return graphemeLines;
|
|
26124
26390
|
}
|
|
26125
26391
|
|
|
26126
|
-
/**
|
|
26127
|
-
* Detect if the text line is ended with an hard break
|
|
26128
|
-
* text and itext do not have wrapping, return false
|
|
26129
|
-
* @param {Number} lineIndex text to split
|
|
26130
|
-
* @return {Boolean}
|
|
26392
|
+
/**
|
|
26393
|
+
* Detect if the text line is ended with an hard break
|
|
26394
|
+
* text and itext do not have wrapping, return false
|
|
26395
|
+
* @param {Number} lineIndex text to split
|
|
26396
|
+
* @return {Boolean}
|
|
26131
26397
|
*/
|
|
26132
26398
|
isEndOfWrapping(lineIndex) {
|
|
26133
26399
|
if (!this._styleMap[lineIndex + 1]) {
|
|
@@ -26141,12 +26407,12 @@ class Textbox extends IText {
|
|
|
26141
26407
|
return false;
|
|
26142
26408
|
}
|
|
26143
26409
|
|
|
26144
|
-
/**
|
|
26145
|
-
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
26146
|
-
* and counting style.
|
|
26147
|
-
* This is important only for splitByGrapheme at the end of wrapping.
|
|
26148
|
-
* If we are not wrapping the offset is always 1
|
|
26149
|
-
* @return Number
|
|
26410
|
+
/**
|
|
26411
|
+
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
26412
|
+
* and counting style.
|
|
26413
|
+
* This is important only for splitByGrapheme at the end of wrapping.
|
|
26414
|
+
* If we are not wrapping the offset is always 1
|
|
26415
|
+
* @return Number
|
|
26150
26416
|
*/
|
|
26151
26417
|
missingNewlineOffset(lineIndex, skipWrapping) {
|
|
26152
26418
|
if (this.splitByGrapheme && !skipWrapping) {
|
|
@@ -26155,12 +26421,12 @@ class Textbox extends IText {
|
|
|
26155
26421
|
return 1;
|
|
26156
26422
|
}
|
|
26157
26423
|
|
|
26158
|
-
/**
|
|
26159
|
-
* Gets lines of text to render in the Textbox. This function calculates
|
|
26160
|
-
* text wrapping on the fly every time it is called.
|
|
26161
|
-
* @param {String} text text to split
|
|
26162
|
-
* @returns {Array} Array of lines in the Textbox.
|
|
26163
|
-
* @override
|
|
26424
|
+
/**
|
|
26425
|
+
* Gets lines of text to render in the Textbox. This function calculates
|
|
26426
|
+
* text wrapping on the fly every time it is called.
|
|
26427
|
+
* @param {String} text text to split
|
|
26428
|
+
* @returns {Array} Array of lines in the Textbox.
|
|
26429
|
+
* @override
|
|
26164
26430
|
*/
|
|
26165
26431
|
_splitTextIntoLines(text) {
|
|
26166
26432
|
const newText = super._splitTextIntoLines(text),
|
|
@@ -26192,9 +26458,9 @@ class Textbox extends IText {
|
|
|
26192
26458
|
}
|
|
26193
26459
|
}
|
|
26194
26460
|
|
|
26195
|
-
/**
|
|
26196
|
-
* Initialize event listeners for safety snap functionality
|
|
26197
|
-
* @private
|
|
26461
|
+
/**
|
|
26462
|
+
* Initialize event listeners for safety snap functionality
|
|
26463
|
+
* @private
|
|
26198
26464
|
*/
|
|
26199
26465
|
initializeEventListeners() {
|
|
26200
26466
|
var _this$canvas;
|
|
@@ -26237,12 +26503,12 @@ class Textbox extends IText {
|
|
|
26237
26503
|
});
|
|
26238
26504
|
}
|
|
26239
26505
|
|
|
26240
|
-
/**
|
|
26241
|
-
* Safety snap to prevent glyph clipping after manual resize.
|
|
26242
|
-
* Similar to Polotno - checks if any glyphs are too close to edges
|
|
26243
|
-
* and automatically expands width if needed.
|
|
26244
|
-
* @private
|
|
26245
|
-
* @param resizeOrigin - Which side was used for resizing ('left' or 'right')
|
|
26506
|
+
/**
|
|
26507
|
+
* Safety snap to prevent glyph clipping after manual resize.
|
|
26508
|
+
* Similar to Polotno - checks if any glyphs are too close to edges
|
|
26509
|
+
* and automatically expands width if needed.
|
|
26510
|
+
* @private
|
|
26511
|
+
* @param resizeOrigin - Which side was used for resizing ('left' or 'right')
|
|
26246
26512
|
*/
|
|
26247
26513
|
safetySnapWidth(resizeOrigin) {
|
|
26248
26514
|
// For Textbox objects, we always want to check for clipping regardless of isWrapping flag
|
|
@@ -26309,31 +26575,31 @@ class Textbox extends IText {
|
|
|
26309
26575
|
}
|
|
26310
26576
|
}
|
|
26311
26577
|
|
|
26312
|
-
/**
|
|
26313
|
-
* Returns object representation of an instance
|
|
26314
|
-
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
26315
|
-
* @return {Object} object representation of an instance
|
|
26578
|
+
/**
|
|
26579
|
+
* Returns object representation of an instance
|
|
26580
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
26581
|
+
* @return {Object} object representation of an instance
|
|
26316
26582
|
*/
|
|
26317
26583
|
toObject() {
|
|
26318
26584
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
26319
26585
|
return super.toObject(['minWidth', 'splitByGrapheme', ...propertiesToInclude]);
|
|
26320
26586
|
}
|
|
26321
26587
|
}
|
|
26322
|
-
/**
|
|
26323
|
-
* Minimum width of textbox, in pixels.
|
|
26324
|
-
* @type Number
|
|
26325
|
-
*/
|
|
26326
|
-
/**
|
|
26327
|
-
* Minimum calculated width of a textbox, in pixels.
|
|
26328
|
-
* fixed to 2 so that an empty textbox cannot go to 0
|
|
26329
|
-
* and is still selectable without text.
|
|
26330
|
-
* @type Number
|
|
26331
|
-
*/
|
|
26332
|
-
/**
|
|
26333
|
-
* Use this boolean property in order to split strings that have no white space concept.
|
|
26334
|
-
* this is a cheap way to help with chinese/japanese
|
|
26335
|
-
* @type Boolean
|
|
26336
|
-
* @since 2.6.0
|
|
26588
|
+
/**
|
|
26589
|
+
* Minimum width of textbox, in pixels.
|
|
26590
|
+
* @type Number
|
|
26591
|
+
*/
|
|
26592
|
+
/**
|
|
26593
|
+
* Minimum calculated width of a textbox, in pixels.
|
|
26594
|
+
* fixed to 2 so that an empty textbox cannot go to 0
|
|
26595
|
+
* and is still selectable without text.
|
|
26596
|
+
* @type Number
|
|
26597
|
+
*/
|
|
26598
|
+
/**
|
|
26599
|
+
* Use this boolean property in order to split strings that have no white space concept.
|
|
26600
|
+
* this is a cheap way to help with chinese/japanese
|
|
26601
|
+
* @type Boolean
|
|
26602
|
+
* @since 2.6.0
|
|
26337
26603
|
*/
|
|
26338
26604
|
_defineProperty(Textbox, "type", 'Textbox');
|
|
26339
26605
|
_defineProperty(Textbox, "textLayoutProperties", [...IText.textLayoutProperties, 'width']);
|