@nasser-sw/fabric 7.0.0-beta1 → 7.0.1-beta2
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 +1524 -1027
- 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 +1524 -1027
- package/dist/index.mjs.map +1 -1
- package/dist/index.node.cjs +1524 -1027
- 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 +1524 -1027
- 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/changeHeight.min.mjs +2 -0
- package/dist/src/controls/changeHeight.min.mjs.map +1 -0
- package/dist/src/controls/changeHeight.mjs +36 -0
- package/dist/src/controls/changeHeight.mjs.map +1 -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 +0 -0
- package/dist/src/shapes/Polyline.d.ts.map +0 -0
- package/dist/src/shapes/Polyline.min.mjs +0 -0
- package/dist/src/shapes/Polyline.min.mjs.map +0 -0
- package/dist/src/shapes/Polyline.mjs +0 -0
- package/dist/src/shapes/Polyline.mjs.map +0 -0
- 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 +1 -1
- package/dist/src/shapes/Text/Text.min.mjs +1 -1
- package/dist/src/shapes/Text/Text.min.mjs.map +1 -1
- package/dist/src/shapes/Text/Text.mjs +347 -295
- 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 +13 -0
- package/dist/src/shapes/Textbox.d.ts.map +1 -1
- package/dist/src/shapes/Textbox.min.mjs +1 -1
- package/dist/src/shapes/Textbox.min.mjs.map +1 -1
- package/dist/src/shapes/Textbox.mjs +256 -138
- package/dist/src/shapes/Textbox.mjs.map +1 -1
- package/dist/src/shapes/Triangle.d.ts +0 -0
- package/dist/src/shapes/Triangle.d.ts.map +0 -0
- package/dist/src/shapes/Triangle.min.mjs +0 -0
- package/dist/src/shapes/Triangle.min.mjs.map +0 -0
- package/dist/src/shapes/Triangle.mjs +0 -0
- package/dist/src/shapes/Triangle.mjs.map +0 -0
- 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 +8 -0
- package/dist/src/text/overlayEditor.d.ts.map +1 -1
- package/dist/src/text/overlayEditor.min.mjs +1 -1
- package/dist/src/text/overlayEditor.min.mjs.map +1 -1
- package/dist/src/text/overlayEditor.mjs +412 -85
- 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/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 +0 -0
- package/dist-extensions/src/shapes/Polyline.d.ts.map +0 -0
- 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 +1 -1
- 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 +13 -0
- package/dist-extensions/src/shapes/Textbox.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Triangle.d.ts +0 -0
- package/dist-extensions/src/shapes/Triangle.d.ts.map +0 -0
- 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 +8 -0
- package/dist-extensions/src/text/overlayEditor.d.ts.map +1 -1
- 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/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/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 +591 -0
- 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 +1 -1
- 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 +0 -0
- 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 -2161
- 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 -669
- package/src/shapes/Triangle.ts +0 -0
- 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 -637
- 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/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/docs/fabric-konva-gap-analysis.md +0 -274
- package/docs/konva-text-behavior-spec.md +0 -265
- package/docs/text-engine-design.md +0 -698
package/dist/index.mjs
CHANGED
|
@@ -354,7 +354,7 @@ class Cache {
|
|
|
354
354
|
}
|
|
355
355
|
const cache = new Cache();
|
|
356
356
|
|
|
357
|
-
var version = "7.0.
|
|
357
|
+
var version = "7.0.1-beta1";
|
|
358
358
|
|
|
359
359
|
// use this syntax so babel plugin see this import here
|
|
360
360
|
const VERSION = version;
|
|
@@ -18673,8 +18673,8 @@ _defineProperty(StyledText, "_styleProperties", styleProperties);
|
|
|
18673
18673
|
// Global measurement context - reused for performance
|
|
18674
18674
|
let measurementContext = null;
|
|
18675
18675
|
|
|
18676
|
-
/**
|
|
18677
|
-
* Get or create the shared measurement context
|
|
18676
|
+
/**
|
|
18677
|
+
* Get or create the shared measurement context
|
|
18678
18678
|
*/
|
|
18679
18679
|
function getMeasurementContext() {
|
|
18680
18680
|
if (!measurementContext) {
|
|
@@ -18687,8 +18687,8 @@ function getMeasurementContext() {
|
|
|
18687
18687
|
return measurementContext;
|
|
18688
18688
|
}
|
|
18689
18689
|
|
|
18690
|
-
/**
|
|
18691
|
-
* Measure a single grapheme
|
|
18690
|
+
/**
|
|
18691
|
+
* Measure a single grapheme
|
|
18692
18692
|
*/
|
|
18693
18693
|
function measureGrapheme(grapheme, options, ctx) {
|
|
18694
18694
|
// Check cache first
|
|
@@ -18721,8 +18721,8 @@ function measureGrapheme(grapheme, options, ctx) {
|
|
|
18721
18721
|
return measurement;
|
|
18722
18722
|
}
|
|
18723
18723
|
|
|
18724
|
-
/**
|
|
18725
|
-
* Measure a grapheme with kerning relative to previous character
|
|
18724
|
+
/**
|
|
18725
|
+
* Measure a grapheme with kerning relative to previous character
|
|
18726
18726
|
*/
|
|
18727
18727
|
function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
|
|
18728
18728
|
// Get individual measurement
|
|
@@ -18763,8 +18763,8 @@ function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
|
|
|
18763
18763
|
};
|
|
18764
18764
|
}
|
|
18765
18765
|
|
|
18766
|
-
/**
|
|
18767
|
-
* Get font metrics for layout calculations
|
|
18766
|
+
/**
|
|
18767
|
+
* Get font metrics for layout calculations
|
|
18768
18768
|
*/
|
|
18769
18769
|
function getFontMetrics(options) {
|
|
18770
18770
|
var _metrics$fontBounding, _metrics$fontBounding2, _metrics$actualBoundi, _metrics$actualBoundi2;
|
|
@@ -18799,8 +18799,8 @@ function getFontMetrics(options) {
|
|
|
18799
18799
|
return result;
|
|
18800
18800
|
}
|
|
18801
18801
|
|
|
18802
|
-
/**
|
|
18803
|
-
* Apply font styling to canvas context
|
|
18802
|
+
/**
|
|
18803
|
+
* Apply font styling to canvas context
|
|
18804
18804
|
*/
|
|
18805
18805
|
function applyFontStyle(ctx, options) {
|
|
18806
18806
|
const fontDeclaration = getFontDeclaration(options);
|
|
@@ -18817,8 +18817,8 @@ function applyFontStyle(ctx, options) {
|
|
|
18817
18817
|
ctx.textBaseline = 'alphabetic';
|
|
18818
18818
|
}
|
|
18819
18819
|
|
|
18820
|
-
/**
|
|
18821
|
-
* Generate font declaration string
|
|
18820
|
+
/**
|
|
18821
|
+
* Generate font declaration string
|
|
18822
18822
|
*/
|
|
18823
18823
|
function getFontDeclaration(options) {
|
|
18824
18824
|
const {
|
|
@@ -18833,8 +18833,8 @@ function getFontDeclaration(options) {
|
|
|
18833
18833
|
return `${fontStyle} ${fontWeight} ${fontSize}px ${normalizedFamily}`;
|
|
18834
18834
|
}
|
|
18835
18835
|
|
|
18836
|
-
/**
|
|
18837
|
-
* LRU Cache implementation for measurements
|
|
18836
|
+
/**
|
|
18837
|
+
* LRU Cache implementation for measurements
|
|
18838
18838
|
*/
|
|
18839
18839
|
class LRUCache {
|
|
18840
18840
|
constructor() {
|
|
@@ -18896,8 +18896,8 @@ class LRUCache {
|
|
|
18896
18896
|
}
|
|
18897
18897
|
}
|
|
18898
18898
|
|
|
18899
|
-
/**
|
|
18900
|
-
* Advanced measurement cache with font-aware keys
|
|
18899
|
+
/**
|
|
18900
|
+
* Advanced measurement cache with font-aware keys
|
|
18901
18901
|
*/
|
|
18902
18902
|
class MeasurementCache {
|
|
18903
18903
|
constructor() {
|
|
@@ -18924,8 +18924,8 @@ class MeasurementCache {
|
|
|
18924
18924
|
}
|
|
18925
18925
|
}
|
|
18926
18926
|
|
|
18927
|
-
/**
|
|
18928
|
-
* Kerning cache for character pairs
|
|
18927
|
+
/**
|
|
18928
|
+
* Kerning cache for character pairs
|
|
18929
18929
|
*/
|
|
18930
18930
|
class KerningCache {
|
|
18931
18931
|
constructor() {
|
|
@@ -18953,8 +18953,8 @@ class KerningCache {
|
|
|
18953
18953
|
}
|
|
18954
18954
|
}
|
|
18955
18955
|
|
|
18956
|
-
/**
|
|
18957
|
-
* Font metrics cache
|
|
18956
|
+
/**
|
|
18957
|
+
* Font metrics cache
|
|
18958
18958
|
*/
|
|
18959
18959
|
class FontMetricsCache {
|
|
18960
18960
|
constructor() {
|
|
@@ -18981,17 +18981,17 @@ const measurementCache = new MeasurementCache();
|
|
|
18981
18981
|
const kerningCache = new KerningCache();
|
|
18982
18982
|
const fontMetricsCache = new FontMetricsCache();
|
|
18983
18983
|
|
|
18984
|
-
/**
|
|
18985
|
-
* Unicode and Internationalization Support
|
|
18986
|
-
*
|
|
18987
|
-
* Enhanced Unicode handling for complex scripts, RTL/LTR text,
|
|
18988
|
-
* and grapheme cluster boundary detection.
|
|
18984
|
+
/**
|
|
18985
|
+
* Unicode and Internationalization Support
|
|
18986
|
+
*
|
|
18987
|
+
* Enhanced Unicode handling for complex scripts, RTL/LTR text,
|
|
18988
|
+
* and grapheme cluster boundary detection.
|
|
18989
18989
|
*/
|
|
18990
18990
|
|
|
18991
18991
|
|
|
18992
|
-
/**
|
|
18993
|
-
* Enhanced grapheme segmentation using Intl.Segmenter when available
|
|
18994
|
-
* with fallback to existing graphemeSplit implementation
|
|
18992
|
+
/**
|
|
18993
|
+
* Enhanced grapheme segmentation using Intl.Segmenter when available
|
|
18994
|
+
* with fallback to existing graphemeSplit implementation
|
|
18995
18995
|
*/
|
|
18996
18996
|
function segmentGraphemes(text) {
|
|
18997
18997
|
// Use native Intl.Segmenter if available
|
|
@@ -19011,15 +19011,15 @@ function segmentGraphemes(text) {
|
|
|
19011
19011
|
return graphemeSplit(text);
|
|
19012
19012
|
}
|
|
19013
19013
|
|
|
19014
|
-
/**
|
|
19015
|
-
* Ellipsis Text Truncation System
|
|
19016
|
-
*
|
|
19017
|
-
* Implements text truncation with ellipsis when content exceeds bounds,
|
|
19018
|
-
* using binary search for optimal truncation points.
|
|
19014
|
+
/**
|
|
19015
|
+
* Ellipsis Text Truncation System
|
|
19016
|
+
*
|
|
19017
|
+
* Implements text truncation with ellipsis when content exceeds bounds,
|
|
19018
|
+
* using binary search for optimal truncation points.
|
|
19019
19019
|
*/
|
|
19020
19020
|
|
|
19021
|
-
/**
|
|
19022
|
-
* Apply ellipsis truncation to text based on width/height constraints
|
|
19021
|
+
/**
|
|
19022
|
+
* Apply ellipsis truncation to text based on width/height constraints
|
|
19023
19023
|
*/
|
|
19024
19024
|
function applyEllipsis(text, options) {
|
|
19025
19025
|
const {
|
|
@@ -19089,8 +19089,8 @@ function applyEllipsis(text, options) {
|
|
|
19089
19089
|
};
|
|
19090
19090
|
}
|
|
19091
19091
|
|
|
19092
|
-
/**
|
|
19093
|
-
* Truncate text based on width constraint using binary search
|
|
19092
|
+
/**
|
|
19093
|
+
* Truncate text based on width constraint using binary search
|
|
19094
19094
|
*/
|
|
19095
19095
|
function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn) {
|
|
19096
19096
|
const graphemes = segmentGraphemes(text);
|
|
@@ -19140,8 +19140,8 @@ function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn)
|
|
|
19140
19140
|
};
|
|
19141
19141
|
}
|
|
19142
19142
|
|
|
19143
|
-
/**
|
|
19144
|
-
* Truncate text based on height constraint
|
|
19143
|
+
/**
|
|
19144
|
+
* Truncate text based on height constraint
|
|
19145
19145
|
*/
|
|
19146
19146
|
function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
|
|
19147
19147
|
var _measureFn;
|
|
@@ -19189,19 +19189,19 @@ function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
|
|
|
19189
19189
|
return truncateByWidth(lines[0], firstLineWidth, ellipsisChar, 0, measureFn);
|
|
19190
19190
|
}
|
|
19191
19191
|
|
|
19192
|
-
/**
|
|
19193
|
-
* Core Text Layout Engine
|
|
19194
|
-
*
|
|
19195
|
-
* Implements Konva-compatible text layout with support for:
|
|
19196
|
-
* - Multiple wrap modes (word/char/none)
|
|
19197
|
-
* - Ellipsis truncation
|
|
19198
|
-
* - Justify alignment with proper space distribution
|
|
19199
|
-
* - RTL/LTR text direction
|
|
19200
|
-
* - Advanced grapheme handling
|
|
19192
|
+
/**
|
|
19193
|
+
* Core Text Layout Engine
|
|
19194
|
+
*
|
|
19195
|
+
* Implements Konva-compatible text layout with support for:
|
|
19196
|
+
* - Multiple wrap modes (word/char/none)
|
|
19197
|
+
* - Ellipsis truncation
|
|
19198
|
+
* - Justify alignment with proper space distribution
|
|
19199
|
+
* - RTL/LTR text direction
|
|
19200
|
+
* - Advanced grapheme handling
|
|
19201
19201
|
*/
|
|
19202
19202
|
|
|
19203
|
-
/**
|
|
19204
|
-
* Main text layout function - converts text and options into positioned layout
|
|
19203
|
+
/**
|
|
19204
|
+
* Main text layout function - converts text and options into positioned layout
|
|
19205
19205
|
*/
|
|
19206
19206
|
function layoutText(options) {
|
|
19207
19207
|
var _ellipsisResult;
|
|
@@ -19320,8 +19320,8 @@ function layoutText(options) {
|
|
|
19320
19320
|
};
|
|
19321
19321
|
}
|
|
19322
19322
|
|
|
19323
|
-
/**
|
|
19324
|
-
* Layout a single paragraph with wrapping
|
|
19323
|
+
/**
|
|
19324
|
+
* Layout a single paragraph with wrapping
|
|
19325
19325
|
*/
|
|
19326
19326
|
function layoutParagraph(text, options) {
|
|
19327
19327
|
const {
|
|
@@ -19356,8 +19356,8 @@ function layoutParagraph(text, options) {
|
|
|
19356
19356
|
return layoutLines;
|
|
19357
19357
|
}
|
|
19358
19358
|
|
|
19359
|
-
/**
|
|
19360
|
-
* Layout a single line of text (no wrapping)
|
|
19359
|
+
/**
|
|
19360
|
+
* Layout a single line of text (no wrapping)
|
|
19361
19361
|
*/
|
|
19362
19362
|
function layoutSingleLine(text, options) {
|
|
19363
19363
|
let textOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -19427,8 +19427,8 @@ function layoutSingleLine(text, options) {
|
|
|
19427
19427
|
};
|
|
19428
19428
|
}
|
|
19429
19429
|
|
|
19430
|
-
/**
|
|
19431
|
-
* Word-based wrapping algorithm
|
|
19430
|
+
/**
|
|
19431
|
+
* Word-based wrapping algorithm
|
|
19432
19432
|
*/
|
|
19433
19433
|
function wrapByWords(text, maxWidth, options) {
|
|
19434
19434
|
const lines = [];
|
|
@@ -19461,8 +19461,8 @@ function wrapByWords(text, maxWidth, options) {
|
|
|
19461
19461
|
return lines.length > 0 ? lines : [''];
|
|
19462
19462
|
}
|
|
19463
19463
|
|
|
19464
|
-
/**
|
|
19465
|
-
* Character-based wrapping algorithm
|
|
19464
|
+
/**
|
|
19465
|
+
* Character-based wrapping algorithm
|
|
19466
19466
|
*/
|
|
19467
19467
|
function wrapByCharacters(text, maxWidth, options) {
|
|
19468
19468
|
const lines = [];
|
|
@@ -19484,8 +19484,8 @@ function wrapByCharacters(text, maxWidth, options) {
|
|
|
19484
19484
|
return lines.length > 0 ? lines : [''];
|
|
19485
19485
|
}
|
|
19486
19486
|
|
|
19487
|
-
/**
|
|
19488
|
-
* Apply text alignment to lines
|
|
19487
|
+
/**
|
|
19488
|
+
* Apply text alignment to lines
|
|
19489
19489
|
*/
|
|
19490
19490
|
function applyAlignment(lines, align, containerWidth, options) {
|
|
19491
19491
|
return lines.map(line => {
|
|
@@ -19519,8 +19519,8 @@ function applyAlignment(lines, align, containerWidth, options) {
|
|
|
19519
19519
|
});
|
|
19520
19520
|
}
|
|
19521
19521
|
|
|
19522
|
-
/**
|
|
19523
|
-
* Apply justify alignment by expanding spaces
|
|
19522
|
+
/**
|
|
19523
|
+
* Apply justify alignment by expanding spaces
|
|
19524
19524
|
*/
|
|
19525
19525
|
function applyJustification(line, containerWidth, options) {
|
|
19526
19526
|
const spaces = line.graphemes.filter(g => /\s/.test(g)).length;
|
|
@@ -19543,8 +19543,8 @@ function applyJustification(line, containerWidth, options) {
|
|
|
19543
19543
|
return line;
|
|
19544
19544
|
}
|
|
19545
19545
|
|
|
19546
|
-
/**
|
|
19547
|
-
* Calculate vertical alignment offset
|
|
19546
|
+
/**
|
|
19547
|
+
* Calculate vertical alignment offset
|
|
19548
19548
|
*/
|
|
19549
19549
|
function calculateVerticalOffset(contentHeight, containerHeight, align) {
|
|
19550
19550
|
switch (align) {
|
|
@@ -19558,8 +19558,8 @@ function calculateVerticalOffset(contentHeight, containerHeight, align) {
|
|
|
19558
19558
|
}
|
|
19559
19559
|
}
|
|
19560
19560
|
|
|
19561
|
-
/**
|
|
19562
|
-
* Handle height overflow with ellipsis
|
|
19561
|
+
/**
|
|
19562
|
+
* Handle height overflow with ellipsis
|
|
19563
19563
|
*/
|
|
19564
19564
|
function handleHeightOverflow(existingLines, overflowLine, remainingHeight, options) {
|
|
19565
19565
|
// If ellipsis is enabled, try to fit part of the overflow line
|
|
@@ -19588,8 +19588,8 @@ function handleHeightOverflow(existingLines, overflowLine, remainingHeight, opti
|
|
|
19588
19588
|
};
|
|
19589
19589
|
}
|
|
19590
19590
|
|
|
19591
|
-
/**
|
|
19592
|
-
* Create empty line for empty paragraphs
|
|
19591
|
+
/**
|
|
19592
|
+
* Create empty line for empty paragraphs
|
|
19593
19593
|
*/
|
|
19594
19594
|
function createEmptyLine(options) {
|
|
19595
19595
|
const height = options.fontSize * options.lineHeight;
|
|
@@ -19605,8 +19605,8 @@ function createEmptyLine(options) {
|
|
|
19605
19605
|
};
|
|
19606
19606
|
}
|
|
19607
19607
|
|
|
19608
|
-
/**
|
|
19609
|
-
* Measure width of a line of text
|
|
19608
|
+
/**
|
|
19609
|
+
* Measure width of a line of text
|
|
19610
19610
|
*/
|
|
19611
19611
|
function measureLineWidth(text, options) {
|
|
19612
19612
|
const graphemes = segmentGraphemes(text);
|
|
@@ -19623,8 +19623,8 @@ function measureLineWidth(text, options) {
|
|
|
19623
19623
|
return width;
|
|
19624
19624
|
}
|
|
19625
19625
|
|
|
19626
|
-
/**
|
|
19627
|
-
* Convert layout options to measurement options
|
|
19626
|
+
/**
|
|
19627
|
+
* Convert layout options to measurement options
|
|
19628
19628
|
*/
|
|
19629
19629
|
function createMeasurementOptions(options) {
|
|
19630
19630
|
return {
|
|
@@ -19867,15 +19867,15 @@ class TextSVGExportMixin extends FabricObjectSVGExportMixin {
|
|
|
19867
19867
|
}
|
|
19868
19868
|
}
|
|
19869
19869
|
|
|
19870
|
-
/**
|
|
19871
|
-
* Browser Line Break Extraction
|
|
19872
|
-
*
|
|
19873
|
-
* Captures exact line breaks as rendered by the browser to ensure
|
|
19874
|
-
* pixel-perfect consistency between DOM editing and canvas rendering.
|
|
19870
|
+
/**
|
|
19871
|
+
* Browser Line Break Extraction
|
|
19872
|
+
*
|
|
19873
|
+
* Captures exact line breaks as rendered by the browser to ensure
|
|
19874
|
+
* pixel-perfect consistency between DOM editing and canvas rendering.
|
|
19875
19875
|
*/
|
|
19876
19876
|
|
|
19877
|
-
/**
|
|
19878
|
-
* Segment text into graphemes safely using Intl.Segmenter or fallback
|
|
19877
|
+
/**
|
|
19878
|
+
* Segment text into graphemes safely using Intl.Segmenter or fallback
|
|
19879
19879
|
*/
|
|
19880
19880
|
function segmentIntoGraphemes(text) {
|
|
19881
19881
|
if (typeof Intl !== 'undefined' && Intl.Segmenter) {
|
|
@@ -19889,9 +19889,9 @@ function segmentIntoGraphemes(text) {
|
|
|
19889
19889
|
return Array.from(text);
|
|
19890
19890
|
}
|
|
19891
19891
|
|
|
19892
|
-
/**
|
|
19893
|
-
* Extract line break information from a textarea by creating a mirror element
|
|
19894
|
-
* with identical computed styles and measuring grapheme positions.
|
|
19892
|
+
/**
|
|
19893
|
+
* Extract line break information from a textarea by creating a mirror element
|
|
19894
|
+
* with identical computed styles and measuring grapheme positions.
|
|
19895
19895
|
*/
|
|
19896
19896
|
function extractLinesFromDOM(textarea) {
|
|
19897
19897
|
const text = textarea.value;
|
|
@@ -19986,16 +19986,16 @@ function extractLinesFromDOM(textarea) {
|
|
|
19986
19986
|
}
|
|
19987
19987
|
}
|
|
19988
19988
|
|
|
19989
|
-
/**
|
|
19990
|
-
* Create a hash of layout-affecting properties to detect when browser lines are still valid
|
|
19989
|
+
/**
|
|
19990
|
+
* Create a hash of layout-affecting properties to detect when browser lines are still valid
|
|
19991
19991
|
*/
|
|
19992
19992
|
function createLayoutHash(target) {
|
|
19993
19993
|
const properties = [target.text, target.width, target.height, target.fontFamily, target.fontSize, target.fontWeight, target.fontStyle, target.lineHeight, target.charSpacing, target.textAlign, target.direction];
|
|
19994
19994
|
return properties.map(p => String(p)).join('|');
|
|
19995
19995
|
}
|
|
19996
19996
|
|
|
19997
|
-
/**
|
|
19998
|
-
* Check if stored browser lines are still valid for the current target state
|
|
19997
|
+
/**
|
|
19998
|
+
* Check if stored browser lines are still valid for the current target state
|
|
19999
19999
|
*/
|
|
20000
20000
|
function areBrowserLinesValid(target, storedHash) {
|
|
20001
20001
|
if (!storedHash || !target.__lastBrowserLines) {
|
|
@@ -20005,24 +20005,24 @@ function areBrowserLinesValid(target, storedHash) {
|
|
|
20005
20005
|
return currentHash === storedHash;
|
|
20006
20006
|
}
|
|
20007
20007
|
|
|
20008
|
-
/**
|
|
20009
|
-
* Store browser lines on a target object with validity hash
|
|
20008
|
+
/**
|
|
20009
|
+
* Store browser lines on a target object with validity hash
|
|
20010
20010
|
*/
|
|
20011
20011
|
function storeBrowserLines(target, lines, layoutHash) {
|
|
20012
20012
|
target.__lastBrowserLines = lines;
|
|
20013
20013
|
target.__lastBrowserLinesHash = createLayoutHash(target);
|
|
20014
20014
|
}
|
|
20015
20015
|
|
|
20016
|
-
/**
|
|
20017
|
-
* Clear stored browser lines from a target object
|
|
20016
|
+
/**
|
|
20017
|
+
* Clear stored browser lines from a target object
|
|
20018
20018
|
*/
|
|
20019
20019
|
function clearBrowserLines(target) {
|
|
20020
20020
|
delete target.__lastBrowserLines;
|
|
20021
20021
|
delete target.__lastBrowserLinesHash;
|
|
20022
20022
|
}
|
|
20023
20023
|
|
|
20024
|
-
/**
|
|
20025
|
-
* Get stored browser lines if they're still valid
|
|
20024
|
+
/**
|
|
20025
|
+
* Get stored browser lines if they're still valid
|
|
20026
20026
|
*/
|
|
20027
20027
|
function getBrowserLines(target) {
|
|
20028
20028
|
const lines = target.__lastBrowserLines;
|
|
@@ -20035,9 +20035,9 @@ function getBrowserLines(target) {
|
|
|
20035
20035
|
|
|
20036
20036
|
let measuringContext;
|
|
20037
20037
|
|
|
20038
|
-
/**
|
|
20039
|
-
* Return a context for measurement of text string.
|
|
20040
|
-
* if created it gets stored for reuse
|
|
20038
|
+
/**
|
|
20039
|
+
* Return a context for measurement of text string.
|
|
20040
|
+
* if created it gets stored for reuse
|
|
20041
20041
|
*/
|
|
20042
20042
|
function getMeasuringContext() {
|
|
20043
20043
|
if (!measuringContext) {
|
|
@@ -20050,17 +20050,17 @@ function getMeasuringContext() {
|
|
|
20050
20050
|
return measuringContext;
|
|
20051
20051
|
}
|
|
20052
20052
|
|
|
20053
|
-
/**
|
|
20054
|
-
* Measure and return the info of a single grapheme.
|
|
20055
|
-
* needs the the info of previous graphemes already filled
|
|
20056
|
-
* Override to customize measuring
|
|
20053
|
+
/**
|
|
20054
|
+
* Measure and return the info of a single grapheme.
|
|
20055
|
+
* needs the the info of previous graphemes already filled
|
|
20056
|
+
* Override to customize measuring
|
|
20057
20057
|
*/
|
|
20058
20058
|
|
|
20059
20059
|
// @TODO this is not complete
|
|
20060
20060
|
|
|
20061
|
-
/**
|
|
20062
|
-
* Text class
|
|
20063
|
-
* @see {@link http://fabricjs.com/fabric-intro-part-2#text}
|
|
20061
|
+
/**
|
|
20062
|
+
* Text class
|
|
20063
|
+
* @see {@link http://fabricjs.com/fabric-intro-part-2#text}
|
|
20064
20064
|
*/
|
|
20065
20065
|
class FabricText extends StyledText {
|
|
20066
20066
|
static getDefaults() {
|
|
@@ -20071,11 +20071,11 @@ class FabricText extends StyledText {
|
|
|
20071
20071
|
}
|
|
20072
20072
|
constructor(text, options) {
|
|
20073
20073
|
super();
|
|
20074
|
-
/**
|
|
20075
|
-
* contains characters bounding boxes
|
|
20076
|
-
* This variable is considered to be protected.
|
|
20077
|
-
* But for how mixins are implemented right now, we can't leave it private
|
|
20078
|
-
* @protected
|
|
20074
|
+
/**
|
|
20075
|
+
* contains characters bounding boxes
|
|
20076
|
+
* This variable is considered to be protected.
|
|
20077
|
+
* But for how mixins are implemented right now, we can't leave it private
|
|
20078
|
+
* @protected
|
|
20079
20079
|
*/
|
|
20080
20080
|
_defineProperty(this, "__charBounds", []);
|
|
20081
20081
|
Object.assign(this, FabricText.ownDefaults);
|
|
@@ -20092,9 +20092,9 @@ class FabricText extends StyledText {
|
|
|
20092
20092
|
this.setCoords();
|
|
20093
20093
|
}
|
|
20094
20094
|
|
|
20095
|
-
/**
|
|
20096
|
-
* If text has a path, it will add the extra information needed
|
|
20097
|
-
* for path and text calculations
|
|
20095
|
+
/**
|
|
20096
|
+
* If text has a path, it will add the extra information needed
|
|
20097
|
+
* for path and text calculations
|
|
20098
20098
|
*/
|
|
20099
20099
|
setPathInfo() {
|
|
20100
20100
|
const path = this.path;
|
|
@@ -20103,10 +20103,10 @@ class FabricText extends StyledText {
|
|
|
20103
20103
|
}
|
|
20104
20104
|
}
|
|
20105
20105
|
|
|
20106
|
-
/**
|
|
20107
|
-
* @private
|
|
20108
|
-
* Divides text into lines of text and lines of graphemes.
|
|
20109
|
-
* Uses browser lines when available for pixel-perfect consistency.
|
|
20106
|
+
/**
|
|
20107
|
+
* @private
|
|
20108
|
+
* Divides text into lines of text and lines of graphemes.
|
|
20109
|
+
* Uses browser lines when available for pixel-perfect consistency.
|
|
20110
20110
|
*/
|
|
20111
20111
|
_splitText() {
|
|
20112
20112
|
// Check if we have valid browser lines and should use them
|
|
@@ -20122,9 +20122,9 @@ class FabricText extends StyledText {
|
|
|
20122
20122
|
return newLines;
|
|
20123
20123
|
}
|
|
20124
20124
|
|
|
20125
|
-
/**
|
|
20126
|
-
* Create TextLinesInfo from browser-extracted lines
|
|
20127
|
-
* @private
|
|
20125
|
+
/**
|
|
20126
|
+
* Create TextLinesInfo from browser-extracted lines
|
|
20127
|
+
* @private
|
|
20128
20128
|
*/
|
|
20129
20129
|
_splitTextFromBrowserLines(browserLines) {
|
|
20130
20130
|
const lines = [];
|
|
@@ -20158,10 +20158,10 @@ class FabricText extends StyledText {
|
|
|
20158
20158
|
return result;
|
|
20159
20159
|
}
|
|
20160
20160
|
|
|
20161
|
-
/**
|
|
20162
|
-
* Initialize or update text dimensions.
|
|
20163
|
-
* Updates this.width and this.height with the proper values.
|
|
20164
|
-
* Does not return dimensions.
|
|
20161
|
+
/**
|
|
20162
|
+
* Initialize or update text dimensions.
|
|
20163
|
+
* Updates this.width and this.height with the proper values.
|
|
20164
|
+
* Does not return dimensions.
|
|
20165
20165
|
*/
|
|
20166
20166
|
initDimensions() {
|
|
20167
20167
|
// Use advanced layout if enabled
|
|
@@ -20184,11 +20184,12 @@ class FabricText extends StyledText {
|
|
|
20184
20184
|
}
|
|
20185
20185
|
}
|
|
20186
20186
|
|
|
20187
|
-
/**
|
|
20188
|
-
* Enlarge space boxes and shift the others
|
|
20187
|
+
/**
|
|
20188
|
+
* Enlarge space boxes and shift the others
|
|
20189
20189
|
*/
|
|
20190
20190
|
enlargeSpaces() {
|
|
20191
20191
|
let diffSpace, currentLineWidth, numberOfSpaces, accumulatedSpace, line, charBound, spaces;
|
|
20192
|
+
const isRtl = this.direction === 'rtl';
|
|
20192
20193
|
for (let i = 0, len = this._textLines.length; i < len; i++) {
|
|
20193
20194
|
if (this.textAlign !== JUSTIFY && (i === len - 1 || this.isEndOfWrapping(i))) {
|
|
20194
20195
|
continue;
|
|
@@ -20199,33 +20200,62 @@ class FabricText extends StyledText {
|
|
|
20199
20200
|
if (currentLineWidth < this.width && (spaces = this.textLines[i].match(this._reSpacesAndTabs))) {
|
|
20200
20201
|
numberOfSpaces = spaces.length;
|
|
20201
20202
|
diffSpace = (this.width - currentLineWidth) / numberOfSpaces;
|
|
20202
|
-
|
|
20203
|
-
|
|
20204
|
-
|
|
20205
|
-
|
|
20206
|
-
|
|
20207
|
-
|
|
20208
|
-
|
|
20209
|
-
|
|
20210
|
-
|
|
20203
|
+
if (isRtl) {
|
|
20204
|
+
for (let j = 0; j < line.length; j++) {
|
|
20205
|
+
if (this._reSpaceAndTab.test(line[j])) ;
|
|
20206
|
+
}
|
|
20207
|
+
|
|
20208
|
+
// For RTL, we need to work backwards through the visual positions
|
|
20209
|
+
// but still update logical positions correctly
|
|
20210
|
+
let spaceCount = 0;
|
|
20211
|
+
for (let j = 0; j <= line.length; j++) {
|
|
20212
|
+
charBound = this.__charBounds[i][j];
|
|
20213
|
+
if (charBound) {
|
|
20214
|
+
if (this._reSpaceAndTab.test(line[j])) {
|
|
20215
|
+
charBound.width += diffSpace;
|
|
20216
|
+
charBound.kernedWidth += diffSpace;
|
|
20217
|
+
spaceCount++;
|
|
20218
|
+
}
|
|
20219
|
+
|
|
20220
|
+
// For RTL, shift all characters to the right by the total expansion
|
|
20221
|
+
// minus the expansion that comes after this character
|
|
20222
|
+
const remainingSpaces = numberOfSpaces - spaceCount;
|
|
20223
|
+
const shiftAmount = remainingSpaces * diffSpace;
|
|
20224
|
+
charBound.left += shiftAmount;
|
|
20225
|
+
}
|
|
20226
|
+
}
|
|
20227
|
+
} else {
|
|
20228
|
+
// LTR processing (original logic)
|
|
20229
|
+
for (let j = 0; j <= line.length; j++) {
|
|
20230
|
+
charBound = this.__charBounds[i][j];
|
|
20231
|
+
if (charBound) {
|
|
20232
|
+
if (this._reSpaceAndTab.test(line[j])) {
|
|
20233
|
+
charBound.width += diffSpace;
|
|
20234
|
+
charBound.kernedWidth += diffSpace;
|
|
20235
|
+
charBound.left += accumulatedSpace;
|
|
20236
|
+
accumulatedSpace += diffSpace;
|
|
20237
|
+
} else {
|
|
20238
|
+
charBound.left += accumulatedSpace;
|
|
20239
|
+
}
|
|
20240
|
+
}
|
|
20211
20241
|
}
|
|
20212
20242
|
}
|
|
20213
20243
|
}
|
|
20214
20244
|
}
|
|
20215
20245
|
}
|
|
20216
20246
|
|
|
20217
|
-
/**
|
|
20218
|
-
* Advanced layout using new text engine (Konva-compatible)
|
|
20219
|
-
* @private
|
|
20247
|
+
/**
|
|
20248
|
+
* Advanced layout using new text engine (Konva-compatible)
|
|
20249
|
+
* @private
|
|
20220
20250
|
*/
|
|
20221
20251
|
_layoutTextAdvanced() {
|
|
20222
20252
|
const options = this._getAdvancedLayoutOptions();
|
|
20223
20253
|
return layoutText(options);
|
|
20224
20254
|
}
|
|
20225
20255
|
|
|
20226
|
-
/**
|
|
20227
|
-
* Get advanced layout options from current text properties
|
|
20228
|
-
* @private
|
|
20256
|
+
/**
|
|
20257
|
+
* Get advanced layout options from current text properties
|
|
20258
|
+
* @private
|
|
20229
20259
|
*/
|
|
20230
20260
|
_getAdvancedLayoutOptions() {
|
|
20231
20261
|
return {
|
|
@@ -20247,9 +20277,9 @@ class FabricText extends StyledText {
|
|
|
20247
20277
|
};
|
|
20248
20278
|
}
|
|
20249
20279
|
|
|
20250
|
-
/**
|
|
20251
|
-
* Map Fabric textAlign to Konva align format
|
|
20252
|
-
* @private
|
|
20280
|
+
/**
|
|
20281
|
+
* Map Fabric textAlign to Konva align format
|
|
20282
|
+
* @private
|
|
20253
20283
|
*/
|
|
20254
20284
|
_mapTextAlignToAlign(textAlign) {
|
|
20255
20285
|
switch (textAlign) {
|
|
@@ -20270,8 +20300,8 @@ class FabricText extends StyledText {
|
|
|
20270
20300
|
}
|
|
20271
20301
|
}
|
|
20272
20302
|
|
|
20273
|
-
/**
|
|
20274
|
-
* Enhanced initDimensions that uses advanced layout when enabled
|
|
20303
|
+
/**
|
|
20304
|
+
* Enhanced initDimensions that uses advanced layout when enabled
|
|
20275
20305
|
*/
|
|
20276
20306
|
initDimensionsAdvanced() {
|
|
20277
20307
|
if (!this.enableAdvancedLayout) {
|
|
@@ -20288,9 +20318,9 @@ class FabricText extends StyledText {
|
|
|
20288
20318
|
this.dirty = true;
|
|
20289
20319
|
}
|
|
20290
20320
|
|
|
20291
|
-
/**
|
|
20292
|
-
* Convert new layout format to legacy _textLines and __charBounds format
|
|
20293
|
-
* @private
|
|
20321
|
+
/**
|
|
20322
|
+
* Convert new layout format to legacy _textLines and __charBounds format
|
|
20323
|
+
* @private
|
|
20294
20324
|
*/
|
|
20295
20325
|
_convertLayoutToLegacyFormat(layout) {
|
|
20296
20326
|
this._textLines = layout.lines.map(line => line.graphemes);
|
|
@@ -20312,30 +20342,30 @@ class FabricText extends StyledText {
|
|
|
20312
20342
|
}
|
|
20313
20343
|
}
|
|
20314
20344
|
|
|
20315
|
-
/**
|
|
20316
|
-
* Detect if the text line is ended with an hard break
|
|
20317
|
-
* text and itext do not have wrapping, return false
|
|
20318
|
-
* @return {Boolean}
|
|
20345
|
+
/**
|
|
20346
|
+
* Detect if the text line is ended with an hard break
|
|
20347
|
+
* text and itext do not have wrapping, return false
|
|
20348
|
+
* @return {Boolean}
|
|
20319
20349
|
*/
|
|
20320
20350
|
isEndOfWrapping(lineIndex) {
|
|
20321
20351
|
return lineIndex === this._textLines.length - 1;
|
|
20322
20352
|
}
|
|
20323
20353
|
|
|
20324
|
-
/**
|
|
20325
|
-
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
20326
|
-
* and counting style.
|
|
20327
|
-
* It return always 1 for text and Itext. Textbox has its own implementation
|
|
20328
|
-
* @return Number
|
|
20354
|
+
/**
|
|
20355
|
+
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
20356
|
+
* and counting style.
|
|
20357
|
+
* It return always 1 for text and Itext. Textbox has its own implementation
|
|
20358
|
+
* @return Number
|
|
20329
20359
|
*/
|
|
20330
20360
|
|
|
20331
20361
|
missingNewlineOffset(_lineIndex) {
|
|
20332
20362
|
return 1;
|
|
20333
20363
|
}
|
|
20334
20364
|
|
|
20335
|
-
/**
|
|
20336
|
-
* Returns 2d representation (lineIndex and charIndex) of cursor
|
|
20337
|
-
* @param {Number} selectionStart
|
|
20338
|
-
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
20365
|
+
/**
|
|
20366
|
+
* Returns 2d representation (lineIndex and charIndex) of cursor
|
|
20367
|
+
* @param {Number} selectionStart
|
|
20368
|
+
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
20339
20369
|
*/
|
|
20340
20370
|
get2DCursorLocation(selectionStart, skipWrapping) {
|
|
20341
20371
|
const lines = skipWrapping ? this._unwrappedTextLines : this._textLines;
|
|
@@ -20355,24 +20385,24 @@ class FabricText extends StyledText {
|
|
|
20355
20385
|
};
|
|
20356
20386
|
}
|
|
20357
20387
|
|
|
20358
|
-
/**
|
|
20359
|
-
* Returns string representation of an instance
|
|
20360
|
-
* @return {String} String representation of text object
|
|
20388
|
+
/**
|
|
20389
|
+
* Returns string representation of an instance
|
|
20390
|
+
* @return {String} String representation of text object
|
|
20361
20391
|
*/
|
|
20362
20392
|
toString() {
|
|
20363
20393
|
return `#<Text (${this.complexity()}): { "text": "${this.text}", "fontFamily": "${this.fontFamily}" }>`;
|
|
20364
20394
|
}
|
|
20365
20395
|
|
|
20366
|
-
/**
|
|
20367
|
-
* Return the dimension and the zoom level needed to create a cache canvas
|
|
20368
|
-
* big enough to host the object to be cached.
|
|
20369
|
-
* @private
|
|
20370
|
-
* @param {Object} dim.x width of object to be cached
|
|
20371
|
-
* @param {Object} dim.y height of object to be cached
|
|
20372
|
-
* @return {Object}.width width of canvas
|
|
20373
|
-
* @return {Object}.height height of canvas
|
|
20374
|
-
* @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
|
|
20375
|
-
* @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
|
|
20396
|
+
/**
|
|
20397
|
+
* Return the dimension and the zoom level needed to create a cache canvas
|
|
20398
|
+
* big enough to host the object to be cached.
|
|
20399
|
+
* @private
|
|
20400
|
+
* @param {Object} dim.x width of object to be cached
|
|
20401
|
+
* @param {Object} dim.y height of object to be cached
|
|
20402
|
+
* @return {Object}.width width of canvas
|
|
20403
|
+
* @return {Object}.height height of canvas
|
|
20404
|
+
* @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
|
|
20405
|
+
* @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
|
|
20376
20406
|
*/
|
|
20377
20407
|
_getCacheCanvasDimensions() {
|
|
20378
20408
|
const dims = super._getCacheCanvasDimensions();
|
|
@@ -20382,9 +20412,9 @@ class FabricText extends StyledText {
|
|
|
20382
20412
|
return dims;
|
|
20383
20413
|
}
|
|
20384
20414
|
|
|
20385
|
-
/**
|
|
20386
|
-
* @private
|
|
20387
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20415
|
+
/**
|
|
20416
|
+
* @private
|
|
20417
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20388
20418
|
*/
|
|
20389
20419
|
_render(ctx) {
|
|
20390
20420
|
const path = this.path;
|
|
@@ -20397,9 +20427,9 @@ class FabricText extends StyledText {
|
|
|
20397
20427
|
this._renderTextDecoration(ctx, 'linethrough');
|
|
20398
20428
|
}
|
|
20399
20429
|
|
|
20400
|
-
/**
|
|
20401
|
-
* @private
|
|
20402
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20430
|
+
/**
|
|
20431
|
+
* @private
|
|
20432
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20403
20433
|
*/
|
|
20404
20434
|
_renderText(ctx) {
|
|
20405
20435
|
// Skip text rendering if in overlay editing mode
|
|
@@ -20415,15 +20445,15 @@ class FabricText extends StyledText {
|
|
|
20415
20445
|
}
|
|
20416
20446
|
}
|
|
20417
20447
|
|
|
20418
|
-
/**
|
|
20419
|
-
* Set the font parameter of the context with the object properties or with charStyle
|
|
20420
|
-
* @private
|
|
20421
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20422
|
-
* @param {Object} [charStyle] object with font style properties
|
|
20423
|
-
* @param {String} [charStyle.fontFamily] Font Family
|
|
20424
|
-
* @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
|
|
20425
|
-
* @param {String} [charStyle.fontWeight] Font weight
|
|
20426
|
-
* @param {String} [charStyle.fontStyle] Font style (italic|normal)
|
|
20448
|
+
/**
|
|
20449
|
+
* Set the font parameter of the context with the object properties or with charStyle
|
|
20450
|
+
* @private
|
|
20451
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20452
|
+
* @param {Object} [charStyle] object with font style properties
|
|
20453
|
+
* @param {String} [charStyle.fontFamily] Font Family
|
|
20454
|
+
* @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
|
|
20455
|
+
* @param {String} [charStyle.fontWeight] Font weight
|
|
20456
|
+
* @param {String} [charStyle.fontStyle] Font style (italic|normal)
|
|
20427
20457
|
*/
|
|
20428
20458
|
_setTextStyles(ctx, charStyle, forMeasuring) {
|
|
20429
20459
|
ctx.textBaseline = 'alphabetic';
|
|
@@ -20443,11 +20473,11 @@ class FabricText extends StyledText {
|
|
|
20443
20473
|
ctx.font = this._getFontDeclaration(charStyle, forMeasuring);
|
|
20444
20474
|
}
|
|
20445
20475
|
|
|
20446
|
-
/**
|
|
20447
|
-
* calculate and return the text Width measuring each line.
|
|
20448
|
-
* @private
|
|
20449
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20450
|
-
* @return {Number} Maximum width of Text object
|
|
20476
|
+
/**
|
|
20477
|
+
* calculate and return the text Width measuring each line.
|
|
20478
|
+
* @private
|
|
20479
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20480
|
+
* @return {Number} Maximum width of Text object
|
|
20451
20481
|
*/
|
|
20452
20482
|
calcTextWidth() {
|
|
20453
20483
|
let maxWidth = this.getLineWidth(0);
|
|
@@ -20460,23 +20490,23 @@ class FabricText extends StyledText {
|
|
|
20460
20490
|
return maxWidth;
|
|
20461
20491
|
}
|
|
20462
20492
|
|
|
20463
|
-
/**
|
|
20464
|
-
* @private
|
|
20465
|
-
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20466
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20467
|
-
* @param {String} line Text to render
|
|
20468
|
-
* @param {Number} left Left position of text
|
|
20469
|
-
* @param {Number} top Top position of text
|
|
20470
|
-
* @param {Number} lineIndex Index of a line in a text
|
|
20493
|
+
/**
|
|
20494
|
+
* @private
|
|
20495
|
+
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20496
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20497
|
+
* @param {String} line Text to render
|
|
20498
|
+
* @param {Number} left Left position of text
|
|
20499
|
+
* @param {Number} top Top position of text
|
|
20500
|
+
* @param {Number} lineIndex Index of a line in a text
|
|
20471
20501
|
*/
|
|
20472
20502
|
_renderTextLine(method, ctx, line, left, top, lineIndex) {
|
|
20473
20503
|
this._renderChars(method, ctx, line, left, top, lineIndex);
|
|
20474
20504
|
}
|
|
20475
20505
|
|
|
20476
|
-
/**
|
|
20477
|
-
* Renders the text background for lines, taking care of style
|
|
20478
|
-
* @private
|
|
20479
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20506
|
+
/**
|
|
20507
|
+
* Renders the text background for lines, taking care of style
|
|
20508
|
+
* @private
|
|
20509
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20480
20510
|
*/
|
|
20481
20511
|
_renderTextLinesBackground(ctx) {
|
|
20482
20512
|
if (!this.textBackgroundColor && !this.styleHas('textBackgroundColor')) {
|
|
@@ -20539,15 +20569,15 @@ class FabricText extends StyledText {
|
|
|
20539
20569
|
this._removeShadow(ctx);
|
|
20540
20570
|
}
|
|
20541
20571
|
|
|
20542
|
-
/**
|
|
20543
|
-
* measure and return the width of a single character.
|
|
20544
|
-
* possibly overridden to accommodate different measure logic or
|
|
20545
|
-
* to hook some external lib for character measurement
|
|
20546
|
-
* @private
|
|
20547
|
-
* @param {String} _char, char to be measured
|
|
20548
|
-
* @param {Object} charStyle style of char to be measured
|
|
20549
|
-
* @param {String} [previousChar] previous char
|
|
20550
|
-
* @param {Object} [prevCharStyle] style of previous char
|
|
20572
|
+
/**
|
|
20573
|
+
* measure and return the width of a single character.
|
|
20574
|
+
* possibly overridden to accommodate different measure logic or
|
|
20575
|
+
* to hook some external lib for character measurement
|
|
20576
|
+
* @private
|
|
20577
|
+
* @param {String} _char, char to be measured
|
|
20578
|
+
* @param {Object} charStyle style of char to be measured
|
|
20579
|
+
* @param {String} [previousChar] previous char
|
|
20580
|
+
* @param {Object} [prevCharStyle] style of previous char
|
|
20551
20581
|
*/
|
|
20552
20582
|
_measureChar(_char, charStyle, previousChar, prevCharStyle) {
|
|
20553
20583
|
const fontCache = cache.getFontCache(charStyle),
|
|
@@ -20592,19 +20622,19 @@ class FabricText extends StyledText {
|
|
|
20592
20622
|
};
|
|
20593
20623
|
}
|
|
20594
20624
|
|
|
20595
|
-
/**
|
|
20596
|
-
* Computes height of character at given position
|
|
20597
|
-
* @param {Number} line the line index number
|
|
20598
|
-
* @param {Number} _char the character index number
|
|
20599
|
-
* @return {Number} fontSize of the character
|
|
20625
|
+
/**
|
|
20626
|
+
* Computes height of character at given position
|
|
20627
|
+
* @param {Number} line the line index number
|
|
20628
|
+
* @param {Number} _char the character index number
|
|
20629
|
+
* @return {Number} fontSize of the character
|
|
20600
20630
|
*/
|
|
20601
20631
|
getHeightOfChar(line, _char) {
|
|
20602
20632
|
return this.getValueOfPropertyAt(line, _char, 'fontSize');
|
|
20603
20633
|
}
|
|
20604
20634
|
|
|
20605
|
-
/**
|
|
20606
|
-
* measure a text line measuring all characters.
|
|
20607
|
-
* @param {Number} lineIndex line number
|
|
20635
|
+
/**
|
|
20636
|
+
* measure a text line measuring all characters.
|
|
20637
|
+
* @param {Number} lineIndex line number
|
|
20608
20638
|
*/
|
|
20609
20639
|
measureLine(lineIndex) {
|
|
20610
20640
|
const lineInfo = this._measureLine(lineIndex);
|
|
@@ -20617,11 +20647,11 @@ class FabricText extends StyledText {
|
|
|
20617
20647
|
return lineInfo;
|
|
20618
20648
|
}
|
|
20619
20649
|
|
|
20620
|
-
/**
|
|
20621
|
-
* measure every grapheme of a line, populating __charBounds
|
|
20622
|
-
* @param {Number} lineIndex
|
|
20623
|
-
* @return {Object} object.width total width of characters
|
|
20624
|
-
* @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
|
|
20650
|
+
/**
|
|
20651
|
+
* measure every grapheme of a line, populating __charBounds
|
|
20652
|
+
* @param {Number} lineIndex
|
|
20653
|
+
* @return {Object} object.width total width of characters
|
|
20654
|
+
* @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
|
|
20625
20655
|
*/
|
|
20626
20656
|
_measureLine(lineIndex) {
|
|
20627
20657
|
let width = 0,
|
|
@@ -20684,13 +20714,13 @@ class FabricText extends StyledText {
|
|
|
20684
20714
|
};
|
|
20685
20715
|
}
|
|
20686
20716
|
|
|
20687
|
-
/**
|
|
20688
|
-
* Calculate the angle and the left,top position of the char that follow a path.
|
|
20689
|
-
* It appends it to graphemeInfo to be reused later at rendering
|
|
20690
|
-
* @private
|
|
20691
|
-
* @param {Number} positionInPath to be measured
|
|
20692
|
-
* @param {GraphemeBBox} graphemeInfo current grapheme box information
|
|
20693
|
-
* @param {Object} startingPoint position of the point
|
|
20717
|
+
/**
|
|
20718
|
+
* Calculate the angle and the left,top position of the char that follow a path.
|
|
20719
|
+
* It appends it to graphemeInfo to be reused later at rendering
|
|
20720
|
+
* @private
|
|
20721
|
+
* @param {Number} positionInPath to be measured
|
|
20722
|
+
* @param {GraphemeBBox} graphemeInfo current grapheme box information
|
|
20723
|
+
* @param {Object} startingPoint position of the point
|
|
20694
20724
|
*/
|
|
20695
20725
|
_setGraphemeOnPath(positionInPath, graphemeInfo) {
|
|
20696
20726
|
const centerPosition = positionInPath + graphemeInfo.kernedWidth / 2,
|
|
@@ -20703,13 +20733,13 @@ class FabricText extends StyledText {
|
|
|
20703
20733
|
graphemeInfo.angle = info.angle + (this.pathSide === RIGHT ? Math.PI : 0);
|
|
20704
20734
|
}
|
|
20705
20735
|
|
|
20706
|
-
/**
|
|
20707
|
-
*
|
|
20708
|
-
* @param {String} grapheme to be measured
|
|
20709
|
-
* @param {Number} lineIndex index of the line where the char is
|
|
20710
|
-
* @param {Number} charIndex position in the line
|
|
20711
|
-
* @param {String} [prevGrapheme] character preceding the one to be measured
|
|
20712
|
-
* @returns {GraphemeBBox} grapheme bbox
|
|
20736
|
+
/**
|
|
20737
|
+
*
|
|
20738
|
+
* @param {String} grapheme to be measured
|
|
20739
|
+
* @param {Number} lineIndex index of the line where the char is
|
|
20740
|
+
* @param {Number} charIndex position in the line
|
|
20741
|
+
* @param {String} [prevGrapheme] character preceding the one to be measured
|
|
20742
|
+
* @returns {GraphemeBBox} grapheme bbox
|
|
20713
20743
|
*/
|
|
20714
20744
|
_getGraphemeBox(grapheme, lineIndex, charIndex, prevGrapheme, skipLeft) {
|
|
20715
20745
|
const style = this.getCompleteStyleDeclaration(lineIndex, charIndex),
|
|
@@ -20737,10 +20767,10 @@ class FabricText extends StyledText {
|
|
|
20737
20767
|
return box;
|
|
20738
20768
|
}
|
|
20739
20769
|
|
|
20740
|
-
/**
|
|
20741
|
-
* Calculate height of line at 'lineIndex'
|
|
20742
|
-
* @param {Number} lineIndex index of line to calculate
|
|
20743
|
-
* @return {Number}
|
|
20770
|
+
/**
|
|
20771
|
+
* Calculate height of line at 'lineIndex'
|
|
20772
|
+
* @param {Number} lineIndex index of line to calculate
|
|
20773
|
+
* @return {Number}
|
|
20744
20774
|
*/
|
|
20745
20775
|
getHeightOfLine(lineIndex) {
|
|
20746
20776
|
if (this.__lineHeights[lineIndex]) {
|
|
@@ -20756,8 +20786,8 @@ class FabricText extends StyledText {
|
|
|
20756
20786
|
return this.__lineHeights[lineIndex] = maxHeight * this.lineHeight * this._fontSizeMult;
|
|
20757
20787
|
}
|
|
20758
20788
|
|
|
20759
|
-
/**
|
|
20760
|
-
* Calculate text box height
|
|
20789
|
+
/**
|
|
20790
|
+
* Calculate text box height
|
|
20761
20791
|
*/
|
|
20762
20792
|
calcTextHeight() {
|
|
20763
20793
|
let lineHeight,
|
|
@@ -20769,26 +20799,26 @@ class FabricText extends StyledText {
|
|
|
20769
20799
|
return height;
|
|
20770
20800
|
}
|
|
20771
20801
|
|
|
20772
|
-
/**
|
|
20773
|
-
* @private
|
|
20774
|
-
* @return {Number} Left offset
|
|
20802
|
+
/**
|
|
20803
|
+
* @private
|
|
20804
|
+
* @return {Number} Left offset
|
|
20775
20805
|
*/
|
|
20776
20806
|
_getLeftOffset() {
|
|
20777
20807
|
return this.direction === 'ltr' ? -this.width / 2 : this.width / 2;
|
|
20778
20808
|
}
|
|
20779
20809
|
|
|
20780
|
-
/**
|
|
20781
|
-
* @private
|
|
20782
|
-
* @return {Number} Top offset
|
|
20810
|
+
/**
|
|
20811
|
+
* @private
|
|
20812
|
+
* @return {Number} Top offset
|
|
20783
20813
|
*/
|
|
20784
20814
|
_getTopOffset() {
|
|
20785
20815
|
return -this.height / 2;
|
|
20786
20816
|
}
|
|
20787
20817
|
|
|
20788
|
-
/**
|
|
20789
|
-
* @private
|
|
20790
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20791
|
-
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20818
|
+
/**
|
|
20819
|
+
* @private
|
|
20820
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20821
|
+
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20792
20822
|
*/
|
|
20793
20823
|
_renderTextCommon(ctx, method) {
|
|
20794
20824
|
ctx.save();
|
|
@@ -20805,9 +20835,9 @@ class FabricText extends StyledText {
|
|
|
20805
20835
|
ctx.restore();
|
|
20806
20836
|
}
|
|
20807
20837
|
|
|
20808
|
-
/**
|
|
20809
|
-
* @private
|
|
20810
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20838
|
+
/**
|
|
20839
|
+
* @private
|
|
20840
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20811
20841
|
*/
|
|
20812
20842
|
_renderTextFill(ctx) {
|
|
20813
20843
|
if (!this.fill && !this.styleHas(FILL)) {
|
|
@@ -20816,9 +20846,9 @@ class FabricText extends StyledText {
|
|
|
20816
20846
|
this._renderTextCommon(ctx, 'fillText');
|
|
20817
20847
|
}
|
|
20818
20848
|
|
|
20819
|
-
/**
|
|
20820
|
-
* @private
|
|
20821
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20849
|
+
/**
|
|
20850
|
+
* @private
|
|
20851
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20822
20852
|
*/
|
|
20823
20853
|
_renderTextStroke(ctx) {
|
|
20824
20854
|
if ((!this.stroke || this.strokeWidth === 0) && this.isEmptyStyles()) {
|
|
@@ -20835,14 +20865,14 @@ class FabricText extends StyledText {
|
|
|
20835
20865
|
ctx.restore();
|
|
20836
20866
|
}
|
|
20837
20867
|
|
|
20838
|
-
/**
|
|
20839
|
-
* @private
|
|
20840
|
-
* @param {String} method fillText or strokeText.
|
|
20841
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20842
|
-
* @param {Array} line Content of the line, splitted in an array by grapheme
|
|
20843
|
-
* @param {Number} left
|
|
20844
|
-
* @param {Number} top
|
|
20845
|
-
* @param {Number} lineIndex
|
|
20868
|
+
/**
|
|
20869
|
+
* @private
|
|
20870
|
+
* @param {String} method fillText or strokeText.
|
|
20871
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20872
|
+
* @param {Array} line Content of the line, splitted in an array by grapheme
|
|
20873
|
+
* @param {Number} left
|
|
20874
|
+
* @param {Number} top
|
|
20875
|
+
* @param {Number} lineIndex
|
|
20846
20876
|
*/
|
|
20847
20877
|
_renderChars(method, ctx, line, left, top, lineIndex) {
|
|
20848
20878
|
const lineHeight = this.getHeightOfLine(lineIndex),
|
|
@@ -20865,7 +20895,15 @@ class FabricText extends StyledText {
|
|
|
20865
20895
|
if (currentDirection !== this.direction) {
|
|
20866
20896
|
ctx.canvas.setAttribute('dir', isLtr ? 'ltr' : 'rtl');
|
|
20867
20897
|
ctx.direction = isLtr ? 'ltr' : 'rtl';
|
|
20868
|
-
|
|
20898
|
+
|
|
20899
|
+
// For justify alignments, we need to set the correct canvas text alignment
|
|
20900
|
+
// This is crucial for RTL text to render in the correct order
|
|
20901
|
+
if (isJustify) {
|
|
20902
|
+
// Justify uses LEFT alignment as a base, letting the character positioning handle justification
|
|
20903
|
+
ctx.textAlign = LEFT;
|
|
20904
|
+
} else {
|
|
20905
|
+
ctx.textAlign = isLtr ? LEFT : RIGHT;
|
|
20906
|
+
}
|
|
20869
20907
|
}
|
|
20870
20908
|
top -= lineHeight * this._fontSizeFraction / this.lineHeight;
|
|
20871
20909
|
if (shortCut) {
|
|
@@ -20916,16 +20954,16 @@ class FabricText extends StyledText {
|
|
|
20916
20954
|
ctx.restore();
|
|
20917
20955
|
}
|
|
20918
20956
|
|
|
20919
|
-
/**
|
|
20920
|
-
* This function try to patch the missing gradientTransform on canvas gradients.
|
|
20921
|
-
* transforming a context to transform the gradient, is going to transform the stroke too.
|
|
20922
|
-
* we want to transform the gradient but not the stroke operation, so we create
|
|
20923
|
-
* a transformed gradient on a pattern and then we use the pattern instead of the gradient.
|
|
20924
|
-
* this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
|
|
20925
|
-
* is limited.
|
|
20926
|
-
* @private
|
|
20927
|
-
* @param {TFiller} filler a fabric gradient instance
|
|
20928
|
-
* @return {CanvasPattern} a pattern to use as fill/stroke style
|
|
20957
|
+
/**
|
|
20958
|
+
* This function try to patch the missing gradientTransform on canvas gradients.
|
|
20959
|
+
* transforming a context to transform the gradient, is going to transform the stroke too.
|
|
20960
|
+
* we want to transform the gradient but not the stroke operation, so we create
|
|
20961
|
+
* a transformed gradient on a pattern and then we use the pattern instead of the gradient.
|
|
20962
|
+
* this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
|
|
20963
|
+
* is limited.
|
|
20964
|
+
* @private
|
|
20965
|
+
* @param {TFiller} filler a fabric gradient instance
|
|
20966
|
+
* @return {CanvasPattern} a pattern to use as fill/stroke style
|
|
20929
20967
|
*/
|
|
20930
20968
|
_applyPatternGradientTransformText(filler) {
|
|
20931
20969
|
// TODO: verify compatibility with strokeUniform
|
|
@@ -20981,12 +21019,12 @@ class FabricText extends StyledText {
|
|
|
20981
21019
|
};
|
|
20982
21020
|
}
|
|
20983
21021
|
|
|
20984
|
-
/**
|
|
20985
|
-
* This function prepare the canvas for a stroke style, and stroke and strokeWidth
|
|
20986
|
-
* need to be sent in as defined
|
|
20987
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
20988
|
-
* @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
|
|
20989
|
-
* @returns
|
|
21022
|
+
/**
|
|
21023
|
+
* This function prepare the canvas for a stroke style, and stroke and strokeWidth
|
|
21024
|
+
* need to be sent in as defined
|
|
21025
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
21026
|
+
* @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
|
|
21027
|
+
* @returns
|
|
20990
21028
|
*/
|
|
20991
21029
|
_setStrokeStyles(ctx, _ref) {
|
|
20992
21030
|
let {
|
|
@@ -21001,12 +21039,12 @@ class FabricText extends StyledText {
|
|
|
21001
21039
|
return this.handleFiller(ctx, 'strokeStyle', stroke);
|
|
21002
21040
|
}
|
|
21003
21041
|
|
|
21004
|
-
/**
|
|
21005
|
-
* This function prepare the canvas for a ill style, and fill
|
|
21006
|
-
* need to be sent in as defined
|
|
21007
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
21008
|
-
* @param {CompleteTextStyleDeclaration} style with ill defined
|
|
21009
|
-
* @returns
|
|
21042
|
+
/**
|
|
21043
|
+
* This function prepare the canvas for a ill style, and fill
|
|
21044
|
+
* need to be sent in as defined
|
|
21045
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
21046
|
+
* @param {CompleteTextStyleDeclaration} style with ill defined
|
|
21047
|
+
* @returns
|
|
21010
21048
|
*/
|
|
21011
21049
|
_setFillStyles(ctx, _ref2) {
|
|
21012
21050
|
let {
|
|
@@ -21015,16 +21053,16 @@ class FabricText extends StyledText {
|
|
|
21015
21053
|
return this.handleFiller(ctx, 'fillStyle', fill);
|
|
21016
21054
|
}
|
|
21017
21055
|
|
|
21018
|
-
/**
|
|
21019
|
-
* @private
|
|
21020
|
-
* @param {String} method
|
|
21021
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21022
|
-
* @param {Number} lineIndex
|
|
21023
|
-
* @param {Number} charIndex
|
|
21024
|
-
* @param {String} _char
|
|
21025
|
-
* @param {Number} left Left coordinate
|
|
21026
|
-
* @param {Number} top Top coordinate
|
|
21027
|
-
* @param {Number} lineHeight Height of the line
|
|
21056
|
+
/**
|
|
21057
|
+
* @private
|
|
21058
|
+
* @param {String} method
|
|
21059
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21060
|
+
* @param {Number} lineIndex
|
|
21061
|
+
* @param {Number} charIndex
|
|
21062
|
+
* @param {String} _char
|
|
21063
|
+
* @param {Number} left Left coordinate
|
|
21064
|
+
* @param {Number} top Top coordinate
|
|
21065
|
+
* @param {Number} lineHeight Height of the line
|
|
21028
21066
|
*/
|
|
21029
21067
|
_renderChar(method, ctx, lineIndex, charIndex, _char, left, top) {
|
|
21030
21068
|
const decl = this._getStyleDeclaration(lineIndex, charIndex),
|
|
@@ -21053,30 +21091,30 @@ class FabricText extends StyledText {
|
|
|
21053
21091
|
ctx.restore();
|
|
21054
21092
|
}
|
|
21055
21093
|
|
|
21056
|
-
/**
|
|
21057
|
-
* Turns the character into a 'superior figure' (i.e. 'superscript')
|
|
21058
|
-
* @param {Number} start selection start
|
|
21059
|
-
* @param {Number} end selection end
|
|
21094
|
+
/**
|
|
21095
|
+
* Turns the character into a 'superior figure' (i.e. 'superscript')
|
|
21096
|
+
* @param {Number} start selection start
|
|
21097
|
+
* @param {Number} end selection end
|
|
21060
21098
|
*/
|
|
21061
21099
|
setSuperscript(start, end) {
|
|
21062
21100
|
this._setScript(start, end, this.superscript);
|
|
21063
21101
|
}
|
|
21064
21102
|
|
|
21065
|
-
/**
|
|
21066
|
-
* Turns the character into an 'inferior figure' (i.e. 'subscript')
|
|
21067
|
-
* @param {Number} start selection start
|
|
21068
|
-
* @param {Number} end selection end
|
|
21103
|
+
/**
|
|
21104
|
+
* Turns the character into an 'inferior figure' (i.e. 'subscript')
|
|
21105
|
+
* @param {Number} start selection start
|
|
21106
|
+
* @param {Number} end selection end
|
|
21069
21107
|
*/
|
|
21070
21108
|
setSubscript(start, end) {
|
|
21071
21109
|
this._setScript(start, end, this.subscript);
|
|
21072
21110
|
}
|
|
21073
21111
|
|
|
21074
|
-
/**
|
|
21075
|
-
* Applies 'schema' at given position
|
|
21076
|
-
* @private
|
|
21077
|
-
* @param {Number} start selection start
|
|
21078
|
-
* @param {Number} end selection end
|
|
21079
|
-
* @param {Number} schema
|
|
21112
|
+
/**
|
|
21113
|
+
* Applies 'schema' at given position
|
|
21114
|
+
* @private
|
|
21115
|
+
* @param {Number} start selection start
|
|
21116
|
+
* @param {Number} end selection end
|
|
21117
|
+
* @param {Number} schema
|
|
21080
21118
|
*/
|
|
21081
21119
|
_setScript(start, end, schema) {
|
|
21082
21120
|
const loc = this.get2DCursorLocation(start, true),
|
|
@@ -21089,10 +21127,10 @@ class FabricText extends StyledText {
|
|
|
21089
21127
|
this.setSelectionStyles(style, start, end);
|
|
21090
21128
|
}
|
|
21091
21129
|
|
|
21092
|
-
/**
|
|
21093
|
-
* @private
|
|
21094
|
-
* @param {Number} lineIndex index text line
|
|
21095
|
-
* @return {Number} Line left offset
|
|
21130
|
+
/**
|
|
21131
|
+
* @private
|
|
21132
|
+
* @param {Number} lineIndex index text line
|
|
21133
|
+
* @return {Number} Line left offset
|
|
21096
21134
|
*/
|
|
21097
21135
|
_getLineLeftOffset(lineIndex) {
|
|
21098
21136
|
const lineWidth = this.getLineWidth(lineIndex),
|
|
@@ -21101,9 +21139,21 @@ class FabricText extends StyledText {
|
|
|
21101
21139
|
direction = this.direction,
|
|
21102
21140
|
isEndOfWrapping = this.isEndOfWrapping(lineIndex);
|
|
21103
21141
|
let leftOffset = 0;
|
|
21104
|
-
|
|
21105
|
-
|
|
21142
|
+
|
|
21143
|
+
// Handle justify alignments (excluding last lines and wrapped line ends)
|
|
21144
|
+
const isJustifyLine = textAlign === JUSTIFY || textAlign === JUSTIFY_CENTER && !isEndOfWrapping || textAlign === JUSTIFY_RIGHT && !isEndOfWrapping || textAlign === JUSTIFY_LEFT && !isEndOfWrapping;
|
|
21145
|
+
if (isJustifyLine) {
|
|
21146
|
+
// Justify lines should start at the left edge for LTR and right edge for RTL
|
|
21147
|
+
// The space distribution is handled by enlargeSpaces()
|
|
21148
|
+
if (direction === 'rtl') {
|
|
21149
|
+
// For RTL justify, we need to account for the line being right-aligned
|
|
21150
|
+
return 0;
|
|
21151
|
+
} else {
|
|
21152
|
+
return 0;
|
|
21153
|
+
}
|
|
21106
21154
|
}
|
|
21155
|
+
|
|
21156
|
+
// Handle non-justify alignments
|
|
21107
21157
|
if (textAlign === CENTER) {
|
|
21108
21158
|
leftOffset = lineDiff / 2;
|
|
21109
21159
|
}
|
|
@@ -21116,6 +21166,8 @@ class FabricText extends StyledText {
|
|
|
21116
21166
|
if (textAlign === JUSTIFY_RIGHT) {
|
|
21117
21167
|
leftOffset = lineDiff;
|
|
21118
21168
|
}
|
|
21169
|
+
|
|
21170
|
+
// Apply RTL adjustments for non-justify alignments
|
|
21119
21171
|
if (direction === 'rtl') {
|
|
21120
21172
|
if (textAlign === RIGHT || textAlign === JUSTIFY || textAlign === JUSTIFY_RIGHT) {
|
|
21121
21173
|
leftOffset = 0;
|
|
@@ -21128,8 +21180,8 @@ class FabricText extends StyledText {
|
|
|
21128
21180
|
return leftOffset;
|
|
21129
21181
|
}
|
|
21130
21182
|
|
|
21131
|
-
/**
|
|
21132
|
-
* @private
|
|
21183
|
+
/**
|
|
21184
|
+
* @private
|
|
21133
21185
|
*/
|
|
21134
21186
|
_clearCache() {
|
|
21135
21187
|
this._forceClearCache = false;
|
|
@@ -21138,12 +21190,12 @@ class FabricText extends StyledText {
|
|
|
21138
21190
|
this.__charBounds = [];
|
|
21139
21191
|
}
|
|
21140
21192
|
|
|
21141
|
-
/**
|
|
21142
|
-
* Measure a single line given its index. Used to calculate the initial
|
|
21143
|
-
* text bounding box. The values are calculated and stored in __lineWidths cache.
|
|
21144
|
-
* @private
|
|
21145
|
-
* @param {Number} lineIndex line number
|
|
21146
|
-
* @return {Number} Line width
|
|
21193
|
+
/**
|
|
21194
|
+
* Measure a single line given its index. Used to calculate the initial
|
|
21195
|
+
* text bounding box. The values are calculated and stored in __lineWidths cache.
|
|
21196
|
+
* @private
|
|
21197
|
+
* @param {Number} lineIndex line number
|
|
21198
|
+
* @return {Number} Line width
|
|
21147
21199
|
*/
|
|
21148
21200
|
getLineWidth(lineIndex) {
|
|
21149
21201
|
if (this.__lineWidths[lineIndex] !== undefined) {
|
|
@@ -21162,12 +21214,12 @@ class FabricText extends StyledText {
|
|
|
21162
21214
|
return 0;
|
|
21163
21215
|
}
|
|
21164
21216
|
|
|
21165
|
-
/**
|
|
21166
|
-
* Retrieves the value of property at given character position
|
|
21167
|
-
* @param {Number} lineIndex the line number
|
|
21168
|
-
* @param {Number} charIndex the character number
|
|
21169
|
-
* @param {String} property the property name
|
|
21170
|
-
* @returns the value of 'property'
|
|
21217
|
+
/**
|
|
21218
|
+
* Retrieves the value of property at given character position
|
|
21219
|
+
* @param {Number} lineIndex the line number
|
|
21220
|
+
* @param {Number} charIndex the character number
|
|
21221
|
+
* @param {String} property the property name
|
|
21222
|
+
* @returns the value of 'property'
|
|
21171
21223
|
*/
|
|
21172
21224
|
getValueOfPropertyAt(lineIndex, charIndex, property) {
|
|
21173
21225
|
var _charStyle$property;
|
|
@@ -21175,9 +21227,9 @@ class FabricText extends StyledText {
|
|
|
21175
21227
|
return (_charStyle$property = charStyle[property]) !== null && _charStyle$property !== void 0 ? _charStyle$property : this[property];
|
|
21176
21228
|
}
|
|
21177
21229
|
|
|
21178
|
-
/**
|
|
21179
|
-
* @private
|
|
21180
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21230
|
+
/**
|
|
21231
|
+
* @private
|
|
21232
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21181
21233
|
*/
|
|
21182
21234
|
_renderTextDecoration(ctx, type) {
|
|
21183
21235
|
if (!this[type] && !this.styleHas(type)) {
|
|
@@ -21261,10 +21313,10 @@ class FabricText extends StyledText {
|
|
|
21261
21313
|
this._removeShadow(ctx);
|
|
21262
21314
|
}
|
|
21263
21315
|
|
|
21264
|
-
/**
|
|
21265
|
-
* return font declaration string for canvas context
|
|
21266
|
-
* @param {Object} [styleObject] object
|
|
21267
|
-
* @returns {String} font declaration formatted for canvas context.
|
|
21316
|
+
/**
|
|
21317
|
+
* return font declaration string for canvas context
|
|
21318
|
+
* @param {Object} [styleObject] object
|
|
21319
|
+
* @returns {String} font declaration formatted for canvas context.
|
|
21268
21320
|
*/
|
|
21269
21321
|
_getFontDeclaration() {
|
|
21270
21322
|
let {
|
|
@@ -21278,9 +21330,9 @@ class FabricText extends StyledText {
|
|
|
21278
21330
|
return [fontStyle, fontWeight, `${forMeasuring ? this.CACHE_FONT_SIZE : fontSize}px`, parsedFontFamily].join(' ');
|
|
21279
21331
|
}
|
|
21280
21332
|
|
|
21281
|
-
/**
|
|
21282
|
-
* Renders text instance on a specified context
|
|
21283
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21333
|
+
/**
|
|
21334
|
+
* Renders text instance on a specified context
|
|
21335
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21284
21336
|
*/
|
|
21285
21337
|
render(ctx) {
|
|
21286
21338
|
if (!this.visible) {
|
|
@@ -21295,22 +21347,22 @@ class FabricText extends StyledText {
|
|
|
21295
21347
|
super.render(ctx);
|
|
21296
21348
|
}
|
|
21297
21349
|
|
|
21298
|
-
/**
|
|
21299
|
-
* Override this method to customize grapheme splitting
|
|
21300
|
-
* @todo the util `graphemeSplit` needs to be injectable in some way.
|
|
21301
|
-
* is more comfortable to inject the correct util rather than having to override text
|
|
21302
|
-
* in the middle of the prototype chain
|
|
21303
|
-
* @param {string} value
|
|
21304
|
-
* @returns {string[]} array of graphemes
|
|
21350
|
+
/**
|
|
21351
|
+
* Override this method to customize grapheme splitting
|
|
21352
|
+
* @todo the util `graphemeSplit` needs to be injectable in some way.
|
|
21353
|
+
* is more comfortable to inject the correct util rather than having to override text
|
|
21354
|
+
* in the middle of the prototype chain
|
|
21355
|
+
* @param {string} value
|
|
21356
|
+
* @returns {string[]} array of graphemes
|
|
21305
21357
|
*/
|
|
21306
21358
|
graphemeSplit(value) {
|
|
21307
21359
|
return graphemeSplit(value);
|
|
21308
21360
|
}
|
|
21309
21361
|
|
|
21310
|
-
/**
|
|
21311
|
-
* Returns the text as an array of lines.
|
|
21312
|
-
* @param {String} text text to split
|
|
21313
|
-
* @returns Lines in the text
|
|
21362
|
+
/**
|
|
21363
|
+
* Returns the text as an array of lines.
|
|
21364
|
+
* @param {String} text text to split
|
|
21365
|
+
* @returns Lines in the text
|
|
21314
21366
|
*/
|
|
21315
21367
|
_splitTextIntoLines(text) {
|
|
21316
21368
|
const lines = text.split(this._reNewline),
|
|
@@ -21330,10 +21382,10 @@ class FabricText extends StyledText {
|
|
|
21330
21382
|
};
|
|
21331
21383
|
}
|
|
21332
21384
|
|
|
21333
|
-
/**
|
|
21334
|
-
* Returns object representation of an instance
|
|
21335
|
-
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
21336
|
-
* @return {Object} Object representation of an instance
|
|
21385
|
+
/**
|
|
21386
|
+
* Returns object representation of an instance
|
|
21387
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
21388
|
+
* @return {Object} Object representation of an instance
|
|
21337
21389
|
*/
|
|
21338
21390
|
toObject() {
|
|
21339
21391
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -21376,23 +21428,23 @@ class FabricText extends StyledText {
|
|
|
21376
21428
|
return this;
|
|
21377
21429
|
}
|
|
21378
21430
|
|
|
21379
|
-
/**
|
|
21380
|
-
* Returns complexity of an instance
|
|
21381
|
-
* @return {Number} complexity
|
|
21431
|
+
/**
|
|
21432
|
+
* Returns complexity of an instance
|
|
21433
|
+
* @return {Number} complexity
|
|
21382
21434
|
*/
|
|
21383
21435
|
complexity() {
|
|
21384
21436
|
return 1;
|
|
21385
21437
|
}
|
|
21386
21438
|
|
|
21387
|
-
/**
|
|
21388
|
-
* List of generic font families
|
|
21389
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
|
|
21439
|
+
/**
|
|
21440
|
+
* List of generic font families
|
|
21441
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
|
|
21390
21442
|
*/
|
|
21391
21443
|
|
|
21392
|
-
/**
|
|
21393
|
-
* Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
|
|
21394
|
-
* @param {HTMLElement} element Element to parse
|
|
21395
|
-
* @param {Object} [options] Options object
|
|
21444
|
+
/**
|
|
21445
|
+
* Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
|
|
21446
|
+
* @param {HTMLElement} element Element to parse
|
|
21447
|
+
* @param {Object} [options] Options object
|
|
21396
21448
|
*/
|
|
21397
21449
|
static async fromElement(element, options, cssRules) {
|
|
21398
21450
|
const parsedAttributes = parseAttributes(element, FabricText.ATTRIBUTE_NAMES, cssRules);
|
|
@@ -21431,10 +21483,10 @@ class FabricText extends StyledText {
|
|
|
21431
21483
|
scaledDiff = lineHeightDiff * textHeightScaleFactor,
|
|
21432
21484
|
textHeight = text.getScaledHeight() + scaledDiff;
|
|
21433
21485
|
let offX = 0;
|
|
21434
|
-
/*
|
|
21435
|
-
Adjust positioning:
|
|
21436
|
-
x/y attributes in SVG correspond to the bottom-left corner of text bounding box
|
|
21437
|
-
fabric output by default at top, left.
|
|
21486
|
+
/*
|
|
21487
|
+
Adjust positioning:
|
|
21488
|
+
x/y attributes in SVG correspond to the bottom-left corner of text bounding box
|
|
21489
|
+
fabric output by default at top, left.
|
|
21438
21490
|
*/
|
|
21439
21491
|
if (textAnchor === CENTER) {
|
|
21440
21492
|
offX = text.getScaledWidth() / 2;
|
|
@@ -21452,10 +21504,10 @@ class FabricText extends StyledText {
|
|
|
21452
21504
|
|
|
21453
21505
|
/* _FROM_SVG_END_ */
|
|
21454
21506
|
|
|
21455
|
-
/**
|
|
21456
|
-
* Returns FabricText instance from an object representation
|
|
21457
|
-
* @param {Object} object plain js Object to create an instance from
|
|
21458
|
-
* @returns {Promise<FabricText>}
|
|
21507
|
+
/**
|
|
21508
|
+
* Returns FabricText instance from an object representation
|
|
21509
|
+
* @param {Object} object plain js Object to create an instance from
|
|
21510
|
+
* @returns {Promise<FabricText>}
|
|
21459
21511
|
*/
|
|
21460
21512
|
static fromObject(object) {
|
|
21461
21513
|
return this._fromObject({
|
|
@@ -21466,10 +21518,10 @@ class FabricText extends StyledText {
|
|
|
21466
21518
|
});
|
|
21467
21519
|
}
|
|
21468
21520
|
}
|
|
21469
|
-
/**
|
|
21470
|
-
* Properties that requires a text layout recalculation when changed
|
|
21471
|
-
* @type string[]
|
|
21472
|
-
* @protected
|
|
21521
|
+
/**
|
|
21522
|
+
* Properties that requires a text layout recalculation when changed
|
|
21523
|
+
* @type string[]
|
|
21524
|
+
* @protected
|
|
21473
21525
|
*/
|
|
21474
21526
|
_defineProperty(FabricText, "textLayoutProperties", textLayoutProperties);
|
|
21475
21527
|
_defineProperty(FabricText, "cacheProperties", [...cacheProperties, ...additionalProps]);
|
|
@@ -21477,9 +21529,9 @@ _defineProperty(FabricText, "ownDefaults", textDefaultValues);
|
|
|
21477
21529
|
_defineProperty(FabricText, "type", 'Text');
|
|
21478
21530
|
_defineProperty(FabricText, "genericFonts", ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif', 'ui-monospace', 'ui-rounded', 'math', 'emoji', 'fangsong']);
|
|
21479
21531
|
/* _FROM_SVG_START_ */
|
|
21480
|
-
/**
|
|
21481
|
-
* List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
|
|
21482
|
-
* @see: http://www.w3.org/TR/SVG/text.html#TextElement
|
|
21532
|
+
/**
|
|
21533
|
+
* List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
|
|
21534
|
+
* @see: http://www.w3.org/TR/SVG/text.html#TextElement
|
|
21483
21535
|
*/
|
|
21484
21536
|
_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'));
|
|
21485
21537
|
applyMixins(FabricText, [TextSVGExportMixin]);
|
|
@@ -21866,8 +21918,8 @@ class OverlayEditor {
|
|
|
21866
21918
|
// We don't need to save/restore them here as it would conflict with IText's restoration
|
|
21867
21919
|
}
|
|
21868
21920
|
|
|
21869
|
-
/**
|
|
21870
|
-
* Get the container element for the overlay (parent of upperCanvasEl)
|
|
21921
|
+
/**
|
|
21922
|
+
* Get the container element for the overlay (parent of upperCanvasEl)
|
|
21871
21923
|
*/
|
|
21872
21924
|
getCanvasContainer() {
|
|
21873
21925
|
const upperCanvas = this.canvas.upperCanvasEl;
|
|
@@ -21881,8 +21933,8 @@ class OverlayEditor {
|
|
|
21881
21933
|
return container;
|
|
21882
21934
|
}
|
|
21883
21935
|
|
|
21884
|
-
/**
|
|
21885
|
-
* Create the overlay DOM structure
|
|
21936
|
+
/**
|
|
21937
|
+
* Create the overlay DOM structure
|
|
21886
21938
|
*/
|
|
21887
21939
|
createOverlayDOM() {
|
|
21888
21940
|
// Host div for positioning and overflow control
|
|
@@ -21902,8 +21954,12 @@ class OverlayEditor {
|
|
|
21902
21954
|
this.textarea.style.pointerEvents = 'auto';
|
|
21903
21955
|
// Set appropriate unicodeBidi based on content and direction
|
|
21904
21956
|
const hasArabicText = /[\u0600-\u06FF\u0750-\u077F\uFB50-\uFDFF\uFE70-\uFEFF]/.test(this.target.text || '');
|
|
21957
|
+
const hasLatinText = /[a-zA-Z]/.test(this.target.text || '');
|
|
21905
21958
|
const isLTRDirection = this.target.direction === 'ltr';
|
|
21906
|
-
if (hasArabicText && isLTRDirection) {
|
|
21959
|
+
if (hasArabicText && hasLatinText && isLTRDirection) {
|
|
21960
|
+
// For mixed Arabic/Latin text in LTR mode, use embed for consistent line wrapping
|
|
21961
|
+
this.textarea.style.unicodeBidi = 'embed';
|
|
21962
|
+
} else if (hasArabicText && isLTRDirection) {
|
|
21907
21963
|
// For Arabic text in LTR mode, use embed to preserve shaping while respecting direction
|
|
21908
21964
|
this.textarea.style.unicodeBidi = 'embed';
|
|
21909
21965
|
} else {
|
|
@@ -21933,8 +21989,8 @@ class OverlayEditor {
|
|
|
21933
21989
|
document.body.appendChild(this.hostDiv);
|
|
21934
21990
|
}
|
|
21935
21991
|
|
|
21936
|
-
/**
|
|
21937
|
-
* Attach all event listeners
|
|
21992
|
+
/**
|
|
21993
|
+
* Attach all event listeners
|
|
21938
21994
|
*/
|
|
21939
21995
|
attachEventListeners() {
|
|
21940
21996
|
// Textarea events
|
|
@@ -21954,8 +22010,8 @@ class OverlayEditor {
|
|
|
21954
22010
|
this.setupViewportChangeDetection();
|
|
21955
22011
|
}
|
|
21956
22012
|
|
|
21957
|
-
/**
|
|
21958
|
-
* Remove all event listeners
|
|
22013
|
+
/**
|
|
22014
|
+
* Remove all event listeners
|
|
21959
22015
|
*/
|
|
21960
22016
|
removeEventListeners() {
|
|
21961
22017
|
this.textarea.removeEventListener('input', this.boundHandlers.onInput);
|
|
@@ -21972,16 +22028,16 @@ class OverlayEditor {
|
|
|
21972
22028
|
this.restoreViewportChangeDetection();
|
|
21973
22029
|
}
|
|
21974
22030
|
|
|
21975
|
-
/**
|
|
21976
|
-
* Simple method to refresh positioning when canvas changes
|
|
22031
|
+
/**
|
|
22032
|
+
* Simple method to refresh positioning when canvas changes
|
|
21977
22033
|
*/
|
|
21978
22034
|
updatePosition() {
|
|
21979
22035
|
this.applyOverlayStyle();
|
|
21980
22036
|
}
|
|
21981
22037
|
|
|
21982
|
-
/**
|
|
21983
|
-
* Update the Fabric object bounds to match current textarea size
|
|
21984
|
-
* This ensures Fabric.js selection controls follow the growing textbox
|
|
22038
|
+
/**
|
|
22039
|
+
* Update the Fabric object bounds to match current textarea size
|
|
22040
|
+
* This ensures Fabric.js selection controls follow the growing textbox
|
|
21985
22041
|
*/
|
|
21986
22042
|
updateObjectBounds() {
|
|
21987
22043
|
if (this.isDestroyed) return;
|
|
@@ -21992,26 +22048,38 @@ class OverlayEditor {
|
|
|
21992
22048
|
parseFloat(this.hostDiv.style.width) / zoom;
|
|
21993
22049
|
const currentHeight = parseFloat(this.hostDiv.style.height) / zoom;
|
|
21994
22050
|
|
|
21995
|
-
//
|
|
22051
|
+
// Always update height for responsive controls (especially important for line deletion)
|
|
21996
22052
|
const heightDiff = Math.abs(currentHeight - target.height);
|
|
21997
|
-
const threshold =
|
|
22053
|
+
const threshold = 0.5; // Lower threshold for better responsiveness to line changes
|
|
21998
22054
|
|
|
21999
22055
|
if (heightDiff > threshold) {
|
|
22056
|
+
target.height;
|
|
22000
22057
|
target.height = currentHeight;
|
|
22001
22058
|
target.setCoords(); // Update control positions
|
|
22059
|
+
|
|
22060
|
+
// Force dirty to ensure proper re-rendering
|
|
22061
|
+
target.dirty = true;
|
|
22002
22062
|
this.canvas.requestRenderAll(); // Re-render to show updated selection
|
|
22063
|
+
|
|
22064
|
+
// IMPORTANT: Reposition overlay after height change
|
|
22065
|
+
requestAnimationFrame(() => {
|
|
22066
|
+
if (!this.isDestroyed) {
|
|
22067
|
+
this.applyOverlayStyle();
|
|
22068
|
+
console.log('📐 Height changed - rechecking alignment after repositioning:');
|
|
22069
|
+
}
|
|
22070
|
+
});
|
|
22003
22071
|
}
|
|
22004
22072
|
}
|
|
22005
22073
|
|
|
22006
|
-
/**
|
|
22007
|
-
* Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
|
|
22074
|
+
/**
|
|
22075
|
+
* Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
|
|
22008
22076
|
*/
|
|
22009
22077
|
letterSpacingPx(charSpacing, fontSize) {
|
|
22010
22078
|
return charSpacing / 1000 * fontSize;
|
|
22011
22079
|
}
|
|
22012
22080
|
|
|
22013
|
-
/**
|
|
22014
|
-
* Detect text direction using first strong directional character
|
|
22081
|
+
/**
|
|
22082
|
+
* Detect text direction using first strong directional character
|
|
22015
22083
|
*/
|
|
22016
22084
|
firstStrongDir(text) {
|
|
22017
22085
|
// Hebrew: \u0590-\u05FF, Arabic: \u0600-\u06FF, \u0750-\u077F, \uFB50-\uFDFF, \uFE70-\uFEFF
|
|
@@ -22027,14 +22095,6 @@ class OverlayEditor {
|
|
|
22027
22095
|
target.setCoords();
|
|
22028
22096
|
const aCoords = target.aCoords;
|
|
22029
22097
|
|
|
22030
|
-
// DEBUG: Log dimensions before edit
|
|
22031
|
-
console.log('BEFORE EDIT:');
|
|
22032
|
-
console.log(' target.width =', target.width);
|
|
22033
|
-
console.log(' target.height =', target.height);
|
|
22034
|
-
console.log(' target.getScaledWidth() =', target.getScaledWidth());
|
|
22035
|
-
console.log(' target.getScaledHeight() =', target.getScaledHeight());
|
|
22036
|
-
console.log(' target.padding =', target.padding);
|
|
22037
|
-
|
|
22038
22098
|
// 2. Get canvas position and scroll offsets (like rtl-test.html)
|
|
22039
22099
|
const canvasEl = canvas.upperCanvasEl;
|
|
22040
22100
|
const canvasRect = canvasEl.getBoundingClientRect();
|
|
@@ -22057,14 +22117,12 @@ class OverlayEditor {
|
|
|
22057
22117
|
const left = canvasRect.left + scrollX + screenPoint.x;
|
|
22058
22118
|
const top = canvasRect.top + scrollY + screenPoint.y;
|
|
22059
22119
|
|
|
22060
|
-
// 4.
|
|
22061
|
-
|
|
22062
|
-
|
|
22063
|
-
|
|
22064
|
-
|
|
22065
|
-
|
|
22066
|
-
console.log(' zoom =', zoom);
|
|
22067
|
-
console.log(' final width =', width);
|
|
22120
|
+
// 4. Calculate the precise width and height for the container
|
|
22121
|
+
// **THE FIX:** Use getBoundingRect() for BOTH width and height.
|
|
22122
|
+
// This is the most reliable measure of the object's final rendered dimensions.
|
|
22123
|
+
const objectBounds = target.getBoundingRect();
|
|
22124
|
+
const width = Math.round(objectBounds.width * zoom);
|
|
22125
|
+
const height = Math.round(objectBounds.height * zoom);
|
|
22068
22126
|
|
|
22069
22127
|
// 5. Apply styles to host DIV - absolute positioning like rtl-test.html
|
|
22070
22128
|
this.hostDiv.style.position = 'absolute';
|
|
@@ -22088,52 +22146,328 @@ class OverlayEditor {
|
|
|
22088
22146
|
const scaleX = target.scaleX || 1;
|
|
22089
22147
|
const finalFontSize = baseFontSize * scaleX * zoom;
|
|
22090
22148
|
const fabricLineHeight = target.lineHeight || 1.16;
|
|
22091
|
-
//
|
|
22092
|
-
|
|
22093
|
-
|
|
22094
|
-
|
|
22095
|
-
|
|
22149
|
+
// **THE FIX:** Use 'border-box' so the width property includes padding.
|
|
22150
|
+
// This makes alignment much easier and more reliable.
|
|
22151
|
+
this.textarea.style.boxSizing = 'border-box';
|
|
22152
|
+
|
|
22153
|
+
// **THE FIX:** Set the textarea width to be IDENTICAL to the host div's width.
|
|
22154
|
+
// The padding will now be correctly contained *inside* this width.
|
|
22155
|
+
this.textarea.style.width = `${width}px`;
|
|
22156
|
+
this.textarea.style.height = '100%'; // Let hostDiv control height
|
|
22096
22157
|
this.textarea.style.padding = `${paddingY}px ${paddingX}px`;
|
|
22158
|
+
|
|
22159
|
+
// Apply all other font and text styles to match Fabric
|
|
22160
|
+
const letterSpacingPx = (target.charSpacing || 0) / 1000 * finalFontSize;
|
|
22097
22161
|
this.textarea.style.fontSize = `${finalFontSize}px`;
|
|
22098
|
-
this.textarea.style.lineHeight = String(fabricLineHeight);
|
|
22162
|
+
this.textarea.style.lineHeight = String(fabricLineHeight);
|
|
22099
22163
|
this.textarea.style.fontFamily = target.fontFamily || 'Arial';
|
|
22100
22164
|
this.textarea.style.fontWeight = String(target.fontWeight || 'normal');
|
|
22101
22165
|
this.textarea.style.fontStyle = target.fontStyle || 'normal';
|
|
22102
|
-
|
|
22166
|
+
// Handle text alignment and justification
|
|
22167
|
+
const textAlign = target.textAlign || 'left';
|
|
22168
|
+
let cssTextAlign = textAlign;
|
|
22169
|
+
|
|
22170
|
+
// Detect text direction from content for proper justify handling
|
|
22171
|
+
const autoDetectedDirection = this.firstStrongDir(this.textarea.value || '');
|
|
22172
|
+
|
|
22173
|
+
// DEBUG: Log alignment details
|
|
22174
|
+
console.log('🔍 ALIGNMENT DEBUG:');
|
|
22175
|
+
console.log(' Fabric textAlign:', textAlign);
|
|
22176
|
+
console.log(' Fabric direction:', target.direction);
|
|
22177
|
+
console.log(' Text content:', JSON.stringify(target.text));
|
|
22178
|
+
console.log(' Detected direction:', autoDetectedDirection);
|
|
22179
|
+
|
|
22180
|
+
// Map fabric.js justify to CSS
|
|
22181
|
+
if (textAlign.includes('justify')) {
|
|
22182
|
+
// Try to match fabric.js justify behavior more precisely
|
|
22183
|
+
try {
|
|
22184
|
+
// For justify, we need to replicate fabric.js space expansion
|
|
22185
|
+
// Use CSS justify but with specific settings to match fabric.js better
|
|
22186
|
+
cssTextAlign = 'justify';
|
|
22187
|
+
|
|
22188
|
+
// Set text-align-last based on justify type and detected direction
|
|
22189
|
+
// Smart justify: respect detected direction even when fabric alignment doesn't match
|
|
22190
|
+
if (textAlign === 'justify') {
|
|
22191
|
+
this.textarea.style.textAlignLast = autoDetectedDirection === 'rtl' ? 'right' : 'left';
|
|
22192
|
+
} else if (textAlign === 'justify-left') {
|
|
22193
|
+
// If text is RTL but fabric says justify-left, override to justify-right for better UX
|
|
22194
|
+
if (autoDetectedDirection === 'rtl') {
|
|
22195
|
+
this.textarea.style.textAlignLast = 'right';
|
|
22196
|
+
console.log(' → Overrode justify-left to justify-right for RTL text');
|
|
22197
|
+
} else {
|
|
22198
|
+
this.textarea.style.textAlignLast = 'left';
|
|
22199
|
+
}
|
|
22200
|
+
} else if (textAlign === 'justify-right') {
|
|
22201
|
+
// If text is LTR but fabric says justify-right, override to justify-left for better UX
|
|
22202
|
+
if (autoDetectedDirection === 'ltr') {
|
|
22203
|
+
this.textarea.style.textAlignLast = 'left';
|
|
22204
|
+
console.log(' → Overrode justify-right to justify-left for LTR text');
|
|
22205
|
+
} else {
|
|
22206
|
+
this.textarea.style.textAlignLast = 'right';
|
|
22207
|
+
}
|
|
22208
|
+
} else if (textAlign === 'justify-center') {
|
|
22209
|
+
this.textarea.style.textAlignLast = 'center';
|
|
22210
|
+
}
|
|
22211
|
+
|
|
22212
|
+
// Enhanced justify settings for better fabric.js matching
|
|
22213
|
+
this.textarea.style.textJustify = 'inter-word';
|
|
22214
|
+
this.textarea.style.wordSpacing = 'normal';
|
|
22215
|
+
|
|
22216
|
+
// Additional CSS properties for better justify matching
|
|
22217
|
+
this.textarea.style.textAlign = 'justify';
|
|
22218
|
+
this.textarea.style.textAlignLast = this.textarea.style.textAlignLast;
|
|
22219
|
+
|
|
22220
|
+
// Try to force better justify behavior
|
|
22221
|
+
this.textarea.style.textJustifyTrim = 'none';
|
|
22222
|
+
this.textarea.style.textAutospace = 'none';
|
|
22223
|
+
console.log(' → Applied justify alignment:', textAlign, 'with last-line:', this.textarea.style.textAlignLast);
|
|
22224
|
+
} catch (error) {
|
|
22225
|
+
console.warn(' → Justify setup failed, falling back to standard alignment:', error);
|
|
22226
|
+
cssTextAlign = textAlign.replace('justify-', '').replace('justify', 'left');
|
|
22227
|
+
}
|
|
22228
|
+
} else {
|
|
22229
|
+
this.textarea.style.textAlignLast = 'auto';
|
|
22230
|
+
this.textarea.style.textJustify = 'auto';
|
|
22231
|
+
this.textarea.style.wordSpacing = 'normal';
|
|
22232
|
+
console.log(' → Applied standard alignment:', cssTextAlign);
|
|
22233
|
+
}
|
|
22234
|
+
this.textarea.style.textAlign = cssTextAlign;
|
|
22103
22235
|
this.textarea.style.color = ((_target$fill = target.fill) === null || _target$fill === void 0 ? void 0 : _target$fill.toString()) || '#000';
|
|
22104
|
-
this.textarea.style.letterSpacing = `${
|
|
22105
|
-
this.textarea.style.direction = target.direction || this.firstStrongDir(this.textarea.value || '');
|
|
22236
|
+
this.textarea.style.letterSpacing = `${letterSpacingPx}px`;
|
|
22106
22237
|
|
|
22107
|
-
//
|
|
22238
|
+
// Use the already detected direction from above
|
|
22239
|
+
const fabricDirection = target.direction;
|
|
22240
|
+
|
|
22241
|
+
// Use auto-detected direction for better BiDi support, but respect fabric direction if it makes sense
|
|
22242
|
+
this.textarea.style.direction = autoDetectedDirection || fabricDirection || 'ltr';
|
|
22108
22243
|
this.textarea.style.fontVariant = 'normal';
|
|
22109
22244
|
this.textarea.style.fontStretch = 'normal';
|
|
22110
|
-
this.textarea.style.textRendering = 'auto';
|
|
22111
|
-
this.textarea.style.fontKerning = '
|
|
22112
|
-
this.textarea.style.
|
|
22245
|
+
this.textarea.style.textRendering = 'auto'; // Changed from 'optimizeLegibility' to match canvas
|
|
22246
|
+
this.textarea.style.fontKerning = 'normal';
|
|
22247
|
+
this.textarea.style.fontFeatureSettings = 'normal';
|
|
22248
|
+
this.textarea.style.fontVariationSettings = 'normal';
|
|
22113
22249
|
this.textarea.style.margin = '0';
|
|
22114
22250
|
this.textarea.style.border = 'none';
|
|
22115
22251
|
this.textarea.style.outline = 'none';
|
|
22116
22252
|
this.textarea.style.background = 'transparent';
|
|
22117
|
-
this.textarea.style.
|
|
22253
|
+
this.textarea.style.overflowWrap = 'break-word';
|
|
22118
22254
|
this.textarea.style.whiteSpace = 'pre-wrap';
|
|
22119
|
-
|
|
22120
|
-
|
|
22121
|
-
|
|
22122
|
-
console.log('
|
|
22123
|
-
console.log('
|
|
22124
|
-
console.log('
|
|
22125
|
-
console.log('
|
|
22126
|
-
console.log('
|
|
22127
|
-
console.log('
|
|
22128
|
-
console.log('
|
|
22129
|
-
console.log('
|
|
22130
|
-
console.log('
|
|
22255
|
+
this.textarea.style.hyphens = 'none';
|
|
22256
|
+
|
|
22257
|
+
// DEBUG: Log final CSS properties
|
|
22258
|
+
console.log('🎨 FINAL TEXTAREA CSS:');
|
|
22259
|
+
console.log(' textAlign:', this.textarea.style.textAlign);
|
|
22260
|
+
console.log(' textAlignLast:', this.textarea.style.textAlignLast);
|
|
22261
|
+
console.log(' direction:', this.textarea.style.direction);
|
|
22262
|
+
console.log(' unicodeBidi:', this.textarea.style.unicodeBidi);
|
|
22263
|
+
console.log(' width:', this.textarea.style.width);
|
|
22264
|
+
console.log(' textJustify:', this.textarea.style.textJustify);
|
|
22265
|
+
console.log(' wordSpacing:', this.textarea.style.wordSpacing);
|
|
22266
|
+
console.log(' whiteSpace:', this.textarea.style.whiteSpace);
|
|
22267
|
+
|
|
22268
|
+
// If justify, log Fabric object dimensions for comparison
|
|
22269
|
+
if (textAlign.includes('justify')) {
|
|
22270
|
+
var _calcTextWidth, _ref;
|
|
22271
|
+
console.log('🔧 FABRIC OBJECT JUSTIFY INFO:');
|
|
22272
|
+
console.log(' Fabric width:', target.width);
|
|
22273
|
+
console.log(' Fabric calcTextWidth:', (_calcTextWidth = (_ref = target).calcTextWidth) === null || _calcTextWidth === void 0 ? void 0 : _calcTextWidth.call(_ref));
|
|
22274
|
+
console.log(' Fabric textAlign:', target.textAlign);
|
|
22275
|
+
console.log(' Text lines:', target.textLines);
|
|
22276
|
+
}
|
|
22277
|
+
|
|
22278
|
+
// Debug font properties matching
|
|
22279
|
+
console.log('🔤 FONT PROPERTIES COMPARISON:');
|
|
22280
|
+
console.log(' Fabric fontFamily:', target.fontFamily);
|
|
22281
|
+
console.log(' Fabric fontWeight:', target.fontWeight);
|
|
22282
|
+
console.log(' Fabric fontStyle:', target.fontStyle);
|
|
22283
|
+
console.log(' Fabric fontSize:', target.fontSize);
|
|
22284
|
+
console.log(' → Textarea fontFamily:', this.textarea.style.fontFamily);
|
|
22285
|
+
console.log(' → Textarea fontWeight:', this.textarea.style.fontWeight);
|
|
22286
|
+
console.log(' → Textarea fontStyle:', this.textarea.style.fontStyle);
|
|
22287
|
+
console.log(' → Textarea fontSize:', this.textarea.style.fontSize);
|
|
22288
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
22289
|
+
|
|
22290
|
+
// Enhanced font rendering to better match fabric.js canvas rendering
|
|
22291
|
+
// Default to auto for more natural rendering
|
|
22292
|
+
this.textarea.style.webkitFontSmoothing = 'auto';
|
|
22293
|
+
this.textarea.style.mozOsxFontSmoothing = 'auto';
|
|
22294
|
+
this.textarea.style.fontSmooth = 'auto';
|
|
22295
|
+
this.textarea.style.textSizeAdjust = 'none';
|
|
22296
|
+
|
|
22297
|
+
// For bold fonts, use subpixel rendering to match canvas thickness better
|
|
22298
|
+
const fontWeight = String(target.fontWeight || 'normal');
|
|
22299
|
+
const isBold = fontWeight === 'bold' || fontWeight === '700' || parseInt(fontWeight) >= 600;
|
|
22300
|
+
if (isBold) {
|
|
22301
|
+
this.textarea.style.webkitFontSmoothing = 'subpixel-antialiased';
|
|
22302
|
+
this.textarea.style.mozOsxFontSmoothing = 'unset';
|
|
22303
|
+
console.log('🔤 Applied enhanced bold rendering for better thickness matching');
|
|
22304
|
+
}
|
|
22305
|
+
console.log('🎨 FONT SMOOTHING APPLIED:');
|
|
22306
|
+
console.log(' webkitFontSmoothing:', this.textarea.style.webkitFontSmoothing);
|
|
22307
|
+
console.log(' mozOsxFontSmoothing:', this.textarea.style.mozOsxFontSmoothing);
|
|
22131
22308
|
|
|
22132
22309
|
// Initial bounds are set correctly by Fabric.js - don't force update here
|
|
22133
22310
|
}
|
|
22134
22311
|
|
|
22135
|
-
/**
|
|
22136
|
-
*
|
|
22312
|
+
/**
|
|
22313
|
+
* Debug method to compare textarea and canvas object bounding boxes
|
|
22314
|
+
*/
|
|
22315
|
+
debugBoundingBoxComparison() {
|
|
22316
|
+
const target = this.target;
|
|
22317
|
+
const canvas = this.canvas;
|
|
22318
|
+
const zoom = canvas.getZoom();
|
|
22319
|
+
|
|
22320
|
+
// Get textarea bounding box (in screen coordinates)
|
|
22321
|
+
const textareaRect = this.textarea.getBoundingClientRect();
|
|
22322
|
+
const hostRect = this.hostDiv.getBoundingClientRect();
|
|
22323
|
+
|
|
22324
|
+
// Get canvas object bounding box (in screen coordinates)
|
|
22325
|
+
const canvasBounds = target.getBoundingRect();
|
|
22326
|
+
const canvasRect = canvas.upperCanvasEl.getBoundingClientRect();
|
|
22327
|
+
|
|
22328
|
+
// Convert canvas object bounds to screen coordinates
|
|
22329
|
+
const vpt = canvas.viewportTransform;
|
|
22330
|
+
const screenObjectBounds = {
|
|
22331
|
+
left: canvasRect.left + canvasBounds.left * zoom + vpt[4],
|
|
22332
|
+
top: canvasRect.top + canvasBounds.top * zoom + vpt[5],
|
|
22333
|
+
width: canvasBounds.width * zoom,
|
|
22334
|
+
height: canvasBounds.height * zoom
|
|
22335
|
+
};
|
|
22336
|
+
console.log('🔍 BOUNDING BOX COMPARISON:');
|
|
22337
|
+
console.log('📦 Textarea Rect:', {
|
|
22338
|
+
left: Math.round(textareaRect.left * 100) / 100,
|
|
22339
|
+
top: Math.round(textareaRect.top * 100) / 100,
|
|
22340
|
+
width: Math.round(textareaRect.width * 100) / 100,
|
|
22341
|
+
height: Math.round(textareaRect.height * 100) / 100
|
|
22342
|
+
});
|
|
22343
|
+
console.log('📦 Host Div Rect:', {
|
|
22344
|
+
left: Math.round(hostRect.left * 100) / 100,
|
|
22345
|
+
top: Math.round(hostRect.top * 100) / 100,
|
|
22346
|
+
width: Math.round(hostRect.width * 100) / 100,
|
|
22347
|
+
height: Math.round(hostRect.height * 100) / 100
|
|
22348
|
+
});
|
|
22349
|
+
console.log('📦 Canvas Object Bounds (screen):', {
|
|
22350
|
+
left: Math.round(screenObjectBounds.left * 100) / 100,
|
|
22351
|
+
top: Math.round(screenObjectBounds.top * 100) / 100,
|
|
22352
|
+
width: Math.round(screenObjectBounds.width * 100) / 100,
|
|
22353
|
+
height: Math.round(screenObjectBounds.height * 100) / 100
|
|
22354
|
+
});
|
|
22355
|
+
console.log('📦 Canvas Object Bounds (canvas):', canvasBounds);
|
|
22356
|
+
|
|
22357
|
+
// Calculate differences
|
|
22358
|
+
const hostVsObject = {
|
|
22359
|
+
leftDiff: Math.round((hostRect.left - screenObjectBounds.left) * 100) / 100,
|
|
22360
|
+
topDiff: Math.round((hostRect.top - screenObjectBounds.top) * 100) / 100,
|
|
22361
|
+
widthDiff: Math.round((hostRect.width - screenObjectBounds.width) * 100) / 100,
|
|
22362
|
+
heightDiff: Math.round((hostRect.height - screenObjectBounds.height) * 100) / 100
|
|
22363
|
+
};
|
|
22364
|
+
const textareaVsObject = {
|
|
22365
|
+
leftDiff: Math.round((textareaRect.left - screenObjectBounds.left) * 100) / 100,
|
|
22366
|
+
topDiff: Math.round((textareaRect.top - screenObjectBounds.top) * 100) / 100,
|
|
22367
|
+
widthDiff: Math.round((textareaRect.width - screenObjectBounds.width) * 100) / 100,
|
|
22368
|
+
heightDiff: Math.round((textareaRect.height - screenObjectBounds.height) * 100) / 100
|
|
22369
|
+
};
|
|
22370
|
+
console.log('📏 Host Div vs Canvas Object Diff:', hostVsObject);
|
|
22371
|
+
console.log('📏 Textarea vs Canvas Object Diff:', textareaVsObject);
|
|
22372
|
+
|
|
22373
|
+
// Check if they're aligned (within 2px tolerance)
|
|
22374
|
+
const tolerance = 2;
|
|
22375
|
+
const hostAligned = Math.abs(hostVsObject.leftDiff) < tolerance && Math.abs(hostVsObject.topDiff) < tolerance && Math.abs(hostVsObject.widthDiff) < tolerance && Math.abs(hostVsObject.heightDiff) < tolerance;
|
|
22376
|
+
const textareaAligned = Math.abs(textareaVsObject.leftDiff) < tolerance && Math.abs(textareaVsObject.topDiff) < tolerance && Math.abs(textareaVsObject.widthDiff) < tolerance && Math.abs(textareaVsObject.heightDiff) < tolerance;
|
|
22377
|
+
console.log(hostAligned ? '✅ Host Div ALIGNED with canvas object' : '❌ Host Div MISALIGNED with canvas object');
|
|
22378
|
+
console.log(textareaAligned ? '✅ Textarea ALIGNED with canvas object' : '❌ Textarea MISALIGNED with canvas object');
|
|
22379
|
+
console.log('🔍 Zoom:', zoom, 'Viewport Transform:', vpt);
|
|
22380
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
22381
|
+
}
|
|
22382
|
+
|
|
22383
|
+
/**
|
|
22384
|
+
* Debug method to compare text wrapping between textarea and Fabric text object
|
|
22385
|
+
*/
|
|
22386
|
+
debugTextWrapping() {
|
|
22387
|
+
const target = this.target;
|
|
22388
|
+
const text = this.textarea.value;
|
|
22389
|
+
console.log('📝 TEXT WRAPPING COMPARISON:');
|
|
22390
|
+
console.log('📄 Text Content:', `"${text}"`);
|
|
22391
|
+
console.log('📄 Text Length:', text.length);
|
|
22392
|
+
|
|
22393
|
+
// Analyze line breaks
|
|
22394
|
+
const explicitLines = text.split('\n');
|
|
22395
|
+
console.log('📄 Explicit Lines (\\n):', explicitLines.length);
|
|
22396
|
+
explicitLines.forEach((line, i) => {
|
|
22397
|
+
console.log(` Line ${i + 1}: "${line}" (${line.length} chars)`);
|
|
22398
|
+
});
|
|
22399
|
+
|
|
22400
|
+
// Get textarea computed styles for wrapping analysis
|
|
22401
|
+
const textareaStyles = window.getComputedStyle(this.textarea);
|
|
22402
|
+
console.log('📐 Textarea Wrapping Styles:');
|
|
22403
|
+
console.log(' width:', textareaStyles.width);
|
|
22404
|
+
console.log(' fontSize:', textareaStyles.fontSize);
|
|
22405
|
+
console.log(' fontFamily:', textareaStyles.fontFamily);
|
|
22406
|
+
console.log(' fontWeight:', textareaStyles.fontWeight);
|
|
22407
|
+
console.log(' letterSpacing:', textareaStyles.letterSpacing);
|
|
22408
|
+
console.log(' lineHeight:', textareaStyles.lineHeight);
|
|
22409
|
+
console.log(' whiteSpace:', textareaStyles.whiteSpace);
|
|
22410
|
+
console.log(' wordWrap:', textareaStyles.wordWrap);
|
|
22411
|
+
console.log(' overflowWrap:', textareaStyles.overflowWrap);
|
|
22412
|
+
console.log(' direction:', textareaStyles.direction);
|
|
22413
|
+
console.log(' textAlign:', textareaStyles.textAlign);
|
|
22414
|
+
|
|
22415
|
+
// Get Fabric text object properties for comparison
|
|
22416
|
+
console.log('📐 Fabric Text Object Properties:');
|
|
22417
|
+
console.log(' width:', target.width);
|
|
22418
|
+
console.log(' fontSize:', target.fontSize);
|
|
22419
|
+
console.log(' fontFamily:', target.fontFamily);
|
|
22420
|
+
console.log(' fontWeight:', target.fontWeight);
|
|
22421
|
+
console.log(' charSpacing:', target.charSpacing);
|
|
22422
|
+
console.log(' lineHeight:', target.lineHeight);
|
|
22423
|
+
console.log(' direction:', target.direction);
|
|
22424
|
+
console.log(' textAlign:', target.textAlign);
|
|
22425
|
+
console.log(' scaleX:', target.scaleX);
|
|
22426
|
+
console.log(' scaleY:', target.scaleY);
|
|
22427
|
+
|
|
22428
|
+
// Calculate effective dimensions for comparison - use actual rendered width
|
|
22429
|
+
// **THE FIX:** Use getBoundingRect to get the *actual rendered width* of the Fabric object.
|
|
22430
|
+
const fabricEffectiveWidth = this.target.getBoundingRect().width;
|
|
22431
|
+
// Use the exact width set on textarea for comparison
|
|
22432
|
+
const textareaComputedWidth = parseFloat(window.getComputedStyle(this.textarea).width);
|
|
22433
|
+
const textareaEffectiveWidth = textareaComputedWidth / this.canvas.getZoom();
|
|
22434
|
+
const widthDiff = Math.abs(textareaEffectiveWidth - fabricEffectiveWidth);
|
|
22435
|
+
console.log('📏 Effective Width Comparison:');
|
|
22436
|
+
console.log(' Textarea Effective Width:', textareaEffectiveWidth);
|
|
22437
|
+
console.log(' Fabric Effective Width:', fabricEffectiveWidth);
|
|
22438
|
+
console.log(' Width Difference:', widthDiff.toFixed(2) + 'px');
|
|
22439
|
+
console.log(widthDiff < 1 ? '✅ Widths MATCH for wrapping' : '❌ Width MISMATCH may cause different wrapping');
|
|
22440
|
+
|
|
22441
|
+
// Check text direction and bidi handling
|
|
22442
|
+
const hasRTLText = /[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\uFB50-\uFDFF\uFE70-\uFEFF]/.test(text);
|
|
22443
|
+
const hasBidiText = /[\u0590-\u06FF]/.test(text) && /[a-zA-Z]/.test(text);
|
|
22444
|
+
console.log('🌍 Text Direction Analysis:');
|
|
22445
|
+
console.log(' Has RTL characters:', hasRTLText);
|
|
22446
|
+
console.log(' Has mixed Bidi text:', hasBidiText);
|
|
22447
|
+
console.log(' Textarea direction:', textareaStyles.direction);
|
|
22448
|
+
console.log(' Fabric direction:', target.direction || 'auto');
|
|
22449
|
+
console.log(' Textarea unicodeBidi:', textareaStyles.unicodeBidi);
|
|
22450
|
+
|
|
22451
|
+
// Measure actual rendered line count
|
|
22452
|
+
const textareaScrollHeight = this.textarea.scrollHeight;
|
|
22453
|
+
const textareaLineHeight = parseFloat(textareaStyles.lineHeight) || parseFloat(textareaStyles.fontSize) * 1.2;
|
|
22454
|
+
const estimatedTextareaLines = Math.round(textareaScrollHeight / textareaLineHeight);
|
|
22455
|
+
console.log('📊 Line Count Analysis:');
|
|
22456
|
+
console.log(' Textarea scrollHeight:', textareaScrollHeight);
|
|
22457
|
+
console.log(' Textarea lineHeight:', textareaLineHeight);
|
|
22458
|
+
console.log(' Estimated rendered lines:', estimatedTextareaLines);
|
|
22459
|
+
console.log(' Explicit line breaks:', explicitLines.length);
|
|
22460
|
+
if (estimatedTextareaLines > explicitLines.length) {
|
|
22461
|
+
console.log('🔄 Text wrapping detected in textarea');
|
|
22462
|
+
console.log(' Wrapped lines:', estimatedTextareaLines - explicitLines.length);
|
|
22463
|
+
} else {
|
|
22464
|
+
console.log('📏 No text wrapping in textarea');
|
|
22465
|
+
}
|
|
22466
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
22467
|
+
}
|
|
22468
|
+
|
|
22469
|
+
/**
|
|
22470
|
+
* Focus the textarea and position cursor at end
|
|
22137
22471
|
*/
|
|
22138
22472
|
focusTextarea() {
|
|
22139
22473
|
// For overlay editing, we want to keep the object in "selection mode" not "editing mode"
|
|
@@ -22168,8 +22502,8 @@ class OverlayEditor {
|
|
|
22168
22502
|
this.canvas.requestRenderAll();
|
|
22169
22503
|
}
|
|
22170
22504
|
|
|
22171
|
-
/**
|
|
22172
|
-
* Refresh overlay positioning and styling
|
|
22505
|
+
/**
|
|
22506
|
+
* Refresh overlay positioning and styling
|
|
22173
22507
|
*/
|
|
22174
22508
|
refresh() {
|
|
22175
22509
|
if (this.isDestroyed) return;
|
|
@@ -22177,8 +22511,8 @@ class OverlayEditor {
|
|
|
22177
22511
|
// Don't update object bounds on every refresh - only when textarea actually resizes
|
|
22178
22512
|
}
|
|
22179
22513
|
|
|
22180
|
-
/**
|
|
22181
|
-
* Destroy the overlay editor
|
|
22514
|
+
/**
|
|
22515
|
+
* Destroy the overlay editor
|
|
22182
22516
|
*/
|
|
22183
22517
|
destroy() {
|
|
22184
22518
|
let commit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
@@ -22205,6 +22539,23 @@ class OverlayEditor {
|
|
|
22205
22539
|
// Handle commit/cancel after restoring visibility
|
|
22206
22540
|
if (commit && !this.isComposing) {
|
|
22207
22541
|
const finalText = this.textarea.value;
|
|
22542
|
+
|
|
22543
|
+
// Auto-detect text direction and update fabric object if needed
|
|
22544
|
+
const detectedDirection = this.firstStrongDir(finalText);
|
|
22545
|
+
const currentDirection = this.target.direction || 'ltr';
|
|
22546
|
+
if (detectedDirection && detectedDirection !== currentDirection) {
|
|
22547
|
+
console.log(`🔄 Overlay Exit: Auto-detected direction change from "${currentDirection}" to "${detectedDirection}"`);
|
|
22548
|
+
console.log(` Text content: "${finalText.substring(0, 50)}..."`);
|
|
22549
|
+
|
|
22550
|
+
// Update the fabric object's direction
|
|
22551
|
+
this.target.set('direction', detectedDirection);
|
|
22552
|
+
|
|
22553
|
+
// Force a re-render to apply the direction change
|
|
22554
|
+
this.canvas.requestRenderAll();
|
|
22555
|
+
console.log(`✅ Fabric object direction updated to: ${detectedDirection}`);
|
|
22556
|
+
} else {
|
|
22557
|
+
console.log(`📝 Overlay Exit: Direction unchanged (${currentDirection}), text: "${finalText.substring(0, 30)}..."`);
|
|
22558
|
+
}
|
|
22208
22559
|
if (this.onCommit) {
|
|
22209
22560
|
this.onCommit(finalText);
|
|
22210
22561
|
}
|
|
@@ -22244,25 +22595,40 @@ class OverlayEditor {
|
|
|
22244
22595
|
}
|
|
22245
22596
|
}
|
|
22246
22597
|
autoResizeTextarea() {
|
|
22247
|
-
//
|
|
22248
|
-
const
|
|
22249
|
-
|
|
22250
|
-
|
|
22251
|
-
|
|
22598
|
+
// Store the scroll position and the container's old height for comparison.
|
|
22599
|
+
const scrollTop = this.textarea.scrollTop;
|
|
22600
|
+
const oldHeight = parseFloat(this.hostDiv.style.height || '0');
|
|
22601
|
+
|
|
22602
|
+
// 1. **Force a reliable reflow.**
|
|
22603
|
+
// First, reset the textarea's height to a minimal value. This is the crucial step
|
|
22604
|
+
// that forces the browser to recalculate the content's height from scratch,
|
|
22605
|
+
// ignoring the hostDiv's larger, stale height.
|
|
22606
|
+
this.textarea.style.height = '1px';
|
|
22607
|
+
|
|
22608
|
+
// 2. Read the now-accurate scrollHeight. This value reflects the minimum
|
|
22609
|
+
// height required for the content, whether it's single or multi-line.
|
|
22252
22610
|
const scrollHeight = this.textarea.scrollHeight;
|
|
22253
22611
|
|
|
22254
|
-
//
|
|
22255
|
-
const
|
|
22256
|
-
const newHeight =
|
|
22257
|
-
const heightChanged = Math.abs(newHeight - oldHeight) > 2; // Only if meaningful change
|
|
22612
|
+
// A small buffer for rendering consistency across browsers.
|
|
22613
|
+
const buffer = 2;
|
|
22614
|
+
const newHeight = scrollHeight + buffer;
|
|
22258
22615
|
|
|
22259
|
-
|
|
22260
|
-
|
|
22616
|
+
// Check if the height has changed significantly.
|
|
22617
|
+
const heightChanged = Math.abs(newHeight - oldHeight) > 1;
|
|
22261
22618
|
|
|
22262
|
-
// Only update object bounds if
|
|
22619
|
+
// 4. Only update heights and object bounds if there was a change.
|
|
22263
22620
|
if (heightChanged) {
|
|
22621
|
+
this.textarea.style.height = `${newHeight}px`;
|
|
22622
|
+
this.hostDiv.style.height = `${newHeight}px`;
|
|
22264
22623
|
this.updateObjectBounds();
|
|
22624
|
+
} else {
|
|
22625
|
+
// If no significant change, ensure the textarea's height matches the container
|
|
22626
|
+
// to prevent any minor visual misalignment.
|
|
22627
|
+
this.textarea.style.height = this.hostDiv.style.height;
|
|
22265
22628
|
}
|
|
22629
|
+
|
|
22630
|
+
// 5. Restore the original scroll position.
|
|
22631
|
+
this.textarea.scrollTop = scrollTop;
|
|
22266
22632
|
}
|
|
22267
22633
|
handleKeyDown(e) {
|
|
22268
22634
|
if (e.key === 'Escape') {
|
|
@@ -22271,6 +22637,19 @@ class OverlayEditor {
|
|
|
22271
22637
|
} else if ((e.ctrlKey || e.metaKey) && e.key === 'Enter') {
|
|
22272
22638
|
e.preventDefault();
|
|
22273
22639
|
this.destroy(true); // Commit
|
|
22640
|
+
} else if (e.key === 'Enter' || e.key === 'Backspace' || e.key === 'Delete') {
|
|
22641
|
+
// For keys that might change the height, schedule a resize check
|
|
22642
|
+
// Use both immediate and delayed checks to catch all scenarios
|
|
22643
|
+
requestAnimationFrame(() => {
|
|
22644
|
+
if (!this.isDestroyed) {
|
|
22645
|
+
this.autoResizeTextarea();
|
|
22646
|
+
}
|
|
22647
|
+
});
|
|
22648
|
+
setTimeout(() => {
|
|
22649
|
+
if (!this.isDestroyed) {
|
|
22650
|
+
this.autoResizeTextarea();
|
|
22651
|
+
}
|
|
22652
|
+
}, 10); // Small delay to ensure DOM is updated
|
|
22274
22653
|
}
|
|
22275
22654
|
}
|
|
22276
22655
|
handleFocus() {
|
|
@@ -22301,8 +22680,8 @@ class OverlayEditor {
|
|
|
22301
22680
|
}
|
|
22302
22681
|
}
|
|
22303
22682
|
|
|
22304
|
-
/**
|
|
22305
|
-
* Setup detection for viewport changes (zoom/pan)
|
|
22683
|
+
/**
|
|
22684
|
+
* Setup detection for viewport changes (zoom/pan)
|
|
22306
22685
|
*/
|
|
22307
22686
|
setupViewportChangeDetection() {
|
|
22308
22687
|
// Store original methods
|
|
@@ -22331,8 +22710,8 @@ class OverlayEditor {
|
|
|
22331
22710
|
};
|
|
22332
22711
|
}
|
|
22333
22712
|
|
|
22334
|
-
/**
|
|
22335
|
-
* Restore original viewport methods
|
|
22713
|
+
/**
|
|
22714
|
+
* Restore original viewport methods
|
|
22336
22715
|
*/
|
|
22337
22716
|
restoreViewportChangeDetection() {
|
|
22338
22717
|
if (this.canvas.__originalSetZoom) {
|
|
@@ -22347,8 +22726,8 @@ class OverlayEditor {
|
|
|
22347
22726
|
}
|
|
22348
22727
|
}
|
|
22349
22728
|
|
|
22350
|
-
/**
|
|
22351
|
-
* Enter overlay text editing mode for a text object
|
|
22729
|
+
/**
|
|
22730
|
+
* Enter overlay text editing mode for a text object
|
|
22352
22731
|
*/
|
|
22353
22732
|
function enterTextOverlayEdit(canvas, target, options) {
|
|
22354
22733
|
// If already in overlay editing, destroy existing editor first
|
|
@@ -22372,35 +22751,35 @@ function enterTextOverlayEdit(canvas, target, options) {
|
|
|
22372
22751
|
return editor;
|
|
22373
22752
|
}
|
|
22374
22753
|
|
|
22375
|
-
/**
|
|
22376
|
-
* extend this regex to support non english languages
|
|
22377
|
-
*
|
|
22378
|
-
* - ` ` Matches a SPACE character (char code 32).
|
|
22379
|
-
* - `\n` Matches a LINE FEED character (char code 10).
|
|
22380
|
-
* - `.` Matches a "." character (char code 46).
|
|
22381
|
-
* - `,` Matches a "," character (char code 44).
|
|
22382
|
-
* - `;` Matches a ";" character (char code 59).
|
|
22383
|
-
* - `!` Matches a "!" character (char code 33).
|
|
22384
|
-
* - `\?` Matches a "?" character (char code 63).
|
|
22385
|
-
* - `\-` Matches a "-" character (char code 45).
|
|
22754
|
+
/**
|
|
22755
|
+
* extend this regex to support non english languages
|
|
22756
|
+
*
|
|
22757
|
+
* - ` ` Matches a SPACE character (char code 32).
|
|
22758
|
+
* - `\n` Matches a LINE FEED character (char code 10).
|
|
22759
|
+
* - `.` Matches a "." character (char code 46).
|
|
22760
|
+
* - `,` Matches a "," character (char code 44).
|
|
22761
|
+
* - `;` Matches a ";" character (char code 59).
|
|
22762
|
+
* - `!` Matches a "!" character (char code 33).
|
|
22763
|
+
* - `\?` Matches a "?" character (char code 63).
|
|
22764
|
+
* - `\-` Matches a "-" character (char code 45).
|
|
22386
22765
|
*/
|
|
22387
22766
|
// eslint-disable-next-line no-useless-escape
|
|
22388
22767
|
const reNonWord = /[ \n\.,;!\?\-]/;
|
|
22389
22768
|
class ITextBehavior extends FabricText {
|
|
22390
22769
|
constructor() {
|
|
22391
22770
|
super(...arguments);
|
|
22392
|
-
/**
|
|
22393
|
-
* Helps determining when the text is in composition, so that the cursor
|
|
22394
|
-
* rendering is altered.
|
|
22771
|
+
/**
|
|
22772
|
+
* Helps determining when the text is in composition, so that the cursor
|
|
22773
|
+
* rendering is altered.
|
|
22395
22774
|
*/
|
|
22396
22775
|
_defineProperty(this, "_currentCursorOpacity", 1);
|
|
22397
22776
|
}
|
|
22398
|
-
/**
|
|
22399
|
-
* Keeps track if the IText object was selected before the actual click.
|
|
22400
|
-
* This because we want to delay enter editing by a click.
|
|
22777
|
+
/**
|
|
22778
|
+
* Keeps track if the IText object was selected before the actual click.
|
|
22779
|
+
* This because we want to delay enter editing by a click.
|
|
22401
22780
|
*/
|
|
22402
|
-
/**
|
|
22403
|
-
* Initializes all the interactive behavior of IText
|
|
22781
|
+
/**
|
|
22782
|
+
* Initializes all the interactive behavior of IText
|
|
22404
22783
|
*/
|
|
22405
22784
|
initBehavior() {
|
|
22406
22785
|
this._tick = this._tick.bind(this);
|
|
@@ -22413,8 +22792,8 @@ class ITextBehavior extends FabricText {
|
|
|
22413
22792
|
return super.onDeselect(options);
|
|
22414
22793
|
}
|
|
22415
22794
|
|
|
22416
|
-
/**
|
|
22417
|
-
* @private
|
|
22795
|
+
/**
|
|
22796
|
+
* @private
|
|
22418
22797
|
*/
|
|
22419
22798
|
_animateCursor(_ref) {
|
|
22420
22799
|
let {
|
|
@@ -22439,8 +22818,8 @@ class ITextBehavior extends FabricText {
|
|
|
22439
22818
|
});
|
|
22440
22819
|
}
|
|
22441
22820
|
|
|
22442
|
-
/**
|
|
22443
|
-
* changes the cursor from visible to invisible
|
|
22821
|
+
/**
|
|
22822
|
+
* changes the cursor from visible to invisible
|
|
22444
22823
|
*/
|
|
22445
22824
|
_tick(delay) {
|
|
22446
22825
|
this._currentTickState = this._animateCursor({
|
|
@@ -22451,8 +22830,8 @@ class ITextBehavior extends FabricText {
|
|
|
22451
22830
|
});
|
|
22452
22831
|
}
|
|
22453
22832
|
|
|
22454
|
-
/**
|
|
22455
|
-
* Changes the cursor from invisible to visible
|
|
22833
|
+
/**
|
|
22834
|
+
* Changes the cursor from invisible to visible
|
|
22456
22835
|
*/
|
|
22457
22836
|
_onTickComplete() {
|
|
22458
22837
|
var _this$_currentTickCom;
|
|
@@ -22464,16 +22843,16 @@ class ITextBehavior extends FabricText {
|
|
|
22464
22843
|
});
|
|
22465
22844
|
}
|
|
22466
22845
|
|
|
22467
|
-
/**
|
|
22468
|
-
* Initializes delayed cursor
|
|
22846
|
+
/**
|
|
22847
|
+
* Initializes delayed cursor
|
|
22469
22848
|
*/
|
|
22470
22849
|
initDelayedCursor(restart) {
|
|
22471
22850
|
this.abortCursorAnimation();
|
|
22472
22851
|
this._tick(restart ? 0 : this.cursorDelay);
|
|
22473
22852
|
}
|
|
22474
22853
|
|
|
22475
|
-
/**
|
|
22476
|
-
* Aborts cursor animation, clears all timeouts and clear textarea context if necessary
|
|
22854
|
+
/**
|
|
22855
|
+
* Aborts cursor animation, clears all timeouts and clear textarea context if necessary
|
|
22477
22856
|
*/
|
|
22478
22857
|
abortCursorAnimation() {
|
|
22479
22858
|
let shouldClear = false;
|
|
@@ -22491,9 +22870,9 @@ class ITextBehavior extends FabricText {
|
|
|
22491
22870
|
}
|
|
22492
22871
|
}
|
|
22493
22872
|
|
|
22494
|
-
/**
|
|
22495
|
-
* Restart tue cursor animation if either is in complete state ( between animations )
|
|
22496
|
-
* or if it never started before
|
|
22873
|
+
/**
|
|
22874
|
+
* Restart tue cursor animation if either is in complete state ( between animations )
|
|
22875
|
+
* or if it never started before
|
|
22497
22876
|
*/
|
|
22498
22877
|
restartCursorIfNeeded() {
|
|
22499
22878
|
if ([this._currentTickState, this._currentTickCompleteState].some(cursorAnimation => !cursorAnimation || cursorAnimation.isDone())) {
|
|
@@ -22501,8 +22880,8 @@ class ITextBehavior extends FabricText {
|
|
|
22501
22880
|
}
|
|
22502
22881
|
}
|
|
22503
22882
|
|
|
22504
|
-
/**
|
|
22505
|
-
* Selects entire text
|
|
22883
|
+
/**
|
|
22884
|
+
* Selects entire text
|
|
22506
22885
|
*/
|
|
22507
22886
|
selectAll() {
|
|
22508
22887
|
this.selectionStart = 0;
|
|
@@ -22512,26 +22891,26 @@ class ITextBehavior extends FabricText {
|
|
|
22512
22891
|
return this;
|
|
22513
22892
|
}
|
|
22514
22893
|
|
|
22515
|
-
/**
|
|
22516
|
-
* Selects entire text and updates the visual state
|
|
22894
|
+
/**
|
|
22895
|
+
* Selects entire text and updates the visual state
|
|
22517
22896
|
*/
|
|
22518
22897
|
cmdAll() {
|
|
22519
22898
|
this.selectAll();
|
|
22520
22899
|
this.renderCursorOrSelection();
|
|
22521
22900
|
}
|
|
22522
22901
|
|
|
22523
|
-
/**
|
|
22524
|
-
* Returns selected text
|
|
22525
|
-
* @return {String}
|
|
22902
|
+
/**
|
|
22903
|
+
* Returns selected text
|
|
22904
|
+
* @return {String}
|
|
22526
22905
|
*/
|
|
22527
22906
|
getSelectedText() {
|
|
22528
22907
|
return this._text.slice(this.selectionStart, this.selectionEnd).join('');
|
|
22529
22908
|
}
|
|
22530
22909
|
|
|
22531
|
-
/**
|
|
22532
|
-
* Find new selection index representing start of current word according to current selection index
|
|
22533
|
-
* @param {Number} startFrom Current selection index
|
|
22534
|
-
* @return {Number} New selection index
|
|
22910
|
+
/**
|
|
22911
|
+
* Find new selection index representing start of current word according to current selection index
|
|
22912
|
+
* @param {Number} startFrom Current selection index
|
|
22913
|
+
* @return {Number} New selection index
|
|
22535
22914
|
*/
|
|
22536
22915
|
findWordBoundaryLeft(startFrom) {
|
|
22537
22916
|
let offset = 0,
|
|
@@ -22551,10 +22930,10 @@ class ITextBehavior extends FabricText {
|
|
|
22551
22930
|
return startFrom - offset;
|
|
22552
22931
|
}
|
|
22553
22932
|
|
|
22554
|
-
/**
|
|
22555
|
-
* Find new selection index representing end of current word according to current selection index
|
|
22556
|
-
* @param {Number} startFrom Current selection index
|
|
22557
|
-
* @return {Number} New selection index
|
|
22933
|
+
/**
|
|
22934
|
+
* Find new selection index representing end of current word according to current selection index
|
|
22935
|
+
* @param {Number} startFrom Current selection index
|
|
22936
|
+
* @return {Number} New selection index
|
|
22558
22937
|
*/
|
|
22559
22938
|
findWordBoundaryRight(startFrom) {
|
|
22560
22939
|
let offset = 0,
|
|
@@ -22574,10 +22953,10 @@ class ITextBehavior extends FabricText {
|
|
|
22574
22953
|
return startFrom + offset;
|
|
22575
22954
|
}
|
|
22576
22955
|
|
|
22577
|
-
/**
|
|
22578
|
-
* Find new selection index representing start of current line according to current selection index
|
|
22579
|
-
* @param {Number} startFrom Current selection index
|
|
22580
|
-
* @return {Number} New selection index
|
|
22956
|
+
/**
|
|
22957
|
+
* Find new selection index representing start of current line according to current selection index
|
|
22958
|
+
* @param {Number} startFrom Current selection index
|
|
22959
|
+
* @return {Number} New selection index
|
|
22581
22960
|
*/
|
|
22582
22961
|
findLineBoundaryLeft(startFrom) {
|
|
22583
22962
|
let offset = 0,
|
|
@@ -22589,10 +22968,10 @@ class ITextBehavior extends FabricText {
|
|
|
22589
22968
|
return startFrom - offset;
|
|
22590
22969
|
}
|
|
22591
22970
|
|
|
22592
|
-
/**
|
|
22593
|
-
* Find new selection index representing end of current line according to current selection index
|
|
22594
|
-
* @param {Number} startFrom Current selection index
|
|
22595
|
-
* @return {Number} New selection index
|
|
22971
|
+
/**
|
|
22972
|
+
* Find new selection index representing end of current line according to current selection index
|
|
22973
|
+
* @param {Number} startFrom Current selection index
|
|
22974
|
+
* @return {Number} New selection index
|
|
22596
22975
|
*/
|
|
22597
22976
|
findLineBoundaryRight(startFrom) {
|
|
22598
22977
|
let offset = 0,
|
|
@@ -22604,11 +22983,11 @@ class ITextBehavior extends FabricText {
|
|
|
22604
22983
|
return startFrom + offset;
|
|
22605
22984
|
}
|
|
22606
22985
|
|
|
22607
|
-
/**
|
|
22608
|
-
* Finds index corresponding to beginning or end of a word
|
|
22609
|
-
* @param {Number} selectionStart Index of a character
|
|
22610
|
-
* @param {Number} direction 1 or -1
|
|
22611
|
-
* @return {Number} Index of the beginning or end of a word
|
|
22986
|
+
/**
|
|
22987
|
+
* Finds index corresponding to beginning or end of a word
|
|
22988
|
+
* @param {Number} selectionStart Index of a character
|
|
22989
|
+
* @param {Number} direction 1 or -1
|
|
22990
|
+
* @return {Number} Index of the beginning or end of a word
|
|
22612
22991
|
*/
|
|
22613
22992
|
searchWordBoundary(selectionStart, direction) {
|
|
22614
22993
|
const text = this._text;
|
|
@@ -22626,9 +23005,9 @@ class ITextBehavior extends FabricText {
|
|
|
22626
23005
|
return index;
|
|
22627
23006
|
}
|
|
22628
23007
|
|
|
22629
|
-
/**
|
|
22630
|
-
* Selects the word that contains the char at index selectionStart
|
|
22631
|
-
* @param {Number} selectionStart Index of a character
|
|
23008
|
+
/**
|
|
23009
|
+
* Selects the word that contains the char at index selectionStart
|
|
23010
|
+
* @param {Number} selectionStart Index of a character
|
|
22632
23011
|
*/
|
|
22633
23012
|
selectWord(selectionStart) {
|
|
22634
23013
|
selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
|
|
@@ -22644,9 +23023,9 @@ class ITextBehavior extends FabricText {
|
|
|
22644
23023
|
this.renderCursorOrSelection();
|
|
22645
23024
|
}
|
|
22646
23025
|
|
|
22647
|
-
/**
|
|
22648
|
-
* Selects the line that contains selectionStart
|
|
22649
|
-
* @param {Number} selectionStart Index of a character
|
|
23026
|
+
/**
|
|
23027
|
+
* Selects the line that contains selectionStart
|
|
23028
|
+
* @param {Number} selectionStart Index of a character
|
|
22650
23029
|
*/
|
|
22651
23030
|
selectLine(selectionStart) {
|
|
22652
23031
|
selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
|
|
@@ -22658,8 +23037,8 @@ class ITextBehavior extends FabricText {
|
|
|
22658
23037
|
this._updateTextarea();
|
|
22659
23038
|
}
|
|
22660
23039
|
|
|
22661
|
-
/**
|
|
22662
|
-
* Enters editing state
|
|
23040
|
+
/**
|
|
23041
|
+
* Enters editing state
|
|
22663
23042
|
*/
|
|
22664
23043
|
enterEditing(e) {
|
|
22665
23044
|
if (this.isEditing || !this.editable) {
|
|
@@ -22679,8 +23058,8 @@ class ITextBehavior extends FabricText {
|
|
|
22679
23058
|
}
|
|
22680
23059
|
}
|
|
22681
23060
|
|
|
22682
|
-
/**
|
|
22683
|
-
* runs the actual logic that enter from editing state, see {@link enterEditing}
|
|
23061
|
+
/**
|
|
23062
|
+
* runs the actual logic that enter from editing state, see {@link enterEditing}
|
|
22684
23063
|
*/
|
|
22685
23064
|
enterEditingImpl() {
|
|
22686
23065
|
if (this.canvas) {
|
|
@@ -22704,8 +23083,8 @@ class ITextBehavior extends FabricText {
|
|
|
22704
23083
|
}
|
|
22705
23084
|
}
|
|
22706
23085
|
|
|
22707
|
-
/**
|
|
22708
|
-
* Enter overlay editing mode using DOM textarea overlay
|
|
23086
|
+
/**
|
|
23087
|
+
* Enter overlay editing mode using DOM textarea overlay
|
|
22709
23088
|
*/
|
|
22710
23089
|
enterOverlayEditing() {
|
|
22711
23090
|
this._saveEditingProps();
|
|
@@ -22726,8 +23105,8 @@ class ITextBehavior extends FabricText {
|
|
|
22726
23105
|
});
|
|
22727
23106
|
}
|
|
22728
23107
|
|
|
22729
|
-
/**
|
|
22730
|
-
* Commit overlay editing changes
|
|
23108
|
+
/**
|
|
23109
|
+
* Commit overlay editing changes
|
|
22731
23110
|
*/
|
|
22732
23111
|
commitOverlayEdit(text) {
|
|
22733
23112
|
const overlayEditor = this.__overlayEditor;
|
|
@@ -22751,8 +23130,8 @@ class ITextBehavior extends FabricText {
|
|
|
22751
23130
|
this.canvas && this.canvas.requestRenderAll();
|
|
22752
23131
|
}
|
|
22753
23132
|
|
|
22754
|
-
/**
|
|
22755
|
-
* Cancel overlay editing without changes
|
|
23133
|
+
/**
|
|
23134
|
+
* Cancel overlay editing without changes
|
|
22756
23135
|
*/
|
|
22757
23136
|
cancelOverlayEdit() {
|
|
22758
23137
|
// Restore original text
|
|
@@ -22760,8 +23139,8 @@ class ITextBehavior extends FabricText {
|
|
|
22760
23139
|
this.exitEditing();
|
|
22761
23140
|
}
|
|
22762
23141
|
|
|
22763
|
-
/**
|
|
22764
|
-
* called by {@link Canvas#textEditingManager}
|
|
23142
|
+
/**
|
|
23143
|
+
* called by {@link Canvas#textEditingManager}
|
|
22765
23144
|
*/
|
|
22766
23145
|
updateSelectionOnMouseMove(e) {
|
|
22767
23146
|
if (this.getActiveControl()) {
|
|
@@ -22789,8 +23168,8 @@ class ITextBehavior extends FabricText {
|
|
|
22789
23168
|
}
|
|
22790
23169
|
}
|
|
22791
23170
|
|
|
22792
|
-
/**
|
|
22793
|
-
* @private
|
|
23171
|
+
/**
|
|
23172
|
+
* @private
|
|
22794
23173
|
*/
|
|
22795
23174
|
_setEditingProps() {
|
|
22796
23175
|
this.hoverCursor = 'text';
|
|
@@ -22802,8 +23181,8 @@ class ITextBehavior extends FabricText {
|
|
|
22802
23181
|
this.lockMovementX = this.lockMovementY = true;
|
|
22803
23182
|
}
|
|
22804
23183
|
|
|
22805
|
-
/**
|
|
22806
|
-
* convert from textarea to grapheme indexes
|
|
23184
|
+
/**
|
|
23185
|
+
* convert from textarea to grapheme indexes
|
|
22807
23186
|
*/
|
|
22808
23187
|
fromStringToGraphemeSelection(start, end, text) {
|
|
22809
23188
|
const smallerTextStart = text.slice(0, start),
|
|
@@ -22822,8 +23201,8 @@ class ITextBehavior extends FabricText {
|
|
|
22822
23201
|
};
|
|
22823
23202
|
}
|
|
22824
23203
|
|
|
22825
|
-
/**
|
|
22826
|
-
* convert from fabric to textarea values
|
|
23204
|
+
/**
|
|
23205
|
+
* convert from fabric to textarea values
|
|
22827
23206
|
*/
|
|
22828
23207
|
fromGraphemeToStringSelection(start, end, graphemes) {
|
|
22829
23208
|
const smallerTextStart = graphemes.slice(0, start),
|
|
@@ -22842,8 +23221,8 @@ class ITextBehavior extends FabricText {
|
|
|
22842
23221
|
};
|
|
22843
23222
|
}
|
|
22844
23223
|
|
|
22845
|
-
/**
|
|
22846
|
-
* @private
|
|
23224
|
+
/**
|
|
23225
|
+
* @private
|
|
22847
23226
|
*/
|
|
22848
23227
|
_updateTextarea() {
|
|
22849
23228
|
this.cursorOffsetCache = {};
|
|
@@ -22858,8 +23237,8 @@ class ITextBehavior extends FabricText {
|
|
|
22858
23237
|
this.updateTextareaPosition();
|
|
22859
23238
|
}
|
|
22860
23239
|
|
|
22861
|
-
/**
|
|
22862
|
-
* @private
|
|
23240
|
+
/**
|
|
23241
|
+
* @private
|
|
22863
23242
|
*/
|
|
22864
23243
|
updateFromTextArea() {
|
|
22865
23244
|
if (!this.hiddenTextarea) {
|
|
@@ -22879,8 +23258,8 @@ class ITextBehavior extends FabricText {
|
|
|
22879
23258
|
this.updateTextareaPosition();
|
|
22880
23259
|
}
|
|
22881
23260
|
|
|
22882
|
-
/**
|
|
22883
|
-
* @private
|
|
23261
|
+
/**
|
|
23262
|
+
* @private
|
|
22884
23263
|
*/
|
|
22885
23264
|
updateTextareaPosition() {
|
|
22886
23265
|
if (this.selectionStart === this.selectionEnd) {
|
|
@@ -22890,9 +23269,9 @@ class ITextBehavior extends FabricText {
|
|
|
22890
23269
|
}
|
|
22891
23270
|
}
|
|
22892
23271
|
|
|
22893
|
-
/**
|
|
22894
|
-
* @private
|
|
22895
|
-
* @return {Object} style contains style for hiddenTextarea
|
|
23272
|
+
/**
|
|
23273
|
+
* @private
|
|
23274
|
+
* @return {Object} style contains style for hiddenTextarea
|
|
22896
23275
|
*/
|
|
22897
23276
|
_calcTextareaPosition() {
|
|
22898
23277
|
if (!this.canvas) {
|
|
@@ -22939,8 +23318,8 @@ class ITextBehavior extends FabricText {
|
|
|
22939
23318
|
};
|
|
22940
23319
|
}
|
|
22941
23320
|
|
|
22942
|
-
/**
|
|
22943
|
-
* @private
|
|
23321
|
+
/**
|
|
23322
|
+
* @private
|
|
22944
23323
|
*/
|
|
22945
23324
|
_saveEditingProps() {
|
|
22946
23325
|
this._savedProps = {
|
|
@@ -22957,8 +23336,8 @@ class ITextBehavior extends FabricText {
|
|
|
22957
23336
|
};
|
|
22958
23337
|
}
|
|
22959
23338
|
|
|
22960
|
-
/**
|
|
22961
|
-
* @private
|
|
23339
|
+
/**
|
|
23340
|
+
* @private
|
|
22962
23341
|
*/
|
|
22963
23342
|
_restoreEditingProps() {
|
|
22964
23343
|
if (!this._savedProps) {
|
|
@@ -22978,9 +23357,9 @@ class ITextBehavior extends FabricText {
|
|
|
22978
23357
|
delete this._savedProps;
|
|
22979
23358
|
}
|
|
22980
23359
|
|
|
22981
|
-
/**
|
|
22982
|
-
* runs the actual logic that exits from editing state, see {@link exitEditing}
|
|
22983
|
-
* But it does not fire events
|
|
23360
|
+
/**
|
|
23361
|
+
* runs the actual logic that exits from editing state, see {@link exitEditing}
|
|
23362
|
+
* But it does not fire events
|
|
22984
23363
|
*/
|
|
22985
23364
|
exitEditingImpl() {
|
|
22986
23365
|
const hiddenTextarea = this.hiddenTextarea;
|
|
@@ -23001,8 +23380,8 @@ class ITextBehavior extends FabricText {
|
|
|
23001
23380
|
}
|
|
23002
23381
|
}
|
|
23003
23382
|
|
|
23004
|
-
/**
|
|
23005
|
-
* Exits from editing state and fires relevant events
|
|
23383
|
+
/**
|
|
23384
|
+
* Exits from editing state and fires relevant events
|
|
23006
23385
|
*/
|
|
23007
23386
|
exitEditing() {
|
|
23008
23387
|
const isTextChanged = this._textBeforeEdit !== this.text;
|
|
@@ -23021,8 +23400,8 @@ class ITextBehavior extends FabricText {
|
|
|
23021
23400
|
return this;
|
|
23022
23401
|
}
|
|
23023
23402
|
|
|
23024
|
-
/**
|
|
23025
|
-
* @private
|
|
23403
|
+
/**
|
|
23404
|
+
* @private
|
|
23026
23405
|
*/
|
|
23027
23406
|
_removeExtraneousStyles() {
|
|
23028
23407
|
for (const prop in this.styles) {
|
|
@@ -23032,10 +23411,10 @@ class ITextBehavior extends FabricText {
|
|
|
23032
23411
|
}
|
|
23033
23412
|
}
|
|
23034
23413
|
|
|
23035
|
-
/**
|
|
23036
|
-
* remove and reflow a style block from start to end.
|
|
23037
|
-
* @param {Number} start linear start position for removal (included in removal)
|
|
23038
|
-
* @param {Number} end linear end position for removal ( excluded from removal )
|
|
23414
|
+
/**
|
|
23415
|
+
* remove and reflow a style block from start to end.
|
|
23416
|
+
* @param {Number} start linear start position for removal (included in removal)
|
|
23417
|
+
* @param {Number} end linear end position for removal ( excluded from removal )
|
|
23039
23418
|
*/
|
|
23040
23419
|
removeStyleFromTo(start, end) {
|
|
23041
23420
|
const {
|
|
@@ -23088,10 +23467,10 @@ class ITextBehavior extends FabricText {
|
|
|
23088
23467
|
}
|
|
23089
23468
|
}
|
|
23090
23469
|
|
|
23091
|
-
/**
|
|
23092
|
-
* Shifts line styles up or down
|
|
23093
|
-
* @param {Number} lineIndex Index of a line
|
|
23094
|
-
* @param {Number} offset Can any number?
|
|
23470
|
+
/**
|
|
23471
|
+
* Shifts line styles up or down
|
|
23472
|
+
* @param {Number} lineIndex Index of a line
|
|
23473
|
+
* @param {Number} offset Can any number?
|
|
23095
23474
|
*/
|
|
23096
23475
|
shiftLineStyles(lineIndex, offset) {
|
|
23097
23476
|
const clonedStyles = Object.assign({}, this.styles);
|
|
@@ -23106,15 +23485,15 @@ class ITextBehavior extends FabricText {
|
|
|
23106
23485
|
}
|
|
23107
23486
|
}
|
|
23108
23487
|
|
|
23109
|
-
/**
|
|
23110
|
-
* Handle insertion of more consecutive style lines for when one or more
|
|
23111
|
-
* newlines gets added to the text. Since current style needs to be shifted
|
|
23112
|
-
* first we shift the current style of the number lines needed, then we add
|
|
23113
|
-
* new lines from the last to the first.
|
|
23114
|
-
* @param {Number} lineIndex Index of a line
|
|
23115
|
-
* @param {Number} charIndex Index of a char
|
|
23116
|
-
* @param {Number} qty number of lines to add
|
|
23117
|
-
* @param {Array} copiedStyle Array of objects styles
|
|
23488
|
+
/**
|
|
23489
|
+
* Handle insertion of more consecutive style lines for when one or more
|
|
23490
|
+
* newlines gets added to the text. Since current style needs to be shifted
|
|
23491
|
+
* first we shift the current style of the number lines needed, then we add
|
|
23492
|
+
* new lines from the last to the first.
|
|
23493
|
+
* @param {Number} lineIndex Index of a line
|
|
23494
|
+
* @param {Number} charIndex Index of a char
|
|
23495
|
+
* @param {Number} qty number of lines to add
|
|
23496
|
+
* @param {Array} copiedStyle Array of objects styles
|
|
23118
23497
|
*/
|
|
23119
23498
|
insertNewlineStyleObject(lineIndex, charIndex, qty, copiedStyle) {
|
|
23120
23499
|
const newLineStyles = {};
|
|
@@ -23174,12 +23553,12 @@ class ITextBehavior extends FabricText {
|
|
|
23174
23553
|
this._forceClearCache = true;
|
|
23175
23554
|
}
|
|
23176
23555
|
|
|
23177
|
-
/**
|
|
23178
|
-
* Inserts style object for a given line/char index
|
|
23179
|
-
* @param {Number} lineIndex Index of a line
|
|
23180
|
-
* @param {Number} charIndex Index of a char
|
|
23181
|
-
* @param {Number} quantity number Style object to insert, if given
|
|
23182
|
-
* @param {Array} copiedStyle array of style objects
|
|
23556
|
+
/**
|
|
23557
|
+
* Inserts style object for a given line/char index
|
|
23558
|
+
* @param {Number} lineIndex Index of a line
|
|
23559
|
+
* @param {Number} charIndex Index of a char
|
|
23560
|
+
* @param {Number} quantity number Style object to insert, if given
|
|
23561
|
+
* @param {Array} copiedStyle array of style objects
|
|
23183
23562
|
*/
|
|
23184
23563
|
insertCharStyleObject(lineIndex, charIndex, quantity, copiedStyle) {
|
|
23185
23564
|
if (!this.styles) {
|
|
@@ -23228,11 +23607,11 @@ class ITextBehavior extends FabricText {
|
|
|
23228
23607
|
}
|
|
23229
23608
|
}
|
|
23230
23609
|
|
|
23231
|
-
/**
|
|
23232
|
-
* Inserts style object(s)
|
|
23233
|
-
* @param {Array} insertedText Characters at the location where style is inserted
|
|
23234
|
-
* @param {Number} start cursor index for inserting style
|
|
23235
|
-
* @param {Array} [copiedStyle] array of style objects to insert.
|
|
23610
|
+
/**
|
|
23611
|
+
* Inserts style object(s)
|
|
23612
|
+
* @param {Array} insertedText Characters at the location where style is inserted
|
|
23613
|
+
* @param {Number} start cursor index for inserting style
|
|
23614
|
+
* @param {Array} [copiedStyle] array of style objects to insert.
|
|
23236
23615
|
*/
|
|
23237
23616
|
insertNewStyleBlock(insertedText, start, copiedStyle) {
|
|
23238
23617
|
const cursorLoc = this.get2DCursorLocation(start, true),
|
|
@@ -23273,12 +23652,12 @@ class ITextBehavior extends FabricText {
|
|
|
23273
23652
|
}
|
|
23274
23653
|
}
|
|
23275
23654
|
|
|
23276
|
-
/**
|
|
23277
|
-
* Removes characters from start/end
|
|
23278
|
-
* start/end ar per grapheme position in _text array.
|
|
23279
|
-
*
|
|
23280
|
-
* @param {Number} start
|
|
23281
|
-
* @param {Number} end default to start + 1
|
|
23655
|
+
/**
|
|
23656
|
+
* Removes characters from start/end
|
|
23657
|
+
* start/end ar per grapheme position in _text array.
|
|
23658
|
+
*
|
|
23659
|
+
* @param {Number} start
|
|
23660
|
+
* @param {Number} end default to start + 1
|
|
23282
23661
|
*/
|
|
23283
23662
|
removeChars(start) {
|
|
23284
23663
|
let end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : start + 1;
|
|
@@ -23291,17 +23670,17 @@ class ITextBehavior extends FabricText {
|
|
|
23291
23670
|
this._removeExtraneousStyles();
|
|
23292
23671
|
}
|
|
23293
23672
|
|
|
23294
|
-
/**
|
|
23295
|
-
* insert characters at start position, before start position.
|
|
23296
|
-
* start equal 1 it means the text get inserted between actual grapheme 0 and 1
|
|
23297
|
-
* if style array is provided, it must be as the same length of text in graphemes
|
|
23298
|
-
* if end is provided and is bigger than start, old text is replaced.
|
|
23299
|
-
* start/end ar per grapheme position in _text array.
|
|
23300
|
-
*
|
|
23301
|
-
* @param {String} text text to insert
|
|
23302
|
-
* @param {Array} style array of style objects
|
|
23303
|
-
* @param {Number} start
|
|
23304
|
-
* @param {Number} end default to start + 1
|
|
23673
|
+
/**
|
|
23674
|
+
* insert characters at start position, before start position.
|
|
23675
|
+
* start equal 1 it means the text get inserted between actual grapheme 0 and 1
|
|
23676
|
+
* if style array is provided, it must be as the same length of text in graphemes
|
|
23677
|
+
* if end is provided and is bigger than start, old text is replaced.
|
|
23678
|
+
* start/end ar per grapheme position in _text array.
|
|
23679
|
+
*
|
|
23680
|
+
* @param {String} text text to insert
|
|
23681
|
+
* @param {Array} style array of style objects
|
|
23682
|
+
* @param {Number} start
|
|
23683
|
+
* @param {Number} end default to start + 1
|
|
23305
23684
|
*/
|
|
23306
23685
|
insertChars(text, style, start) {
|
|
23307
23686
|
let end = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : start;
|
|
@@ -23318,9 +23697,9 @@ class ITextBehavior extends FabricText {
|
|
|
23318
23697
|
this._removeExtraneousStyles();
|
|
23319
23698
|
}
|
|
23320
23699
|
|
|
23321
|
-
/**
|
|
23322
|
-
* Set the selectionStart and selectionEnd according to the new position of cursor
|
|
23323
|
-
* mimic the key - mouse navigation when shift is pressed.
|
|
23700
|
+
/**
|
|
23701
|
+
* Set the selectionStart and selectionEnd according to the new position of cursor
|
|
23702
|
+
* mimic the key - mouse navigation when shift is pressed.
|
|
23324
23703
|
*/
|
|
23325
23704
|
setSelectionStartEndWithShift(start, end, newSelection) {
|
|
23326
23705
|
if (newSelection <= start) {
|
|
@@ -23943,8 +24322,8 @@ class ITextKeyBehavior extends ITextBehavior {
|
|
|
23943
24322
|
}
|
|
23944
24323
|
}
|
|
23945
24324
|
|
|
23946
|
-
/**
|
|
23947
|
-
* `LEFT_CLICK === 0`
|
|
24325
|
+
/**
|
|
24326
|
+
* `LEFT_CLICK === 0`
|
|
23948
24327
|
*/
|
|
23949
24328
|
const notALeftClick = e => !!e.button;
|
|
23950
24329
|
class ITextClickBehavior extends ITextKeyBehavior {
|
|
@@ -23962,36 +24341,36 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
23962
24341
|
super.initBehavior();
|
|
23963
24342
|
}
|
|
23964
24343
|
|
|
23965
|
-
/**
|
|
23966
|
-
* If this method returns true a mouse move operation over a text selection
|
|
23967
|
-
* will not prevent the native mouse event allowing the browser to start a drag operation.
|
|
23968
|
-
* shouldStartDragging can be read 'do not prevent default for mouse move event'
|
|
23969
|
-
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
23970
|
-
* @returns
|
|
24344
|
+
/**
|
|
24345
|
+
* If this method returns true a mouse move operation over a text selection
|
|
24346
|
+
* will not prevent the native mouse event allowing the browser to start a drag operation.
|
|
24347
|
+
* shouldStartDragging can be read 'do not prevent default for mouse move event'
|
|
24348
|
+
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24349
|
+
* @returns
|
|
23971
24350
|
*/
|
|
23972
24351
|
shouldStartDragging() {
|
|
23973
24352
|
return this.draggableTextDelegate.isActive();
|
|
23974
24353
|
}
|
|
23975
24354
|
|
|
23976
|
-
/**
|
|
23977
|
-
* @public override this method to control whether instance should/shouldn't become a drag source,
|
|
23978
|
-
* @see also {@link DraggableTextDelegate#isActive}
|
|
23979
|
-
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
23980
|
-
* @returns {boolean} should handle event
|
|
24355
|
+
/**
|
|
24356
|
+
* @public override this method to control whether instance should/shouldn't become a drag source,
|
|
24357
|
+
* @see also {@link DraggableTextDelegate#isActive}
|
|
24358
|
+
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24359
|
+
* @returns {boolean} should handle event
|
|
23981
24360
|
*/
|
|
23982
24361
|
onDragStart(e) {
|
|
23983
24362
|
return this.draggableTextDelegate.onDragStart(e);
|
|
23984
24363
|
}
|
|
23985
24364
|
|
|
23986
|
-
/**
|
|
23987
|
-
* @public override this method to control whether instance should/shouldn't become a drop target
|
|
24365
|
+
/**
|
|
24366
|
+
* @public override this method to control whether instance should/shouldn't become a drop target
|
|
23988
24367
|
*/
|
|
23989
24368
|
canDrop(e) {
|
|
23990
24369
|
return this.draggableTextDelegate.canDrop(e);
|
|
23991
24370
|
}
|
|
23992
24371
|
|
|
23993
|
-
/**
|
|
23994
|
-
* Default handler for double click, select a word or enter overlay editing
|
|
24372
|
+
/**
|
|
24373
|
+
* Default handler for double click, select a word or enter overlay editing
|
|
23995
24374
|
*/
|
|
23996
24375
|
doubleClickHandler(options) {
|
|
23997
24376
|
// Check if we should enter overlay editing mode
|
|
@@ -24008,8 +24387,8 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24008
24387
|
this.renderCursorOrSelection();
|
|
24009
24388
|
}
|
|
24010
24389
|
|
|
24011
|
-
/**
|
|
24012
|
-
* Default handler for triple click, select a line
|
|
24390
|
+
/**
|
|
24391
|
+
* Default handler for triple click, select a line
|
|
24013
24392
|
*/
|
|
24014
24393
|
tripleClickHandler(options) {
|
|
24015
24394
|
if (!this.isEditing) {
|
|
@@ -24019,13 +24398,13 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24019
24398
|
this.renderCursorOrSelection();
|
|
24020
24399
|
}
|
|
24021
24400
|
|
|
24022
|
-
/**
|
|
24023
|
-
* Default event handler for the basic functionalities needed on _mouseDown
|
|
24024
|
-
* can be overridden to do something different.
|
|
24025
|
-
* Scope of this implementation is: find the click position, set selectionStart
|
|
24026
|
-
* find selectionEnd, initialize the drawing of either cursor or selection area
|
|
24027
|
-
* initializing a mousedDown on a text area will cancel fabricjs knowledge of
|
|
24028
|
-
* current compositionMode. It will be set to false.
|
|
24401
|
+
/**
|
|
24402
|
+
* Default event handler for the basic functionalities needed on _mouseDown
|
|
24403
|
+
* can be overridden to do something different.
|
|
24404
|
+
* Scope of this implementation is: find the click position, set selectionStart
|
|
24405
|
+
* find selectionEnd, initialize the drawing of either cursor or selection area
|
|
24406
|
+
* initializing a mousedDown on a text area will cancel fabricjs knowledge of
|
|
24407
|
+
* current compositionMode. It will be set to false.
|
|
24029
24408
|
*/
|
|
24030
24409
|
_mouseDownHandler(_ref) {
|
|
24031
24410
|
let {
|
|
@@ -24053,9 +24432,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24053
24432
|
this.selected || (this.selected = alreadySelected || this.isEditing);
|
|
24054
24433
|
}
|
|
24055
24434
|
|
|
24056
|
-
/**
|
|
24057
|
-
* standard handler for mouse up, overridable
|
|
24058
|
-
* @private
|
|
24435
|
+
/**
|
|
24436
|
+
* standard handler for mouse up, overridable
|
|
24437
|
+
* @private
|
|
24059
24438
|
*/
|
|
24060
24439
|
mouseUpHandler(_ref2) {
|
|
24061
24440
|
let {
|
|
@@ -24086,9 +24465,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24086
24465
|
}
|
|
24087
24466
|
}
|
|
24088
24467
|
|
|
24089
|
-
/**
|
|
24090
|
-
* Changes cursor location in a text depending on passed pointer (x/y) object
|
|
24091
|
-
* @param {TPointerEvent} e Event object
|
|
24468
|
+
/**
|
|
24469
|
+
* Changes cursor location in a text depending on passed pointer (x/y) object
|
|
24470
|
+
* @param {TPointerEvent} e Event object
|
|
24092
24471
|
*/
|
|
24093
24472
|
setCursorByClick(e) {
|
|
24094
24473
|
const newSelection = this.getSelectionStartFromPointer(e),
|
|
@@ -24106,10 +24485,10 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24106
24485
|
}
|
|
24107
24486
|
}
|
|
24108
24487
|
|
|
24109
|
-
/**
|
|
24110
|
-
* Returns index of a character corresponding to where an object was clicked
|
|
24111
|
-
* @param {TPointerEvent} e Event object
|
|
24112
|
-
* @return {Number} Index of a character
|
|
24488
|
+
/**
|
|
24489
|
+
* Returns index of a character corresponding to where an object was clicked
|
|
24490
|
+
* @param {TPointerEvent} e Event object
|
|
24491
|
+
* @return {Number} Index of a character
|
|
24113
24492
|
*/
|
|
24114
24493
|
getSelectionStartFromPointer(e) {
|
|
24115
24494
|
const mouseOffset = this.canvas.getScenePoint(e).transform(invertTransform(this.calcTransformMatrix())).add(new Point(-this._getLeftOffset(), -this._getTopOffset()));
|
|
@@ -24155,15 +24534,15 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24155
24534
|
}
|
|
24156
24535
|
}
|
|
24157
24536
|
|
|
24158
|
-
/**
|
|
24159
|
-
* Hit Testing and Cursor Positioning System
|
|
24160
|
-
*
|
|
24161
|
-
* Maps pointer coordinates to text positions and provides cursor rectangles
|
|
24162
|
-
* for interactive text editing with grapheme-aware boundaries.
|
|
24537
|
+
/**
|
|
24538
|
+
* Hit Testing and Cursor Positioning System
|
|
24539
|
+
*
|
|
24540
|
+
* Maps pointer coordinates to text positions and provides cursor rectangles
|
|
24541
|
+
* for interactive text editing with grapheme-aware boundaries.
|
|
24163
24542
|
*/
|
|
24164
24543
|
|
|
24165
|
-
/**
|
|
24166
|
-
* Hit test a point against laid out text to find insertion position
|
|
24544
|
+
/**
|
|
24545
|
+
* Hit test a point against laid out text to find insertion position
|
|
24167
24546
|
*/
|
|
24168
24547
|
function hitTest(x, y, layout, options) {
|
|
24169
24548
|
if (layout.lines.length === 0) {
|
|
@@ -24207,8 +24586,8 @@ function hitTest(x, y, layout, options) {
|
|
|
24207
24586
|
};
|
|
24208
24587
|
}
|
|
24209
24588
|
|
|
24210
|
-
/**
|
|
24211
|
-
* Get cursor rectangle for a given insertion index
|
|
24589
|
+
/**
|
|
24590
|
+
* Get cursor rectangle for a given insertion index
|
|
24212
24591
|
*/
|
|
24213
24592
|
function getCursorRect(insertionIndex, layout, options) {
|
|
24214
24593
|
if (layout.lines.length === 0) {
|
|
@@ -24255,8 +24634,8 @@ function getCursorRect(insertionIndex, layout, options) {
|
|
|
24255
24634
|
|
|
24256
24635
|
// Private helper functions
|
|
24257
24636
|
|
|
24258
|
-
/**
|
|
24259
|
-
* Find which line contains the given Y coordinate
|
|
24637
|
+
/**
|
|
24638
|
+
* Find which line contains the given Y coordinate
|
|
24260
24639
|
*/
|
|
24261
24640
|
function findLineAtY(y, lines) {
|
|
24262
24641
|
var _lines;
|
|
@@ -24279,8 +24658,8 @@ function findLineAtY(y, lines) {
|
|
|
24279
24658
|
};
|
|
24280
24659
|
}
|
|
24281
24660
|
|
|
24282
|
-
/**
|
|
24283
|
-
* Find character position within a line at given X coordinate
|
|
24661
|
+
/**
|
|
24662
|
+
* Find character position within a line at given X coordinate
|
|
24284
24663
|
*/
|
|
24285
24664
|
function findCharAtX(x, line, options) {
|
|
24286
24665
|
if (line.bounds.length === 0) {
|
|
@@ -24386,8 +24765,8 @@ function findCharAtX(x, line, options) {
|
|
|
24386
24765
|
};
|
|
24387
24766
|
}
|
|
24388
24767
|
|
|
24389
|
-
/**
|
|
24390
|
-
* Calculate total insertion index from line and character indices
|
|
24768
|
+
/**
|
|
24769
|
+
* Calculate total insertion index from line and character indices
|
|
24391
24770
|
*/
|
|
24392
24771
|
function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
|
|
24393
24772
|
let insertionIndex = 0;
|
|
@@ -24406,8 +24785,8 @@ function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
|
|
|
24406
24785
|
return insertionIndex;
|
|
24407
24786
|
}
|
|
24408
24787
|
|
|
24409
|
-
/**
|
|
24410
|
-
* Find line and grapheme position from insertion index
|
|
24788
|
+
/**
|
|
24789
|
+
* Find line and grapheme position from insertion index
|
|
24411
24790
|
*/
|
|
24412
24791
|
function findPositionFromIndex(insertionIndex, layout) {
|
|
24413
24792
|
let currentIndex = 0;
|
|
@@ -24449,8 +24828,8 @@ function findPositionFromIndex(insertionIndex, layout) {
|
|
|
24449
24828
|
};
|
|
24450
24829
|
}
|
|
24451
24830
|
|
|
24452
|
-
/**
|
|
24453
|
-
* Calculate Y position of a line
|
|
24831
|
+
/**
|
|
24832
|
+
* Calculate Y position of a line
|
|
24454
24833
|
*/
|
|
24455
24834
|
function calculateLineY(lineIndex, layout, options) {
|
|
24456
24835
|
let y = 0;
|
|
@@ -24553,48 +24932,48 @@ const iTextDefaultValues = {
|
|
|
24553
24932
|
|
|
24554
24933
|
// @TODO this is not complete
|
|
24555
24934
|
|
|
24556
|
-
/**
|
|
24557
|
-
* @fires changed
|
|
24558
|
-
* @fires selection:changed
|
|
24559
|
-
* @fires editing:entered
|
|
24560
|
-
* @fires editing:exited
|
|
24561
|
-
* @fires dragstart
|
|
24562
|
-
* @fires drag drag event firing on the drag source
|
|
24563
|
-
* @fires dragend
|
|
24564
|
-
* @fires copy
|
|
24565
|
-
* @fires cut
|
|
24566
|
-
* @fires paste
|
|
24567
|
-
*
|
|
24568
|
-
* #### Supported key combinations
|
|
24569
|
-
* ```
|
|
24570
|
-
* Move cursor: left, right, up, down
|
|
24571
|
-
* Select character: shift + left, shift + right
|
|
24572
|
-
* Select text vertically: shift + up, shift + down
|
|
24573
|
-
* Move cursor by word: alt + left, alt + right
|
|
24574
|
-
* Select words: shift + alt + left, shift + alt + right
|
|
24575
|
-
* Move cursor to line start/end: cmd + left, cmd + right or home, end
|
|
24576
|
-
* Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
|
|
24577
|
-
* Jump to start/end of text: cmd + up, cmd + down
|
|
24578
|
-
* Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
|
|
24579
|
-
* Delete character: backspace
|
|
24580
|
-
* Delete word: alt + backspace
|
|
24581
|
-
* Delete line: cmd + backspace
|
|
24582
|
-
* Forward delete: delete
|
|
24583
|
-
* Copy text: ctrl/cmd + c
|
|
24584
|
-
* Paste text: ctrl/cmd + v
|
|
24585
|
-
* Cut text: ctrl/cmd + x
|
|
24586
|
-
* Select entire text: ctrl/cmd + a
|
|
24587
|
-
* Quit editing tab or esc
|
|
24588
|
-
* ```
|
|
24589
|
-
*
|
|
24590
|
-
* #### Supported mouse/touch combination
|
|
24591
|
-
* ```
|
|
24592
|
-
* Position cursor: click/touch
|
|
24593
|
-
* Create selection: click/touch & drag
|
|
24594
|
-
* Create selection: click & shift + click
|
|
24595
|
-
* Select word: double click
|
|
24596
|
-
* Select line: triple click
|
|
24597
|
-
* ```
|
|
24935
|
+
/**
|
|
24936
|
+
* @fires changed
|
|
24937
|
+
* @fires selection:changed
|
|
24938
|
+
* @fires editing:entered
|
|
24939
|
+
* @fires editing:exited
|
|
24940
|
+
* @fires dragstart
|
|
24941
|
+
* @fires drag drag event firing on the drag source
|
|
24942
|
+
* @fires dragend
|
|
24943
|
+
* @fires copy
|
|
24944
|
+
* @fires cut
|
|
24945
|
+
* @fires paste
|
|
24946
|
+
*
|
|
24947
|
+
* #### Supported key combinations
|
|
24948
|
+
* ```
|
|
24949
|
+
* Move cursor: left, right, up, down
|
|
24950
|
+
* Select character: shift + left, shift + right
|
|
24951
|
+
* Select text vertically: shift + up, shift + down
|
|
24952
|
+
* Move cursor by word: alt + left, alt + right
|
|
24953
|
+
* Select words: shift + alt + left, shift + alt + right
|
|
24954
|
+
* Move cursor to line start/end: cmd + left, cmd + right or home, end
|
|
24955
|
+
* Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
|
|
24956
|
+
* Jump to start/end of text: cmd + up, cmd + down
|
|
24957
|
+
* Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
|
|
24958
|
+
* Delete character: backspace
|
|
24959
|
+
* Delete word: alt + backspace
|
|
24960
|
+
* Delete line: cmd + backspace
|
|
24961
|
+
* Forward delete: delete
|
|
24962
|
+
* Copy text: ctrl/cmd + c
|
|
24963
|
+
* Paste text: ctrl/cmd + v
|
|
24964
|
+
* Cut text: ctrl/cmd + x
|
|
24965
|
+
* Select entire text: ctrl/cmd + a
|
|
24966
|
+
* Quit editing tab or esc
|
|
24967
|
+
* ```
|
|
24968
|
+
*
|
|
24969
|
+
* #### Supported mouse/touch combination
|
|
24970
|
+
* ```
|
|
24971
|
+
* Position cursor: click/touch
|
|
24972
|
+
* Create selection: click/touch & drag
|
|
24973
|
+
* Create selection: click & shift + click
|
|
24974
|
+
* Select word: double click
|
|
24975
|
+
* Select line: triple click
|
|
24976
|
+
* ```
|
|
24598
24977
|
*/
|
|
24599
24978
|
class IText extends ITextClickBehavior {
|
|
24600
24979
|
static getDefaults() {
|
|
@@ -24609,10 +24988,10 @@ class IText extends ITextClickBehavior {
|
|
|
24609
24988
|
return type === 'itext' ? 'i-text' : type;
|
|
24610
24989
|
}
|
|
24611
24990
|
|
|
24612
|
-
/**
|
|
24613
|
-
* Constructor
|
|
24614
|
-
* @param {String} text Text string
|
|
24615
|
-
* @param {Object} [options] Options object
|
|
24991
|
+
/**
|
|
24992
|
+
* Constructor
|
|
24993
|
+
* @param {String} text Text string
|
|
24994
|
+
* @param {Object} [options] Options object
|
|
24616
24995
|
*/
|
|
24617
24996
|
constructor(text, options) {
|
|
24618
24997
|
super(text, {
|
|
@@ -24622,11 +25001,11 @@ class IText extends ITextClickBehavior {
|
|
|
24622
25001
|
this.initBehavior();
|
|
24623
25002
|
}
|
|
24624
25003
|
|
|
24625
|
-
/**
|
|
24626
|
-
* While editing handle differently
|
|
24627
|
-
* @private
|
|
24628
|
-
* @param {string} key
|
|
24629
|
-
* @param {*} value
|
|
25004
|
+
/**
|
|
25005
|
+
* While editing handle differently
|
|
25006
|
+
* @private
|
|
25007
|
+
* @param {string} key
|
|
25008
|
+
* @param {*} value
|
|
24630
25009
|
*/
|
|
24631
25010
|
_set(key, value) {
|
|
24632
25011
|
if (this.isEditing && this._savedProps && key in this._savedProps) {
|
|
@@ -24641,28 +25020,28 @@ class IText extends ITextClickBehavior {
|
|
|
24641
25020
|
return super._set(key, value);
|
|
24642
25021
|
}
|
|
24643
25022
|
|
|
24644
|
-
/**
|
|
24645
|
-
* Sets selection start (left boundary of a selection)
|
|
24646
|
-
* @param {Number} index Index to set selection start to
|
|
25023
|
+
/**
|
|
25024
|
+
* Sets selection start (left boundary of a selection)
|
|
25025
|
+
* @param {Number} index Index to set selection start to
|
|
24647
25026
|
*/
|
|
24648
25027
|
setSelectionStart(index) {
|
|
24649
25028
|
index = Math.max(index, 0);
|
|
24650
25029
|
this._updateAndFire('selectionStart', index);
|
|
24651
25030
|
}
|
|
24652
25031
|
|
|
24653
|
-
/**
|
|
24654
|
-
* Sets selection end (right boundary of a selection)
|
|
24655
|
-
* @param {Number} index Index to set selection end to
|
|
25032
|
+
/**
|
|
25033
|
+
* Sets selection end (right boundary of a selection)
|
|
25034
|
+
* @param {Number} index Index to set selection end to
|
|
24656
25035
|
*/
|
|
24657
25036
|
setSelectionEnd(index) {
|
|
24658
25037
|
index = Math.min(index, this.text.length);
|
|
24659
25038
|
this._updateAndFire('selectionEnd', index);
|
|
24660
25039
|
}
|
|
24661
25040
|
|
|
24662
|
-
/**
|
|
24663
|
-
* @private
|
|
24664
|
-
* @param {String} property 'selectionStart' or 'selectionEnd'
|
|
24665
|
-
* @param {Number} index new position of property
|
|
25041
|
+
/**
|
|
25042
|
+
* @private
|
|
25043
|
+
* @param {String} property 'selectionStart' or 'selectionEnd'
|
|
25044
|
+
* @param {Number} index new position of property
|
|
24666
25045
|
*/
|
|
24667
25046
|
_updateAndFire(property, index) {
|
|
24668
25047
|
if (this[property] !== index) {
|
|
@@ -24672,9 +25051,9 @@ class IText extends ITextClickBehavior {
|
|
|
24672
25051
|
this._updateTextarea();
|
|
24673
25052
|
}
|
|
24674
25053
|
|
|
24675
|
-
/**
|
|
24676
|
-
* Fires the even of selection changed
|
|
24677
|
-
* @private
|
|
25054
|
+
/**
|
|
25055
|
+
* Fires the even of selection changed
|
|
25056
|
+
* @private
|
|
24678
25057
|
*/
|
|
24679
25058
|
_fireSelectionChanged() {
|
|
24680
25059
|
this.fire('selection:changed');
|
|
@@ -24683,25 +25062,25 @@ class IText extends ITextClickBehavior {
|
|
|
24683
25062
|
});
|
|
24684
25063
|
}
|
|
24685
25064
|
|
|
24686
|
-
/**
|
|
24687
|
-
* Initialize text dimensions. Render all text on given context
|
|
24688
|
-
* or on a offscreen canvas to get the text width with measureText.
|
|
24689
|
-
* Updates this.width and this.height with the proper values.
|
|
24690
|
-
* Does not return dimensions.
|
|
24691
|
-
* @private
|
|
25065
|
+
/**
|
|
25066
|
+
* Initialize text dimensions. Render all text on given context
|
|
25067
|
+
* or on a offscreen canvas to get the text width with measureText.
|
|
25068
|
+
* Updates this.width and this.height with the proper values.
|
|
25069
|
+
* Does not return dimensions.
|
|
25070
|
+
* @private
|
|
24692
25071
|
*/
|
|
24693
25072
|
initDimensions() {
|
|
24694
25073
|
this.isEditing && this.initDelayedCursor();
|
|
24695
25074
|
super.initDimensions();
|
|
24696
25075
|
}
|
|
24697
25076
|
|
|
24698
|
-
/**
|
|
24699
|
-
* Gets style of a current selection/cursor (at the start position)
|
|
24700
|
-
* if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
|
|
24701
|
-
* @param {Number} startIndex Start index to get styles at
|
|
24702
|
-
* @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
24703
|
-
* @param {Boolean} [complete] get full style or not
|
|
24704
|
-
* @return {Array} styles an array with one, zero or more Style objects
|
|
25077
|
+
/**
|
|
25078
|
+
* Gets style of a current selection/cursor (at the start position)
|
|
25079
|
+
* if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
|
|
25080
|
+
* @param {Number} startIndex Start index to get styles at
|
|
25081
|
+
* @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25082
|
+
* @param {Boolean} [complete] get full style or not
|
|
25083
|
+
* @return {Array} styles an array with one, zero or more Style objects
|
|
24705
25084
|
*/
|
|
24706
25085
|
getSelectionStyles() {
|
|
24707
25086
|
let startIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart || 0;
|
|
@@ -24710,11 +25089,11 @@ class IText extends ITextClickBehavior {
|
|
|
24710
25089
|
return super.getSelectionStyles(startIndex, endIndex, complete);
|
|
24711
25090
|
}
|
|
24712
25091
|
|
|
24713
|
-
/**
|
|
24714
|
-
* Sets style of a current selection, if no selection exist, do not set anything.
|
|
24715
|
-
* @param {Object} [styles] Styles object
|
|
24716
|
-
* @param {Number} [startIndex] Start index to get styles at
|
|
24717
|
-
* @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25092
|
+
/**
|
|
25093
|
+
* Sets style of a current selection, if no selection exist, do not set anything.
|
|
25094
|
+
* @param {Object} [styles] Styles object
|
|
25095
|
+
* @param {Number} [startIndex] Start index to get styles at
|
|
25096
|
+
* @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
24718
25097
|
*/
|
|
24719
25098
|
setSelectionStyles(styles) {
|
|
24720
25099
|
let startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selectionStart || 0;
|
|
@@ -24722,10 +25101,10 @@ class IText extends ITextClickBehavior {
|
|
|
24722
25101
|
return super.setSelectionStyles(styles, startIndex, endIndex);
|
|
24723
25102
|
}
|
|
24724
25103
|
|
|
24725
|
-
/**
|
|
24726
|
-
* Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
|
|
24727
|
-
* @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
|
|
24728
|
-
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
25104
|
+
/**
|
|
25105
|
+
* Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
|
|
25106
|
+
* @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
|
|
25107
|
+
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
24729
25108
|
*/
|
|
24730
25109
|
get2DCursorLocation() {
|
|
24731
25110
|
let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -24733,9 +25112,9 @@ class IText extends ITextClickBehavior {
|
|
|
24733
25112
|
return super.get2DCursorLocation(selectionStart, skipWrapping);
|
|
24734
25113
|
}
|
|
24735
25114
|
|
|
24736
|
-
/**
|
|
24737
|
-
* @private
|
|
24738
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
25115
|
+
/**
|
|
25116
|
+
* @private
|
|
25117
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
24739
25118
|
*/
|
|
24740
25119
|
render(ctx) {
|
|
24741
25120
|
super.render(ctx);
|
|
@@ -24745,9 +25124,9 @@ class IText extends ITextClickBehavior {
|
|
|
24745
25124
|
this.renderCursorOrSelection();
|
|
24746
25125
|
}
|
|
24747
25126
|
|
|
24748
|
-
/**
|
|
24749
|
-
* @override block cursor/selection logic while rendering the exported canvas
|
|
24750
|
-
* @todo this workaround should be replaced with a more robust solution
|
|
25127
|
+
/**
|
|
25128
|
+
* @override block cursor/selection logic while rendering the exported canvas
|
|
25129
|
+
* @todo this workaround should be replaced with a more robust solution
|
|
24751
25130
|
*/
|
|
24752
25131
|
toCanvasElement(options) {
|
|
24753
25132
|
const isEditing = this.isEditing;
|
|
@@ -24757,9 +25136,9 @@ class IText extends ITextClickBehavior {
|
|
|
24757
25136
|
return canvas;
|
|
24758
25137
|
}
|
|
24759
25138
|
|
|
24760
|
-
/**
|
|
24761
|
-
* Renders cursor or selection (depending on what exists)
|
|
24762
|
-
* it does on the contextTop. If contextTop is not available, do nothing.
|
|
25139
|
+
/**
|
|
25140
|
+
* Renders cursor or selection (depending on what exists)
|
|
25141
|
+
* it does on the contextTop. If contextTop is not available, do nothing.
|
|
24763
25142
|
*/
|
|
24764
25143
|
renderCursorOrSelection() {
|
|
24765
25144
|
if (!this.isEditing || !this.canvas) {
|
|
@@ -24815,12 +25194,12 @@ class IText extends ITextClickBehavior {
|
|
|
24815
25194
|
ctx.restore();
|
|
24816
25195
|
}
|
|
24817
25196
|
|
|
24818
|
-
/**
|
|
24819
|
-
* Finds and returns an array of clip paths that are applied to the parent
|
|
24820
|
-
* group(s) of the current FabricObject instance. The object's hierarchy is
|
|
24821
|
-
* traversed upwards (from the current object towards the root of the canvas),
|
|
24822
|
-
* checking each parent object for the presence of a `clipPath` that is not
|
|
24823
|
-
* absolutely positioned.
|
|
25197
|
+
/**
|
|
25198
|
+
* Finds and returns an array of clip paths that are applied to the parent
|
|
25199
|
+
* group(s) of the current FabricObject instance. The object's hierarchy is
|
|
25200
|
+
* traversed upwards (from the current object towards the root of the canvas),
|
|
25201
|
+
* checking each parent object for the presence of a `clipPath` that is not
|
|
25202
|
+
* absolutely positioned.
|
|
24824
25203
|
*/
|
|
24825
25204
|
findAncestorsWithClipPath() {
|
|
24826
25205
|
const clipPathAncestors = [];
|
|
@@ -24835,13 +25214,13 @@ class IText extends ITextClickBehavior {
|
|
|
24835
25214
|
return clipPathAncestors;
|
|
24836
25215
|
}
|
|
24837
25216
|
|
|
24838
|
-
/**
|
|
24839
|
-
* Returns cursor boundaries (left, top, leftOffset, topOffset)
|
|
24840
|
-
* left/top are left/top of entire text box
|
|
24841
|
-
* leftOffset/topOffset are offset from that left/top point of a text box
|
|
24842
|
-
* @private
|
|
24843
|
-
* @param {number} [index] index from start
|
|
24844
|
-
* @param {boolean} [skipCaching]
|
|
25217
|
+
/**
|
|
25218
|
+
* Returns cursor boundaries (left, top, leftOffset, topOffset)
|
|
25219
|
+
* left/top are left/top of entire text box
|
|
25220
|
+
* leftOffset/topOffset are offset from that left/top point of a text box
|
|
25221
|
+
* @private
|
|
25222
|
+
* @param {number} [index] index from start
|
|
25223
|
+
* @param {boolean} [skipCaching]
|
|
24845
25224
|
*/
|
|
24846
25225
|
_getCursorBoundaries() {
|
|
24847
25226
|
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -24855,11 +25234,11 @@ class IText extends ITextClickBehavior {
|
|
|
24855
25234
|
return this._getCursorBoundariesOriginal(index, skipCaching);
|
|
24856
25235
|
}
|
|
24857
25236
|
|
|
24858
|
-
/**
|
|
24859
|
-
* Caches and returns cursor left/top offset relative to instance's center point
|
|
24860
|
-
* @private
|
|
24861
|
-
* @param {number} index index from start
|
|
24862
|
-
* @param {boolean} [skipCaching]
|
|
25237
|
+
/**
|
|
25238
|
+
* Caches and returns cursor left/top offset relative to instance's center point
|
|
25239
|
+
* @private
|
|
25240
|
+
* @param {number} index index from start
|
|
25241
|
+
* @param {boolean} [skipCaching]
|
|
24863
25242
|
*/
|
|
24864
25243
|
_getCursorBoundariesOffsets(index, skipCaching) {
|
|
24865
25244
|
if (skipCaching) {
|
|
@@ -24871,9 +25250,9 @@ class IText extends ITextClickBehavior {
|
|
|
24871
25250
|
return this.cursorOffsetCache = this.__getCursorBoundariesOffsets(index);
|
|
24872
25251
|
}
|
|
24873
25252
|
|
|
24874
|
-
/**
|
|
24875
|
-
* Enhanced cursor boundaries using advanced hit testing when available
|
|
24876
|
-
* @private
|
|
25253
|
+
/**
|
|
25254
|
+
* Enhanced cursor boundaries using advanced hit testing when available
|
|
25255
|
+
* @private
|
|
24877
25256
|
*/
|
|
24878
25257
|
_getCursorBoundariesAdvanced(index) {
|
|
24879
25258
|
if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
|
|
@@ -24889,9 +25268,9 @@ class IText extends ITextClickBehavior {
|
|
|
24889
25268
|
};
|
|
24890
25269
|
}
|
|
24891
25270
|
|
|
24892
|
-
/**
|
|
24893
|
-
* Enhanced selection start from pointer using BiDi-aware hit testing
|
|
24894
|
-
* @override
|
|
25271
|
+
/**
|
|
25272
|
+
* Enhanced selection start from pointer using BiDi-aware hit testing
|
|
25273
|
+
* @override
|
|
24895
25274
|
*/
|
|
24896
25275
|
getSelectionStartFromPointer(e) {
|
|
24897
25276
|
if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
|
|
@@ -24905,9 +25284,9 @@ class IText extends ITextClickBehavior {
|
|
|
24905
25284
|
return Math.min(hitResult.charIndex, this._text.length);
|
|
24906
25285
|
}
|
|
24907
25286
|
|
|
24908
|
-
/**
|
|
24909
|
-
* Original cursor boundaries implementation
|
|
24910
|
-
* @private
|
|
25287
|
+
/**
|
|
25288
|
+
* Original cursor boundaries implementation
|
|
25289
|
+
* @private
|
|
24911
25290
|
*/
|
|
24912
25291
|
_getCursorBoundariesOriginal(index, skipCaching) {
|
|
24913
25292
|
const left = this._getLeftOffset(),
|
|
@@ -24921,10 +25300,10 @@ class IText extends ITextClickBehavior {
|
|
|
24921
25300
|
};
|
|
24922
25301
|
}
|
|
24923
25302
|
|
|
24924
|
-
/**
|
|
24925
|
-
* Calculates cursor left/top offset relative to instance's center point
|
|
24926
|
-
* @private
|
|
24927
|
-
* @param {number} index index from start
|
|
25303
|
+
/**
|
|
25304
|
+
* Calculates cursor left/top offset relative to instance's center point
|
|
25305
|
+
* @private
|
|
25306
|
+
* @param {number} index index from start
|
|
24928
25307
|
*/
|
|
24929
25308
|
__getCursorBoundariesOffsets(index) {
|
|
24930
25309
|
let topOffset = 0,
|
|
@@ -24958,29 +25337,29 @@ class IText extends ITextClickBehavior {
|
|
|
24958
25337
|
return boundaries;
|
|
24959
25338
|
}
|
|
24960
25339
|
|
|
24961
|
-
/**
|
|
24962
|
-
* Renders cursor on context Top, outside the animation cycle, on request
|
|
24963
|
-
* Used for the drag/drop effect.
|
|
24964
|
-
* If contextTop is not available, do nothing.
|
|
25340
|
+
/**
|
|
25341
|
+
* Renders cursor on context Top, outside the animation cycle, on request
|
|
25342
|
+
* Used for the drag/drop effect.
|
|
25343
|
+
* If contextTop is not available, do nothing.
|
|
24965
25344
|
*/
|
|
24966
25345
|
renderCursorAt(selectionStart) {
|
|
24967
25346
|
this._renderCursor(this.canvas.contextTop, this._getCursorBoundaries(selectionStart, true), selectionStart);
|
|
24968
25347
|
}
|
|
24969
25348
|
|
|
24970
|
-
/**
|
|
24971
|
-
* Renders cursor
|
|
24972
|
-
* @param {Object} boundaries
|
|
24973
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25349
|
+
/**
|
|
25350
|
+
* Renders cursor
|
|
25351
|
+
* @param {Object} boundaries
|
|
25352
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
24974
25353
|
*/
|
|
24975
25354
|
renderCursor(ctx, boundaries) {
|
|
24976
25355
|
this._renderCursor(ctx, boundaries, this.selectionStart);
|
|
24977
25356
|
}
|
|
24978
25357
|
|
|
24979
|
-
/**
|
|
24980
|
-
* Return the data needed to render the cursor for given selection start
|
|
24981
|
-
* The left,top are relative to the object, while width and height are prescaled
|
|
24982
|
-
* to look think with canvas zoom and object scaling,
|
|
24983
|
-
* so they depend on canvas and object scaling
|
|
25358
|
+
/**
|
|
25359
|
+
* Return the data needed to render the cursor for given selection start
|
|
25360
|
+
* The left,top are relative to the object, while width and height are prescaled
|
|
25361
|
+
* to look think with canvas zoom and object scaling,
|
|
25362
|
+
* so they depend on canvas and object scaling
|
|
24984
25363
|
*/
|
|
24985
25364
|
getCursorRenderingData() {
|
|
24986
25365
|
let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -25003,9 +25382,9 @@ class IText extends ITextClickBehavior {
|
|
|
25003
25382
|
};
|
|
25004
25383
|
}
|
|
25005
25384
|
|
|
25006
|
-
/**
|
|
25007
|
-
* Render the cursor at the given selectionStart.
|
|
25008
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25385
|
+
/**
|
|
25386
|
+
* Render the cursor at the given selectionStart.
|
|
25387
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25009
25388
|
*/
|
|
25010
25389
|
_renderCursor(ctx, boundaries, selectionStart) {
|
|
25011
25390
|
const {
|
|
@@ -25021,10 +25400,10 @@ class IText extends ITextClickBehavior {
|
|
|
25021
25400
|
ctx.fillRect(left, top, width, height);
|
|
25022
25401
|
}
|
|
25023
25402
|
|
|
25024
|
-
/**
|
|
25025
|
-
* Renders text selection
|
|
25026
|
-
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25027
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25403
|
+
/**
|
|
25404
|
+
* Renders text selection
|
|
25405
|
+
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25406
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25028
25407
|
*/
|
|
25029
25408
|
renderSelection(ctx, boundaries) {
|
|
25030
25409
|
const selection = {
|
|
@@ -25034,8 +25413,8 @@ class IText extends ITextClickBehavior {
|
|
|
25034
25413
|
this._renderSelection(ctx, selection, boundaries);
|
|
25035
25414
|
}
|
|
25036
25415
|
|
|
25037
|
-
/**
|
|
25038
|
-
* Renders drag start text selection
|
|
25416
|
+
/**
|
|
25417
|
+
* Renders drag start text selection
|
|
25039
25418
|
*/
|
|
25040
25419
|
renderDragSourceEffect() {
|
|
25041
25420
|
const dragStartSelection = this.draggableTextDelegate.getDragStartSelection();
|
|
@@ -25046,12 +25425,12 @@ class IText extends ITextClickBehavior {
|
|
|
25046
25425
|
this.renderCursorAt(dragSelection);
|
|
25047
25426
|
}
|
|
25048
25427
|
|
|
25049
|
-
/**
|
|
25050
|
-
* Renders text selection
|
|
25051
|
-
* @private
|
|
25052
|
-
* @param {{ selectionStart: number, selectionEnd: number }} selection
|
|
25053
|
-
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25054
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25428
|
+
/**
|
|
25429
|
+
* Renders text selection
|
|
25430
|
+
* @private
|
|
25431
|
+
* @param {{ selectionStart: number, selectionEnd: number }} selection
|
|
25432
|
+
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25433
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25055
25434
|
*/
|
|
25056
25435
|
_renderSelection(ctx, selection, boundaries) {
|
|
25057
25436
|
const selectionStart = selection.selectionStart,
|
|
@@ -25113,34 +25492,34 @@ class IText extends ITextClickBehavior {
|
|
|
25113
25492
|
}
|
|
25114
25493
|
}
|
|
25115
25494
|
|
|
25116
|
-
/**
|
|
25117
|
-
* High level function to know the height of the cursor.
|
|
25118
|
-
* the currentChar is the one that precedes the cursor
|
|
25119
|
-
* Returns fontSize of char at the current cursor
|
|
25120
|
-
* Unused from the library, is for the end user
|
|
25121
|
-
* @return {Number} Character font size
|
|
25495
|
+
/**
|
|
25496
|
+
* High level function to know the height of the cursor.
|
|
25497
|
+
* the currentChar is the one that precedes the cursor
|
|
25498
|
+
* Returns fontSize of char at the current cursor
|
|
25499
|
+
* Unused from the library, is for the end user
|
|
25500
|
+
* @return {Number} Character font size
|
|
25122
25501
|
*/
|
|
25123
25502
|
getCurrentCharFontSize() {
|
|
25124
25503
|
const cp = this._getCurrentCharIndex();
|
|
25125
25504
|
return this.getValueOfPropertyAt(cp.l, cp.c, 'fontSize');
|
|
25126
25505
|
}
|
|
25127
25506
|
|
|
25128
|
-
/**
|
|
25129
|
-
* High level function to know the color of the cursor.
|
|
25130
|
-
* the currentChar is the one that precedes the cursor
|
|
25131
|
-
* Returns color (fill) of char at the current cursor
|
|
25132
|
-
* if the text object has a pattern or gradient for filler, it will return that.
|
|
25133
|
-
* Unused by the library, is for the end user
|
|
25134
|
-
* @return {String | TFiller} Character color (fill)
|
|
25507
|
+
/**
|
|
25508
|
+
* High level function to know the color of the cursor.
|
|
25509
|
+
* the currentChar is the one that precedes the cursor
|
|
25510
|
+
* Returns color (fill) of char at the current cursor
|
|
25511
|
+
* if the text object has a pattern or gradient for filler, it will return that.
|
|
25512
|
+
* Unused by the library, is for the end user
|
|
25513
|
+
* @return {String | TFiller} Character color (fill)
|
|
25135
25514
|
*/
|
|
25136
25515
|
getCurrentCharColor() {
|
|
25137
25516
|
const cp = this._getCurrentCharIndex();
|
|
25138
25517
|
return this.getValueOfPropertyAt(cp.l, cp.c, FILL);
|
|
25139
25518
|
}
|
|
25140
25519
|
|
|
25141
|
-
/**
|
|
25142
|
-
* Returns the cursor position for the getCurrent.. functions
|
|
25143
|
-
* @private
|
|
25520
|
+
/**
|
|
25521
|
+
* Returns the cursor position for the getCurrent.. functions
|
|
25522
|
+
* @private
|
|
25144
25523
|
*/
|
|
25145
25524
|
_getCurrentCharIndex() {
|
|
25146
25525
|
const cursorPosition = this.get2DCursorLocation(this.selectionStart, true),
|
|
@@ -25156,52 +25535,52 @@ class IText extends ITextClickBehavior {
|
|
|
25156
25535
|
super.dispose();
|
|
25157
25536
|
}
|
|
25158
25537
|
}
|
|
25159
|
-
/**
|
|
25160
|
-
* Index where text selection starts (or where cursor is when there is no selection)
|
|
25161
|
-
* @type Number
|
|
25538
|
+
/**
|
|
25539
|
+
* Index where text selection starts (or where cursor is when there is no selection)
|
|
25540
|
+
* @type Number
|
|
25162
25541
|
*/
|
|
25163
|
-
/**
|
|
25164
|
-
* Index where text selection ends
|
|
25165
|
-
* @type Number
|
|
25542
|
+
/**
|
|
25543
|
+
* Index where text selection ends
|
|
25544
|
+
* @type Number
|
|
25166
25545
|
*/
|
|
25167
|
-
/**
|
|
25168
|
-
* Color of text selection
|
|
25169
|
-
* @type String
|
|
25546
|
+
/**
|
|
25547
|
+
* Color of text selection
|
|
25548
|
+
* @type String
|
|
25170
25549
|
*/
|
|
25171
|
-
/**
|
|
25172
|
-
* Indicates whether text is in editing mode
|
|
25173
|
-
* @type Boolean
|
|
25550
|
+
/**
|
|
25551
|
+
* Indicates whether text is in editing mode
|
|
25552
|
+
* @type Boolean
|
|
25174
25553
|
*/
|
|
25175
|
-
/**
|
|
25176
|
-
* Indicates whether a text can be edited
|
|
25177
|
-
* @type Boolean
|
|
25554
|
+
/**
|
|
25555
|
+
* Indicates whether a text can be edited
|
|
25556
|
+
* @type Boolean
|
|
25178
25557
|
*/
|
|
25179
|
-
/**
|
|
25180
|
-
* Border color of text object while it's in editing mode
|
|
25181
|
-
* @type String
|
|
25558
|
+
/**
|
|
25559
|
+
* Border color of text object while it's in editing mode
|
|
25560
|
+
* @type String
|
|
25182
25561
|
*/
|
|
25183
|
-
/**
|
|
25184
|
-
* Width of cursor (in px)
|
|
25185
|
-
* @type Number
|
|
25562
|
+
/**
|
|
25563
|
+
* Width of cursor (in px)
|
|
25564
|
+
* @type Number
|
|
25186
25565
|
*/
|
|
25187
|
-
/**
|
|
25188
|
-
* Color of text cursor color in editing mode.
|
|
25189
|
-
* if not set (default) will take color from the text.
|
|
25190
|
-
* if set to a color value that fabric can understand, it will
|
|
25191
|
-
* be used instead of the color of the text at the current position.
|
|
25192
|
-
* @type String
|
|
25566
|
+
/**
|
|
25567
|
+
* Color of text cursor color in editing mode.
|
|
25568
|
+
* if not set (default) will take color from the text.
|
|
25569
|
+
* if set to a color value that fabric can understand, it will
|
|
25570
|
+
* be used instead of the color of the text at the current position.
|
|
25571
|
+
* @type String
|
|
25193
25572
|
*/
|
|
25194
|
-
/**
|
|
25195
|
-
* Delay between cursor blink (in ms)
|
|
25196
|
-
* @type Number
|
|
25573
|
+
/**
|
|
25574
|
+
* Delay between cursor blink (in ms)
|
|
25575
|
+
* @type Number
|
|
25197
25576
|
*/
|
|
25198
|
-
/**
|
|
25199
|
-
* Duration of cursor fade in (in ms)
|
|
25200
|
-
* @type Number
|
|
25577
|
+
/**
|
|
25578
|
+
* Duration of cursor fade in (in ms)
|
|
25579
|
+
* @type Number
|
|
25201
25580
|
*/
|
|
25202
|
-
/**
|
|
25203
|
-
* Indicates whether internal text char widths can be cached
|
|
25204
|
-
* @type Boolean
|
|
25581
|
+
/**
|
|
25582
|
+
* Indicates whether internal text char widths can be cached
|
|
25583
|
+
* @type Boolean
|
|
25205
25584
|
*/
|
|
25206
25585
|
_defineProperty(IText, "ownDefaults", iTextDefaultValues);
|
|
25207
25586
|
_defineProperty(IText, "type", 'IText');
|
|
@@ -25223,11 +25602,11 @@ const textboxDefaultValues = {
|
|
|
25223
25602
|
|
|
25224
25603
|
// @TODO this is not complete
|
|
25225
25604
|
|
|
25226
|
-
/**
|
|
25227
|
-
* Textbox class, based on IText, allows the user to resize the text rectangle
|
|
25228
|
-
* and wraps lines automatically. Textboxes have their Y scaling locked, the
|
|
25229
|
-
* user can only change width. Height is adjusted automatically based on the
|
|
25230
|
-
* wrapping of lines.
|
|
25605
|
+
/**
|
|
25606
|
+
* Textbox class, based on IText, allows the user to resize the text rectangle
|
|
25607
|
+
* and wraps lines automatically. Textboxes have their Y scaling locked, the
|
|
25608
|
+
* user can only change width. Height is adjusted automatically based on the
|
|
25609
|
+
* wrapping of lines.
|
|
25231
25610
|
*/
|
|
25232
25611
|
class Textbox extends IText {
|
|
25233
25612
|
static getDefaults() {
|
|
@@ -25237,22 +25616,23 @@ class Textbox extends IText {
|
|
|
25237
25616
|
};
|
|
25238
25617
|
}
|
|
25239
25618
|
|
|
25240
|
-
/**
|
|
25241
|
-
* Constructor
|
|
25242
|
-
* @param {String} text Text string
|
|
25243
|
-
* @param {Object} [options] Options object
|
|
25619
|
+
/**
|
|
25620
|
+
* Constructor
|
|
25621
|
+
* @param {String} text Text string
|
|
25622
|
+
* @param {Object} [options] Options object
|
|
25244
25623
|
*/
|
|
25245
25624
|
constructor(text, options) {
|
|
25246
25625
|
super(text, {
|
|
25247
25626
|
...Textbox.ownDefaults,
|
|
25248
25627
|
...options
|
|
25249
25628
|
});
|
|
25629
|
+
this.initializeEventListeners();
|
|
25250
25630
|
}
|
|
25251
25631
|
|
|
25252
|
-
/**
|
|
25253
|
-
* Creates the default control object.
|
|
25254
|
-
* If you prefer to have on instance of controls shared among all objects
|
|
25255
|
-
* make this function return an empty object and add controls to the ownDefaults object
|
|
25632
|
+
/**
|
|
25633
|
+
* Creates the default control object.
|
|
25634
|
+
* If you prefer to have on instance of controls shared among all objects
|
|
25635
|
+
* make this function return an empty object and add controls to the ownDefaults object
|
|
25256
25636
|
*/
|
|
25257
25637
|
static createControls() {
|
|
25258
25638
|
return {
|
|
@@ -25260,11 +25640,11 @@ class Textbox extends IText {
|
|
|
25260
25640
|
};
|
|
25261
25641
|
}
|
|
25262
25642
|
|
|
25263
|
-
/**
|
|
25264
|
-
* Unlike superclass's version of this function, Textbox does not update
|
|
25265
|
-
* its width.
|
|
25266
|
-
* @private
|
|
25267
|
-
* @override
|
|
25643
|
+
/**
|
|
25644
|
+
* Unlike superclass's version of this function, Textbox does not update
|
|
25645
|
+
* its width.
|
|
25646
|
+
* @private
|
|
25647
|
+
* @override
|
|
25268
25648
|
*/
|
|
25269
25649
|
initDimensions() {
|
|
25270
25650
|
if (!this.initialized) {
|
|
@@ -25293,9 +25673,9 @@ class Textbox extends IText {
|
|
|
25293
25673
|
this.height = this.calcTextHeight();
|
|
25294
25674
|
}
|
|
25295
25675
|
|
|
25296
|
-
/**
|
|
25297
|
-
* Advanced dimensions calculation using new layout engine
|
|
25298
|
-
* @private
|
|
25676
|
+
/**
|
|
25677
|
+
* Advanced dimensions calculation using new layout engine
|
|
25678
|
+
* @private
|
|
25299
25679
|
*/
|
|
25300
25680
|
initDimensionsAdvanced() {
|
|
25301
25681
|
if (!this.initialized) {
|
|
@@ -25350,9 +25730,9 @@ class Textbox extends IText {
|
|
|
25350
25730
|
this.dirty = true;
|
|
25351
25731
|
}
|
|
25352
25732
|
|
|
25353
|
-
/**
|
|
25354
|
-
* Generate style map from new layout format
|
|
25355
|
-
* @private
|
|
25733
|
+
/**
|
|
25734
|
+
* Generate style map from new layout format
|
|
25735
|
+
* @private
|
|
25356
25736
|
*/
|
|
25357
25737
|
_generateStyleMapFromLayout(layout) {
|
|
25358
25738
|
const map = {};
|
|
@@ -25374,12 +25754,12 @@ class Textbox extends IText {
|
|
|
25374
25754
|
return map;
|
|
25375
25755
|
}
|
|
25376
25756
|
|
|
25377
|
-
/**
|
|
25378
|
-
* Generate an object that translates the style object so that it is
|
|
25379
|
-
* broken up by visual lines (new lines and automatic wrapping).
|
|
25380
|
-
* The original text styles object is broken up by actual lines (new lines only),
|
|
25381
|
-
* which is only sufficient for Text / IText
|
|
25382
|
-
* @private
|
|
25757
|
+
/**
|
|
25758
|
+
* Generate an object that translates the style object so that it is
|
|
25759
|
+
* broken up by visual lines (new lines and automatic wrapping).
|
|
25760
|
+
* The original text styles object is broken up by actual lines (new lines only),
|
|
25761
|
+
* which is only sufficient for Text / IText
|
|
25762
|
+
* @private
|
|
25383
25763
|
*/
|
|
25384
25764
|
_generateStyleMap(textInfo) {
|
|
25385
25765
|
let realLineCount = 0,
|
|
@@ -25406,10 +25786,10 @@ class Textbox extends IText {
|
|
|
25406
25786
|
return map;
|
|
25407
25787
|
}
|
|
25408
25788
|
|
|
25409
|
-
/**
|
|
25410
|
-
* Returns true if object has a style property or has it on a specified line
|
|
25411
|
-
* @param {Number} lineIndex
|
|
25412
|
-
* @return {Boolean}
|
|
25789
|
+
/**
|
|
25790
|
+
* Returns true if object has a style property or has it on a specified line
|
|
25791
|
+
* @param {Number} lineIndex
|
|
25792
|
+
* @return {Boolean}
|
|
25413
25793
|
*/
|
|
25414
25794
|
styleHas(property, lineIndex) {
|
|
25415
25795
|
if (this._styleMap && !this.isWrapping) {
|
|
@@ -25421,10 +25801,10 @@ class Textbox extends IText {
|
|
|
25421
25801
|
return super.styleHas(property, lineIndex);
|
|
25422
25802
|
}
|
|
25423
25803
|
|
|
25424
|
-
/**
|
|
25425
|
-
* Returns true if object has no styling or no styling in a line
|
|
25426
|
-
* @param {Number} lineIndex , lineIndex is on wrapped lines.
|
|
25427
|
-
* @return {Boolean}
|
|
25804
|
+
/**
|
|
25805
|
+
* Returns true if object has no styling or no styling in a line
|
|
25806
|
+
* @param {Number} lineIndex , lineIndex is on wrapped lines.
|
|
25807
|
+
* @return {Boolean}
|
|
25428
25808
|
*/
|
|
25429
25809
|
isEmptyStyles(lineIndex) {
|
|
25430
25810
|
if (!this.styles) {
|
|
@@ -25461,11 +25841,11 @@ class Textbox extends IText {
|
|
|
25461
25841
|
return true;
|
|
25462
25842
|
}
|
|
25463
25843
|
|
|
25464
|
-
/**
|
|
25465
|
-
* @protected
|
|
25466
|
-
* @param {Number} lineIndex
|
|
25467
|
-
* @param {Number} charIndex
|
|
25468
|
-
* @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
|
|
25844
|
+
/**
|
|
25845
|
+
* @protected
|
|
25846
|
+
* @param {Number} lineIndex
|
|
25847
|
+
* @param {Number} charIndex
|
|
25848
|
+
* @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
|
|
25469
25849
|
*/
|
|
25470
25850
|
_getStyleDeclaration(lineIndex, charIndex) {
|
|
25471
25851
|
if (this._styleMap && !this.isWrapping) {
|
|
@@ -25479,59 +25859,59 @@ class Textbox extends IText {
|
|
|
25479
25859
|
return super._getStyleDeclaration(lineIndex, charIndex);
|
|
25480
25860
|
}
|
|
25481
25861
|
|
|
25482
|
-
/**
|
|
25483
|
-
* @param {Number} lineIndex
|
|
25484
|
-
* @param {Number} charIndex
|
|
25485
|
-
* @param {Object} style
|
|
25486
|
-
* @private
|
|
25862
|
+
/**
|
|
25863
|
+
* @param {Number} lineIndex
|
|
25864
|
+
* @param {Number} charIndex
|
|
25865
|
+
* @param {Object} style
|
|
25866
|
+
* @private
|
|
25487
25867
|
*/
|
|
25488
25868
|
_setStyleDeclaration(lineIndex, charIndex, style) {
|
|
25489
25869
|
const map = this._styleMap[lineIndex];
|
|
25490
25870
|
super._setStyleDeclaration(map.line, map.offset + charIndex, style);
|
|
25491
25871
|
}
|
|
25492
25872
|
|
|
25493
|
-
/**
|
|
25494
|
-
* @param {Number} lineIndex
|
|
25495
|
-
* @param {Number} charIndex
|
|
25496
|
-
* @private
|
|
25873
|
+
/**
|
|
25874
|
+
* @param {Number} lineIndex
|
|
25875
|
+
* @param {Number} charIndex
|
|
25876
|
+
* @private
|
|
25497
25877
|
*/
|
|
25498
25878
|
_deleteStyleDeclaration(lineIndex, charIndex) {
|
|
25499
25879
|
const map = this._styleMap[lineIndex];
|
|
25500
25880
|
super._deleteStyleDeclaration(map.line, map.offset + charIndex);
|
|
25501
25881
|
}
|
|
25502
25882
|
|
|
25503
|
-
/**
|
|
25504
|
-
* probably broken need a fix
|
|
25505
|
-
* Returns the real style line that correspond to the wrapped lineIndex line
|
|
25506
|
-
* Used just to verify if the line does exist or not.
|
|
25507
|
-
* @param {Number} lineIndex
|
|
25508
|
-
* @returns {Boolean} if the line exists or not
|
|
25509
|
-
* @private
|
|
25883
|
+
/**
|
|
25884
|
+
* probably broken need a fix
|
|
25885
|
+
* Returns the real style line that correspond to the wrapped lineIndex line
|
|
25886
|
+
* Used just to verify if the line does exist or not.
|
|
25887
|
+
* @param {Number} lineIndex
|
|
25888
|
+
* @returns {Boolean} if the line exists or not
|
|
25889
|
+
* @private
|
|
25510
25890
|
*/
|
|
25511
25891
|
_getLineStyle(lineIndex) {
|
|
25512
25892
|
const map = this._styleMap[lineIndex];
|
|
25513
25893
|
return !!this.styles[map.line];
|
|
25514
25894
|
}
|
|
25515
25895
|
|
|
25516
|
-
/**
|
|
25517
|
-
* Set the line style to an empty object so that is initialized
|
|
25518
|
-
* @param {Number} lineIndex
|
|
25519
|
-
* @param {Object} style
|
|
25520
|
-
* @private
|
|
25896
|
+
/**
|
|
25897
|
+
* Set the line style to an empty object so that is initialized
|
|
25898
|
+
* @param {Number} lineIndex
|
|
25899
|
+
* @param {Object} style
|
|
25900
|
+
* @private
|
|
25521
25901
|
*/
|
|
25522
25902
|
_setLineStyle(lineIndex) {
|
|
25523
25903
|
const map = this._styleMap[lineIndex];
|
|
25524
25904
|
super._setLineStyle(map.line);
|
|
25525
25905
|
}
|
|
25526
25906
|
|
|
25527
|
-
/**
|
|
25528
|
-
* Wraps text using the 'width' property of Textbox. First this function
|
|
25529
|
-
* splits text on newlines, so we preserve newlines entered by the user.
|
|
25530
|
-
* Then it wraps each line using the width of the Textbox by calling
|
|
25531
|
-
* _wrapLine().
|
|
25532
|
-
* @param {Array} lines The string array of text that is split into lines
|
|
25533
|
-
* @param {Number} desiredWidth width you want to wrap to
|
|
25534
|
-
* @returns {Array} Array of lines
|
|
25907
|
+
/**
|
|
25908
|
+
* Wraps text using the 'width' property of Textbox. First this function
|
|
25909
|
+
* splits text on newlines, so we preserve newlines entered by the user.
|
|
25910
|
+
* Then it wraps each line using the width of the Textbox by calling
|
|
25911
|
+
* _wrapLine().
|
|
25912
|
+
* @param {Array} lines The string array of text that is split into lines
|
|
25913
|
+
* @param {Number} desiredWidth width you want to wrap to
|
|
25914
|
+
* @returns {Array} Array of lines
|
|
25535
25915
|
*/
|
|
25536
25916
|
_wrapText(lines, desiredWidth) {
|
|
25537
25917
|
this.isWrapping = true;
|
|
@@ -25545,12 +25925,12 @@ class Textbox extends IText {
|
|
|
25545
25925
|
return wrapped;
|
|
25546
25926
|
}
|
|
25547
25927
|
|
|
25548
|
-
/**
|
|
25549
|
-
* For each line of text terminated by an hard line stop,
|
|
25550
|
-
* measure each word width and extract the largest word from all.
|
|
25551
|
-
* The returned words here are the one that at the end will be rendered.
|
|
25552
|
-
* @param {string[]} lines the lines we need to measure
|
|
25553
|
-
*
|
|
25928
|
+
/**
|
|
25929
|
+
* For each line of text terminated by an hard line stop,
|
|
25930
|
+
* measure each word width and extract the largest word from all.
|
|
25931
|
+
* The returned words here are the one that at the end will be rendered.
|
|
25932
|
+
* @param {string[]} lines the lines we need to measure
|
|
25933
|
+
*
|
|
25554
25934
|
*/
|
|
25555
25935
|
getGraphemeDataForRender(lines) {
|
|
25556
25936
|
const splitByGrapheme = this.splitByGrapheme,
|
|
@@ -25583,17 +25963,17 @@ class Textbox extends IText {
|
|
|
25583
25963
|
};
|
|
25584
25964
|
}
|
|
25585
25965
|
|
|
25586
|
-
/**
|
|
25587
|
-
* Helper function to measure a string of text, given its lineIndex and charIndex offset
|
|
25588
|
-
* It gets called when charBounds are not available yet.
|
|
25589
|
-
* Override if necessary
|
|
25590
|
-
* Use with {@link Textbox#wordSplit}
|
|
25591
|
-
*
|
|
25592
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
25593
|
-
* @param {String} text
|
|
25594
|
-
* @param {number} lineIndex
|
|
25595
|
-
* @param {number} charOffset
|
|
25596
|
-
* @returns {number}
|
|
25966
|
+
/**
|
|
25967
|
+
* Helper function to measure a string of text, given its lineIndex and charIndex offset
|
|
25968
|
+
* It gets called when charBounds are not available yet.
|
|
25969
|
+
* Override if necessary
|
|
25970
|
+
* Use with {@link Textbox#wordSplit}
|
|
25971
|
+
*
|
|
25972
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
25973
|
+
* @param {String} text
|
|
25974
|
+
* @param {number} lineIndex
|
|
25975
|
+
* @param {number} charOffset
|
|
25976
|
+
* @returns {number}
|
|
25597
25977
|
*/
|
|
25598
25978
|
_measureWord(word, lineIndex) {
|
|
25599
25979
|
let charOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -25608,26 +25988,26 @@ class Textbox extends IText {
|
|
|
25608
25988
|
return width;
|
|
25609
25989
|
}
|
|
25610
25990
|
|
|
25611
|
-
/**
|
|
25612
|
-
* Override this method to customize word splitting
|
|
25613
|
-
* Use with {@link Textbox#_measureWord}
|
|
25614
|
-
* @param {string} value
|
|
25615
|
-
* @returns {string[]} array of words
|
|
25991
|
+
/**
|
|
25992
|
+
* Override this method to customize word splitting
|
|
25993
|
+
* Use with {@link Textbox#_measureWord}
|
|
25994
|
+
* @param {string} value
|
|
25995
|
+
* @returns {string[]} array of words
|
|
25616
25996
|
*/
|
|
25617
25997
|
wordSplit(value) {
|
|
25618
25998
|
return value.split(this._wordJoiners);
|
|
25619
25999
|
}
|
|
25620
26000
|
|
|
25621
|
-
/**
|
|
25622
|
-
* Wraps a line of text using the width of the Textbox as desiredWidth
|
|
25623
|
-
* and leveraging the known width o words from GraphemeData
|
|
25624
|
-
* @private
|
|
25625
|
-
* @param {Number} lineIndex
|
|
25626
|
-
* @param {Number} desiredWidth width you want to wrap the line to
|
|
25627
|
-
* @param {GraphemeData} graphemeData an object containing all the lines' words width.
|
|
25628
|
-
* @param {Number} reservedSpace space to remove from wrapping for custom functionalities
|
|
25629
|
-
* @returns {Array} Array of line(s) into which the given text is wrapped
|
|
25630
|
-
* to.
|
|
26001
|
+
/**
|
|
26002
|
+
* Wraps a line of text using the width of the Textbox as desiredWidth
|
|
26003
|
+
* and leveraging the known width o words from GraphemeData
|
|
26004
|
+
* @private
|
|
26005
|
+
* @param {Number} lineIndex
|
|
26006
|
+
* @param {Number} desiredWidth width you want to wrap the line to
|
|
26007
|
+
* @param {GraphemeData} graphemeData an object containing all the lines' words width.
|
|
26008
|
+
* @param {Number} reservedSpace space to remove from wrapping for custom functionalities
|
|
26009
|
+
* @returns {Array} Array of line(s) into which the given text is wrapped
|
|
26010
|
+
* to.
|
|
25631
26011
|
*/
|
|
25632
26012
|
_wrapLine(lineIndex, desiredWidth, _ref) {
|
|
25633
26013
|
let {
|
|
@@ -25685,11 +26065,11 @@ class Textbox extends IText {
|
|
|
25685
26065
|
return graphemeLines;
|
|
25686
26066
|
}
|
|
25687
26067
|
|
|
25688
|
-
/**
|
|
25689
|
-
* Detect if the text line is ended with an hard break
|
|
25690
|
-
* text and itext do not have wrapping, return false
|
|
25691
|
-
* @param {Number} lineIndex text to split
|
|
25692
|
-
* @return {Boolean}
|
|
26068
|
+
/**
|
|
26069
|
+
* Detect if the text line is ended with an hard break
|
|
26070
|
+
* text and itext do not have wrapping, return false
|
|
26071
|
+
* @param {Number} lineIndex text to split
|
|
26072
|
+
* @return {Boolean}
|
|
25693
26073
|
*/
|
|
25694
26074
|
isEndOfWrapping(lineIndex) {
|
|
25695
26075
|
if (!this._styleMap[lineIndex + 1]) {
|
|
@@ -25703,12 +26083,12 @@ class Textbox extends IText {
|
|
|
25703
26083
|
return false;
|
|
25704
26084
|
}
|
|
25705
26085
|
|
|
25706
|
-
/**
|
|
25707
|
-
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
25708
|
-
* and counting style.
|
|
25709
|
-
* This is important only for splitByGrapheme at the end of wrapping.
|
|
25710
|
-
* If we are not wrapping the offset is always 1
|
|
25711
|
-
* @return Number
|
|
26086
|
+
/**
|
|
26087
|
+
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
26088
|
+
* and counting style.
|
|
26089
|
+
* This is important only for splitByGrapheme at the end of wrapping.
|
|
26090
|
+
* If we are not wrapping the offset is always 1
|
|
26091
|
+
* @return Number
|
|
25712
26092
|
*/
|
|
25713
26093
|
missingNewlineOffset(lineIndex, skipWrapping) {
|
|
25714
26094
|
if (this.splitByGrapheme && !skipWrapping) {
|
|
@@ -25717,12 +26097,12 @@ class Textbox extends IText {
|
|
|
25717
26097
|
return 1;
|
|
25718
26098
|
}
|
|
25719
26099
|
|
|
25720
|
-
/**
|
|
25721
|
-
* Gets lines of text to render in the Textbox. This function calculates
|
|
25722
|
-
* text wrapping on the fly every time it is called.
|
|
25723
|
-
* @param {String} text text to split
|
|
25724
|
-
* @returns {Array} Array of lines in the Textbox.
|
|
25725
|
-
* @override
|
|
26100
|
+
/**
|
|
26101
|
+
* Gets lines of text to render in the Textbox. This function calculates
|
|
26102
|
+
* text wrapping on the fly every time it is called.
|
|
26103
|
+
* @param {String} text text to split
|
|
26104
|
+
* @returns {Array} Array of lines in the Textbox.
|
|
26105
|
+
* @override
|
|
25726
26106
|
*/
|
|
25727
26107
|
_splitTextIntoLines(text) {
|
|
25728
26108
|
const newText = super._splitTextIntoLines(text),
|
|
@@ -25754,31 +26134,148 @@ class Textbox extends IText {
|
|
|
25754
26134
|
}
|
|
25755
26135
|
}
|
|
25756
26136
|
|
|
25757
|
-
/**
|
|
25758
|
-
*
|
|
25759
|
-
* @
|
|
25760
|
-
|
|
26137
|
+
/**
|
|
26138
|
+
* Initialize event listeners for safety snap functionality
|
|
26139
|
+
* @private
|
|
26140
|
+
*/
|
|
26141
|
+
initializeEventListeners() {
|
|
26142
|
+
var _this$canvas;
|
|
26143
|
+
// Track which side is being used for resize to handle position compensation
|
|
26144
|
+
let resizeOrigin = null;
|
|
26145
|
+
|
|
26146
|
+
// Detect resize origin during resizing
|
|
26147
|
+
this.on('resizing', e => {
|
|
26148
|
+
// Check transform origin to determine which side is being resized
|
|
26149
|
+
if (e.transform) {
|
|
26150
|
+
const {
|
|
26151
|
+
originX
|
|
26152
|
+
} = e.transform;
|
|
26153
|
+
// originX tells us which side is the anchor - opposite side is being dragged
|
|
26154
|
+
resizeOrigin = originX === 'right' ? 'left' : originX === 'left' ? 'right' : null;
|
|
26155
|
+
} else if (e.originX) {
|
|
26156
|
+
const {
|
|
26157
|
+
originX
|
|
26158
|
+
} = e;
|
|
26159
|
+
resizeOrigin = originX === 'right' ? 'left' : originX === 'left' ? 'right' : null;
|
|
26160
|
+
}
|
|
26161
|
+
});
|
|
26162
|
+
|
|
26163
|
+
// Only trigger safety snap after resize is complete (not during)
|
|
26164
|
+
// Use 'modified' event which fires after user releases the mouse
|
|
26165
|
+
this.on('modified', () => {
|
|
26166
|
+
const currentResizeOrigin = resizeOrigin; // Capture the value before reset
|
|
26167
|
+
// Small delay to ensure text layout is updated
|
|
26168
|
+
setTimeout(() => this.safetySnapWidth(currentResizeOrigin), 10);
|
|
26169
|
+
resizeOrigin = null; // Reset after capturing
|
|
26170
|
+
});
|
|
26171
|
+
|
|
26172
|
+
// Also listen to canvas-level modified event as backup
|
|
26173
|
+
(_this$canvas = this.canvas) === null || _this$canvas === void 0 || _this$canvas.on('object:modified', e => {
|
|
26174
|
+
if (e.target === this) {
|
|
26175
|
+
const currentResizeOrigin = resizeOrigin; // Capture the value before reset
|
|
26176
|
+
setTimeout(() => this.safetySnapWidth(currentResizeOrigin), 10);
|
|
26177
|
+
resizeOrigin = null; // Reset after capturing
|
|
26178
|
+
}
|
|
26179
|
+
});
|
|
26180
|
+
}
|
|
26181
|
+
|
|
26182
|
+
/**
|
|
26183
|
+
* Safety snap to prevent glyph clipping after manual resize.
|
|
26184
|
+
* Similar to Polotno - checks if any glyphs are too close to edges
|
|
26185
|
+
* and automatically expands width if needed.
|
|
26186
|
+
* @private
|
|
26187
|
+
* @param resizeOrigin - Which side was used for resizing ('left' or 'right')
|
|
26188
|
+
*/
|
|
26189
|
+
safetySnapWidth(resizeOrigin) {
|
|
26190
|
+
// For Textbox objects, we always want to check for clipping regardless of isWrapping flag
|
|
26191
|
+
if (!this._textLines || this.type.toLowerCase() !== 'textbox' || this._textLines.length === 0) {
|
|
26192
|
+
return;
|
|
26193
|
+
}
|
|
26194
|
+
const lineCount = this._textLines.length;
|
|
26195
|
+
if (lineCount === 0) return;
|
|
26196
|
+
let maxRequiredWidth = 0; // Width including RTL buffer
|
|
26197
|
+
|
|
26198
|
+
for (let i = 0; i < lineCount; i++) {
|
|
26199
|
+
const lineText = this._textLines[i].join(''); // Convert grapheme array to string
|
|
26200
|
+
const lineWidth = this.getLineWidth(i);
|
|
26201
|
+
|
|
26202
|
+
// RTL detection - regex for Arabic, Hebrew, and other RTL characters
|
|
26203
|
+
const rtlRegex = /[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\uFB50-\uFDFF\uFE70-\uFEFF]/;
|
|
26204
|
+
if (rtlRegex.test(lineText)) {
|
|
26205
|
+
// Add minimal RTL compensation buffer - just enough to prevent clipping
|
|
26206
|
+
const rtlBuffer = (this.fontSize || 16) * 0.15; // 15% of font size (much smaller)
|
|
26207
|
+
maxRequiredWidth = Math.max(maxRequiredWidth, lineWidth + rtlBuffer);
|
|
26208
|
+
} else {
|
|
26209
|
+
maxRequiredWidth = Math.max(maxRequiredWidth, lineWidth);
|
|
26210
|
+
}
|
|
26211
|
+
}
|
|
26212
|
+
|
|
26213
|
+
// Safety margin - how close glyphs can get before we snap
|
|
26214
|
+
const safetyThreshold = 2; // px - very subtle trigger
|
|
26215
|
+
|
|
26216
|
+
if (maxRequiredWidth > this.width - safetyThreshold) {
|
|
26217
|
+
var _this$canvas2;
|
|
26218
|
+
// Set width to exactly what's needed + minimal safety margin
|
|
26219
|
+
const newWidth = maxRequiredWidth + 1; // Add just 1px safety margin
|
|
26220
|
+
|
|
26221
|
+
// Store original position before width change
|
|
26222
|
+
const originalLeft = this.left;
|
|
26223
|
+
const originalTop = this.top;
|
|
26224
|
+
const widthIncrease = newWidth - this.width;
|
|
26225
|
+
|
|
26226
|
+
// Change width
|
|
26227
|
+
this.set('width', newWidth);
|
|
26228
|
+
|
|
26229
|
+
// Force text layout recalculation
|
|
26230
|
+
this.initDimensions();
|
|
26231
|
+
|
|
26232
|
+
// Only compensate position when resizing from left handle
|
|
26233
|
+
// Right handle resize doesn't shift the text position
|
|
26234
|
+
if (resizeOrigin === 'left') {
|
|
26235
|
+
// When resizing from left, the expansion pushes text right
|
|
26236
|
+
// Compensate by moving the textbox left by the width increase
|
|
26237
|
+
this.set({
|
|
26238
|
+
'left': originalLeft - widthIncrease,
|
|
26239
|
+
'top': originalTop
|
|
26240
|
+
});
|
|
26241
|
+
}
|
|
26242
|
+
this.setCoords();
|
|
26243
|
+
|
|
26244
|
+
// Also refresh the overlay editor if it exists
|
|
26245
|
+
if (this.__overlayEditor) {
|
|
26246
|
+
setTimeout(() => {
|
|
26247
|
+
this.__overlayEditor.refresh();
|
|
26248
|
+
}, 0);
|
|
26249
|
+
}
|
|
26250
|
+
(_this$canvas2 = this.canvas) === null || _this$canvas2 === void 0 || _this$canvas2.requestRenderAll();
|
|
26251
|
+
}
|
|
26252
|
+
}
|
|
26253
|
+
|
|
26254
|
+
/**
|
|
26255
|
+
* Returns object representation of an instance
|
|
26256
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
26257
|
+
* @return {Object} object representation of an instance
|
|
25761
26258
|
*/
|
|
25762
26259
|
toObject() {
|
|
25763
26260
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
25764
26261
|
return super.toObject(['minWidth', 'splitByGrapheme', ...propertiesToInclude]);
|
|
25765
26262
|
}
|
|
25766
26263
|
}
|
|
25767
|
-
/**
|
|
25768
|
-
* Minimum width of textbox, in pixels.
|
|
25769
|
-
* @type Number
|
|
25770
|
-
*/
|
|
25771
|
-
/**
|
|
25772
|
-
* Minimum calculated width of a textbox, in pixels.
|
|
25773
|
-
* fixed to 2 so that an empty textbox cannot go to 0
|
|
25774
|
-
* and is still selectable without text.
|
|
25775
|
-
* @type Number
|
|
25776
|
-
*/
|
|
25777
|
-
/**
|
|
25778
|
-
* Use this boolean property in order to split strings that have no white space concept.
|
|
25779
|
-
* this is a cheap way to help with chinese/japanese
|
|
25780
|
-
* @type Boolean
|
|
25781
|
-
* @since 2.6.0
|
|
26264
|
+
/**
|
|
26265
|
+
* Minimum width of textbox, in pixels.
|
|
26266
|
+
* @type Number
|
|
26267
|
+
*/
|
|
26268
|
+
/**
|
|
26269
|
+
* Minimum calculated width of a textbox, in pixels.
|
|
26270
|
+
* fixed to 2 so that an empty textbox cannot go to 0
|
|
26271
|
+
* and is still selectable without text.
|
|
26272
|
+
* @type Number
|
|
26273
|
+
*/
|
|
26274
|
+
/**
|
|
26275
|
+
* Use this boolean property in order to split strings that have no white space concept.
|
|
26276
|
+
* this is a cheap way to help with chinese/japanese
|
|
26277
|
+
* @type Boolean
|
|
26278
|
+
* @since 2.6.0
|
|
25782
26279
|
*/
|
|
25783
26280
|
_defineProperty(Textbox, "type", 'Textbox');
|
|
25784
26281
|
_defineProperty(Textbox, "textLayoutProperties", [...IText.textLayoutProperties, 'width']);
|