@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.node.mjs
CHANGED
|
@@ -410,7 +410,7 @@ class Cache {
|
|
|
410
410
|
}
|
|
411
411
|
const cache = new Cache();
|
|
412
412
|
|
|
413
|
-
var version = "7.0.
|
|
413
|
+
var version = "7.0.1-beta1";
|
|
414
414
|
|
|
415
415
|
// use this syntax so babel plugin see this import here
|
|
416
416
|
const VERSION = version;
|
|
@@ -18729,8 +18729,8 @@ _defineProperty(StyledText, "_styleProperties", styleProperties);
|
|
|
18729
18729
|
// Global measurement context - reused for performance
|
|
18730
18730
|
let measurementContext = null;
|
|
18731
18731
|
|
|
18732
|
-
/**
|
|
18733
|
-
* Get or create the shared measurement context
|
|
18732
|
+
/**
|
|
18733
|
+
* Get or create the shared measurement context
|
|
18734
18734
|
*/
|
|
18735
18735
|
function getMeasurementContext() {
|
|
18736
18736
|
if (!measurementContext) {
|
|
@@ -18743,8 +18743,8 @@ function getMeasurementContext() {
|
|
|
18743
18743
|
return measurementContext;
|
|
18744
18744
|
}
|
|
18745
18745
|
|
|
18746
|
-
/**
|
|
18747
|
-
* Measure a single grapheme
|
|
18746
|
+
/**
|
|
18747
|
+
* Measure a single grapheme
|
|
18748
18748
|
*/
|
|
18749
18749
|
function measureGrapheme(grapheme, options, ctx) {
|
|
18750
18750
|
// Check cache first
|
|
@@ -18777,8 +18777,8 @@ function measureGrapheme(grapheme, options, ctx) {
|
|
|
18777
18777
|
return measurement;
|
|
18778
18778
|
}
|
|
18779
18779
|
|
|
18780
|
-
/**
|
|
18781
|
-
* Measure a grapheme with kerning relative to previous character
|
|
18780
|
+
/**
|
|
18781
|
+
* Measure a grapheme with kerning relative to previous character
|
|
18782
18782
|
*/
|
|
18783
18783
|
function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
|
|
18784
18784
|
// Get individual measurement
|
|
@@ -18819,8 +18819,8 @@ function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
|
|
|
18819
18819
|
};
|
|
18820
18820
|
}
|
|
18821
18821
|
|
|
18822
|
-
/**
|
|
18823
|
-
* Get font metrics for layout calculations
|
|
18822
|
+
/**
|
|
18823
|
+
* Get font metrics for layout calculations
|
|
18824
18824
|
*/
|
|
18825
18825
|
function getFontMetrics(options) {
|
|
18826
18826
|
var _metrics$fontBounding, _metrics$fontBounding2, _metrics$actualBoundi, _metrics$actualBoundi2;
|
|
@@ -18855,8 +18855,8 @@ function getFontMetrics(options) {
|
|
|
18855
18855
|
return result;
|
|
18856
18856
|
}
|
|
18857
18857
|
|
|
18858
|
-
/**
|
|
18859
|
-
* Apply font styling to canvas context
|
|
18858
|
+
/**
|
|
18859
|
+
* Apply font styling to canvas context
|
|
18860
18860
|
*/
|
|
18861
18861
|
function applyFontStyle(ctx, options) {
|
|
18862
18862
|
const fontDeclaration = getFontDeclaration(options);
|
|
@@ -18873,8 +18873,8 @@ function applyFontStyle(ctx, options) {
|
|
|
18873
18873
|
ctx.textBaseline = 'alphabetic';
|
|
18874
18874
|
}
|
|
18875
18875
|
|
|
18876
|
-
/**
|
|
18877
|
-
* Generate font declaration string
|
|
18876
|
+
/**
|
|
18877
|
+
* Generate font declaration string
|
|
18878
18878
|
*/
|
|
18879
18879
|
function getFontDeclaration(options) {
|
|
18880
18880
|
const {
|
|
@@ -18889,8 +18889,8 @@ function getFontDeclaration(options) {
|
|
|
18889
18889
|
return `${fontStyle} ${fontWeight} ${fontSize}px ${normalizedFamily}`;
|
|
18890
18890
|
}
|
|
18891
18891
|
|
|
18892
|
-
/**
|
|
18893
|
-
* LRU Cache implementation for measurements
|
|
18892
|
+
/**
|
|
18893
|
+
* LRU Cache implementation for measurements
|
|
18894
18894
|
*/
|
|
18895
18895
|
class LRUCache {
|
|
18896
18896
|
constructor() {
|
|
@@ -18952,8 +18952,8 @@ class LRUCache {
|
|
|
18952
18952
|
}
|
|
18953
18953
|
}
|
|
18954
18954
|
|
|
18955
|
-
/**
|
|
18956
|
-
* Advanced measurement cache with font-aware keys
|
|
18955
|
+
/**
|
|
18956
|
+
* Advanced measurement cache with font-aware keys
|
|
18957
18957
|
*/
|
|
18958
18958
|
class MeasurementCache {
|
|
18959
18959
|
constructor() {
|
|
@@ -18980,8 +18980,8 @@ class MeasurementCache {
|
|
|
18980
18980
|
}
|
|
18981
18981
|
}
|
|
18982
18982
|
|
|
18983
|
-
/**
|
|
18984
|
-
* Kerning cache for character pairs
|
|
18983
|
+
/**
|
|
18984
|
+
* Kerning cache for character pairs
|
|
18985
18985
|
*/
|
|
18986
18986
|
class KerningCache {
|
|
18987
18987
|
constructor() {
|
|
@@ -19009,8 +19009,8 @@ class KerningCache {
|
|
|
19009
19009
|
}
|
|
19010
19010
|
}
|
|
19011
19011
|
|
|
19012
|
-
/**
|
|
19013
|
-
* Font metrics cache
|
|
19012
|
+
/**
|
|
19013
|
+
* Font metrics cache
|
|
19014
19014
|
*/
|
|
19015
19015
|
class FontMetricsCache {
|
|
19016
19016
|
constructor() {
|
|
@@ -19037,17 +19037,17 @@ const measurementCache = new MeasurementCache();
|
|
|
19037
19037
|
const kerningCache = new KerningCache();
|
|
19038
19038
|
const fontMetricsCache = new FontMetricsCache();
|
|
19039
19039
|
|
|
19040
|
-
/**
|
|
19041
|
-
* Unicode and Internationalization Support
|
|
19042
|
-
*
|
|
19043
|
-
* Enhanced Unicode handling for complex scripts, RTL/LTR text,
|
|
19044
|
-
* and grapheme cluster boundary detection.
|
|
19040
|
+
/**
|
|
19041
|
+
* Unicode and Internationalization Support
|
|
19042
|
+
*
|
|
19043
|
+
* Enhanced Unicode handling for complex scripts, RTL/LTR text,
|
|
19044
|
+
* and grapheme cluster boundary detection.
|
|
19045
19045
|
*/
|
|
19046
19046
|
|
|
19047
19047
|
|
|
19048
|
-
/**
|
|
19049
|
-
* Enhanced grapheme segmentation using Intl.Segmenter when available
|
|
19050
|
-
* with fallback to existing graphemeSplit implementation
|
|
19048
|
+
/**
|
|
19049
|
+
* Enhanced grapheme segmentation using Intl.Segmenter when available
|
|
19050
|
+
* with fallback to existing graphemeSplit implementation
|
|
19051
19051
|
*/
|
|
19052
19052
|
function segmentGraphemes(text) {
|
|
19053
19053
|
// Use native Intl.Segmenter if available
|
|
@@ -19067,15 +19067,15 @@ function segmentGraphemes(text) {
|
|
|
19067
19067
|
return graphemeSplit(text);
|
|
19068
19068
|
}
|
|
19069
19069
|
|
|
19070
|
-
/**
|
|
19071
|
-
* Ellipsis Text Truncation System
|
|
19072
|
-
*
|
|
19073
|
-
* Implements text truncation with ellipsis when content exceeds bounds,
|
|
19074
|
-
* using binary search for optimal truncation points.
|
|
19070
|
+
/**
|
|
19071
|
+
* Ellipsis Text Truncation System
|
|
19072
|
+
*
|
|
19073
|
+
* Implements text truncation with ellipsis when content exceeds bounds,
|
|
19074
|
+
* using binary search for optimal truncation points.
|
|
19075
19075
|
*/
|
|
19076
19076
|
|
|
19077
|
-
/**
|
|
19078
|
-
* Apply ellipsis truncation to text based on width/height constraints
|
|
19077
|
+
/**
|
|
19078
|
+
* Apply ellipsis truncation to text based on width/height constraints
|
|
19079
19079
|
*/
|
|
19080
19080
|
function applyEllipsis(text, options) {
|
|
19081
19081
|
const {
|
|
@@ -19145,8 +19145,8 @@ function applyEllipsis(text, options) {
|
|
|
19145
19145
|
};
|
|
19146
19146
|
}
|
|
19147
19147
|
|
|
19148
|
-
/**
|
|
19149
|
-
* Truncate text based on width constraint using binary search
|
|
19148
|
+
/**
|
|
19149
|
+
* Truncate text based on width constraint using binary search
|
|
19150
19150
|
*/
|
|
19151
19151
|
function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn) {
|
|
19152
19152
|
const graphemes = segmentGraphemes(text);
|
|
@@ -19196,8 +19196,8 @@ function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn)
|
|
|
19196
19196
|
};
|
|
19197
19197
|
}
|
|
19198
19198
|
|
|
19199
|
-
/**
|
|
19200
|
-
* Truncate text based on height constraint
|
|
19199
|
+
/**
|
|
19200
|
+
* Truncate text based on height constraint
|
|
19201
19201
|
*/
|
|
19202
19202
|
function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
|
|
19203
19203
|
var _measureFn;
|
|
@@ -19245,19 +19245,19 @@ function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
|
|
|
19245
19245
|
return truncateByWidth(lines[0], firstLineWidth, ellipsisChar, 0, measureFn);
|
|
19246
19246
|
}
|
|
19247
19247
|
|
|
19248
|
-
/**
|
|
19249
|
-
* Core Text Layout Engine
|
|
19250
|
-
*
|
|
19251
|
-
* Implements Konva-compatible text layout with support for:
|
|
19252
|
-
* - Multiple wrap modes (word/char/none)
|
|
19253
|
-
* - Ellipsis truncation
|
|
19254
|
-
* - Justify alignment with proper space distribution
|
|
19255
|
-
* - RTL/LTR text direction
|
|
19256
|
-
* - Advanced grapheme handling
|
|
19248
|
+
/**
|
|
19249
|
+
* Core Text Layout Engine
|
|
19250
|
+
*
|
|
19251
|
+
* Implements Konva-compatible text layout with support for:
|
|
19252
|
+
* - Multiple wrap modes (word/char/none)
|
|
19253
|
+
* - Ellipsis truncation
|
|
19254
|
+
* - Justify alignment with proper space distribution
|
|
19255
|
+
* - RTL/LTR text direction
|
|
19256
|
+
* - Advanced grapheme handling
|
|
19257
19257
|
*/
|
|
19258
19258
|
|
|
19259
|
-
/**
|
|
19260
|
-
* Main text layout function - converts text and options into positioned layout
|
|
19259
|
+
/**
|
|
19260
|
+
* Main text layout function - converts text and options into positioned layout
|
|
19261
19261
|
*/
|
|
19262
19262
|
function layoutText(options) {
|
|
19263
19263
|
var _ellipsisResult;
|
|
@@ -19376,8 +19376,8 @@ function layoutText(options) {
|
|
|
19376
19376
|
};
|
|
19377
19377
|
}
|
|
19378
19378
|
|
|
19379
|
-
/**
|
|
19380
|
-
* Layout a single paragraph with wrapping
|
|
19379
|
+
/**
|
|
19380
|
+
* Layout a single paragraph with wrapping
|
|
19381
19381
|
*/
|
|
19382
19382
|
function layoutParagraph(text, options) {
|
|
19383
19383
|
const {
|
|
@@ -19412,8 +19412,8 @@ function layoutParagraph(text, options) {
|
|
|
19412
19412
|
return layoutLines;
|
|
19413
19413
|
}
|
|
19414
19414
|
|
|
19415
|
-
/**
|
|
19416
|
-
* Layout a single line of text (no wrapping)
|
|
19415
|
+
/**
|
|
19416
|
+
* Layout a single line of text (no wrapping)
|
|
19417
19417
|
*/
|
|
19418
19418
|
function layoutSingleLine(text, options) {
|
|
19419
19419
|
let textOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -19483,8 +19483,8 @@ function layoutSingleLine(text, options) {
|
|
|
19483
19483
|
};
|
|
19484
19484
|
}
|
|
19485
19485
|
|
|
19486
|
-
/**
|
|
19487
|
-
* Word-based wrapping algorithm
|
|
19486
|
+
/**
|
|
19487
|
+
* Word-based wrapping algorithm
|
|
19488
19488
|
*/
|
|
19489
19489
|
function wrapByWords(text, maxWidth, options) {
|
|
19490
19490
|
const lines = [];
|
|
@@ -19517,8 +19517,8 @@ function wrapByWords(text, maxWidth, options) {
|
|
|
19517
19517
|
return lines.length > 0 ? lines : [''];
|
|
19518
19518
|
}
|
|
19519
19519
|
|
|
19520
|
-
/**
|
|
19521
|
-
* Character-based wrapping algorithm
|
|
19520
|
+
/**
|
|
19521
|
+
* Character-based wrapping algorithm
|
|
19522
19522
|
*/
|
|
19523
19523
|
function wrapByCharacters(text, maxWidth, options) {
|
|
19524
19524
|
const lines = [];
|
|
@@ -19540,8 +19540,8 @@ function wrapByCharacters(text, maxWidth, options) {
|
|
|
19540
19540
|
return lines.length > 0 ? lines : [''];
|
|
19541
19541
|
}
|
|
19542
19542
|
|
|
19543
|
-
/**
|
|
19544
|
-
* Apply text alignment to lines
|
|
19543
|
+
/**
|
|
19544
|
+
* Apply text alignment to lines
|
|
19545
19545
|
*/
|
|
19546
19546
|
function applyAlignment(lines, align, containerWidth, options) {
|
|
19547
19547
|
return lines.map(line => {
|
|
@@ -19575,8 +19575,8 @@ function applyAlignment(lines, align, containerWidth, options) {
|
|
|
19575
19575
|
});
|
|
19576
19576
|
}
|
|
19577
19577
|
|
|
19578
|
-
/**
|
|
19579
|
-
* Apply justify alignment by expanding spaces
|
|
19578
|
+
/**
|
|
19579
|
+
* Apply justify alignment by expanding spaces
|
|
19580
19580
|
*/
|
|
19581
19581
|
function applyJustification(line, containerWidth, options) {
|
|
19582
19582
|
const spaces = line.graphemes.filter(g => /\s/.test(g)).length;
|
|
@@ -19599,8 +19599,8 @@ function applyJustification(line, containerWidth, options) {
|
|
|
19599
19599
|
return line;
|
|
19600
19600
|
}
|
|
19601
19601
|
|
|
19602
|
-
/**
|
|
19603
|
-
* Calculate vertical alignment offset
|
|
19602
|
+
/**
|
|
19603
|
+
* Calculate vertical alignment offset
|
|
19604
19604
|
*/
|
|
19605
19605
|
function calculateVerticalOffset(contentHeight, containerHeight, align) {
|
|
19606
19606
|
switch (align) {
|
|
@@ -19614,8 +19614,8 @@ function calculateVerticalOffset(contentHeight, containerHeight, align) {
|
|
|
19614
19614
|
}
|
|
19615
19615
|
}
|
|
19616
19616
|
|
|
19617
|
-
/**
|
|
19618
|
-
* Handle height overflow with ellipsis
|
|
19617
|
+
/**
|
|
19618
|
+
* Handle height overflow with ellipsis
|
|
19619
19619
|
*/
|
|
19620
19620
|
function handleHeightOverflow(existingLines, overflowLine, remainingHeight, options) {
|
|
19621
19621
|
// If ellipsis is enabled, try to fit part of the overflow line
|
|
@@ -19644,8 +19644,8 @@ function handleHeightOverflow(existingLines, overflowLine, remainingHeight, opti
|
|
|
19644
19644
|
};
|
|
19645
19645
|
}
|
|
19646
19646
|
|
|
19647
|
-
/**
|
|
19648
|
-
* Create empty line for empty paragraphs
|
|
19647
|
+
/**
|
|
19648
|
+
* Create empty line for empty paragraphs
|
|
19649
19649
|
*/
|
|
19650
19650
|
function createEmptyLine(options) {
|
|
19651
19651
|
const height = options.fontSize * options.lineHeight;
|
|
@@ -19661,8 +19661,8 @@ function createEmptyLine(options) {
|
|
|
19661
19661
|
};
|
|
19662
19662
|
}
|
|
19663
19663
|
|
|
19664
|
-
/**
|
|
19665
|
-
* Measure width of a line of text
|
|
19664
|
+
/**
|
|
19665
|
+
* Measure width of a line of text
|
|
19666
19666
|
*/
|
|
19667
19667
|
function measureLineWidth(text, options) {
|
|
19668
19668
|
const graphemes = segmentGraphemes(text);
|
|
@@ -19679,8 +19679,8 @@ function measureLineWidth(text, options) {
|
|
|
19679
19679
|
return width;
|
|
19680
19680
|
}
|
|
19681
19681
|
|
|
19682
|
-
/**
|
|
19683
|
-
* Convert layout options to measurement options
|
|
19682
|
+
/**
|
|
19683
|
+
* Convert layout options to measurement options
|
|
19684
19684
|
*/
|
|
19685
19685
|
function createMeasurementOptions(options) {
|
|
19686
19686
|
return {
|
|
@@ -19923,15 +19923,15 @@ class TextSVGExportMixin extends FabricObjectSVGExportMixin {
|
|
|
19923
19923
|
}
|
|
19924
19924
|
}
|
|
19925
19925
|
|
|
19926
|
-
/**
|
|
19927
|
-
* Browser Line Break Extraction
|
|
19928
|
-
*
|
|
19929
|
-
* Captures exact line breaks as rendered by the browser to ensure
|
|
19930
|
-
* pixel-perfect consistency between DOM editing and canvas rendering.
|
|
19926
|
+
/**
|
|
19927
|
+
* Browser Line Break Extraction
|
|
19928
|
+
*
|
|
19929
|
+
* Captures exact line breaks as rendered by the browser to ensure
|
|
19930
|
+
* pixel-perfect consistency between DOM editing and canvas rendering.
|
|
19931
19931
|
*/
|
|
19932
19932
|
|
|
19933
|
-
/**
|
|
19934
|
-
* Segment text into graphemes safely using Intl.Segmenter or fallback
|
|
19933
|
+
/**
|
|
19934
|
+
* Segment text into graphemes safely using Intl.Segmenter or fallback
|
|
19935
19935
|
*/
|
|
19936
19936
|
function segmentIntoGraphemes(text) {
|
|
19937
19937
|
if (typeof Intl !== 'undefined' && Intl.Segmenter) {
|
|
@@ -19945,9 +19945,9 @@ function segmentIntoGraphemes(text) {
|
|
|
19945
19945
|
return Array.from(text);
|
|
19946
19946
|
}
|
|
19947
19947
|
|
|
19948
|
-
/**
|
|
19949
|
-
* Extract line break information from a textarea by creating a mirror element
|
|
19950
|
-
* with identical computed styles and measuring grapheme positions.
|
|
19948
|
+
/**
|
|
19949
|
+
* Extract line break information from a textarea by creating a mirror element
|
|
19950
|
+
* with identical computed styles and measuring grapheme positions.
|
|
19951
19951
|
*/
|
|
19952
19952
|
function extractLinesFromDOM(textarea) {
|
|
19953
19953
|
const text = textarea.value;
|
|
@@ -20042,16 +20042,16 @@ function extractLinesFromDOM(textarea) {
|
|
|
20042
20042
|
}
|
|
20043
20043
|
}
|
|
20044
20044
|
|
|
20045
|
-
/**
|
|
20046
|
-
* Create a hash of layout-affecting properties to detect when browser lines are still valid
|
|
20045
|
+
/**
|
|
20046
|
+
* Create a hash of layout-affecting properties to detect when browser lines are still valid
|
|
20047
20047
|
*/
|
|
20048
20048
|
function createLayoutHash(target) {
|
|
20049
20049
|
const properties = [target.text, target.width, target.height, target.fontFamily, target.fontSize, target.fontWeight, target.fontStyle, target.lineHeight, target.charSpacing, target.textAlign, target.direction];
|
|
20050
20050
|
return properties.map(p => String(p)).join('|');
|
|
20051
20051
|
}
|
|
20052
20052
|
|
|
20053
|
-
/**
|
|
20054
|
-
* Check if stored browser lines are still valid for the current target state
|
|
20053
|
+
/**
|
|
20054
|
+
* Check if stored browser lines are still valid for the current target state
|
|
20055
20055
|
*/
|
|
20056
20056
|
function areBrowserLinesValid(target, storedHash) {
|
|
20057
20057
|
if (!storedHash || !target.__lastBrowserLines) {
|
|
@@ -20061,24 +20061,24 @@ function areBrowserLinesValid(target, storedHash) {
|
|
|
20061
20061
|
return currentHash === storedHash;
|
|
20062
20062
|
}
|
|
20063
20063
|
|
|
20064
|
-
/**
|
|
20065
|
-
* Store browser lines on a target object with validity hash
|
|
20064
|
+
/**
|
|
20065
|
+
* Store browser lines on a target object with validity hash
|
|
20066
20066
|
*/
|
|
20067
20067
|
function storeBrowserLines(target, lines, layoutHash) {
|
|
20068
20068
|
target.__lastBrowserLines = lines;
|
|
20069
20069
|
target.__lastBrowserLinesHash = createLayoutHash(target);
|
|
20070
20070
|
}
|
|
20071
20071
|
|
|
20072
|
-
/**
|
|
20073
|
-
* Clear stored browser lines from a target object
|
|
20072
|
+
/**
|
|
20073
|
+
* Clear stored browser lines from a target object
|
|
20074
20074
|
*/
|
|
20075
20075
|
function clearBrowserLines(target) {
|
|
20076
20076
|
delete target.__lastBrowserLines;
|
|
20077
20077
|
delete target.__lastBrowserLinesHash;
|
|
20078
20078
|
}
|
|
20079
20079
|
|
|
20080
|
-
/**
|
|
20081
|
-
* Get stored browser lines if they're still valid
|
|
20080
|
+
/**
|
|
20081
|
+
* Get stored browser lines if they're still valid
|
|
20082
20082
|
*/
|
|
20083
20083
|
function getBrowserLines(target) {
|
|
20084
20084
|
const lines = target.__lastBrowserLines;
|
|
@@ -20091,9 +20091,9 @@ function getBrowserLines(target) {
|
|
|
20091
20091
|
|
|
20092
20092
|
let measuringContext;
|
|
20093
20093
|
|
|
20094
|
-
/**
|
|
20095
|
-
* Return a context for measurement of text string.
|
|
20096
|
-
* if created it gets stored for reuse
|
|
20094
|
+
/**
|
|
20095
|
+
* Return a context for measurement of text string.
|
|
20096
|
+
* if created it gets stored for reuse
|
|
20097
20097
|
*/
|
|
20098
20098
|
function getMeasuringContext() {
|
|
20099
20099
|
if (!measuringContext) {
|
|
@@ -20106,17 +20106,17 @@ function getMeasuringContext() {
|
|
|
20106
20106
|
return measuringContext;
|
|
20107
20107
|
}
|
|
20108
20108
|
|
|
20109
|
-
/**
|
|
20110
|
-
* Measure and return the info of a single grapheme.
|
|
20111
|
-
* needs the the info of previous graphemes already filled
|
|
20112
|
-
* Override to customize measuring
|
|
20109
|
+
/**
|
|
20110
|
+
* Measure and return the info of a single grapheme.
|
|
20111
|
+
* needs the the info of previous graphemes already filled
|
|
20112
|
+
* Override to customize measuring
|
|
20113
20113
|
*/
|
|
20114
20114
|
|
|
20115
20115
|
// @TODO this is not complete
|
|
20116
20116
|
|
|
20117
|
-
/**
|
|
20118
|
-
* Text class
|
|
20119
|
-
* @see {@link http://fabricjs.com/fabric-intro-part-2#text}
|
|
20117
|
+
/**
|
|
20118
|
+
* Text class
|
|
20119
|
+
* @see {@link http://fabricjs.com/fabric-intro-part-2#text}
|
|
20120
20120
|
*/
|
|
20121
20121
|
class FabricText extends StyledText {
|
|
20122
20122
|
static getDefaults() {
|
|
@@ -20127,11 +20127,11 @@ class FabricText extends StyledText {
|
|
|
20127
20127
|
}
|
|
20128
20128
|
constructor(text, options) {
|
|
20129
20129
|
super();
|
|
20130
|
-
/**
|
|
20131
|
-
* contains characters bounding boxes
|
|
20132
|
-
* This variable is considered to be protected.
|
|
20133
|
-
* But for how mixins are implemented right now, we can't leave it private
|
|
20134
|
-
* @protected
|
|
20130
|
+
/**
|
|
20131
|
+
* contains characters bounding boxes
|
|
20132
|
+
* This variable is considered to be protected.
|
|
20133
|
+
* But for how mixins are implemented right now, we can't leave it private
|
|
20134
|
+
* @protected
|
|
20135
20135
|
*/
|
|
20136
20136
|
_defineProperty(this, "__charBounds", []);
|
|
20137
20137
|
Object.assign(this, FabricText.ownDefaults);
|
|
@@ -20148,9 +20148,9 @@ class FabricText extends StyledText {
|
|
|
20148
20148
|
this.setCoords();
|
|
20149
20149
|
}
|
|
20150
20150
|
|
|
20151
|
-
/**
|
|
20152
|
-
* If text has a path, it will add the extra information needed
|
|
20153
|
-
* for path and text calculations
|
|
20151
|
+
/**
|
|
20152
|
+
* If text has a path, it will add the extra information needed
|
|
20153
|
+
* for path and text calculations
|
|
20154
20154
|
*/
|
|
20155
20155
|
setPathInfo() {
|
|
20156
20156
|
const path = this.path;
|
|
@@ -20159,10 +20159,10 @@ class FabricText extends StyledText {
|
|
|
20159
20159
|
}
|
|
20160
20160
|
}
|
|
20161
20161
|
|
|
20162
|
-
/**
|
|
20163
|
-
* @private
|
|
20164
|
-
* Divides text into lines of text and lines of graphemes.
|
|
20165
|
-
* Uses browser lines when available for pixel-perfect consistency.
|
|
20162
|
+
/**
|
|
20163
|
+
* @private
|
|
20164
|
+
* Divides text into lines of text and lines of graphemes.
|
|
20165
|
+
* Uses browser lines when available for pixel-perfect consistency.
|
|
20166
20166
|
*/
|
|
20167
20167
|
_splitText() {
|
|
20168
20168
|
// Check if we have valid browser lines and should use them
|
|
@@ -20178,9 +20178,9 @@ class FabricText extends StyledText {
|
|
|
20178
20178
|
return newLines;
|
|
20179
20179
|
}
|
|
20180
20180
|
|
|
20181
|
-
/**
|
|
20182
|
-
* Create TextLinesInfo from browser-extracted lines
|
|
20183
|
-
* @private
|
|
20181
|
+
/**
|
|
20182
|
+
* Create TextLinesInfo from browser-extracted lines
|
|
20183
|
+
* @private
|
|
20184
20184
|
*/
|
|
20185
20185
|
_splitTextFromBrowserLines(browserLines) {
|
|
20186
20186
|
const lines = [];
|
|
@@ -20214,10 +20214,10 @@ class FabricText extends StyledText {
|
|
|
20214
20214
|
return result;
|
|
20215
20215
|
}
|
|
20216
20216
|
|
|
20217
|
-
/**
|
|
20218
|
-
* Initialize or update text dimensions.
|
|
20219
|
-
* Updates this.width and this.height with the proper values.
|
|
20220
|
-
* Does not return dimensions.
|
|
20217
|
+
/**
|
|
20218
|
+
* Initialize or update text dimensions.
|
|
20219
|
+
* Updates this.width and this.height with the proper values.
|
|
20220
|
+
* Does not return dimensions.
|
|
20221
20221
|
*/
|
|
20222
20222
|
initDimensions() {
|
|
20223
20223
|
// Use advanced layout if enabled
|
|
@@ -20240,11 +20240,12 @@ class FabricText extends StyledText {
|
|
|
20240
20240
|
}
|
|
20241
20241
|
}
|
|
20242
20242
|
|
|
20243
|
-
/**
|
|
20244
|
-
* Enlarge space boxes and shift the others
|
|
20243
|
+
/**
|
|
20244
|
+
* Enlarge space boxes and shift the others
|
|
20245
20245
|
*/
|
|
20246
20246
|
enlargeSpaces() {
|
|
20247
20247
|
let diffSpace, currentLineWidth, numberOfSpaces, accumulatedSpace, line, charBound, spaces;
|
|
20248
|
+
const isRtl = this.direction === 'rtl';
|
|
20248
20249
|
for (let i = 0, len = this._textLines.length; i < len; i++) {
|
|
20249
20250
|
if (this.textAlign !== JUSTIFY && (i === len - 1 || this.isEndOfWrapping(i))) {
|
|
20250
20251
|
continue;
|
|
@@ -20255,33 +20256,62 @@ class FabricText extends StyledText {
|
|
|
20255
20256
|
if (currentLineWidth < this.width && (spaces = this.textLines[i].match(this._reSpacesAndTabs))) {
|
|
20256
20257
|
numberOfSpaces = spaces.length;
|
|
20257
20258
|
diffSpace = (this.width - currentLineWidth) / numberOfSpaces;
|
|
20258
|
-
|
|
20259
|
-
|
|
20260
|
-
|
|
20261
|
-
|
|
20262
|
-
|
|
20263
|
-
|
|
20264
|
-
|
|
20265
|
-
|
|
20266
|
-
|
|
20259
|
+
if (isRtl) {
|
|
20260
|
+
for (let j = 0; j < line.length; j++) {
|
|
20261
|
+
if (this._reSpaceAndTab.test(line[j])) ;
|
|
20262
|
+
}
|
|
20263
|
+
|
|
20264
|
+
// For RTL, we need to work backwards through the visual positions
|
|
20265
|
+
// but still update logical positions correctly
|
|
20266
|
+
let spaceCount = 0;
|
|
20267
|
+
for (let j = 0; j <= line.length; j++) {
|
|
20268
|
+
charBound = this.__charBounds[i][j];
|
|
20269
|
+
if (charBound) {
|
|
20270
|
+
if (this._reSpaceAndTab.test(line[j])) {
|
|
20271
|
+
charBound.width += diffSpace;
|
|
20272
|
+
charBound.kernedWidth += diffSpace;
|
|
20273
|
+
spaceCount++;
|
|
20274
|
+
}
|
|
20275
|
+
|
|
20276
|
+
// For RTL, shift all characters to the right by the total expansion
|
|
20277
|
+
// minus the expansion that comes after this character
|
|
20278
|
+
const remainingSpaces = numberOfSpaces - spaceCount;
|
|
20279
|
+
const shiftAmount = remainingSpaces * diffSpace;
|
|
20280
|
+
charBound.left += shiftAmount;
|
|
20281
|
+
}
|
|
20282
|
+
}
|
|
20283
|
+
} else {
|
|
20284
|
+
// LTR processing (original logic)
|
|
20285
|
+
for (let j = 0; j <= line.length; j++) {
|
|
20286
|
+
charBound = this.__charBounds[i][j];
|
|
20287
|
+
if (charBound) {
|
|
20288
|
+
if (this._reSpaceAndTab.test(line[j])) {
|
|
20289
|
+
charBound.width += diffSpace;
|
|
20290
|
+
charBound.kernedWidth += diffSpace;
|
|
20291
|
+
charBound.left += accumulatedSpace;
|
|
20292
|
+
accumulatedSpace += diffSpace;
|
|
20293
|
+
} else {
|
|
20294
|
+
charBound.left += accumulatedSpace;
|
|
20295
|
+
}
|
|
20296
|
+
}
|
|
20267
20297
|
}
|
|
20268
20298
|
}
|
|
20269
20299
|
}
|
|
20270
20300
|
}
|
|
20271
20301
|
}
|
|
20272
20302
|
|
|
20273
|
-
/**
|
|
20274
|
-
* Advanced layout using new text engine (Konva-compatible)
|
|
20275
|
-
* @private
|
|
20303
|
+
/**
|
|
20304
|
+
* Advanced layout using new text engine (Konva-compatible)
|
|
20305
|
+
* @private
|
|
20276
20306
|
*/
|
|
20277
20307
|
_layoutTextAdvanced() {
|
|
20278
20308
|
const options = this._getAdvancedLayoutOptions();
|
|
20279
20309
|
return layoutText(options);
|
|
20280
20310
|
}
|
|
20281
20311
|
|
|
20282
|
-
/**
|
|
20283
|
-
* Get advanced layout options from current text properties
|
|
20284
|
-
* @private
|
|
20312
|
+
/**
|
|
20313
|
+
* Get advanced layout options from current text properties
|
|
20314
|
+
* @private
|
|
20285
20315
|
*/
|
|
20286
20316
|
_getAdvancedLayoutOptions() {
|
|
20287
20317
|
return {
|
|
@@ -20303,9 +20333,9 @@ class FabricText extends StyledText {
|
|
|
20303
20333
|
};
|
|
20304
20334
|
}
|
|
20305
20335
|
|
|
20306
|
-
/**
|
|
20307
|
-
* Map Fabric textAlign to Konva align format
|
|
20308
|
-
* @private
|
|
20336
|
+
/**
|
|
20337
|
+
* Map Fabric textAlign to Konva align format
|
|
20338
|
+
* @private
|
|
20309
20339
|
*/
|
|
20310
20340
|
_mapTextAlignToAlign(textAlign) {
|
|
20311
20341
|
switch (textAlign) {
|
|
@@ -20326,8 +20356,8 @@ class FabricText extends StyledText {
|
|
|
20326
20356
|
}
|
|
20327
20357
|
}
|
|
20328
20358
|
|
|
20329
|
-
/**
|
|
20330
|
-
* Enhanced initDimensions that uses advanced layout when enabled
|
|
20359
|
+
/**
|
|
20360
|
+
* Enhanced initDimensions that uses advanced layout when enabled
|
|
20331
20361
|
*/
|
|
20332
20362
|
initDimensionsAdvanced() {
|
|
20333
20363
|
if (!this.enableAdvancedLayout) {
|
|
@@ -20344,9 +20374,9 @@ class FabricText extends StyledText {
|
|
|
20344
20374
|
this.dirty = true;
|
|
20345
20375
|
}
|
|
20346
20376
|
|
|
20347
|
-
/**
|
|
20348
|
-
* Convert new layout format to legacy _textLines and __charBounds format
|
|
20349
|
-
* @private
|
|
20377
|
+
/**
|
|
20378
|
+
* Convert new layout format to legacy _textLines and __charBounds format
|
|
20379
|
+
* @private
|
|
20350
20380
|
*/
|
|
20351
20381
|
_convertLayoutToLegacyFormat(layout) {
|
|
20352
20382
|
this._textLines = layout.lines.map(line => line.graphemes);
|
|
@@ -20368,30 +20398,30 @@ class FabricText extends StyledText {
|
|
|
20368
20398
|
}
|
|
20369
20399
|
}
|
|
20370
20400
|
|
|
20371
|
-
/**
|
|
20372
|
-
* Detect if the text line is ended with an hard break
|
|
20373
|
-
* text and itext do not have wrapping, return false
|
|
20374
|
-
* @return {Boolean}
|
|
20401
|
+
/**
|
|
20402
|
+
* Detect if the text line is ended with an hard break
|
|
20403
|
+
* text and itext do not have wrapping, return false
|
|
20404
|
+
* @return {Boolean}
|
|
20375
20405
|
*/
|
|
20376
20406
|
isEndOfWrapping(lineIndex) {
|
|
20377
20407
|
return lineIndex === this._textLines.length - 1;
|
|
20378
20408
|
}
|
|
20379
20409
|
|
|
20380
|
-
/**
|
|
20381
|
-
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
20382
|
-
* and counting style.
|
|
20383
|
-
* It return always 1 for text and Itext. Textbox has its own implementation
|
|
20384
|
-
* @return Number
|
|
20410
|
+
/**
|
|
20411
|
+
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
20412
|
+
* and counting style.
|
|
20413
|
+
* It return always 1 for text and Itext. Textbox has its own implementation
|
|
20414
|
+
* @return Number
|
|
20385
20415
|
*/
|
|
20386
20416
|
|
|
20387
20417
|
missingNewlineOffset(_lineIndex) {
|
|
20388
20418
|
return 1;
|
|
20389
20419
|
}
|
|
20390
20420
|
|
|
20391
|
-
/**
|
|
20392
|
-
* Returns 2d representation (lineIndex and charIndex) of cursor
|
|
20393
|
-
* @param {Number} selectionStart
|
|
20394
|
-
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
20421
|
+
/**
|
|
20422
|
+
* Returns 2d representation (lineIndex and charIndex) of cursor
|
|
20423
|
+
* @param {Number} selectionStart
|
|
20424
|
+
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
20395
20425
|
*/
|
|
20396
20426
|
get2DCursorLocation(selectionStart, skipWrapping) {
|
|
20397
20427
|
const lines = skipWrapping ? this._unwrappedTextLines : this._textLines;
|
|
@@ -20411,24 +20441,24 @@ class FabricText extends StyledText {
|
|
|
20411
20441
|
};
|
|
20412
20442
|
}
|
|
20413
20443
|
|
|
20414
|
-
/**
|
|
20415
|
-
* Returns string representation of an instance
|
|
20416
|
-
* @return {String} String representation of text object
|
|
20444
|
+
/**
|
|
20445
|
+
* Returns string representation of an instance
|
|
20446
|
+
* @return {String} String representation of text object
|
|
20417
20447
|
*/
|
|
20418
20448
|
toString() {
|
|
20419
20449
|
return `#<Text (${this.complexity()}): { "text": "${this.text}", "fontFamily": "${this.fontFamily}" }>`;
|
|
20420
20450
|
}
|
|
20421
20451
|
|
|
20422
|
-
/**
|
|
20423
|
-
* Return the dimension and the zoom level needed to create a cache canvas
|
|
20424
|
-
* big enough to host the object to be cached.
|
|
20425
|
-
* @private
|
|
20426
|
-
* @param {Object} dim.x width of object to be cached
|
|
20427
|
-
* @param {Object} dim.y height of object to be cached
|
|
20428
|
-
* @return {Object}.width width of canvas
|
|
20429
|
-
* @return {Object}.height height of canvas
|
|
20430
|
-
* @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
|
|
20431
|
-
* @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
|
|
20452
|
+
/**
|
|
20453
|
+
* Return the dimension and the zoom level needed to create a cache canvas
|
|
20454
|
+
* big enough to host the object to be cached.
|
|
20455
|
+
* @private
|
|
20456
|
+
* @param {Object} dim.x width of object to be cached
|
|
20457
|
+
* @param {Object} dim.y height of object to be cached
|
|
20458
|
+
* @return {Object}.width width of canvas
|
|
20459
|
+
* @return {Object}.height height of canvas
|
|
20460
|
+
* @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
|
|
20461
|
+
* @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
|
|
20432
20462
|
*/
|
|
20433
20463
|
_getCacheCanvasDimensions() {
|
|
20434
20464
|
const dims = super._getCacheCanvasDimensions();
|
|
@@ -20438,9 +20468,9 @@ class FabricText extends StyledText {
|
|
|
20438
20468
|
return dims;
|
|
20439
20469
|
}
|
|
20440
20470
|
|
|
20441
|
-
/**
|
|
20442
|
-
* @private
|
|
20443
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20471
|
+
/**
|
|
20472
|
+
* @private
|
|
20473
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20444
20474
|
*/
|
|
20445
20475
|
_render(ctx) {
|
|
20446
20476
|
const path = this.path;
|
|
@@ -20453,9 +20483,9 @@ class FabricText extends StyledText {
|
|
|
20453
20483
|
this._renderTextDecoration(ctx, 'linethrough');
|
|
20454
20484
|
}
|
|
20455
20485
|
|
|
20456
|
-
/**
|
|
20457
|
-
* @private
|
|
20458
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20486
|
+
/**
|
|
20487
|
+
* @private
|
|
20488
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20459
20489
|
*/
|
|
20460
20490
|
_renderText(ctx) {
|
|
20461
20491
|
// Skip text rendering if in overlay editing mode
|
|
@@ -20471,15 +20501,15 @@ class FabricText extends StyledText {
|
|
|
20471
20501
|
}
|
|
20472
20502
|
}
|
|
20473
20503
|
|
|
20474
|
-
/**
|
|
20475
|
-
* Set the font parameter of the context with the object properties or with charStyle
|
|
20476
|
-
* @private
|
|
20477
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20478
|
-
* @param {Object} [charStyle] object with font style properties
|
|
20479
|
-
* @param {String} [charStyle.fontFamily] Font Family
|
|
20480
|
-
* @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
|
|
20481
|
-
* @param {String} [charStyle.fontWeight] Font weight
|
|
20482
|
-
* @param {String} [charStyle.fontStyle] Font style (italic|normal)
|
|
20504
|
+
/**
|
|
20505
|
+
* Set the font parameter of the context with the object properties or with charStyle
|
|
20506
|
+
* @private
|
|
20507
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20508
|
+
* @param {Object} [charStyle] object with font style properties
|
|
20509
|
+
* @param {String} [charStyle.fontFamily] Font Family
|
|
20510
|
+
* @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
|
|
20511
|
+
* @param {String} [charStyle.fontWeight] Font weight
|
|
20512
|
+
* @param {String} [charStyle.fontStyle] Font style (italic|normal)
|
|
20483
20513
|
*/
|
|
20484
20514
|
_setTextStyles(ctx, charStyle, forMeasuring) {
|
|
20485
20515
|
ctx.textBaseline = 'alphabetic';
|
|
@@ -20499,11 +20529,11 @@ class FabricText extends StyledText {
|
|
|
20499
20529
|
ctx.font = this._getFontDeclaration(charStyle, forMeasuring);
|
|
20500
20530
|
}
|
|
20501
20531
|
|
|
20502
|
-
/**
|
|
20503
|
-
* calculate and return the text Width measuring each line.
|
|
20504
|
-
* @private
|
|
20505
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20506
|
-
* @return {Number} Maximum width of Text object
|
|
20532
|
+
/**
|
|
20533
|
+
* calculate and return the text Width measuring each line.
|
|
20534
|
+
* @private
|
|
20535
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20536
|
+
* @return {Number} Maximum width of Text object
|
|
20507
20537
|
*/
|
|
20508
20538
|
calcTextWidth() {
|
|
20509
20539
|
let maxWidth = this.getLineWidth(0);
|
|
@@ -20516,23 +20546,23 @@ class FabricText extends StyledText {
|
|
|
20516
20546
|
return maxWidth;
|
|
20517
20547
|
}
|
|
20518
20548
|
|
|
20519
|
-
/**
|
|
20520
|
-
* @private
|
|
20521
|
-
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20522
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20523
|
-
* @param {String} line Text to render
|
|
20524
|
-
* @param {Number} left Left position of text
|
|
20525
|
-
* @param {Number} top Top position of text
|
|
20526
|
-
* @param {Number} lineIndex Index of a line in a text
|
|
20549
|
+
/**
|
|
20550
|
+
* @private
|
|
20551
|
+
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20552
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20553
|
+
* @param {String} line Text to render
|
|
20554
|
+
* @param {Number} left Left position of text
|
|
20555
|
+
* @param {Number} top Top position of text
|
|
20556
|
+
* @param {Number} lineIndex Index of a line in a text
|
|
20527
20557
|
*/
|
|
20528
20558
|
_renderTextLine(method, ctx, line, left, top, lineIndex) {
|
|
20529
20559
|
this._renderChars(method, ctx, line, left, top, lineIndex);
|
|
20530
20560
|
}
|
|
20531
20561
|
|
|
20532
|
-
/**
|
|
20533
|
-
* Renders the text background for lines, taking care of style
|
|
20534
|
-
* @private
|
|
20535
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20562
|
+
/**
|
|
20563
|
+
* Renders the text background for lines, taking care of style
|
|
20564
|
+
* @private
|
|
20565
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20536
20566
|
*/
|
|
20537
20567
|
_renderTextLinesBackground(ctx) {
|
|
20538
20568
|
if (!this.textBackgroundColor && !this.styleHas('textBackgroundColor')) {
|
|
@@ -20595,15 +20625,15 @@ class FabricText extends StyledText {
|
|
|
20595
20625
|
this._removeShadow(ctx);
|
|
20596
20626
|
}
|
|
20597
20627
|
|
|
20598
|
-
/**
|
|
20599
|
-
* measure and return the width of a single character.
|
|
20600
|
-
* possibly overridden to accommodate different measure logic or
|
|
20601
|
-
* to hook some external lib for character measurement
|
|
20602
|
-
* @private
|
|
20603
|
-
* @param {String} _char, char to be measured
|
|
20604
|
-
* @param {Object} charStyle style of char to be measured
|
|
20605
|
-
* @param {String} [previousChar] previous char
|
|
20606
|
-
* @param {Object} [prevCharStyle] style of previous char
|
|
20628
|
+
/**
|
|
20629
|
+
* measure and return the width of a single character.
|
|
20630
|
+
* possibly overridden to accommodate different measure logic or
|
|
20631
|
+
* to hook some external lib for character measurement
|
|
20632
|
+
* @private
|
|
20633
|
+
* @param {String} _char, char to be measured
|
|
20634
|
+
* @param {Object} charStyle style of char to be measured
|
|
20635
|
+
* @param {String} [previousChar] previous char
|
|
20636
|
+
* @param {Object} [prevCharStyle] style of previous char
|
|
20607
20637
|
*/
|
|
20608
20638
|
_measureChar(_char, charStyle, previousChar, prevCharStyle) {
|
|
20609
20639
|
const fontCache = cache.getFontCache(charStyle),
|
|
@@ -20648,19 +20678,19 @@ class FabricText extends StyledText {
|
|
|
20648
20678
|
};
|
|
20649
20679
|
}
|
|
20650
20680
|
|
|
20651
|
-
/**
|
|
20652
|
-
* Computes height of character at given position
|
|
20653
|
-
* @param {Number} line the line index number
|
|
20654
|
-
* @param {Number} _char the character index number
|
|
20655
|
-
* @return {Number} fontSize of the character
|
|
20681
|
+
/**
|
|
20682
|
+
* Computes height of character at given position
|
|
20683
|
+
* @param {Number} line the line index number
|
|
20684
|
+
* @param {Number} _char the character index number
|
|
20685
|
+
* @return {Number} fontSize of the character
|
|
20656
20686
|
*/
|
|
20657
20687
|
getHeightOfChar(line, _char) {
|
|
20658
20688
|
return this.getValueOfPropertyAt(line, _char, 'fontSize');
|
|
20659
20689
|
}
|
|
20660
20690
|
|
|
20661
|
-
/**
|
|
20662
|
-
* measure a text line measuring all characters.
|
|
20663
|
-
* @param {Number} lineIndex line number
|
|
20691
|
+
/**
|
|
20692
|
+
* measure a text line measuring all characters.
|
|
20693
|
+
* @param {Number} lineIndex line number
|
|
20664
20694
|
*/
|
|
20665
20695
|
measureLine(lineIndex) {
|
|
20666
20696
|
const lineInfo = this._measureLine(lineIndex);
|
|
@@ -20673,11 +20703,11 @@ class FabricText extends StyledText {
|
|
|
20673
20703
|
return lineInfo;
|
|
20674
20704
|
}
|
|
20675
20705
|
|
|
20676
|
-
/**
|
|
20677
|
-
* measure every grapheme of a line, populating __charBounds
|
|
20678
|
-
* @param {Number} lineIndex
|
|
20679
|
-
* @return {Object} object.width total width of characters
|
|
20680
|
-
* @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
|
|
20706
|
+
/**
|
|
20707
|
+
* measure every grapheme of a line, populating __charBounds
|
|
20708
|
+
* @param {Number} lineIndex
|
|
20709
|
+
* @return {Object} object.width total width of characters
|
|
20710
|
+
* @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
|
|
20681
20711
|
*/
|
|
20682
20712
|
_measureLine(lineIndex) {
|
|
20683
20713
|
let width = 0,
|
|
@@ -20740,13 +20770,13 @@ class FabricText extends StyledText {
|
|
|
20740
20770
|
};
|
|
20741
20771
|
}
|
|
20742
20772
|
|
|
20743
|
-
/**
|
|
20744
|
-
* Calculate the angle and the left,top position of the char that follow a path.
|
|
20745
|
-
* It appends it to graphemeInfo to be reused later at rendering
|
|
20746
|
-
* @private
|
|
20747
|
-
* @param {Number} positionInPath to be measured
|
|
20748
|
-
* @param {GraphemeBBox} graphemeInfo current grapheme box information
|
|
20749
|
-
* @param {Object} startingPoint position of the point
|
|
20773
|
+
/**
|
|
20774
|
+
* Calculate the angle and the left,top position of the char that follow a path.
|
|
20775
|
+
* It appends it to graphemeInfo to be reused later at rendering
|
|
20776
|
+
* @private
|
|
20777
|
+
* @param {Number} positionInPath to be measured
|
|
20778
|
+
* @param {GraphemeBBox} graphemeInfo current grapheme box information
|
|
20779
|
+
* @param {Object} startingPoint position of the point
|
|
20750
20780
|
*/
|
|
20751
20781
|
_setGraphemeOnPath(positionInPath, graphemeInfo) {
|
|
20752
20782
|
const centerPosition = positionInPath + graphemeInfo.kernedWidth / 2,
|
|
@@ -20759,13 +20789,13 @@ class FabricText extends StyledText {
|
|
|
20759
20789
|
graphemeInfo.angle = info.angle + (this.pathSide === RIGHT ? Math.PI : 0);
|
|
20760
20790
|
}
|
|
20761
20791
|
|
|
20762
|
-
/**
|
|
20763
|
-
*
|
|
20764
|
-
* @param {String} grapheme to be measured
|
|
20765
|
-
* @param {Number} lineIndex index of the line where the char is
|
|
20766
|
-
* @param {Number} charIndex position in the line
|
|
20767
|
-
* @param {String} [prevGrapheme] character preceding the one to be measured
|
|
20768
|
-
* @returns {GraphemeBBox} grapheme bbox
|
|
20792
|
+
/**
|
|
20793
|
+
*
|
|
20794
|
+
* @param {String} grapheme to be measured
|
|
20795
|
+
* @param {Number} lineIndex index of the line where the char is
|
|
20796
|
+
* @param {Number} charIndex position in the line
|
|
20797
|
+
* @param {String} [prevGrapheme] character preceding the one to be measured
|
|
20798
|
+
* @returns {GraphemeBBox} grapheme bbox
|
|
20769
20799
|
*/
|
|
20770
20800
|
_getGraphemeBox(grapheme, lineIndex, charIndex, prevGrapheme, skipLeft) {
|
|
20771
20801
|
const style = this.getCompleteStyleDeclaration(lineIndex, charIndex),
|
|
@@ -20793,10 +20823,10 @@ class FabricText extends StyledText {
|
|
|
20793
20823
|
return box;
|
|
20794
20824
|
}
|
|
20795
20825
|
|
|
20796
|
-
/**
|
|
20797
|
-
* Calculate height of line at 'lineIndex'
|
|
20798
|
-
* @param {Number} lineIndex index of line to calculate
|
|
20799
|
-
* @return {Number}
|
|
20826
|
+
/**
|
|
20827
|
+
* Calculate height of line at 'lineIndex'
|
|
20828
|
+
* @param {Number} lineIndex index of line to calculate
|
|
20829
|
+
* @return {Number}
|
|
20800
20830
|
*/
|
|
20801
20831
|
getHeightOfLine(lineIndex) {
|
|
20802
20832
|
if (this.__lineHeights[lineIndex]) {
|
|
@@ -20812,8 +20842,8 @@ class FabricText extends StyledText {
|
|
|
20812
20842
|
return this.__lineHeights[lineIndex] = maxHeight * this.lineHeight * this._fontSizeMult;
|
|
20813
20843
|
}
|
|
20814
20844
|
|
|
20815
|
-
/**
|
|
20816
|
-
* Calculate text box height
|
|
20845
|
+
/**
|
|
20846
|
+
* Calculate text box height
|
|
20817
20847
|
*/
|
|
20818
20848
|
calcTextHeight() {
|
|
20819
20849
|
let lineHeight,
|
|
@@ -20825,26 +20855,26 @@ class FabricText extends StyledText {
|
|
|
20825
20855
|
return height;
|
|
20826
20856
|
}
|
|
20827
20857
|
|
|
20828
|
-
/**
|
|
20829
|
-
* @private
|
|
20830
|
-
* @return {Number} Left offset
|
|
20858
|
+
/**
|
|
20859
|
+
* @private
|
|
20860
|
+
* @return {Number} Left offset
|
|
20831
20861
|
*/
|
|
20832
20862
|
_getLeftOffset() {
|
|
20833
20863
|
return this.direction === 'ltr' ? -this.width / 2 : this.width / 2;
|
|
20834
20864
|
}
|
|
20835
20865
|
|
|
20836
|
-
/**
|
|
20837
|
-
* @private
|
|
20838
|
-
* @return {Number} Top offset
|
|
20866
|
+
/**
|
|
20867
|
+
* @private
|
|
20868
|
+
* @return {Number} Top offset
|
|
20839
20869
|
*/
|
|
20840
20870
|
_getTopOffset() {
|
|
20841
20871
|
return -this.height / 2;
|
|
20842
20872
|
}
|
|
20843
20873
|
|
|
20844
|
-
/**
|
|
20845
|
-
* @private
|
|
20846
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20847
|
-
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20874
|
+
/**
|
|
20875
|
+
* @private
|
|
20876
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20877
|
+
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20848
20878
|
*/
|
|
20849
20879
|
_renderTextCommon(ctx, method) {
|
|
20850
20880
|
ctx.save();
|
|
@@ -20861,9 +20891,9 @@ class FabricText extends StyledText {
|
|
|
20861
20891
|
ctx.restore();
|
|
20862
20892
|
}
|
|
20863
20893
|
|
|
20864
|
-
/**
|
|
20865
|
-
* @private
|
|
20866
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20894
|
+
/**
|
|
20895
|
+
* @private
|
|
20896
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20867
20897
|
*/
|
|
20868
20898
|
_renderTextFill(ctx) {
|
|
20869
20899
|
if (!this.fill && !this.styleHas(FILL)) {
|
|
@@ -20872,9 +20902,9 @@ class FabricText extends StyledText {
|
|
|
20872
20902
|
this._renderTextCommon(ctx, 'fillText');
|
|
20873
20903
|
}
|
|
20874
20904
|
|
|
20875
|
-
/**
|
|
20876
|
-
* @private
|
|
20877
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20905
|
+
/**
|
|
20906
|
+
* @private
|
|
20907
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20878
20908
|
*/
|
|
20879
20909
|
_renderTextStroke(ctx) {
|
|
20880
20910
|
if ((!this.stroke || this.strokeWidth === 0) && this.isEmptyStyles()) {
|
|
@@ -20891,14 +20921,14 @@ class FabricText extends StyledText {
|
|
|
20891
20921
|
ctx.restore();
|
|
20892
20922
|
}
|
|
20893
20923
|
|
|
20894
|
-
/**
|
|
20895
|
-
* @private
|
|
20896
|
-
* @param {String} method fillText or strokeText.
|
|
20897
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20898
|
-
* @param {Array} line Content of the line, splitted in an array by grapheme
|
|
20899
|
-
* @param {Number} left
|
|
20900
|
-
* @param {Number} top
|
|
20901
|
-
* @param {Number} lineIndex
|
|
20924
|
+
/**
|
|
20925
|
+
* @private
|
|
20926
|
+
* @param {String} method fillText or strokeText.
|
|
20927
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20928
|
+
* @param {Array} line Content of the line, splitted in an array by grapheme
|
|
20929
|
+
* @param {Number} left
|
|
20930
|
+
* @param {Number} top
|
|
20931
|
+
* @param {Number} lineIndex
|
|
20902
20932
|
*/
|
|
20903
20933
|
_renderChars(method, ctx, line, left, top, lineIndex) {
|
|
20904
20934
|
const lineHeight = this.getHeightOfLine(lineIndex),
|
|
@@ -20921,7 +20951,15 @@ class FabricText extends StyledText {
|
|
|
20921
20951
|
if (currentDirection !== this.direction) {
|
|
20922
20952
|
ctx.canvas.setAttribute('dir', isLtr ? 'ltr' : 'rtl');
|
|
20923
20953
|
ctx.direction = isLtr ? 'ltr' : 'rtl';
|
|
20924
|
-
|
|
20954
|
+
|
|
20955
|
+
// For justify alignments, we need to set the correct canvas text alignment
|
|
20956
|
+
// This is crucial for RTL text to render in the correct order
|
|
20957
|
+
if (isJustify) {
|
|
20958
|
+
// Justify uses LEFT alignment as a base, letting the character positioning handle justification
|
|
20959
|
+
ctx.textAlign = LEFT;
|
|
20960
|
+
} else {
|
|
20961
|
+
ctx.textAlign = isLtr ? LEFT : RIGHT;
|
|
20962
|
+
}
|
|
20925
20963
|
}
|
|
20926
20964
|
top -= lineHeight * this._fontSizeFraction / this.lineHeight;
|
|
20927
20965
|
if (shortCut) {
|
|
@@ -20972,16 +21010,16 @@ class FabricText extends StyledText {
|
|
|
20972
21010
|
ctx.restore();
|
|
20973
21011
|
}
|
|
20974
21012
|
|
|
20975
|
-
/**
|
|
20976
|
-
* This function try to patch the missing gradientTransform on canvas gradients.
|
|
20977
|
-
* transforming a context to transform the gradient, is going to transform the stroke too.
|
|
20978
|
-
* we want to transform the gradient but not the stroke operation, so we create
|
|
20979
|
-
* a transformed gradient on a pattern and then we use the pattern instead of the gradient.
|
|
20980
|
-
* this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
|
|
20981
|
-
* is limited.
|
|
20982
|
-
* @private
|
|
20983
|
-
* @param {TFiller} filler a fabric gradient instance
|
|
20984
|
-
* @return {CanvasPattern} a pattern to use as fill/stroke style
|
|
21013
|
+
/**
|
|
21014
|
+
* This function try to patch the missing gradientTransform on canvas gradients.
|
|
21015
|
+
* transforming a context to transform the gradient, is going to transform the stroke too.
|
|
21016
|
+
* we want to transform the gradient but not the stroke operation, so we create
|
|
21017
|
+
* a transformed gradient on a pattern and then we use the pattern instead of the gradient.
|
|
21018
|
+
* this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
|
|
21019
|
+
* is limited.
|
|
21020
|
+
* @private
|
|
21021
|
+
* @param {TFiller} filler a fabric gradient instance
|
|
21022
|
+
* @return {CanvasPattern} a pattern to use as fill/stroke style
|
|
20985
21023
|
*/
|
|
20986
21024
|
_applyPatternGradientTransformText(filler) {
|
|
20987
21025
|
// TODO: verify compatibility with strokeUniform
|
|
@@ -21037,12 +21075,12 @@ class FabricText extends StyledText {
|
|
|
21037
21075
|
};
|
|
21038
21076
|
}
|
|
21039
21077
|
|
|
21040
|
-
/**
|
|
21041
|
-
* This function prepare the canvas for a stroke style, and stroke and strokeWidth
|
|
21042
|
-
* need to be sent in as defined
|
|
21043
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
21044
|
-
* @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
|
|
21045
|
-
* @returns
|
|
21078
|
+
/**
|
|
21079
|
+
* This function prepare the canvas for a stroke style, and stroke and strokeWidth
|
|
21080
|
+
* need to be sent in as defined
|
|
21081
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
21082
|
+
* @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
|
|
21083
|
+
* @returns
|
|
21046
21084
|
*/
|
|
21047
21085
|
_setStrokeStyles(ctx, _ref) {
|
|
21048
21086
|
let {
|
|
@@ -21057,12 +21095,12 @@ class FabricText extends StyledText {
|
|
|
21057
21095
|
return this.handleFiller(ctx, 'strokeStyle', stroke);
|
|
21058
21096
|
}
|
|
21059
21097
|
|
|
21060
|
-
/**
|
|
21061
|
-
* This function prepare the canvas for a ill style, and fill
|
|
21062
|
-
* need to be sent in as defined
|
|
21063
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
21064
|
-
* @param {CompleteTextStyleDeclaration} style with ill defined
|
|
21065
|
-
* @returns
|
|
21098
|
+
/**
|
|
21099
|
+
* This function prepare the canvas for a ill style, and fill
|
|
21100
|
+
* need to be sent in as defined
|
|
21101
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
21102
|
+
* @param {CompleteTextStyleDeclaration} style with ill defined
|
|
21103
|
+
* @returns
|
|
21066
21104
|
*/
|
|
21067
21105
|
_setFillStyles(ctx, _ref2) {
|
|
21068
21106
|
let {
|
|
@@ -21071,16 +21109,16 @@ class FabricText extends StyledText {
|
|
|
21071
21109
|
return this.handleFiller(ctx, 'fillStyle', fill);
|
|
21072
21110
|
}
|
|
21073
21111
|
|
|
21074
|
-
/**
|
|
21075
|
-
* @private
|
|
21076
|
-
* @param {String} method
|
|
21077
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21078
|
-
* @param {Number} lineIndex
|
|
21079
|
-
* @param {Number} charIndex
|
|
21080
|
-
* @param {String} _char
|
|
21081
|
-
* @param {Number} left Left coordinate
|
|
21082
|
-
* @param {Number} top Top coordinate
|
|
21083
|
-
* @param {Number} lineHeight Height of the line
|
|
21112
|
+
/**
|
|
21113
|
+
* @private
|
|
21114
|
+
* @param {String} method
|
|
21115
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21116
|
+
* @param {Number} lineIndex
|
|
21117
|
+
* @param {Number} charIndex
|
|
21118
|
+
* @param {String} _char
|
|
21119
|
+
* @param {Number} left Left coordinate
|
|
21120
|
+
* @param {Number} top Top coordinate
|
|
21121
|
+
* @param {Number} lineHeight Height of the line
|
|
21084
21122
|
*/
|
|
21085
21123
|
_renderChar(method, ctx, lineIndex, charIndex, _char, left, top) {
|
|
21086
21124
|
const decl = this._getStyleDeclaration(lineIndex, charIndex),
|
|
@@ -21109,30 +21147,30 @@ class FabricText extends StyledText {
|
|
|
21109
21147
|
ctx.restore();
|
|
21110
21148
|
}
|
|
21111
21149
|
|
|
21112
|
-
/**
|
|
21113
|
-
* Turns the character into a 'superior figure' (i.e. 'superscript')
|
|
21114
|
-
* @param {Number} start selection start
|
|
21115
|
-
* @param {Number} end selection end
|
|
21150
|
+
/**
|
|
21151
|
+
* Turns the character into a 'superior figure' (i.e. 'superscript')
|
|
21152
|
+
* @param {Number} start selection start
|
|
21153
|
+
* @param {Number} end selection end
|
|
21116
21154
|
*/
|
|
21117
21155
|
setSuperscript(start, end) {
|
|
21118
21156
|
this._setScript(start, end, this.superscript);
|
|
21119
21157
|
}
|
|
21120
21158
|
|
|
21121
|
-
/**
|
|
21122
|
-
* Turns the character into an 'inferior figure' (i.e. 'subscript')
|
|
21123
|
-
* @param {Number} start selection start
|
|
21124
|
-
* @param {Number} end selection end
|
|
21159
|
+
/**
|
|
21160
|
+
* Turns the character into an 'inferior figure' (i.e. 'subscript')
|
|
21161
|
+
* @param {Number} start selection start
|
|
21162
|
+
* @param {Number} end selection end
|
|
21125
21163
|
*/
|
|
21126
21164
|
setSubscript(start, end) {
|
|
21127
21165
|
this._setScript(start, end, this.subscript);
|
|
21128
21166
|
}
|
|
21129
21167
|
|
|
21130
|
-
/**
|
|
21131
|
-
* Applies 'schema' at given position
|
|
21132
|
-
* @private
|
|
21133
|
-
* @param {Number} start selection start
|
|
21134
|
-
* @param {Number} end selection end
|
|
21135
|
-
* @param {Number} schema
|
|
21168
|
+
/**
|
|
21169
|
+
* Applies 'schema' at given position
|
|
21170
|
+
* @private
|
|
21171
|
+
* @param {Number} start selection start
|
|
21172
|
+
* @param {Number} end selection end
|
|
21173
|
+
* @param {Number} schema
|
|
21136
21174
|
*/
|
|
21137
21175
|
_setScript(start, end, schema) {
|
|
21138
21176
|
const loc = this.get2DCursorLocation(start, true),
|
|
@@ -21145,10 +21183,10 @@ class FabricText extends StyledText {
|
|
|
21145
21183
|
this.setSelectionStyles(style, start, end);
|
|
21146
21184
|
}
|
|
21147
21185
|
|
|
21148
|
-
/**
|
|
21149
|
-
* @private
|
|
21150
|
-
* @param {Number} lineIndex index text line
|
|
21151
|
-
* @return {Number} Line left offset
|
|
21186
|
+
/**
|
|
21187
|
+
* @private
|
|
21188
|
+
* @param {Number} lineIndex index text line
|
|
21189
|
+
* @return {Number} Line left offset
|
|
21152
21190
|
*/
|
|
21153
21191
|
_getLineLeftOffset(lineIndex) {
|
|
21154
21192
|
const lineWidth = this.getLineWidth(lineIndex),
|
|
@@ -21157,9 +21195,21 @@ class FabricText extends StyledText {
|
|
|
21157
21195
|
direction = this.direction,
|
|
21158
21196
|
isEndOfWrapping = this.isEndOfWrapping(lineIndex);
|
|
21159
21197
|
let leftOffset = 0;
|
|
21160
|
-
|
|
21161
|
-
|
|
21198
|
+
|
|
21199
|
+
// Handle justify alignments (excluding last lines and wrapped line ends)
|
|
21200
|
+
const isJustifyLine = textAlign === JUSTIFY || textAlign === JUSTIFY_CENTER && !isEndOfWrapping || textAlign === JUSTIFY_RIGHT && !isEndOfWrapping || textAlign === JUSTIFY_LEFT && !isEndOfWrapping;
|
|
21201
|
+
if (isJustifyLine) {
|
|
21202
|
+
// Justify lines should start at the left edge for LTR and right edge for RTL
|
|
21203
|
+
// The space distribution is handled by enlargeSpaces()
|
|
21204
|
+
if (direction === 'rtl') {
|
|
21205
|
+
// For RTL justify, we need to account for the line being right-aligned
|
|
21206
|
+
return 0;
|
|
21207
|
+
} else {
|
|
21208
|
+
return 0;
|
|
21209
|
+
}
|
|
21162
21210
|
}
|
|
21211
|
+
|
|
21212
|
+
// Handle non-justify alignments
|
|
21163
21213
|
if (textAlign === CENTER) {
|
|
21164
21214
|
leftOffset = lineDiff / 2;
|
|
21165
21215
|
}
|
|
@@ -21172,6 +21222,8 @@ class FabricText extends StyledText {
|
|
|
21172
21222
|
if (textAlign === JUSTIFY_RIGHT) {
|
|
21173
21223
|
leftOffset = lineDiff;
|
|
21174
21224
|
}
|
|
21225
|
+
|
|
21226
|
+
// Apply RTL adjustments for non-justify alignments
|
|
21175
21227
|
if (direction === 'rtl') {
|
|
21176
21228
|
if (textAlign === RIGHT || textAlign === JUSTIFY || textAlign === JUSTIFY_RIGHT) {
|
|
21177
21229
|
leftOffset = 0;
|
|
@@ -21184,8 +21236,8 @@ class FabricText extends StyledText {
|
|
|
21184
21236
|
return leftOffset;
|
|
21185
21237
|
}
|
|
21186
21238
|
|
|
21187
|
-
/**
|
|
21188
|
-
* @private
|
|
21239
|
+
/**
|
|
21240
|
+
* @private
|
|
21189
21241
|
*/
|
|
21190
21242
|
_clearCache() {
|
|
21191
21243
|
this._forceClearCache = false;
|
|
@@ -21194,12 +21246,12 @@ class FabricText extends StyledText {
|
|
|
21194
21246
|
this.__charBounds = [];
|
|
21195
21247
|
}
|
|
21196
21248
|
|
|
21197
|
-
/**
|
|
21198
|
-
* Measure a single line given its index. Used to calculate the initial
|
|
21199
|
-
* text bounding box. The values are calculated and stored in __lineWidths cache.
|
|
21200
|
-
* @private
|
|
21201
|
-
* @param {Number} lineIndex line number
|
|
21202
|
-
* @return {Number} Line width
|
|
21249
|
+
/**
|
|
21250
|
+
* Measure a single line given its index. Used to calculate the initial
|
|
21251
|
+
* text bounding box. The values are calculated and stored in __lineWidths cache.
|
|
21252
|
+
* @private
|
|
21253
|
+
* @param {Number} lineIndex line number
|
|
21254
|
+
* @return {Number} Line width
|
|
21203
21255
|
*/
|
|
21204
21256
|
getLineWidth(lineIndex) {
|
|
21205
21257
|
if (this.__lineWidths[lineIndex] !== undefined) {
|
|
@@ -21218,12 +21270,12 @@ class FabricText extends StyledText {
|
|
|
21218
21270
|
return 0;
|
|
21219
21271
|
}
|
|
21220
21272
|
|
|
21221
|
-
/**
|
|
21222
|
-
* Retrieves the value of property at given character position
|
|
21223
|
-
* @param {Number} lineIndex the line number
|
|
21224
|
-
* @param {Number} charIndex the character number
|
|
21225
|
-
* @param {String} property the property name
|
|
21226
|
-
* @returns the value of 'property'
|
|
21273
|
+
/**
|
|
21274
|
+
* Retrieves the value of property at given character position
|
|
21275
|
+
* @param {Number} lineIndex the line number
|
|
21276
|
+
* @param {Number} charIndex the character number
|
|
21277
|
+
* @param {String} property the property name
|
|
21278
|
+
* @returns the value of 'property'
|
|
21227
21279
|
*/
|
|
21228
21280
|
getValueOfPropertyAt(lineIndex, charIndex, property) {
|
|
21229
21281
|
var _charStyle$property;
|
|
@@ -21231,9 +21283,9 @@ class FabricText extends StyledText {
|
|
|
21231
21283
|
return (_charStyle$property = charStyle[property]) !== null && _charStyle$property !== void 0 ? _charStyle$property : this[property];
|
|
21232
21284
|
}
|
|
21233
21285
|
|
|
21234
|
-
/**
|
|
21235
|
-
* @private
|
|
21236
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21286
|
+
/**
|
|
21287
|
+
* @private
|
|
21288
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21237
21289
|
*/
|
|
21238
21290
|
_renderTextDecoration(ctx, type) {
|
|
21239
21291
|
if (!this[type] && !this.styleHas(type)) {
|
|
@@ -21317,10 +21369,10 @@ class FabricText extends StyledText {
|
|
|
21317
21369
|
this._removeShadow(ctx);
|
|
21318
21370
|
}
|
|
21319
21371
|
|
|
21320
|
-
/**
|
|
21321
|
-
* return font declaration string for canvas context
|
|
21322
|
-
* @param {Object} [styleObject] object
|
|
21323
|
-
* @returns {String} font declaration formatted for canvas context.
|
|
21372
|
+
/**
|
|
21373
|
+
* return font declaration string for canvas context
|
|
21374
|
+
* @param {Object} [styleObject] object
|
|
21375
|
+
* @returns {String} font declaration formatted for canvas context.
|
|
21324
21376
|
*/
|
|
21325
21377
|
_getFontDeclaration() {
|
|
21326
21378
|
let {
|
|
@@ -21334,9 +21386,9 @@ class FabricText extends StyledText {
|
|
|
21334
21386
|
return [fontStyle, fontWeight, `${forMeasuring ? this.CACHE_FONT_SIZE : fontSize}px`, parsedFontFamily].join(' ');
|
|
21335
21387
|
}
|
|
21336
21388
|
|
|
21337
|
-
/**
|
|
21338
|
-
* Renders text instance on a specified context
|
|
21339
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21389
|
+
/**
|
|
21390
|
+
* Renders text instance on a specified context
|
|
21391
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21340
21392
|
*/
|
|
21341
21393
|
render(ctx) {
|
|
21342
21394
|
if (!this.visible) {
|
|
@@ -21351,22 +21403,22 @@ class FabricText extends StyledText {
|
|
|
21351
21403
|
super.render(ctx);
|
|
21352
21404
|
}
|
|
21353
21405
|
|
|
21354
|
-
/**
|
|
21355
|
-
* Override this method to customize grapheme splitting
|
|
21356
|
-
* @todo the util `graphemeSplit` needs to be injectable in some way.
|
|
21357
|
-
* is more comfortable to inject the correct util rather than having to override text
|
|
21358
|
-
* in the middle of the prototype chain
|
|
21359
|
-
* @param {string} value
|
|
21360
|
-
* @returns {string[]} array of graphemes
|
|
21406
|
+
/**
|
|
21407
|
+
* Override this method to customize grapheme splitting
|
|
21408
|
+
* @todo the util `graphemeSplit` needs to be injectable in some way.
|
|
21409
|
+
* is more comfortable to inject the correct util rather than having to override text
|
|
21410
|
+
* in the middle of the prototype chain
|
|
21411
|
+
* @param {string} value
|
|
21412
|
+
* @returns {string[]} array of graphemes
|
|
21361
21413
|
*/
|
|
21362
21414
|
graphemeSplit(value) {
|
|
21363
21415
|
return graphemeSplit(value);
|
|
21364
21416
|
}
|
|
21365
21417
|
|
|
21366
|
-
/**
|
|
21367
|
-
* Returns the text as an array of lines.
|
|
21368
|
-
* @param {String} text text to split
|
|
21369
|
-
* @returns Lines in the text
|
|
21418
|
+
/**
|
|
21419
|
+
* Returns the text as an array of lines.
|
|
21420
|
+
* @param {String} text text to split
|
|
21421
|
+
* @returns Lines in the text
|
|
21370
21422
|
*/
|
|
21371
21423
|
_splitTextIntoLines(text) {
|
|
21372
21424
|
const lines = text.split(this._reNewline),
|
|
@@ -21386,10 +21438,10 @@ class FabricText extends StyledText {
|
|
|
21386
21438
|
};
|
|
21387
21439
|
}
|
|
21388
21440
|
|
|
21389
|
-
/**
|
|
21390
|
-
* Returns object representation of an instance
|
|
21391
|
-
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
21392
|
-
* @return {Object} Object representation of an instance
|
|
21441
|
+
/**
|
|
21442
|
+
* Returns object representation of an instance
|
|
21443
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
21444
|
+
* @return {Object} Object representation of an instance
|
|
21393
21445
|
*/
|
|
21394
21446
|
toObject() {
|
|
21395
21447
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -21432,23 +21484,23 @@ class FabricText extends StyledText {
|
|
|
21432
21484
|
return this;
|
|
21433
21485
|
}
|
|
21434
21486
|
|
|
21435
|
-
/**
|
|
21436
|
-
* Returns complexity of an instance
|
|
21437
|
-
* @return {Number} complexity
|
|
21487
|
+
/**
|
|
21488
|
+
* Returns complexity of an instance
|
|
21489
|
+
* @return {Number} complexity
|
|
21438
21490
|
*/
|
|
21439
21491
|
complexity() {
|
|
21440
21492
|
return 1;
|
|
21441
21493
|
}
|
|
21442
21494
|
|
|
21443
|
-
/**
|
|
21444
|
-
* List of generic font families
|
|
21445
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
|
|
21495
|
+
/**
|
|
21496
|
+
* List of generic font families
|
|
21497
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
|
|
21446
21498
|
*/
|
|
21447
21499
|
|
|
21448
|
-
/**
|
|
21449
|
-
* Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
|
|
21450
|
-
* @param {HTMLElement} element Element to parse
|
|
21451
|
-
* @param {Object} [options] Options object
|
|
21500
|
+
/**
|
|
21501
|
+
* Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
|
|
21502
|
+
* @param {HTMLElement} element Element to parse
|
|
21503
|
+
* @param {Object} [options] Options object
|
|
21452
21504
|
*/
|
|
21453
21505
|
static async fromElement(element, options, cssRules) {
|
|
21454
21506
|
const parsedAttributes = parseAttributes(element, FabricText.ATTRIBUTE_NAMES, cssRules);
|
|
@@ -21487,10 +21539,10 @@ class FabricText extends StyledText {
|
|
|
21487
21539
|
scaledDiff = lineHeightDiff * textHeightScaleFactor,
|
|
21488
21540
|
textHeight = text.getScaledHeight() + scaledDiff;
|
|
21489
21541
|
let offX = 0;
|
|
21490
|
-
/*
|
|
21491
|
-
Adjust positioning:
|
|
21492
|
-
x/y attributes in SVG correspond to the bottom-left corner of text bounding box
|
|
21493
|
-
fabric output by default at top, left.
|
|
21542
|
+
/*
|
|
21543
|
+
Adjust positioning:
|
|
21544
|
+
x/y attributes in SVG correspond to the bottom-left corner of text bounding box
|
|
21545
|
+
fabric output by default at top, left.
|
|
21494
21546
|
*/
|
|
21495
21547
|
if (textAnchor === CENTER) {
|
|
21496
21548
|
offX = text.getScaledWidth() / 2;
|
|
@@ -21508,10 +21560,10 @@ class FabricText extends StyledText {
|
|
|
21508
21560
|
|
|
21509
21561
|
/* _FROM_SVG_END_ */
|
|
21510
21562
|
|
|
21511
|
-
/**
|
|
21512
|
-
* Returns FabricText instance from an object representation
|
|
21513
|
-
* @param {Object} object plain js Object to create an instance from
|
|
21514
|
-
* @returns {Promise<FabricText>}
|
|
21563
|
+
/**
|
|
21564
|
+
* Returns FabricText instance from an object representation
|
|
21565
|
+
* @param {Object} object plain js Object to create an instance from
|
|
21566
|
+
* @returns {Promise<FabricText>}
|
|
21515
21567
|
*/
|
|
21516
21568
|
static fromObject(object) {
|
|
21517
21569
|
return this._fromObject({
|
|
@@ -21522,10 +21574,10 @@ class FabricText extends StyledText {
|
|
|
21522
21574
|
});
|
|
21523
21575
|
}
|
|
21524
21576
|
}
|
|
21525
|
-
/**
|
|
21526
|
-
* Properties that requires a text layout recalculation when changed
|
|
21527
|
-
* @type string[]
|
|
21528
|
-
* @protected
|
|
21577
|
+
/**
|
|
21578
|
+
* Properties that requires a text layout recalculation when changed
|
|
21579
|
+
* @type string[]
|
|
21580
|
+
* @protected
|
|
21529
21581
|
*/
|
|
21530
21582
|
_defineProperty(FabricText, "textLayoutProperties", textLayoutProperties);
|
|
21531
21583
|
_defineProperty(FabricText, "cacheProperties", [...cacheProperties, ...additionalProps]);
|
|
@@ -21533,9 +21585,9 @@ _defineProperty(FabricText, "ownDefaults", textDefaultValues);
|
|
|
21533
21585
|
_defineProperty(FabricText, "type", 'Text');
|
|
21534
21586
|
_defineProperty(FabricText, "genericFonts", ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif', 'ui-monospace', 'ui-rounded', 'math', 'emoji', 'fangsong']);
|
|
21535
21587
|
/* _FROM_SVG_START_ */
|
|
21536
|
-
/**
|
|
21537
|
-
* List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
|
|
21538
|
-
* @see: http://www.w3.org/TR/SVG/text.html#TextElement
|
|
21588
|
+
/**
|
|
21589
|
+
* List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
|
|
21590
|
+
* @see: http://www.w3.org/TR/SVG/text.html#TextElement
|
|
21539
21591
|
*/
|
|
21540
21592
|
_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'));
|
|
21541
21593
|
applyMixins(FabricText, [TextSVGExportMixin]);
|
|
@@ -21922,8 +21974,8 @@ class OverlayEditor {
|
|
|
21922
21974
|
// We don't need to save/restore them here as it would conflict with IText's restoration
|
|
21923
21975
|
}
|
|
21924
21976
|
|
|
21925
|
-
/**
|
|
21926
|
-
* Get the container element for the overlay (parent of upperCanvasEl)
|
|
21977
|
+
/**
|
|
21978
|
+
* Get the container element for the overlay (parent of upperCanvasEl)
|
|
21927
21979
|
*/
|
|
21928
21980
|
getCanvasContainer() {
|
|
21929
21981
|
const upperCanvas = this.canvas.upperCanvasEl;
|
|
@@ -21937,8 +21989,8 @@ class OverlayEditor {
|
|
|
21937
21989
|
return container;
|
|
21938
21990
|
}
|
|
21939
21991
|
|
|
21940
|
-
/**
|
|
21941
|
-
* Create the overlay DOM structure
|
|
21992
|
+
/**
|
|
21993
|
+
* Create the overlay DOM structure
|
|
21942
21994
|
*/
|
|
21943
21995
|
createOverlayDOM() {
|
|
21944
21996
|
// Host div for positioning and overflow control
|
|
@@ -21958,8 +22010,12 @@ class OverlayEditor {
|
|
|
21958
22010
|
this.textarea.style.pointerEvents = 'auto';
|
|
21959
22011
|
// Set appropriate unicodeBidi based on content and direction
|
|
21960
22012
|
const hasArabicText = /[\u0600-\u06FF\u0750-\u077F\uFB50-\uFDFF\uFE70-\uFEFF]/.test(this.target.text || '');
|
|
22013
|
+
const hasLatinText = /[a-zA-Z]/.test(this.target.text || '');
|
|
21961
22014
|
const isLTRDirection = this.target.direction === 'ltr';
|
|
21962
|
-
if (hasArabicText && isLTRDirection) {
|
|
22015
|
+
if (hasArabicText && hasLatinText && isLTRDirection) {
|
|
22016
|
+
// For mixed Arabic/Latin text in LTR mode, use embed for consistent line wrapping
|
|
22017
|
+
this.textarea.style.unicodeBidi = 'embed';
|
|
22018
|
+
} else if (hasArabicText && isLTRDirection) {
|
|
21963
22019
|
// For Arabic text in LTR mode, use embed to preserve shaping while respecting direction
|
|
21964
22020
|
this.textarea.style.unicodeBidi = 'embed';
|
|
21965
22021
|
} else {
|
|
@@ -21989,8 +22045,8 @@ class OverlayEditor {
|
|
|
21989
22045
|
document.body.appendChild(this.hostDiv);
|
|
21990
22046
|
}
|
|
21991
22047
|
|
|
21992
|
-
/**
|
|
21993
|
-
* Attach all event listeners
|
|
22048
|
+
/**
|
|
22049
|
+
* Attach all event listeners
|
|
21994
22050
|
*/
|
|
21995
22051
|
attachEventListeners() {
|
|
21996
22052
|
// Textarea events
|
|
@@ -22010,8 +22066,8 @@ class OverlayEditor {
|
|
|
22010
22066
|
this.setupViewportChangeDetection();
|
|
22011
22067
|
}
|
|
22012
22068
|
|
|
22013
|
-
/**
|
|
22014
|
-
* Remove all event listeners
|
|
22069
|
+
/**
|
|
22070
|
+
* Remove all event listeners
|
|
22015
22071
|
*/
|
|
22016
22072
|
removeEventListeners() {
|
|
22017
22073
|
this.textarea.removeEventListener('input', this.boundHandlers.onInput);
|
|
@@ -22028,16 +22084,16 @@ class OverlayEditor {
|
|
|
22028
22084
|
this.restoreViewportChangeDetection();
|
|
22029
22085
|
}
|
|
22030
22086
|
|
|
22031
|
-
/**
|
|
22032
|
-
* Simple method to refresh positioning when canvas changes
|
|
22087
|
+
/**
|
|
22088
|
+
* Simple method to refresh positioning when canvas changes
|
|
22033
22089
|
*/
|
|
22034
22090
|
updatePosition() {
|
|
22035
22091
|
this.applyOverlayStyle();
|
|
22036
22092
|
}
|
|
22037
22093
|
|
|
22038
|
-
/**
|
|
22039
|
-
* Update the Fabric object bounds to match current textarea size
|
|
22040
|
-
* This ensures Fabric.js selection controls follow the growing textbox
|
|
22094
|
+
/**
|
|
22095
|
+
* Update the Fabric object bounds to match current textarea size
|
|
22096
|
+
* This ensures Fabric.js selection controls follow the growing textbox
|
|
22041
22097
|
*/
|
|
22042
22098
|
updateObjectBounds() {
|
|
22043
22099
|
if (this.isDestroyed) return;
|
|
@@ -22048,26 +22104,38 @@ class OverlayEditor {
|
|
|
22048
22104
|
parseFloat(this.hostDiv.style.width) / zoom;
|
|
22049
22105
|
const currentHeight = parseFloat(this.hostDiv.style.height) / zoom;
|
|
22050
22106
|
|
|
22051
|
-
//
|
|
22107
|
+
// Always update height for responsive controls (especially important for line deletion)
|
|
22052
22108
|
const heightDiff = Math.abs(currentHeight - target.height);
|
|
22053
|
-
const threshold =
|
|
22109
|
+
const threshold = 0.5; // Lower threshold for better responsiveness to line changes
|
|
22054
22110
|
|
|
22055
22111
|
if (heightDiff > threshold) {
|
|
22112
|
+
target.height;
|
|
22056
22113
|
target.height = currentHeight;
|
|
22057
22114
|
target.setCoords(); // Update control positions
|
|
22115
|
+
|
|
22116
|
+
// Force dirty to ensure proper re-rendering
|
|
22117
|
+
target.dirty = true;
|
|
22058
22118
|
this.canvas.requestRenderAll(); // Re-render to show updated selection
|
|
22119
|
+
|
|
22120
|
+
// IMPORTANT: Reposition overlay after height change
|
|
22121
|
+
requestAnimationFrame(() => {
|
|
22122
|
+
if (!this.isDestroyed) {
|
|
22123
|
+
this.applyOverlayStyle();
|
|
22124
|
+
console.log('📐 Height changed - rechecking alignment after repositioning:');
|
|
22125
|
+
}
|
|
22126
|
+
});
|
|
22059
22127
|
}
|
|
22060
22128
|
}
|
|
22061
22129
|
|
|
22062
|
-
/**
|
|
22063
|
-
* Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
|
|
22130
|
+
/**
|
|
22131
|
+
* Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
|
|
22064
22132
|
*/
|
|
22065
22133
|
letterSpacingPx(charSpacing, fontSize) {
|
|
22066
22134
|
return charSpacing / 1000 * fontSize;
|
|
22067
22135
|
}
|
|
22068
22136
|
|
|
22069
|
-
/**
|
|
22070
|
-
* Detect text direction using first strong directional character
|
|
22137
|
+
/**
|
|
22138
|
+
* Detect text direction using first strong directional character
|
|
22071
22139
|
*/
|
|
22072
22140
|
firstStrongDir(text) {
|
|
22073
22141
|
// Hebrew: \u0590-\u05FF, Arabic: \u0600-\u06FF, \u0750-\u077F, \uFB50-\uFDFF, \uFE70-\uFEFF
|
|
@@ -22083,14 +22151,6 @@ class OverlayEditor {
|
|
|
22083
22151
|
target.setCoords();
|
|
22084
22152
|
const aCoords = target.aCoords;
|
|
22085
22153
|
|
|
22086
|
-
// DEBUG: Log dimensions before edit
|
|
22087
|
-
console.log('BEFORE EDIT:');
|
|
22088
|
-
console.log(' target.width =', target.width);
|
|
22089
|
-
console.log(' target.height =', target.height);
|
|
22090
|
-
console.log(' target.getScaledWidth() =', target.getScaledWidth());
|
|
22091
|
-
console.log(' target.getScaledHeight() =', target.getScaledHeight());
|
|
22092
|
-
console.log(' target.padding =', target.padding);
|
|
22093
|
-
|
|
22094
22154
|
// 2. Get canvas position and scroll offsets (like rtl-test.html)
|
|
22095
22155
|
const canvasEl = canvas.upperCanvasEl;
|
|
22096
22156
|
const canvasRect = canvasEl.getBoundingClientRect();
|
|
@@ -22113,14 +22173,12 @@ class OverlayEditor {
|
|
|
22113
22173
|
const left = canvasRect.left + scrollX + screenPoint.x;
|
|
22114
22174
|
const top = canvasRect.top + scrollY + screenPoint.y;
|
|
22115
22175
|
|
|
22116
|
-
// 4.
|
|
22117
|
-
|
|
22118
|
-
|
|
22119
|
-
|
|
22120
|
-
|
|
22121
|
-
|
|
22122
|
-
console.log(' zoom =', zoom);
|
|
22123
|
-
console.log(' final width =', width);
|
|
22176
|
+
// 4. Calculate the precise width and height for the container
|
|
22177
|
+
// **THE FIX:** Use getBoundingRect() for BOTH width and height.
|
|
22178
|
+
// This is the most reliable measure of the object's final rendered dimensions.
|
|
22179
|
+
const objectBounds = target.getBoundingRect();
|
|
22180
|
+
const width = Math.round(objectBounds.width * zoom);
|
|
22181
|
+
const height = Math.round(objectBounds.height * zoom);
|
|
22124
22182
|
|
|
22125
22183
|
// 5. Apply styles to host DIV - absolute positioning like rtl-test.html
|
|
22126
22184
|
this.hostDiv.style.position = 'absolute';
|
|
@@ -22144,52 +22202,328 @@ class OverlayEditor {
|
|
|
22144
22202
|
const scaleX = target.scaleX || 1;
|
|
22145
22203
|
const finalFontSize = baseFontSize * scaleX * zoom;
|
|
22146
22204
|
const fabricLineHeight = target.lineHeight || 1.16;
|
|
22147
|
-
//
|
|
22148
|
-
|
|
22149
|
-
|
|
22150
|
-
|
|
22151
|
-
|
|
22205
|
+
// **THE FIX:** Use 'border-box' so the width property includes padding.
|
|
22206
|
+
// This makes alignment much easier and more reliable.
|
|
22207
|
+
this.textarea.style.boxSizing = 'border-box';
|
|
22208
|
+
|
|
22209
|
+
// **THE FIX:** Set the textarea width to be IDENTICAL to the host div's width.
|
|
22210
|
+
// The padding will now be correctly contained *inside* this width.
|
|
22211
|
+
this.textarea.style.width = `${width}px`;
|
|
22212
|
+
this.textarea.style.height = '100%'; // Let hostDiv control height
|
|
22152
22213
|
this.textarea.style.padding = `${paddingY}px ${paddingX}px`;
|
|
22214
|
+
|
|
22215
|
+
// Apply all other font and text styles to match Fabric
|
|
22216
|
+
const letterSpacingPx = (target.charSpacing || 0) / 1000 * finalFontSize;
|
|
22153
22217
|
this.textarea.style.fontSize = `${finalFontSize}px`;
|
|
22154
|
-
this.textarea.style.lineHeight = String(fabricLineHeight);
|
|
22218
|
+
this.textarea.style.lineHeight = String(fabricLineHeight);
|
|
22155
22219
|
this.textarea.style.fontFamily = target.fontFamily || 'Arial';
|
|
22156
22220
|
this.textarea.style.fontWeight = String(target.fontWeight || 'normal');
|
|
22157
22221
|
this.textarea.style.fontStyle = target.fontStyle || 'normal';
|
|
22158
|
-
|
|
22222
|
+
// Handle text alignment and justification
|
|
22223
|
+
const textAlign = target.textAlign || 'left';
|
|
22224
|
+
let cssTextAlign = textAlign;
|
|
22225
|
+
|
|
22226
|
+
// Detect text direction from content for proper justify handling
|
|
22227
|
+
const autoDetectedDirection = this.firstStrongDir(this.textarea.value || '');
|
|
22228
|
+
|
|
22229
|
+
// DEBUG: Log alignment details
|
|
22230
|
+
console.log('🔍 ALIGNMENT DEBUG:');
|
|
22231
|
+
console.log(' Fabric textAlign:', textAlign);
|
|
22232
|
+
console.log(' Fabric direction:', target.direction);
|
|
22233
|
+
console.log(' Text content:', JSON.stringify(target.text));
|
|
22234
|
+
console.log(' Detected direction:', autoDetectedDirection);
|
|
22235
|
+
|
|
22236
|
+
// Map fabric.js justify to CSS
|
|
22237
|
+
if (textAlign.includes('justify')) {
|
|
22238
|
+
// Try to match fabric.js justify behavior more precisely
|
|
22239
|
+
try {
|
|
22240
|
+
// For justify, we need to replicate fabric.js space expansion
|
|
22241
|
+
// Use CSS justify but with specific settings to match fabric.js better
|
|
22242
|
+
cssTextAlign = 'justify';
|
|
22243
|
+
|
|
22244
|
+
// Set text-align-last based on justify type and detected direction
|
|
22245
|
+
// Smart justify: respect detected direction even when fabric alignment doesn't match
|
|
22246
|
+
if (textAlign === 'justify') {
|
|
22247
|
+
this.textarea.style.textAlignLast = autoDetectedDirection === 'rtl' ? 'right' : 'left';
|
|
22248
|
+
} else if (textAlign === 'justify-left') {
|
|
22249
|
+
// If text is RTL but fabric says justify-left, override to justify-right for better UX
|
|
22250
|
+
if (autoDetectedDirection === 'rtl') {
|
|
22251
|
+
this.textarea.style.textAlignLast = 'right';
|
|
22252
|
+
console.log(' → Overrode justify-left to justify-right for RTL text');
|
|
22253
|
+
} else {
|
|
22254
|
+
this.textarea.style.textAlignLast = 'left';
|
|
22255
|
+
}
|
|
22256
|
+
} else if (textAlign === 'justify-right') {
|
|
22257
|
+
// If text is LTR but fabric says justify-right, override to justify-left for better UX
|
|
22258
|
+
if (autoDetectedDirection === 'ltr') {
|
|
22259
|
+
this.textarea.style.textAlignLast = 'left';
|
|
22260
|
+
console.log(' → Overrode justify-right to justify-left for LTR text');
|
|
22261
|
+
} else {
|
|
22262
|
+
this.textarea.style.textAlignLast = 'right';
|
|
22263
|
+
}
|
|
22264
|
+
} else if (textAlign === 'justify-center') {
|
|
22265
|
+
this.textarea.style.textAlignLast = 'center';
|
|
22266
|
+
}
|
|
22267
|
+
|
|
22268
|
+
// Enhanced justify settings for better fabric.js matching
|
|
22269
|
+
this.textarea.style.textJustify = 'inter-word';
|
|
22270
|
+
this.textarea.style.wordSpacing = 'normal';
|
|
22271
|
+
|
|
22272
|
+
// Additional CSS properties for better justify matching
|
|
22273
|
+
this.textarea.style.textAlign = 'justify';
|
|
22274
|
+
this.textarea.style.textAlignLast = this.textarea.style.textAlignLast;
|
|
22275
|
+
|
|
22276
|
+
// Try to force better justify behavior
|
|
22277
|
+
this.textarea.style.textJustifyTrim = 'none';
|
|
22278
|
+
this.textarea.style.textAutospace = 'none';
|
|
22279
|
+
console.log(' → Applied justify alignment:', textAlign, 'with last-line:', this.textarea.style.textAlignLast);
|
|
22280
|
+
} catch (error) {
|
|
22281
|
+
console.warn(' → Justify setup failed, falling back to standard alignment:', error);
|
|
22282
|
+
cssTextAlign = textAlign.replace('justify-', '').replace('justify', 'left');
|
|
22283
|
+
}
|
|
22284
|
+
} else {
|
|
22285
|
+
this.textarea.style.textAlignLast = 'auto';
|
|
22286
|
+
this.textarea.style.textJustify = 'auto';
|
|
22287
|
+
this.textarea.style.wordSpacing = 'normal';
|
|
22288
|
+
console.log(' → Applied standard alignment:', cssTextAlign);
|
|
22289
|
+
}
|
|
22290
|
+
this.textarea.style.textAlign = cssTextAlign;
|
|
22159
22291
|
this.textarea.style.color = ((_target$fill = target.fill) === null || _target$fill === void 0 ? void 0 : _target$fill.toString()) || '#000';
|
|
22160
|
-
this.textarea.style.letterSpacing = `${
|
|
22161
|
-
this.textarea.style.direction = target.direction || this.firstStrongDir(this.textarea.value || '');
|
|
22292
|
+
this.textarea.style.letterSpacing = `${letterSpacingPx}px`;
|
|
22162
22293
|
|
|
22163
|
-
//
|
|
22294
|
+
// Use the already detected direction from above
|
|
22295
|
+
const fabricDirection = target.direction;
|
|
22296
|
+
|
|
22297
|
+
// Use auto-detected direction for better BiDi support, but respect fabric direction if it makes sense
|
|
22298
|
+
this.textarea.style.direction = autoDetectedDirection || fabricDirection || 'ltr';
|
|
22164
22299
|
this.textarea.style.fontVariant = 'normal';
|
|
22165
22300
|
this.textarea.style.fontStretch = 'normal';
|
|
22166
|
-
this.textarea.style.textRendering = 'auto';
|
|
22167
|
-
this.textarea.style.fontKerning = '
|
|
22168
|
-
this.textarea.style.
|
|
22301
|
+
this.textarea.style.textRendering = 'auto'; // Changed from 'optimizeLegibility' to match canvas
|
|
22302
|
+
this.textarea.style.fontKerning = 'normal';
|
|
22303
|
+
this.textarea.style.fontFeatureSettings = 'normal';
|
|
22304
|
+
this.textarea.style.fontVariationSettings = 'normal';
|
|
22169
22305
|
this.textarea.style.margin = '0';
|
|
22170
22306
|
this.textarea.style.border = 'none';
|
|
22171
22307
|
this.textarea.style.outline = 'none';
|
|
22172
22308
|
this.textarea.style.background = 'transparent';
|
|
22173
|
-
this.textarea.style.
|
|
22309
|
+
this.textarea.style.overflowWrap = 'break-word';
|
|
22174
22310
|
this.textarea.style.whiteSpace = 'pre-wrap';
|
|
22175
|
-
|
|
22176
|
-
|
|
22177
|
-
|
|
22178
|
-
console.log('
|
|
22179
|
-
console.log('
|
|
22180
|
-
console.log('
|
|
22181
|
-
console.log('
|
|
22182
|
-
console.log('
|
|
22183
|
-
console.log('
|
|
22184
|
-
console.log('
|
|
22185
|
-
console.log('
|
|
22186
|
-
console.log('
|
|
22311
|
+
this.textarea.style.hyphens = 'none';
|
|
22312
|
+
|
|
22313
|
+
// DEBUG: Log final CSS properties
|
|
22314
|
+
console.log('🎨 FINAL TEXTAREA CSS:');
|
|
22315
|
+
console.log(' textAlign:', this.textarea.style.textAlign);
|
|
22316
|
+
console.log(' textAlignLast:', this.textarea.style.textAlignLast);
|
|
22317
|
+
console.log(' direction:', this.textarea.style.direction);
|
|
22318
|
+
console.log(' unicodeBidi:', this.textarea.style.unicodeBidi);
|
|
22319
|
+
console.log(' width:', this.textarea.style.width);
|
|
22320
|
+
console.log(' textJustify:', this.textarea.style.textJustify);
|
|
22321
|
+
console.log(' wordSpacing:', this.textarea.style.wordSpacing);
|
|
22322
|
+
console.log(' whiteSpace:', this.textarea.style.whiteSpace);
|
|
22323
|
+
|
|
22324
|
+
// If justify, log Fabric object dimensions for comparison
|
|
22325
|
+
if (textAlign.includes('justify')) {
|
|
22326
|
+
var _calcTextWidth, _ref;
|
|
22327
|
+
console.log('🔧 FABRIC OBJECT JUSTIFY INFO:');
|
|
22328
|
+
console.log(' Fabric width:', target.width);
|
|
22329
|
+
console.log(' Fabric calcTextWidth:', (_calcTextWidth = (_ref = target).calcTextWidth) === null || _calcTextWidth === void 0 ? void 0 : _calcTextWidth.call(_ref));
|
|
22330
|
+
console.log(' Fabric textAlign:', target.textAlign);
|
|
22331
|
+
console.log(' Text lines:', target.textLines);
|
|
22332
|
+
}
|
|
22333
|
+
|
|
22334
|
+
// Debug font properties matching
|
|
22335
|
+
console.log('🔤 FONT PROPERTIES COMPARISON:');
|
|
22336
|
+
console.log(' Fabric fontFamily:', target.fontFamily);
|
|
22337
|
+
console.log(' Fabric fontWeight:', target.fontWeight);
|
|
22338
|
+
console.log(' Fabric fontStyle:', target.fontStyle);
|
|
22339
|
+
console.log(' Fabric fontSize:', target.fontSize);
|
|
22340
|
+
console.log(' → Textarea fontFamily:', this.textarea.style.fontFamily);
|
|
22341
|
+
console.log(' → Textarea fontWeight:', this.textarea.style.fontWeight);
|
|
22342
|
+
console.log(' → Textarea fontStyle:', this.textarea.style.fontStyle);
|
|
22343
|
+
console.log(' → Textarea fontSize:', this.textarea.style.fontSize);
|
|
22344
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
22345
|
+
|
|
22346
|
+
// Enhanced font rendering to better match fabric.js canvas rendering
|
|
22347
|
+
// Default to auto for more natural rendering
|
|
22348
|
+
this.textarea.style.webkitFontSmoothing = 'auto';
|
|
22349
|
+
this.textarea.style.mozOsxFontSmoothing = 'auto';
|
|
22350
|
+
this.textarea.style.fontSmooth = 'auto';
|
|
22351
|
+
this.textarea.style.textSizeAdjust = 'none';
|
|
22352
|
+
|
|
22353
|
+
// For bold fonts, use subpixel rendering to match canvas thickness better
|
|
22354
|
+
const fontWeight = String(target.fontWeight || 'normal');
|
|
22355
|
+
const isBold = fontWeight === 'bold' || fontWeight === '700' || parseInt(fontWeight) >= 600;
|
|
22356
|
+
if (isBold) {
|
|
22357
|
+
this.textarea.style.webkitFontSmoothing = 'subpixel-antialiased';
|
|
22358
|
+
this.textarea.style.mozOsxFontSmoothing = 'unset';
|
|
22359
|
+
console.log('🔤 Applied enhanced bold rendering for better thickness matching');
|
|
22360
|
+
}
|
|
22361
|
+
console.log('🎨 FONT SMOOTHING APPLIED:');
|
|
22362
|
+
console.log(' webkitFontSmoothing:', this.textarea.style.webkitFontSmoothing);
|
|
22363
|
+
console.log(' mozOsxFontSmoothing:', this.textarea.style.mozOsxFontSmoothing);
|
|
22187
22364
|
|
|
22188
22365
|
// Initial bounds are set correctly by Fabric.js - don't force update here
|
|
22189
22366
|
}
|
|
22190
22367
|
|
|
22191
|
-
/**
|
|
22192
|
-
*
|
|
22368
|
+
/**
|
|
22369
|
+
* Debug method to compare textarea and canvas object bounding boxes
|
|
22370
|
+
*/
|
|
22371
|
+
debugBoundingBoxComparison() {
|
|
22372
|
+
const target = this.target;
|
|
22373
|
+
const canvas = this.canvas;
|
|
22374
|
+
const zoom = canvas.getZoom();
|
|
22375
|
+
|
|
22376
|
+
// Get textarea bounding box (in screen coordinates)
|
|
22377
|
+
const textareaRect = this.textarea.getBoundingClientRect();
|
|
22378
|
+
const hostRect = this.hostDiv.getBoundingClientRect();
|
|
22379
|
+
|
|
22380
|
+
// Get canvas object bounding box (in screen coordinates)
|
|
22381
|
+
const canvasBounds = target.getBoundingRect();
|
|
22382
|
+
const canvasRect = canvas.upperCanvasEl.getBoundingClientRect();
|
|
22383
|
+
|
|
22384
|
+
// Convert canvas object bounds to screen coordinates
|
|
22385
|
+
const vpt = canvas.viewportTransform;
|
|
22386
|
+
const screenObjectBounds = {
|
|
22387
|
+
left: canvasRect.left + canvasBounds.left * zoom + vpt[4],
|
|
22388
|
+
top: canvasRect.top + canvasBounds.top * zoom + vpt[5],
|
|
22389
|
+
width: canvasBounds.width * zoom,
|
|
22390
|
+
height: canvasBounds.height * zoom
|
|
22391
|
+
};
|
|
22392
|
+
console.log('🔍 BOUNDING BOX COMPARISON:');
|
|
22393
|
+
console.log('📦 Textarea Rect:', {
|
|
22394
|
+
left: Math.round(textareaRect.left * 100) / 100,
|
|
22395
|
+
top: Math.round(textareaRect.top * 100) / 100,
|
|
22396
|
+
width: Math.round(textareaRect.width * 100) / 100,
|
|
22397
|
+
height: Math.round(textareaRect.height * 100) / 100
|
|
22398
|
+
});
|
|
22399
|
+
console.log('📦 Host Div Rect:', {
|
|
22400
|
+
left: Math.round(hostRect.left * 100) / 100,
|
|
22401
|
+
top: Math.round(hostRect.top * 100) / 100,
|
|
22402
|
+
width: Math.round(hostRect.width * 100) / 100,
|
|
22403
|
+
height: Math.round(hostRect.height * 100) / 100
|
|
22404
|
+
});
|
|
22405
|
+
console.log('📦 Canvas Object Bounds (screen):', {
|
|
22406
|
+
left: Math.round(screenObjectBounds.left * 100) / 100,
|
|
22407
|
+
top: Math.round(screenObjectBounds.top * 100) / 100,
|
|
22408
|
+
width: Math.round(screenObjectBounds.width * 100) / 100,
|
|
22409
|
+
height: Math.round(screenObjectBounds.height * 100) / 100
|
|
22410
|
+
});
|
|
22411
|
+
console.log('📦 Canvas Object Bounds (canvas):', canvasBounds);
|
|
22412
|
+
|
|
22413
|
+
// Calculate differences
|
|
22414
|
+
const hostVsObject = {
|
|
22415
|
+
leftDiff: Math.round((hostRect.left - screenObjectBounds.left) * 100) / 100,
|
|
22416
|
+
topDiff: Math.round((hostRect.top - screenObjectBounds.top) * 100) / 100,
|
|
22417
|
+
widthDiff: Math.round((hostRect.width - screenObjectBounds.width) * 100) / 100,
|
|
22418
|
+
heightDiff: Math.round((hostRect.height - screenObjectBounds.height) * 100) / 100
|
|
22419
|
+
};
|
|
22420
|
+
const textareaVsObject = {
|
|
22421
|
+
leftDiff: Math.round((textareaRect.left - screenObjectBounds.left) * 100) / 100,
|
|
22422
|
+
topDiff: Math.round((textareaRect.top - screenObjectBounds.top) * 100) / 100,
|
|
22423
|
+
widthDiff: Math.round((textareaRect.width - screenObjectBounds.width) * 100) / 100,
|
|
22424
|
+
heightDiff: Math.round((textareaRect.height - screenObjectBounds.height) * 100) / 100
|
|
22425
|
+
};
|
|
22426
|
+
console.log('📏 Host Div vs Canvas Object Diff:', hostVsObject);
|
|
22427
|
+
console.log('📏 Textarea vs Canvas Object Diff:', textareaVsObject);
|
|
22428
|
+
|
|
22429
|
+
// Check if they're aligned (within 2px tolerance)
|
|
22430
|
+
const tolerance = 2;
|
|
22431
|
+
const hostAligned = Math.abs(hostVsObject.leftDiff) < tolerance && Math.abs(hostVsObject.topDiff) < tolerance && Math.abs(hostVsObject.widthDiff) < tolerance && Math.abs(hostVsObject.heightDiff) < tolerance;
|
|
22432
|
+
const textareaAligned = Math.abs(textareaVsObject.leftDiff) < tolerance && Math.abs(textareaVsObject.topDiff) < tolerance && Math.abs(textareaVsObject.widthDiff) < tolerance && Math.abs(textareaVsObject.heightDiff) < tolerance;
|
|
22433
|
+
console.log(hostAligned ? '✅ Host Div ALIGNED with canvas object' : '❌ Host Div MISALIGNED with canvas object');
|
|
22434
|
+
console.log(textareaAligned ? '✅ Textarea ALIGNED with canvas object' : '❌ Textarea MISALIGNED with canvas object');
|
|
22435
|
+
console.log('🔍 Zoom:', zoom, 'Viewport Transform:', vpt);
|
|
22436
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
22437
|
+
}
|
|
22438
|
+
|
|
22439
|
+
/**
|
|
22440
|
+
* Debug method to compare text wrapping between textarea and Fabric text object
|
|
22441
|
+
*/
|
|
22442
|
+
debugTextWrapping() {
|
|
22443
|
+
const target = this.target;
|
|
22444
|
+
const text = this.textarea.value;
|
|
22445
|
+
console.log('📝 TEXT WRAPPING COMPARISON:');
|
|
22446
|
+
console.log('📄 Text Content:', `"${text}"`);
|
|
22447
|
+
console.log('📄 Text Length:', text.length);
|
|
22448
|
+
|
|
22449
|
+
// Analyze line breaks
|
|
22450
|
+
const explicitLines = text.split('\n');
|
|
22451
|
+
console.log('📄 Explicit Lines (\\n):', explicitLines.length);
|
|
22452
|
+
explicitLines.forEach((line, i) => {
|
|
22453
|
+
console.log(` Line ${i + 1}: "${line}" (${line.length} chars)`);
|
|
22454
|
+
});
|
|
22455
|
+
|
|
22456
|
+
// Get textarea computed styles for wrapping analysis
|
|
22457
|
+
const textareaStyles = window.getComputedStyle(this.textarea);
|
|
22458
|
+
console.log('📐 Textarea Wrapping Styles:');
|
|
22459
|
+
console.log(' width:', textareaStyles.width);
|
|
22460
|
+
console.log(' fontSize:', textareaStyles.fontSize);
|
|
22461
|
+
console.log(' fontFamily:', textareaStyles.fontFamily);
|
|
22462
|
+
console.log(' fontWeight:', textareaStyles.fontWeight);
|
|
22463
|
+
console.log(' letterSpacing:', textareaStyles.letterSpacing);
|
|
22464
|
+
console.log(' lineHeight:', textareaStyles.lineHeight);
|
|
22465
|
+
console.log(' whiteSpace:', textareaStyles.whiteSpace);
|
|
22466
|
+
console.log(' wordWrap:', textareaStyles.wordWrap);
|
|
22467
|
+
console.log(' overflowWrap:', textareaStyles.overflowWrap);
|
|
22468
|
+
console.log(' direction:', textareaStyles.direction);
|
|
22469
|
+
console.log(' textAlign:', textareaStyles.textAlign);
|
|
22470
|
+
|
|
22471
|
+
// Get Fabric text object properties for comparison
|
|
22472
|
+
console.log('📐 Fabric Text Object Properties:');
|
|
22473
|
+
console.log(' width:', target.width);
|
|
22474
|
+
console.log(' fontSize:', target.fontSize);
|
|
22475
|
+
console.log(' fontFamily:', target.fontFamily);
|
|
22476
|
+
console.log(' fontWeight:', target.fontWeight);
|
|
22477
|
+
console.log(' charSpacing:', target.charSpacing);
|
|
22478
|
+
console.log(' lineHeight:', target.lineHeight);
|
|
22479
|
+
console.log(' direction:', target.direction);
|
|
22480
|
+
console.log(' textAlign:', target.textAlign);
|
|
22481
|
+
console.log(' scaleX:', target.scaleX);
|
|
22482
|
+
console.log(' scaleY:', target.scaleY);
|
|
22483
|
+
|
|
22484
|
+
// Calculate effective dimensions for comparison - use actual rendered width
|
|
22485
|
+
// **THE FIX:** Use getBoundingRect to get the *actual rendered width* of the Fabric object.
|
|
22486
|
+
const fabricEffectiveWidth = this.target.getBoundingRect().width;
|
|
22487
|
+
// Use the exact width set on textarea for comparison
|
|
22488
|
+
const textareaComputedWidth = parseFloat(window.getComputedStyle(this.textarea).width);
|
|
22489
|
+
const textareaEffectiveWidth = textareaComputedWidth / this.canvas.getZoom();
|
|
22490
|
+
const widthDiff = Math.abs(textareaEffectiveWidth - fabricEffectiveWidth);
|
|
22491
|
+
console.log('📏 Effective Width Comparison:');
|
|
22492
|
+
console.log(' Textarea Effective Width:', textareaEffectiveWidth);
|
|
22493
|
+
console.log(' Fabric Effective Width:', fabricEffectiveWidth);
|
|
22494
|
+
console.log(' Width Difference:', widthDiff.toFixed(2) + 'px');
|
|
22495
|
+
console.log(widthDiff < 1 ? '✅ Widths MATCH for wrapping' : '❌ Width MISMATCH may cause different wrapping');
|
|
22496
|
+
|
|
22497
|
+
// Check text direction and bidi handling
|
|
22498
|
+
const hasRTLText = /[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\uFB50-\uFDFF\uFE70-\uFEFF]/.test(text);
|
|
22499
|
+
const hasBidiText = /[\u0590-\u06FF]/.test(text) && /[a-zA-Z]/.test(text);
|
|
22500
|
+
console.log('🌍 Text Direction Analysis:');
|
|
22501
|
+
console.log(' Has RTL characters:', hasRTLText);
|
|
22502
|
+
console.log(' Has mixed Bidi text:', hasBidiText);
|
|
22503
|
+
console.log(' Textarea direction:', textareaStyles.direction);
|
|
22504
|
+
console.log(' Fabric direction:', target.direction || 'auto');
|
|
22505
|
+
console.log(' Textarea unicodeBidi:', textareaStyles.unicodeBidi);
|
|
22506
|
+
|
|
22507
|
+
// Measure actual rendered line count
|
|
22508
|
+
const textareaScrollHeight = this.textarea.scrollHeight;
|
|
22509
|
+
const textareaLineHeight = parseFloat(textareaStyles.lineHeight) || parseFloat(textareaStyles.fontSize) * 1.2;
|
|
22510
|
+
const estimatedTextareaLines = Math.round(textareaScrollHeight / textareaLineHeight);
|
|
22511
|
+
console.log('📊 Line Count Analysis:');
|
|
22512
|
+
console.log(' Textarea scrollHeight:', textareaScrollHeight);
|
|
22513
|
+
console.log(' Textarea lineHeight:', textareaLineHeight);
|
|
22514
|
+
console.log(' Estimated rendered lines:', estimatedTextareaLines);
|
|
22515
|
+
console.log(' Explicit line breaks:', explicitLines.length);
|
|
22516
|
+
if (estimatedTextareaLines > explicitLines.length) {
|
|
22517
|
+
console.log('🔄 Text wrapping detected in textarea');
|
|
22518
|
+
console.log(' Wrapped lines:', estimatedTextareaLines - explicitLines.length);
|
|
22519
|
+
} else {
|
|
22520
|
+
console.log('📏 No text wrapping in textarea');
|
|
22521
|
+
}
|
|
22522
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
22523
|
+
}
|
|
22524
|
+
|
|
22525
|
+
/**
|
|
22526
|
+
* Focus the textarea and position cursor at end
|
|
22193
22527
|
*/
|
|
22194
22528
|
focusTextarea() {
|
|
22195
22529
|
// For overlay editing, we want to keep the object in "selection mode" not "editing mode"
|
|
@@ -22224,8 +22558,8 @@ class OverlayEditor {
|
|
|
22224
22558
|
this.canvas.requestRenderAll();
|
|
22225
22559
|
}
|
|
22226
22560
|
|
|
22227
|
-
/**
|
|
22228
|
-
* Refresh overlay positioning and styling
|
|
22561
|
+
/**
|
|
22562
|
+
* Refresh overlay positioning and styling
|
|
22229
22563
|
*/
|
|
22230
22564
|
refresh() {
|
|
22231
22565
|
if (this.isDestroyed) return;
|
|
@@ -22233,8 +22567,8 @@ class OverlayEditor {
|
|
|
22233
22567
|
// Don't update object bounds on every refresh - only when textarea actually resizes
|
|
22234
22568
|
}
|
|
22235
22569
|
|
|
22236
|
-
/**
|
|
22237
|
-
* Destroy the overlay editor
|
|
22570
|
+
/**
|
|
22571
|
+
* Destroy the overlay editor
|
|
22238
22572
|
*/
|
|
22239
22573
|
destroy() {
|
|
22240
22574
|
let commit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
@@ -22261,6 +22595,23 @@ class OverlayEditor {
|
|
|
22261
22595
|
// Handle commit/cancel after restoring visibility
|
|
22262
22596
|
if (commit && !this.isComposing) {
|
|
22263
22597
|
const finalText = this.textarea.value;
|
|
22598
|
+
|
|
22599
|
+
// Auto-detect text direction and update fabric object if needed
|
|
22600
|
+
const detectedDirection = this.firstStrongDir(finalText);
|
|
22601
|
+
const currentDirection = this.target.direction || 'ltr';
|
|
22602
|
+
if (detectedDirection && detectedDirection !== currentDirection) {
|
|
22603
|
+
console.log(`🔄 Overlay Exit: Auto-detected direction change from "${currentDirection}" to "${detectedDirection}"`);
|
|
22604
|
+
console.log(` Text content: "${finalText.substring(0, 50)}..."`);
|
|
22605
|
+
|
|
22606
|
+
// Update the fabric object's direction
|
|
22607
|
+
this.target.set('direction', detectedDirection);
|
|
22608
|
+
|
|
22609
|
+
// Force a re-render to apply the direction change
|
|
22610
|
+
this.canvas.requestRenderAll();
|
|
22611
|
+
console.log(`✅ Fabric object direction updated to: ${detectedDirection}`);
|
|
22612
|
+
} else {
|
|
22613
|
+
console.log(`📝 Overlay Exit: Direction unchanged (${currentDirection}), text: "${finalText.substring(0, 30)}..."`);
|
|
22614
|
+
}
|
|
22264
22615
|
if (this.onCommit) {
|
|
22265
22616
|
this.onCommit(finalText);
|
|
22266
22617
|
}
|
|
@@ -22300,25 +22651,40 @@ class OverlayEditor {
|
|
|
22300
22651
|
}
|
|
22301
22652
|
}
|
|
22302
22653
|
autoResizeTextarea() {
|
|
22303
|
-
//
|
|
22304
|
-
const
|
|
22305
|
-
|
|
22306
|
-
|
|
22307
|
-
|
|
22654
|
+
// Store the scroll position and the container's old height for comparison.
|
|
22655
|
+
const scrollTop = this.textarea.scrollTop;
|
|
22656
|
+
const oldHeight = parseFloat(this.hostDiv.style.height || '0');
|
|
22657
|
+
|
|
22658
|
+
// 1. **Force a reliable reflow.**
|
|
22659
|
+
// First, reset the textarea's height to a minimal value. This is the crucial step
|
|
22660
|
+
// that forces the browser to recalculate the content's height from scratch,
|
|
22661
|
+
// ignoring the hostDiv's larger, stale height.
|
|
22662
|
+
this.textarea.style.height = '1px';
|
|
22663
|
+
|
|
22664
|
+
// 2. Read the now-accurate scrollHeight. This value reflects the minimum
|
|
22665
|
+
// height required for the content, whether it's single or multi-line.
|
|
22308
22666
|
const scrollHeight = this.textarea.scrollHeight;
|
|
22309
22667
|
|
|
22310
|
-
//
|
|
22311
|
-
const
|
|
22312
|
-
const newHeight =
|
|
22313
|
-
const heightChanged = Math.abs(newHeight - oldHeight) > 2; // Only if meaningful change
|
|
22668
|
+
// A small buffer for rendering consistency across browsers.
|
|
22669
|
+
const buffer = 2;
|
|
22670
|
+
const newHeight = scrollHeight + buffer;
|
|
22314
22671
|
|
|
22315
|
-
|
|
22316
|
-
|
|
22672
|
+
// Check if the height has changed significantly.
|
|
22673
|
+
const heightChanged = Math.abs(newHeight - oldHeight) > 1;
|
|
22317
22674
|
|
|
22318
|
-
// Only update object bounds if
|
|
22675
|
+
// 4. Only update heights and object bounds if there was a change.
|
|
22319
22676
|
if (heightChanged) {
|
|
22677
|
+
this.textarea.style.height = `${newHeight}px`;
|
|
22678
|
+
this.hostDiv.style.height = `${newHeight}px`;
|
|
22320
22679
|
this.updateObjectBounds();
|
|
22680
|
+
} else {
|
|
22681
|
+
// If no significant change, ensure the textarea's height matches the container
|
|
22682
|
+
// to prevent any minor visual misalignment.
|
|
22683
|
+
this.textarea.style.height = this.hostDiv.style.height;
|
|
22321
22684
|
}
|
|
22685
|
+
|
|
22686
|
+
// 5. Restore the original scroll position.
|
|
22687
|
+
this.textarea.scrollTop = scrollTop;
|
|
22322
22688
|
}
|
|
22323
22689
|
handleKeyDown(e) {
|
|
22324
22690
|
if (e.key === 'Escape') {
|
|
@@ -22327,6 +22693,19 @@ class OverlayEditor {
|
|
|
22327
22693
|
} else if ((e.ctrlKey || e.metaKey) && e.key === 'Enter') {
|
|
22328
22694
|
e.preventDefault();
|
|
22329
22695
|
this.destroy(true); // Commit
|
|
22696
|
+
} else if (e.key === 'Enter' || e.key === 'Backspace' || e.key === 'Delete') {
|
|
22697
|
+
// For keys that might change the height, schedule a resize check
|
|
22698
|
+
// Use both immediate and delayed checks to catch all scenarios
|
|
22699
|
+
requestAnimationFrame(() => {
|
|
22700
|
+
if (!this.isDestroyed) {
|
|
22701
|
+
this.autoResizeTextarea();
|
|
22702
|
+
}
|
|
22703
|
+
});
|
|
22704
|
+
setTimeout(() => {
|
|
22705
|
+
if (!this.isDestroyed) {
|
|
22706
|
+
this.autoResizeTextarea();
|
|
22707
|
+
}
|
|
22708
|
+
}, 10); // Small delay to ensure DOM is updated
|
|
22330
22709
|
}
|
|
22331
22710
|
}
|
|
22332
22711
|
handleFocus() {
|
|
@@ -22357,8 +22736,8 @@ class OverlayEditor {
|
|
|
22357
22736
|
}
|
|
22358
22737
|
}
|
|
22359
22738
|
|
|
22360
|
-
/**
|
|
22361
|
-
* Setup detection for viewport changes (zoom/pan)
|
|
22739
|
+
/**
|
|
22740
|
+
* Setup detection for viewport changes (zoom/pan)
|
|
22362
22741
|
*/
|
|
22363
22742
|
setupViewportChangeDetection() {
|
|
22364
22743
|
// Store original methods
|
|
@@ -22387,8 +22766,8 @@ class OverlayEditor {
|
|
|
22387
22766
|
};
|
|
22388
22767
|
}
|
|
22389
22768
|
|
|
22390
|
-
/**
|
|
22391
|
-
* Restore original viewport methods
|
|
22769
|
+
/**
|
|
22770
|
+
* Restore original viewport methods
|
|
22392
22771
|
*/
|
|
22393
22772
|
restoreViewportChangeDetection() {
|
|
22394
22773
|
if (this.canvas.__originalSetZoom) {
|
|
@@ -22403,8 +22782,8 @@ class OverlayEditor {
|
|
|
22403
22782
|
}
|
|
22404
22783
|
}
|
|
22405
22784
|
|
|
22406
|
-
/**
|
|
22407
|
-
* Enter overlay text editing mode for a text object
|
|
22785
|
+
/**
|
|
22786
|
+
* Enter overlay text editing mode for a text object
|
|
22408
22787
|
*/
|
|
22409
22788
|
function enterTextOverlayEdit(canvas, target, options) {
|
|
22410
22789
|
// If already in overlay editing, destroy existing editor first
|
|
@@ -22428,35 +22807,35 @@ function enterTextOverlayEdit(canvas, target, options) {
|
|
|
22428
22807
|
return editor;
|
|
22429
22808
|
}
|
|
22430
22809
|
|
|
22431
|
-
/**
|
|
22432
|
-
* extend this regex to support non english languages
|
|
22433
|
-
*
|
|
22434
|
-
* - ` ` Matches a SPACE character (char code 32).
|
|
22435
|
-
* - `\n` Matches a LINE FEED character (char code 10).
|
|
22436
|
-
* - `.` Matches a "." character (char code 46).
|
|
22437
|
-
* - `,` Matches a "," character (char code 44).
|
|
22438
|
-
* - `;` Matches a ";" character (char code 59).
|
|
22439
|
-
* - `!` Matches a "!" character (char code 33).
|
|
22440
|
-
* - `\?` Matches a "?" character (char code 63).
|
|
22441
|
-
* - `\-` Matches a "-" character (char code 45).
|
|
22810
|
+
/**
|
|
22811
|
+
* extend this regex to support non english languages
|
|
22812
|
+
*
|
|
22813
|
+
* - ` ` Matches a SPACE character (char code 32).
|
|
22814
|
+
* - `\n` Matches a LINE FEED character (char code 10).
|
|
22815
|
+
* - `.` Matches a "." character (char code 46).
|
|
22816
|
+
* - `,` Matches a "," character (char code 44).
|
|
22817
|
+
* - `;` Matches a ";" character (char code 59).
|
|
22818
|
+
* - `!` Matches a "!" character (char code 33).
|
|
22819
|
+
* - `\?` Matches a "?" character (char code 63).
|
|
22820
|
+
* - `\-` Matches a "-" character (char code 45).
|
|
22442
22821
|
*/
|
|
22443
22822
|
// eslint-disable-next-line no-useless-escape
|
|
22444
22823
|
const reNonWord = /[ \n\.,;!\?\-]/;
|
|
22445
22824
|
class ITextBehavior extends FabricText {
|
|
22446
22825
|
constructor() {
|
|
22447
22826
|
super(...arguments);
|
|
22448
|
-
/**
|
|
22449
|
-
* Helps determining when the text is in composition, so that the cursor
|
|
22450
|
-
* rendering is altered.
|
|
22827
|
+
/**
|
|
22828
|
+
* Helps determining when the text is in composition, so that the cursor
|
|
22829
|
+
* rendering is altered.
|
|
22451
22830
|
*/
|
|
22452
22831
|
_defineProperty(this, "_currentCursorOpacity", 1);
|
|
22453
22832
|
}
|
|
22454
|
-
/**
|
|
22455
|
-
* Keeps track if the IText object was selected before the actual click.
|
|
22456
|
-
* This because we want to delay enter editing by a click.
|
|
22833
|
+
/**
|
|
22834
|
+
* Keeps track if the IText object was selected before the actual click.
|
|
22835
|
+
* This because we want to delay enter editing by a click.
|
|
22457
22836
|
*/
|
|
22458
|
-
/**
|
|
22459
|
-
* Initializes all the interactive behavior of IText
|
|
22837
|
+
/**
|
|
22838
|
+
* Initializes all the interactive behavior of IText
|
|
22460
22839
|
*/
|
|
22461
22840
|
initBehavior() {
|
|
22462
22841
|
this._tick = this._tick.bind(this);
|
|
@@ -22469,8 +22848,8 @@ class ITextBehavior extends FabricText {
|
|
|
22469
22848
|
return super.onDeselect(options);
|
|
22470
22849
|
}
|
|
22471
22850
|
|
|
22472
|
-
/**
|
|
22473
|
-
* @private
|
|
22851
|
+
/**
|
|
22852
|
+
* @private
|
|
22474
22853
|
*/
|
|
22475
22854
|
_animateCursor(_ref) {
|
|
22476
22855
|
let {
|
|
@@ -22495,8 +22874,8 @@ class ITextBehavior extends FabricText {
|
|
|
22495
22874
|
});
|
|
22496
22875
|
}
|
|
22497
22876
|
|
|
22498
|
-
/**
|
|
22499
|
-
* changes the cursor from visible to invisible
|
|
22877
|
+
/**
|
|
22878
|
+
* changes the cursor from visible to invisible
|
|
22500
22879
|
*/
|
|
22501
22880
|
_tick(delay) {
|
|
22502
22881
|
this._currentTickState = this._animateCursor({
|
|
@@ -22507,8 +22886,8 @@ class ITextBehavior extends FabricText {
|
|
|
22507
22886
|
});
|
|
22508
22887
|
}
|
|
22509
22888
|
|
|
22510
|
-
/**
|
|
22511
|
-
* Changes the cursor from invisible to visible
|
|
22889
|
+
/**
|
|
22890
|
+
* Changes the cursor from invisible to visible
|
|
22512
22891
|
*/
|
|
22513
22892
|
_onTickComplete() {
|
|
22514
22893
|
var _this$_currentTickCom;
|
|
@@ -22520,16 +22899,16 @@ class ITextBehavior extends FabricText {
|
|
|
22520
22899
|
});
|
|
22521
22900
|
}
|
|
22522
22901
|
|
|
22523
|
-
/**
|
|
22524
|
-
* Initializes delayed cursor
|
|
22902
|
+
/**
|
|
22903
|
+
* Initializes delayed cursor
|
|
22525
22904
|
*/
|
|
22526
22905
|
initDelayedCursor(restart) {
|
|
22527
22906
|
this.abortCursorAnimation();
|
|
22528
22907
|
this._tick(restart ? 0 : this.cursorDelay);
|
|
22529
22908
|
}
|
|
22530
22909
|
|
|
22531
|
-
/**
|
|
22532
|
-
* Aborts cursor animation, clears all timeouts and clear textarea context if necessary
|
|
22910
|
+
/**
|
|
22911
|
+
* Aborts cursor animation, clears all timeouts and clear textarea context if necessary
|
|
22533
22912
|
*/
|
|
22534
22913
|
abortCursorAnimation() {
|
|
22535
22914
|
let shouldClear = false;
|
|
@@ -22547,9 +22926,9 @@ class ITextBehavior extends FabricText {
|
|
|
22547
22926
|
}
|
|
22548
22927
|
}
|
|
22549
22928
|
|
|
22550
|
-
/**
|
|
22551
|
-
* Restart tue cursor animation if either is in complete state ( between animations )
|
|
22552
|
-
* or if it never started before
|
|
22929
|
+
/**
|
|
22930
|
+
* Restart tue cursor animation if either is in complete state ( between animations )
|
|
22931
|
+
* or if it never started before
|
|
22553
22932
|
*/
|
|
22554
22933
|
restartCursorIfNeeded() {
|
|
22555
22934
|
if ([this._currentTickState, this._currentTickCompleteState].some(cursorAnimation => !cursorAnimation || cursorAnimation.isDone())) {
|
|
@@ -22557,8 +22936,8 @@ class ITextBehavior extends FabricText {
|
|
|
22557
22936
|
}
|
|
22558
22937
|
}
|
|
22559
22938
|
|
|
22560
|
-
/**
|
|
22561
|
-
* Selects entire text
|
|
22939
|
+
/**
|
|
22940
|
+
* Selects entire text
|
|
22562
22941
|
*/
|
|
22563
22942
|
selectAll() {
|
|
22564
22943
|
this.selectionStart = 0;
|
|
@@ -22568,26 +22947,26 @@ class ITextBehavior extends FabricText {
|
|
|
22568
22947
|
return this;
|
|
22569
22948
|
}
|
|
22570
22949
|
|
|
22571
|
-
/**
|
|
22572
|
-
* Selects entire text and updates the visual state
|
|
22950
|
+
/**
|
|
22951
|
+
* Selects entire text and updates the visual state
|
|
22573
22952
|
*/
|
|
22574
22953
|
cmdAll() {
|
|
22575
22954
|
this.selectAll();
|
|
22576
22955
|
this.renderCursorOrSelection();
|
|
22577
22956
|
}
|
|
22578
22957
|
|
|
22579
|
-
/**
|
|
22580
|
-
* Returns selected text
|
|
22581
|
-
* @return {String}
|
|
22958
|
+
/**
|
|
22959
|
+
* Returns selected text
|
|
22960
|
+
* @return {String}
|
|
22582
22961
|
*/
|
|
22583
22962
|
getSelectedText() {
|
|
22584
22963
|
return this._text.slice(this.selectionStart, this.selectionEnd).join('');
|
|
22585
22964
|
}
|
|
22586
22965
|
|
|
22587
|
-
/**
|
|
22588
|
-
* Find new selection index representing start of current word according to current selection index
|
|
22589
|
-
* @param {Number} startFrom Current selection index
|
|
22590
|
-
* @return {Number} New selection index
|
|
22966
|
+
/**
|
|
22967
|
+
* Find new selection index representing start of current word according to current selection index
|
|
22968
|
+
* @param {Number} startFrom Current selection index
|
|
22969
|
+
* @return {Number} New selection index
|
|
22591
22970
|
*/
|
|
22592
22971
|
findWordBoundaryLeft(startFrom) {
|
|
22593
22972
|
let offset = 0,
|
|
@@ -22607,10 +22986,10 @@ class ITextBehavior extends FabricText {
|
|
|
22607
22986
|
return startFrom - offset;
|
|
22608
22987
|
}
|
|
22609
22988
|
|
|
22610
|
-
/**
|
|
22611
|
-
* Find new selection index representing end of current word according to current selection index
|
|
22612
|
-
* @param {Number} startFrom Current selection index
|
|
22613
|
-
* @return {Number} New selection index
|
|
22989
|
+
/**
|
|
22990
|
+
* Find new selection index representing end of current word according to current selection index
|
|
22991
|
+
* @param {Number} startFrom Current selection index
|
|
22992
|
+
* @return {Number} New selection index
|
|
22614
22993
|
*/
|
|
22615
22994
|
findWordBoundaryRight(startFrom) {
|
|
22616
22995
|
let offset = 0,
|
|
@@ -22630,10 +23009,10 @@ class ITextBehavior extends FabricText {
|
|
|
22630
23009
|
return startFrom + offset;
|
|
22631
23010
|
}
|
|
22632
23011
|
|
|
22633
|
-
/**
|
|
22634
|
-
* Find new selection index representing start of current line according to current selection index
|
|
22635
|
-
* @param {Number} startFrom Current selection index
|
|
22636
|
-
* @return {Number} New selection index
|
|
23012
|
+
/**
|
|
23013
|
+
* Find new selection index representing start of current line according to current selection index
|
|
23014
|
+
* @param {Number} startFrom Current selection index
|
|
23015
|
+
* @return {Number} New selection index
|
|
22637
23016
|
*/
|
|
22638
23017
|
findLineBoundaryLeft(startFrom) {
|
|
22639
23018
|
let offset = 0,
|
|
@@ -22645,10 +23024,10 @@ class ITextBehavior extends FabricText {
|
|
|
22645
23024
|
return startFrom - offset;
|
|
22646
23025
|
}
|
|
22647
23026
|
|
|
22648
|
-
/**
|
|
22649
|
-
* Find new selection index representing end of current line according to current selection index
|
|
22650
|
-
* @param {Number} startFrom Current selection index
|
|
22651
|
-
* @return {Number} New selection index
|
|
23027
|
+
/**
|
|
23028
|
+
* Find new selection index representing end of current line according to current selection index
|
|
23029
|
+
* @param {Number} startFrom Current selection index
|
|
23030
|
+
* @return {Number} New selection index
|
|
22652
23031
|
*/
|
|
22653
23032
|
findLineBoundaryRight(startFrom) {
|
|
22654
23033
|
let offset = 0,
|
|
@@ -22660,11 +23039,11 @@ class ITextBehavior extends FabricText {
|
|
|
22660
23039
|
return startFrom + offset;
|
|
22661
23040
|
}
|
|
22662
23041
|
|
|
22663
|
-
/**
|
|
22664
|
-
* Finds index corresponding to beginning or end of a word
|
|
22665
|
-
* @param {Number} selectionStart Index of a character
|
|
22666
|
-
* @param {Number} direction 1 or -1
|
|
22667
|
-
* @return {Number} Index of the beginning or end of a word
|
|
23042
|
+
/**
|
|
23043
|
+
* Finds index corresponding to beginning or end of a word
|
|
23044
|
+
* @param {Number} selectionStart Index of a character
|
|
23045
|
+
* @param {Number} direction 1 or -1
|
|
23046
|
+
* @return {Number} Index of the beginning or end of a word
|
|
22668
23047
|
*/
|
|
22669
23048
|
searchWordBoundary(selectionStart, direction) {
|
|
22670
23049
|
const text = this._text;
|
|
@@ -22682,9 +23061,9 @@ class ITextBehavior extends FabricText {
|
|
|
22682
23061
|
return index;
|
|
22683
23062
|
}
|
|
22684
23063
|
|
|
22685
|
-
/**
|
|
22686
|
-
* Selects the word that contains the char at index selectionStart
|
|
22687
|
-
* @param {Number} selectionStart Index of a character
|
|
23064
|
+
/**
|
|
23065
|
+
* Selects the word that contains the char at index selectionStart
|
|
23066
|
+
* @param {Number} selectionStart Index of a character
|
|
22688
23067
|
*/
|
|
22689
23068
|
selectWord(selectionStart) {
|
|
22690
23069
|
selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
|
|
@@ -22700,9 +23079,9 @@ class ITextBehavior extends FabricText {
|
|
|
22700
23079
|
this.renderCursorOrSelection();
|
|
22701
23080
|
}
|
|
22702
23081
|
|
|
22703
|
-
/**
|
|
22704
|
-
* Selects the line that contains selectionStart
|
|
22705
|
-
* @param {Number} selectionStart Index of a character
|
|
23082
|
+
/**
|
|
23083
|
+
* Selects the line that contains selectionStart
|
|
23084
|
+
* @param {Number} selectionStart Index of a character
|
|
22706
23085
|
*/
|
|
22707
23086
|
selectLine(selectionStart) {
|
|
22708
23087
|
selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
|
|
@@ -22714,8 +23093,8 @@ class ITextBehavior extends FabricText {
|
|
|
22714
23093
|
this._updateTextarea();
|
|
22715
23094
|
}
|
|
22716
23095
|
|
|
22717
|
-
/**
|
|
22718
|
-
* Enters editing state
|
|
23096
|
+
/**
|
|
23097
|
+
* Enters editing state
|
|
22719
23098
|
*/
|
|
22720
23099
|
enterEditing(e) {
|
|
22721
23100
|
if (this.isEditing || !this.editable) {
|
|
@@ -22735,8 +23114,8 @@ class ITextBehavior extends FabricText {
|
|
|
22735
23114
|
}
|
|
22736
23115
|
}
|
|
22737
23116
|
|
|
22738
|
-
/**
|
|
22739
|
-
* runs the actual logic that enter from editing state, see {@link enterEditing}
|
|
23117
|
+
/**
|
|
23118
|
+
* runs the actual logic that enter from editing state, see {@link enterEditing}
|
|
22740
23119
|
*/
|
|
22741
23120
|
enterEditingImpl() {
|
|
22742
23121
|
if (this.canvas) {
|
|
@@ -22760,8 +23139,8 @@ class ITextBehavior extends FabricText {
|
|
|
22760
23139
|
}
|
|
22761
23140
|
}
|
|
22762
23141
|
|
|
22763
|
-
/**
|
|
22764
|
-
* Enter overlay editing mode using DOM textarea overlay
|
|
23142
|
+
/**
|
|
23143
|
+
* Enter overlay editing mode using DOM textarea overlay
|
|
22765
23144
|
*/
|
|
22766
23145
|
enterOverlayEditing() {
|
|
22767
23146
|
this._saveEditingProps();
|
|
@@ -22782,8 +23161,8 @@ class ITextBehavior extends FabricText {
|
|
|
22782
23161
|
});
|
|
22783
23162
|
}
|
|
22784
23163
|
|
|
22785
|
-
/**
|
|
22786
|
-
* Commit overlay editing changes
|
|
23164
|
+
/**
|
|
23165
|
+
* Commit overlay editing changes
|
|
22787
23166
|
*/
|
|
22788
23167
|
commitOverlayEdit(text) {
|
|
22789
23168
|
const overlayEditor = this.__overlayEditor;
|
|
@@ -22807,8 +23186,8 @@ class ITextBehavior extends FabricText {
|
|
|
22807
23186
|
this.canvas && this.canvas.requestRenderAll();
|
|
22808
23187
|
}
|
|
22809
23188
|
|
|
22810
|
-
/**
|
|
22811
|
-
* Cancel overlay editing without changes
|
|
23189
|
+
/**
|
|
23190
|
+
* Cancel overlay editing without changes
|
|
22812
23191
|
*/
|
|
22813
23192
|
cancelOverlayEdit() {
|
|
22814
23193
|
// Restore original text
|
|
@@ -22816,8 +23195,8 @@ class ITextBehavior extends FabricText {
|
|
|
22816
23195
|
this.exitEditing();
|
|
22817
23196
|
}
|
|
22818
23197
|
|
|
22819
|
-
/**
|
|
22820
|
-
* called by {@link Canvas#textEditingManager}
|
|
23198
|
+
/**
|
|
23199
|
+
* called by {@link Canvas#textEditingManager}
|
|
22821
23200
|
*/
|
|
22822
23201
|
updateSelectionOnMouseMove(e) {
|
|
22823
23202
|
if (this.getActiveControl()) {
|
|
@@ -22845,8 +23224,8 @@ class ITextBehavior extends FabricText {
|
|
|
22845
23224
|
}
|
|
22846
23225
|
}
|
|
22847
23226
|
|
|
22848
|
-
/**
|
|
22849
|
-
* @private
|
|
23227
|
+
/**
|
|
23228
|
+
* @private
|
|
22850
23229
|
*/
|
|
22851
23230
|
_setEditingProps() {
|
|
22852
23231
|
this.hoverCursor = 'text';
|
|
@@ -22858,8 +23237,8 @@ class ITextBehavior extends FabricText {
|
|
|
22858
23237
|
this.lockMovementX = this.lockMovementY = true;
|
|
22859
23238
|
}
|
|
22860
23239
|
|
|
22861
|
-
/**
|
|
22862
|
-
* convert from textarea to grapheme indexes
|
|
23240
|
+
/**
|
|
23241
|
+
* convert from textarea to grapheme indexes
|
|
22863
23242
|
*/
|
|
22864
23243
|
fromStringToGraphemeSelection(start, end, text) {
|
|
22865
23244
|
const smallerTextStart = text.slice(0, start),
|
|
@@ -22878,8 +23257,8 @@ class ITextBehavior extends FabricText {
|
|
|
22878
23257
|
};
|
|
22879
23258
|
}
|
|
22880
23259
|
|
|
22881
|
-
/**
|
|
22882
|
-
* convert from fabric to textarea values
|
|
23260
|
+
/**
|
|
23261
|
+
* convert from fabric to textarea values
|
|
22883
23262
|
*/
|
|
22884
23263
|
fromGraphemeToStringSelection(start, end, graphemes) {
|
|
22885
23264
|
const smallerTextStart = graphemes.slice(0, start),
|
|
@@ -22898,8 +23277,8 @@ class ITextBehavior extends FabricText {
|
|
|
22898
23277
|
};
|
|
22899
23278
|
}
|
|
22900
23279
|
|
|
22901
|
-
/**
|
|
22902
|
-
* @private
|
|
23280
|
+
/**
|
|
23281
|
+
* @private
|
|
22903
23282
|
*/
|
|
22904
23283
|
_updateTextarea() {
|
|
22905
23284
|
this.cursorOffsetCache = {};
|
|
@@ -22914,8 +23293,8 @@ class ITextBehavior extends FabricText {
|
|
|
22914
23293
|
this.updateTextareaPosition();
|
|
22915
23294
|
}
|
|
22916
23295
|
|
|
22917
|
-
/**
|
|
22918
|
-
* @private
|
|
23296
|
+
/**
|
|
23297
|
+
* @private
|
|
22919
23298
|
*/
|
|
22920
23299
|
updateFromTextArea() {
|
|
22921
23300
|
if (!this.hiddenTextarea) {
|
|
@@ -22935,8 +23314,8 @@ class ITextBehavior extends FabricText {
|
|
|
22935
23314
|
this.updateTextareaPosition();
|
|
22936
23315
|
}
|
|
22937
23316
|
|
|
22938
|
-
/**
|
|
22939
|
-
* @private
|
|
23317
|
+
/**
|
|
23318
|
+
* @private
|
|
22940
23319
|
*/
|
|
22941
23320
|
updateTextareaPosition() {
|
|
22942
23321
|
if (this.selectionStart === this.selectionEnd) {
|
|
@@ -22946,9 +23325,9 @@ class ITextBehavior extends FabricText {
|
|
|
22946
23325
|
}
|
|
22947
23326
|
}
|
|
22948
23327
|
|
|
22949
|
-
/**
|
|
22950
|
-
* @private
|
|
22951
|
-
* @return {Object} style contains style for hiddenTextarea
|
|
23328
|
+
/**
|
|
23329
|
+
* @private
|
|
23330
|
+
* @return {Object} style contains style for hiddenTextarea
|
|
22952
23331
|
*/
|
|
22953
23332
|
_calcTextareaPosition() {
|
|
22954
23333
|
if (!this.canvas) {
|
|
@@ -22995,8 +23374,8 @@ class ITextBehavior extends FabricText {
|
|
|
22995
23374
|
};
|
|
22996
23375
|
}
|
|
22997
23376
|
|
|
22998
|
-
/**
|
|
22999
|
-
* @private
|
|
23377
|
+
/**
|
|
23378
|
+
* @private
|
|
23000
23379
|
*/
|
|
23001
23380
|
_saveEditingProps() {
|
|
23002
23381
|
this._savedProps = {
|
|
@@ -23013,8 +23392,8 @@ class ITextBehavior extends FabricText {
|
|
|
23013
23392
|
};
|
|
23014
23393
|
}
|
|
23015
23394
|
|
|
23016
|
-
/**
|
|
23017
|
-
* @private
|
|
23395
|
+
/**
|
|
23396
|
+
* @private
|
|
23018
23397
|
*/
|
|
23019
23398
|
_restoreEditingProps() {
|
|
23020
23399
|
if (!this._savedProps) {
|
|
@@ -23034,9 +23413,9 @@ class ITextBehavior extends FabricText {
|
|
|
23034
23413
|
delete this._savedProps;
|
|
23035
23414
|
}
|
|
23036
23415
|
|
|
23037
|
-
/**
|
|
23038
|
-
* runs the actual logic that exits from editing state, see {@link exitEditing}
|
|
23039
|
-
* But it does not fire events
|
|
23416
|
+
/**
|
|
23417
|
+
* runs the actual logic that exits from editing state, see {@link exitEditing}
|
|
23418
|
+
* But it does not fire events
|
|
23040
23419
|
*/
|
|
23041
23420
|
exitEditingImpl() {
|
|
23042
23421
|
const hiddenTextarea = this.hiddenTextarea;
|
|
@@ -23057,8 +23436,8 @@ class ITextBehavior extends FabricText {
|
|
|
23057
23436
|
}
|
|
23058
23437
|
}
|
|
23059
23438
|
|
|
23060
|
-
/**
|
|
23061
|
-
* Exits from editing state and fires relevant events
|
|
23439
|
+
/**
|
|
23440
|
+
* Exits from editing state and fires relevant events
|
|
23062
23441
|
*/
|
|
23063
23442
|
exitEditing() {
|
|
23064
23443
|
const isTextChanged = this._textBeforeEdit !== this.text;
|
|
@@ -23077,8 +23456,8 @@ class ITextBehavior extends FabricText {
|
|
|
23077
23456
|
return this;
|
|
23078
23457
|
}
|
|
23079
23458
|
|
|
23080
|
-
/**
|
|
23081
|
-
* @private
|
|
23459
|
+
/**
|
|
23460
|
+
* @private
|
|
23082
23461
|
*/
|
|
23083
23462
|
_removeExtraneousStyles() {
|
|
23084
23463
|
for (const prop in this.styles) {
|
|
@@ -23088,10 +23467,10 @@ class ITextBehavior extends FabricText {
|
|
|
23088
23467
|
}
|
|
23089
23468
|
}
|
|
23090
23469
|
|
|
23091
|
-
/**
|
|
23092
|
-
* remove and reflow a style block from start to end.
|
|
23093
|
-
* @param {Number} start linear start position for removal (included in removal)
|
|
23094
|
-
* @param {Number} end linear end position for removal ( excluded from removal )
|
|
23470
|
+
/**
|
|
23471
|
+
* remove and reflow a style block from start to end.
|
|
23472
|
+
* @param {Number} start linear start position for removal (included in removal)
|
|
23473
|
+
* @param {Number} end linear end position for removal ( excluded from removal )
|
|
23095
23474
|
*/
|
|
23096
23475
|
removeStyleFromTo(start, end) {
|
|
23097
23476
|
const {
|
|
@@ -23144,10 +23523,10 @@ class ITextBehavior extends FabricText {
|
|
|
23144
23523
|
}
|
|
23145
23524
|
}
|
|
23146
23525
|
|
|
23147
|
-
/**
|
|
23148
|
-
* Shifts line styles up or down
|
|
23149
|
-
* @param {Number} lineIndex Index of a line
|
|
23150
|
-
* @param {Number} offset Can any number?
|
|
23526
|
+
/**
|
|
23527
|
+
* Shifts line styles up or down
|
|
23528
|
+
* @param {Number} lineIndex Index of a line
|
|
23529
|
+
* @param {Number} offset Can any number?
|
|
23151
23530
|
*/
|
|
23152
23531
|
shiftLineStyles(lineIndex, offset) {
|
|
23153
23532
|
const clonedStyles = Object.assign({}, this.styles);
|
|
@@ -23162,15 +23541,15 @@ class ITextBehavior extends FabricText {
|
|
|
23162
23541
|
}
|
|
23163
23542
|
}
|
|
23164
23543
|
|
|
23165
|
-
/**
|
|
23166
|
-
* Handle insertion of more consecutive style lines for when one or more
|
|
23167
|
-
* newlines gets added to the text. Since current style needs to be shifted
|
|
23168
|
-
* first we shift the current style of the number lines needed, then we add
|
|
23169
|
-
* new lines from the last to the first.
|
|
23170
|
-
* @param {Number} lineIndex Index of a line
|
|
23171
|
-
* @param {Number} charIndex Index of a char
|
|
23172
|
-
* @param {Number} qty number of lines to add
|
|
23173
|
-
* @param {Array} copiedStyle Array of objects styles
|
|
23544
|
+
/**
|
|
23545
|
+
* Handle insertion of more consecutive style lines for when one or more
|
|
23546
|
+
* newlines gets added to the text. Since current style needs to be shifted
|
|
23547
|
+
* first we shift the current style of the number lines needed, then we add
|
|
23548
|
+
* new lines from the last to the first.
|
|
23549
|
+
* @param {Number} lineIndex Index of a line
|
|
23550
|
+
* @param {Number} charIndex Index of a char
|
|
23551
|
+
* @param {Number} qty number of lines to add
|
|
23552
|
+
* @param {Array} copiedStyle Array of objects styles
|
|
23174
23553
|
*/
|
|
23175
23554
|
insertNewlineStyleObject(lineIndex, charIndex, qty, copiedStyle) {
|
|
23176
23555
|
const newLineStyles = {};
|
|
@@ -23230,12 +23609,12 @@ class ITextBehavior extends FabricText {
|
|
|
23230
23609
|
this._forceClearCache = true;
|
|
23231
23610
|
}
|
|
23232
23611
|
|
|
23233
|
-
/**
|
|
23234
|
-
* Inserts style object for a given line/char index
|
|
23235
|
-
* @param {Number} lineIndex Index of a line
|
|
23236
|
-
* @param {Number} charIndex Index of a char
|
|
23237
|
-
* @param {Number} quantity number Style object to insert, if given
|
|
23238
|
-
* @param {Array} copiedStyle array of style objects
|
|
23612
|
+
/**
|
|
23613
|
+
* Inserts style object for a given line/char index
|
|
23614
|
+
* @param {Number} lineIndex Index of a line
|
|
23615
|
+
* @param {Number} charIndex Index of a char
|
|
23616
|
+
* @param {Number} quantity number Style object to insert, if given
|
|
23617
|
+
* @param {Array} copiedStyle array of style objects
|
|
23239
23618
|
*/
|
|
23240
23619
|
insertCharStyleObject(lineIndex, charIndex, quantity, copiedStyle) {
|
|
23241
23620
|
if (!this.styles) {
|
|
@@ -23284,11 +23663,11 @@ class ITextBehavior extends FabricText {
|
|
|
23284
23663
|
}
|
|
23285
23664
|
}
|
|
23286
23665
|
|
|
23287
|
-
/**
|
|
23288
|
-
* Inserts style object(s)
|
|
23289
|
-
* @param {Array} insertedText Characters at the location where style is inserted
|
|
23290
|
-
* @param {Number} start cursor index for inserting style
|
|
23291
|
-
* @param {Array} [copiedStyle] array of style objects to insert.
|
|
23666
|
+
/**
|
|
23667
|
+
* Inserts style object(s)
|
|
23668
|
+
* @param {Array} insertedText Characters at the location where style is inserted
|
|
23669
|
+
* @param {Number} start cursor index for inserting style
|
|
23670
|
+
* @param {Array} [copiedStyle] array of style objects to insert.
|
|
23292
23671
|
*/
|
|
23293
23672
|
insertNewStyleBlock(insertedText, start, copiedStyle) {
|
|
23294
23673
|
const cursorLoc = this.get2DCursorLocation(start, true),
|
|
@@ -23329,12 +23708,12 @@ class ITextBehavior extends FabricText {
|
|
|
23329
23708
|
}
|
|
23330
23709
|
}
|
|
23331
23710
|
|
|
23332
|
-
/**
|
|
23333
|
-
* Removes characters from start/end
|
|
23334
|
-
* start/end ar per grapheme position in _text array.
|
|
23335
|
-
*
|
|
23336
|
-
* @param {Number} start
|
|
23337
|
-
* @param {Number} end default to start + 1
|
|
23711
|
+
/**
|
|
23712
|
+
* Removes characters from start/end
|
|
23713
|
+
* start/end ar per grapheme position in _text array.
|
|
23714
|
+
*
|
|
23715
|
+
* @param {Number} start
|
|
23716
|
+
* @param {Number} end default to start + 1
|
|
23338
23717
|
*/
|
|
23339
23718
|
removeChars(start) {
|
|
23340
23719
|
let end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : start + 1;
|
|
@@ -23347,17 +23726,17 @@ class ITextBehavior extends FabricText {
|
|
|
23347
23726
|
this._removeExtraneousStyles();
|
|
23348
23727
|
}
|
|
23349
23728
|
|
|
23350
|
-
/**
|
|
23351
|
-
* insert characters at start position, before start position.
|
|
23352
|
-
* start equal 1 it means the text get inserted between actual grapheme 0 and 1
|
|
23353
|
-
* if style array is provided, it must be as the same length of text in graphemes
|
|
23354
|
-
* if end is provided and is bigger than start, old text is replaced.
|
|
23355
|
-
* start/end ar per grapheme position in _text array.
|
|
23356
|
-
*
|
|
23357
|
-
* @param {String} text text to insert
|
|
23358
|
-
* @param {Array} style array of style objects
|
|
23359
|
-
* @param {Number} start
|
|
23360
|
-
* @param {Number} end default to start + 1
|
|
23729
|
+
/**
|
|
23730
|
+
* insert characters at start position, before start position.
|
|
23731
|
+
* start equal 1 it means the text get inserted between actual grapheme 0 and 1
|
|
23732
|
+
* if style array is provided, it must be as the same length of text in graphemes
|
|
23733
|
+
* if end is provided and is bigger than start, old text is replaced.
|
|
23734
|
+
* start/end ar per grapheme position in _text array.
|
|
23735
|
+
*
|
|
23736
|
+
* @param {String} text text to insert
|
|
23737
|
+
* @param {Array} style array of style objects
|
|
23738
|
+
* @param {Number} start
|
|
23739
|
+
* @param {Number} end default to start + 1
|
|
23361
23740
|
*/
|
|
23362
23741
|
insertChars(text, style, start) {
|
|
23363
23742
|
let end = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : start;
|
|
@@ -23374,9 +23753,9 @@ class ITextBehavior extends FabricText {
|
|
|
23374
23753
|
this._removeExtraneousStyles();
|
|
23375
23754
|
}
|
|
23376
23755
|
|
|
23377
|
-
/**
|
|
23378
|
-
* Set the selectionStart and selectionEnd according to the new position of cursor
|
|
23379
|
-
* mimic the key - mouse navigation when shift is pressed.
|
|
23756
|
+
/**
|
|
23757
|
+
* Set the selectionStart and selectionEnd according to the new position of cursor
|
|
23758
|
+
* mimic the key - mouse navigation when shift is pressed.
|
|
23380
23759
|
*/
|
|
23381
23760
|
setSelectionStartEndWithShift(start, end, newSelection) {
|
|
23382
23761
|
if (newSelection <= start) {
|
|
@@ -23999,8 +24378,8 @@ class ITextKeyBehavior extends ITextBehavior {
|
|
|
23999
24378
|
}
|
|
24000
24379
|
}
|
|
24001
24380
|
|
|
24002
|
-
/**
|
|
24003
|
-
* `LEFT_CLICK === 0`
|
|
24381
|
+
/**
|
|
24382
|
+
* `LEFT_CLICK === 0`
|
|
24004
24383
|
*/
|
|
24005
24384
|
const notALeftClick = e => !!e.button;
|
|
24006
24385
|
class ITextClickBehavior extends ITextKeyBehavior {
|
|
@@ -24018,36 +24397,36 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24018
24397
|
super.initBehavior();
|
|
24019
24398
|
}
|
|
24020
24399
|
|
|
24021
|
-
/**
|
|
24022
|
-
* If this method returns true a mouse move operation over a text selection
|
|
24023
|
-
* will not prevent the native mouse event allowing the browser to start a drag operation.
|
|
24024
|
-
* shouldStartDragging can be read 'do not prevent default for mouse move event'
|
|
24025
|
-
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24026
|
-
* @returns
|
|
24400
|
+
/**
|
|
24401
|
+
* If this method returns true a mouse move operation over a text selection
|
|
24402
|
+
* will not prevent the native mouse event allowing the browser to start a drag operation.
|
|
24403
|
+
* shouldStartDragging can be read 'do not prevent default for mouse move event'
|
|
24404
|
+
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24405
|
+
* @returns
|
|
24027
24406
|
*/
|
|
24028
24407
|
shouldStartDragging() {
|
|
24029
24408
|
return this.draggableTextDelegate.isActive();
|
|
24030
24409
|
}
|
|
24031
24410
|
|
|
24032
|
-
/**
|
|
24033
|
-
* @public override this method to control whether instance should/shouldn't become a drag source,
|
|
24034
|
-
* @see also {@link DraggableTextDelegate#isActive}
|
|
24035
|
-
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24036
|
-
* @returns {boolean} should handle event
|
|
24411
|
+
/**
|
|
24412
|
+
* @public override this method to control whether instance should/shouldn't become a drag source,
|
|
24413
|
+
* @see also {@link DraggableTextDelegate#isActive}
|
|
24414
|
+
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24415
|
+
* @returns {boolean} should handle event
|
|
24037
24416
|
*/
|
|
24038
24417
|
onDragStart(e) {
|
|
24039
24418
|
return this.draggableTextDelegate.onDragStart(e);
|
|
24040
24419
|
}
|
|
24041
24420
|
|
|
24042
|
-
/**
|
|
24043
|
-
* @public override this method to control whether instance should/shouldn't become a drop target
|
|
24421
|
+
/**
|
|
24422
|
+
* @public override this method to control whether instance should/shouldn't become a drop target
|
|
24044
24423
|
*/
|
|
24045
24424
|
canDrop(e) {
|
|
24046
24425
|
return this.draggableTextDelegate.canDrop(e);
|
|
24047
24426
|
}
|
|
24048
24427
|
|
|
24049
|
-
/**
|
|
24050
|
-
* Default handler for double click, select a word or enter overlay editing
|
|
24428
|
+
/**
|
|
24429
|
+
* Default handler for double click, select a word or enter overlay editing
|
|
24051
24430
|
*/
|
|
24052
24431
|
doubleClickHandler(options) {
|
|
24053
24432
|
// Check if we should enter overlay editing mode
|
|
@@ -24064,8 +24443,8 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24064
24443
|
this.renderCursorOrSelection();
|
|
24065
24444
|
}
|
|
24066
24445
|
|
|
24067
|
-
/**
|
|
24068
|
-
* Default handler for triple click, select a line
|
|
24446
|
+
/**
|
|
24447
|
+
* Default handler for triple click, select a line
|
|
24069
24448
|
*/
|
|
24070
24449
|
tripleClickHandler(options) {
|
|
24071
24450
|
if (!this.isEditing) {
|
|
@@ -24075,13 +24454,13 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24075
24454
|
this.renderCursorOrSelection();
|
|
24076
24455
|
}
|
|
24077
24456
|
|
|
24078
|
-
/**
|
|
24079
|
-
* Default event handler for the basic functionalities needed on _mouseDown
|
|
24080
|
-
* can be overridden to do something different.
|
|
24081
|
-
* Scope of this implementation is: find the click position, set selectionStart
|
|
24082
|
-
* find selectionEnd, initialize the drawing of either cursor or selection area
|
|
24083
|
-
* initializing a mousedDown on a text area will cancel fabricjs knowledge of
|
|
24084
|
-
* current compositionMode. It will be set to false.
|
|
24457
|
+
/**
|
|
24458
|
+
* Default event handler for the basic functionalities needed on _mouseDown
|
|
24459
|
+
* can be overridden to do something different.
|
|
24460
|
+
* Scope of this implementation is: find the click position, set selectionStart
|
|
24461
|
+
* find selectionEnd, initialize the drawing of either cursor or selection area
|
|
24462
|
+
* initializing a mousedDown on a text area will cancel fabricjs knowledge of
|
|
24463
|
+
* current compositionMode. It will be set to false.
|
|
24085
24464
|
*/
|
|
24086
24465
|
_mouseDownHandler(_ref) {
|
|
24087
24466
|
let {
|
|
@@ -24109,9 +24488,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24109
24488
|
this.selected || (this.selected = alreadySelected || this.isEditing);
|
|
24110
24489
|
}
|
|
24111
24490
|
|
|
24112
|
-
/**
|
|
24113
|
-
* standard handler for mouse up, overridable
|
|
24114
|
-
* @private
|
|
24491
|
+
/**
|
|
24492
|
+
* standard handler for mouse up, overridable
|
|
24493
|
+
* @private
|
|
24115
24494
|
*/
|
|
24116
24495
|
mouseUpHandler(_ref2) {
|
|
24117
24496
|
let {
|
|
@@ -24142,9 +24521,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24142
24521
|
}
|
|
24143
24522
|
}
|
|
24144
24523
|
|
|
24145
|
-
/**
|
|
24146
|
-
* Changes cursor location in a text depending on passed pointer (x/y) object
|
|
24147
|
-
* @param {TPointerEvent} e Event object
|
|
24524
|
+
/**
|
|
24525
|
+
* Changes cursor location in a text depending on passed pointer (x/y) object
|
|
24526
|
+
* @param {TPointerEvent} e Event object
|
|
24148
24527
|
*/
|
|
24149
24528
|
setCursorByClick(e) {
|
|
24150
24529
|
const newSelection = this.getSelectionStartFromPointer(e),
|
|
@@ -24162,10 +24541,10 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24162
24541
|
}
|
|
24163
24542
|
}
|
|
24164
24543
|
|
|
24165
|
-
/**
|
|
24166
|
-
* Returns index of a character corresponding to where an object was clicked
|
|
24167
|
-
* @param {TPointerEvent} e Event object
|
|
24168
|
-
* @return {Number} Index of a character
|
|
24544
|
+
/**
|
|
24545
|
+
* Returns index of a character corresponding to where an object was clicked
|
|
24546
|
+
* @param {TPointerEvent} e Event object
|
|
24547
|
+
* @return {Number} Index of a character
|
|
24169
24548
|
*/
|
|
24170
24549
|
getSelectionStartFromPointer(e) {
|
|
24171
24550
|
const mouseOffset = this.canvas.getScenePoint(e).transform(invertTransform(this.calcTransformMatrix())).add(new Point(-this._getLeftOffset(), -this._getTopOffset()));
|
|
@@ -24211,15 +24590,15 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24211
24590
|
}
|
|
24212
24591
|
}
|
|
24213
24592
|
|
|
24214
|
-
/**
|
|
24215
|
-
* Hit Testing and Cursor Positioning System
|
|
24216
|
-
*
|
|
24217
|
-
* Maps pointer coordinates to text positions and provides cursor rectangles
|
|
24218
|
-
* for interactive text editing with grapheme-aware boundaries.
|
|
24593
|
+
/**
|
|
24594
|
+
* Hit Testing and Cursor Positioning System
|
|
24595
|
+
*
|
|
24596
|
+
* Maps pointer coordinates to text positions and provides cursor rectangles
|
|
24597
|
+
* for interactive text editing with grapheme-aware boundaries.
|
|
24219
24598
|
*/
|
|
24220
24599
|
|
|
24221
|
-
/**
|
|
24222
|
-
* Hit test a point against laid out text to find insertion position
|
|
24600
|
+
/**
|
|
24601
|
+
* Hit test a point against laid out text to find insertion position
|
|
24223
24602
|
*/
|
|
24224
24603
|
function hitTest(x, y, layout, options) {
|
|
24225
24604
|
if (layout.lines.length === 0) {
|
|
@@ -24263,8 +24642,8 @@ function hitTest(x, y, layout, options) {
|
|
|
24263
24642
|
};
|
|
24264
24643
|
}
|
|
24265
24644
|
|
|
24266
|
-
/**
|
|
24267
|
-
* Get cursor rectangle for a given insertion index
|
|
24645
|
+
/**
|
|
24646
|
+
* Get cursor rectangle for a given insertion index
|
|
24268
24647
|
*/
|
|
24269
24648
|
function getCursorRect(insertionIndex, layout, options) {
|
|
24270
24649
|
if (layout.lines.length === 0) {
|
|
@@ -24311,8 +24690,8 @@ function getCursorRect(insertionIndex, layout, options) {
|
|
|
24311
24690
|
|
|
24312
24691
|
// Private helper functions
|
|
24313
24692
|
|
|
24314
|
-
/**
|
|
24315
|
-
* Find which line contains the given Y coordinate
|
|
24693
|
+
/**
|
|
24694
|
+
* Find which line contains the given Y coordinate
|
|
24316
24695
|
*/
|
|
24317
24696
|
function findLineAtY(y, lines) {
|
|
24318
24697
|
var _lines;
|
|
@@ -24335,8 +24714,8 @@ function findLineAtY(y, lines) {
|
|
|
24335
24714
|
};
|
|
24336
24715
|
}
|
|
24337
24716
|
|
|
24338
|
-
/**
|
|
24339
|
-
* Find character position within a line at given X coordinate
|
|
24717
|
+
/**
|
|
24718
|
+
* Find character position within a line at given X coordinate
|
|
24340
24719
|
*/
|
|
24341
24720
|
function findCharAtX(x, line, options) {
|
|
24342
24721
|
if (line.bounds.length === 0) {
|
|
@@ -24442,8 +24821,8 @@ function findCharAtX(x, line, options) {
|
|
|
24442
24821
|
};
|
|
24443
24822
|
}
|
|
24444
24823
|
|
|
24445
|
-
/**
|
|
24446
|
-
* Calculate total insertion index from line and character indices
|
|
24824
|
+
/**
|
|
24825
|
+
* Calculate total insertion index from line and character indices
|
|
24447
24826
|
*/
|
|
24448
24827
|
function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
|
|
24449
24828
|
let insertionIndex = 0;
|
|
@@ -24462,8 +24841,8 @@ function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
|
|
|
24462
24841
|
return insertionIndex;
|
|
24463
24842
|
}
|
|
24464
24843
|
|
|
24465
|
-
/**
|
|
24466
|
-
* Find line and grapheme position from insertion index
|
|
24844
|
+
/**
|
|
24845
|
+
* Find line and grapheme position from insertion index
|
|
24467
24846
|
*/
|
|
24468
24847
|
function findPositionFromIndex(insertionIndex, layout) {
|
|
24469
24848
|
let currentIndex = 0;
|
|
@@ -24505,8 +24884,8 @@ function findPositionFromIndex(insertionIndex, layout) {
|
|
|
24505
24884
|
};
|
|
24506
24885
|
}
|
|
24507
24886
|
|
|
24508
|
-
/**
|
|
24509
|
-
* Calculate Y position of a line
|
|
24887
|
+
/**
|
|
24888
|
+
* Calculate Y position of a line
|
|
24510
24889
|
*/
|
|
24511
24890
|
function calculateLineY(lineIndex, layout, options) {
|
|
24512
24891
|
let y = 0;
|
|
@@ -24609,48 +24988,48 @@ const iTextDefaultValues = {
|
|
|
24609
24988
|
|
|
24610
24989
|
// @TODO this is not complete
|
|
24611
24990
|
|
|
24612
|
-
/**
|
|
24613
|
-
* @fires changed
|
|
24614
|
-
* @fires selection:changed
|
|
24615
|
-
* @fires editing:entered
|
|
24616
|
-
* @fires editing:exited
|
|
24617
|
-
* @fires dragstart
|
|
24618
|
-
* @fires drag drag event firing on the drag source
|
|
24619
|
-
* @fires dragend
|
|
24620
|
-
* @fires copy
|
|
24621
|
-
* @fires cut
|
|
24622
|
-
* @fires paste
|
|
24623
|
-
*
|
|
24624
|
-
* #### Supported key combinations
|
|
24625
|
-
* ```
|
|
24626
|
-
* Move cursor: left, right, up, down
|
|
24627
|
-
* Select character: shift + left, shift + right
|
|
24628
|
-
* Select text vertically: shift + up, shift + down
|
|
24629
|
-
* Move cursor by word: alt + left, alt + right
|
|
24630
|
-
* Select words: shift + alt + left, shift + alt + right
|
|
24631
|
-
* Move cursor to line start/end: cmd + left, cmd + right or home, end
|
|
24632
|
-
* Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
|
|
24633
|
-
* Jump to start/end of text: cmd + up, cmd + down
|
|
24634
|
-
* Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
|
|
24635
|
-
* Delete character: backspace
|
|
24636
|
-
* Delete word: alt + backspace
|
|
24637
|
-
* Delete line: cmd + backspace
|
|
24638
|
-
* Forward delete: delete
|
|
24639
|
-
* Copy text: ctrl/cmd + c
|
|
24640
|
-
* Paste text: ctrl/cmd + v
|
|
24641
|
-
* Cut text: ctrl/cmd + x
|
|
24642
|
-
* Select entire text: ctrl/cmd + a
|
|
24643
|
-
* Quit editing tab or esc
|
|
24644
|
-
* ```
|
|
24645
|
-
*
|
|
24646
|
-
* #### Supported mouse/touch combination
|
|
24647
|
-
* ```
|
|
24648
|
-
* Position cursor: click/touch
|
|
24649
|
-
* Create selection: click/touch & drag
|
|
24650
|
-
* Create selection: click & shift + click
|
|
24651
|
-
* Select word: double click
|
|
24652
|
-
* Select line: triple click
|
|
24653
|
-
* ```
|
|
24991
|
+
/**
|
|
24992
|
+
* @fires changed
|
|
24993
|
+
* @fires selection:changed
|
|
24994
|
+
* @fires editing:entered
|
|
24995
|
+
* @fires editing:exited
|
|
24996
|
+
* @fires dragstart
|
|
24997
|
+
* @fires drag drag event firing on the drag source
|
|
24998
|
+
* @fires dragend
|
|
24999
|
+
* @fires copy
|
|
25000
|
+
* @fires cut
|
|
25001
|
+
* @fires paste
|
|
25002
|
+
*
|
|
25003
|
+
* #### Supported key combinations
|
|
25004
|
+
* ```
|
|
25005
|
+
* Move cursor: left, right, up, down
|
|
25006
|
+
* Select character: shift + left, shift + right
|
|
25007
|
+
* Select text vertically: shift + up, shift + down
|
|
25008
|
+
* Move cursor by word: alt + left, alt + right
|
|
25009
|
+
* Select words: shift + alt + left, shift + alt + right
|
|
25010
|
+
* Move cursor to line start/end: cmd + left, cmd + right or home, end
|
|
25011
|
+
* Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
|
|
25012
|
+
* Jump to start/end of text: cmd + up, cmd + down
|
|
25013
|
+
* Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
|
|
25014
|
+
* Delete character: backspace
|
|
25015
|
+
* Delete word: alt + backspace
|
|
25016
|
+
* Delete line: cmd + backspace
|
|
25017
|
+
* Forward delete: delete
|
|
25018
|
+
* Copy text: ctrl/cmd + c
|
|
25019
|
+
* Paste text: ctrl/cmd + v
|
|
25020
|
+
* Cut text: ctrl/cmd + x
|
|
25021
|
+
* Select entire text: ctrl/cmd + a
|
|
25022
|
+
* Quit editing tab or esc
|
|
25023
|
+
* ```
|
|
25024
|
+
*
|
|
25025
|
+
* #### Supported mouse/touch combination
|
|
25026
|
+
* ```
|
|
25027
|
+
* Position cursor: click/touch
|
|
25028
|
+
* Create selection: click/touch & drag
|
|
25029
|
+
* Create selection: click & shift + click
|
|
25030
|
+
* Select word: double click
|
|
25031
|
+
* Select line: triple click
|
|
25032
|
+
* ```
|
|
24654
25033
|
*/
|
|
24655
25034
|
class IText extends ITextClickBehavior {
|
|
24656
25035
|
static getDefaults() {
|
|
@@ -24665,10 +25044,10 @@ class IText extends ITextClickBehavior {
|
|
|
24665
25044
|
return type === 'itext' ? 'i-text' : type;
|
|
24666
25045
|
}
|
|
24667
25046
|
|
|
24668
|
-
/**
|
|
24669
|
-
* Constructor
|
|
24670
|
-
* @param {String} text Text string
|
|
24671
|
-
* @param {Object} [options] Options object
|
|
25047
|
+
/**
|
|
25048
|
+
* Constructor
|
|
25049
|
+
* @param {String} text Text string
|
|
25050
|
+
* @param {Object} [options] Options object
|
|
24672
25051
|
*/
|
|
24673
25052
|
constructor(text, options) {
|
|
24674
25053
|
super(text, {
|
|
@@ -24678,11 +25057,11 @@ class IText extends ITextClickBehavior {
|
|
|
24678
25057
|
this.initBehavior();
|
|
24679
25058
|
}
|
|
24680
25059
|
|
|
24681
|
-
/**
|
|
24682
|
-
* While editing handle differently
|
|
24683
|
-
* @private
|
|
24684
|
-
* @param {string} key
|
|
24685
|
-
* @param {*} value
|
|
25060
|
+
/**
|
|
25061
|
+
* While editing handle differently
|
|
25062
|
+
* @private
|
|
25063
|
+
* @param {string} key
|
|
25064
|
+
* @param {*} value
|
|
24686
25065
|
*/
|
|
24687
25066
|
_set(key, value) {
|
|
24688
25067
|
if (this.isEditing && this._savedProps && key in this._savedProps) {
|
|
@@ -24697,28 +25076,28 @@ class IText extends ITextClickBehavior {
|
|
|
24697
25076
|
return super._set(key, value);
|
|
24698
25077
|
}
|
|
24699
25078
|
|
|
24700
|
-
/**
|
|
24701
|
-
* Sets selection start (left boundary of a selection)
|
|
24702
|
-
* @param {Number} index Index to set selection start to
|
|
25079
|
+
/**
|
|
25080
|
+
* Sets selection start (left boundary of a selection)
|
|
25081
|
+
* @param {Number} index Index to set selection start to
|
|
24703
25082
|
*/
|
|
24704
25083
|
setSelectionStart(index) {
|
|
24705
25084
|
index = Math.max(index, 0);
|
|
24706
25085
|
this._updateAndFire('selectionStart', index);
|
|
24707
25086
|
}
|
|
24708
25087
|
|
|
24709
|
-
/**
|
|
24710
|
-
* Sets selection end (right boundary of a selection)
|
|
24711
|
-
* @param {Number} index Index to set selection end to
|
|
25088
|
+
/**
|
|
25089
|
+
* Sets selection end (right boundary of a selection)
|
|
25090
|
+
* @param {Number} index Index to set selection end to
|
|
24712
25091
|
*/
|
|
24713
25092
|
setSelectionEnd(index) {
|
|
24714
25093
|
index = Math.min(index, this.text.length);
|
|
24715
25094
|
this._updateAndFire('selectionEnd', index);
|
|
24716
25095
|
}
|
|
24717
25096
|
|
|
24718
|
-
/**
|
|
24719
|
-
* @private
|
|
24720
|
-
* @param {String} property 'selectionStart' or 'selectionEnd'
|
|
24721
|
-
* @param {Number} index new position of property
|
|
25097
|
+
/**
|
|
25098
|
+
* @private
|
|
25099
|
+
* @param {String} property 'selectionStart' or 'selectionEnd'
|
|
25100
|
+
* @param {Number} index new position of property
|
|
24722
25101
|
*/
|
|
24723
25102
|
_updateAndFire(property, index) {
|
|
24724
25103
|
if (this[property] !== index) {
|
|
@@ -24728,9 +25107,9 @@ class IText extends ITextClickBehavior {
|
|
|
24728
25107
|
this._updateTextarea();
|
|
24729
25108
|
}
|
|
24730
25109
|
|
|
24731
|
-
/**
|
|
24732
|
-
* Fires the even of selection changed
|
|
24733
|
-
* @private
|
|
25110
|
+
/**
|
|
25111
|
+
* Fires the even of selection changed
|
|
25112
|
+
* @private
|
|
24734
25113
|
*/
|
|
24735
25114
|
_fireSelectionChanged() {
|
|
24736
25115
|
this.fire('selection:changed');
|
|
@@ -24739,25 +25118,25 @@ class IText extends ITextClickBehavior {
|
|
|
24739
25118
|
});
|
|
24740
25119
|
}
|
|
24741
25120
|
|
|
24742
|
-
/**
|
|
24743
|
-
* Initialize text dimensions. Render all text on given context
|
|
24744
|
-
* or on a offscreen canvas to get the text width with measureText.
|
|
24745
|
-
* Updates this.width and this.height with the proper values.
|
|
24746
|
-
* Does not return dimensions.
|
|
24747
|
-
* @private
|
|
25121
|
+
/**
|
|
25122
|
+
* Initialize text dimensions. Render all text on given context
|
|
25123
|
+
* or on a offscreen canvas to get the text width with measureText.
|
|
25124
|
+
* Updates this.width and this.height with the proper values.
|
|
25125
|
+
* Does not return dimensions.
|
|
25126
|
+
* @private
|
|
24748
25127
|
*/
|
|
24749
25128
|
initDimensions() {
|
|
24750
25129
|
this.isEditing && this.initDelayedCursor();
|
|
24751
25130
|
super.initDimensions();
|
|
24752
25131
|
}
|
|
24753
25132
|
|
|
24754
|
-
/**
|
|
24755
|
-
* Gets style of a current selection/cursor (at the start position)
|
|
24756
|
-
* if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
|
|
24757
|
-
* @param {Number} startIndex Start index to get styles at
|
|
24758
|
-
* @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
24759
|
-
* @param {Boolean} [complete] get full style or not
|
|
24760
|
-
* @return {Array} styles an array with one, zero or more Style objects
|
|
25133
|
+
/**
|
|
25134
|
+
* Gets style of a current selection/cursor (at the start position)
|
|
25135
|
+
* if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
|
|
25136
|
+
* @param {Number} startIndex Start index to get styles at
|
|
25137
|
+
* @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25138
|
+
* @param {Boolean} [complete] get full style or not
|
|
25139
|
+
* @return {Array} styles an array with one, zero or more Style objects
|
|
24761
25140
|
*/
|
|
24762
25141
|
getSelectionStyles() {
|
|
24763
25142
|
let startIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart || 0;
|
|
@@ -24766,11 +25145,11 @@ class IText extends ITextClickBehavior {
|
|
|
24766
25145
|
return super.getSelectionStyles(startIndex, endIndex, complete);
|
|
24767
25146
|
}
|
|
24768
25147
|
|
|
24769
|
-
/**
|
|
24770
|
-
* Sets style of a current selection, if no selection exist, do not set anything.
|
|
24771
|
-
* @param {Object} [styles] Styles object
|
|
24772
|
-
* @param {Number} [startIndex] Start index to get styles at
|
|
24773
|
-
* @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25148
|
+
/**
|
|
25149
|
+
* Sets style of a current selection, if no selection exist, do not set anything.
|
|
25150
|
+
* @param {Object} [styles] Styles object
|
|
25151
|
+
* @param {Number} [startIndex] Start index to get styles at
|
|
25152
|
+
* @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
24774
25153
|
*/
|
|
24775
25154
|
setSelectionStyles(styles) {
|
|
24776
25155
|
let startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selectionStart || 0;
|
|
@@ -24778,10 +25157,10 @@ class IText extends ITextClickBehavior {
|
|
|
24778
25157
|
return super.setSelectionStyles(styles, startIndex, endIndex);
|
|
24779
25158
|
}
|
|
24780
25159
|
|
|
24781
|
-
/**
|
|
24782
|
-
* Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
|
|
24783
|
-
* @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
|
|
24784
|
-
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
25160
|
+
/**
|
|
25161
|
+
* Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
|
|
25162
|
+
* @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
|
|
25163
|
+
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
24785
25164
|
*/
|
|
24786
25165
|
get2DCursorLocation() {
|
|
24787
25166
|
let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -24789,9 +25168,9 @@ class IText extends ITextClickBehavior {
|
|
|
24789
25168
|
return super.get2DCursorLocation(selectionStart, skipWrapping);
|
|
24790
25169
|
}
|
|
24791
25170
|
|
|
24792
|
-
/**
|
|
24793
|
-
* @private
|
|
24794
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
25171
|
+
/**
|
|
25172
|
+
* @private
|
|
25173
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
24795
25174
|
*/
|
|
24796
25175
|
render(ctx) {
|
|
24797
25176
|
super.render(ctx);
|
|
@@ -24801,9 +25180,9 @@ class IText extends ITextClickBehavior {
|
|
|
24801
25180
|
this.renderCursorOrSelection();
|
|
24802
25181
|
}
|
|
24803
25182
|
|
|
24804
|
-
/**
|
|
24805
|
-
* @override block cursor/selection logic while rendering the exported canvas
|
|
24806
|
-
* @todo this workaround should be replaced with a more robust solution
|
|
25183
|
+
/**
|
|
25184
|
+
* @override block cursor/selection logic while rendering the exported canvas
|
|
25185
|
+
* @todo this workaround should be replaced with a more robust solution
|
|
24807
25186
|
*/
|
|
24808
25187
|
toCanvasElement(options) {
|
|
24809
25188
|
const isEditing = this.isEditing;
|
|
@@ -24813,9 +25192,9 @@ class IText extends ITextClickBehavior {
|
|
|
24813
25192
|
return canvas;
|
|
24814
25193
|
}
|
|
24815
25194
|
|
|
24816
|
-
/**
|
|
24817
|
-
* Renders cursor or selection (depending on what exists)
|
|
24818
|
-
* it does on the contextTop. If contextTop is not available, do nothing.
|
|
25195
|
+
/**
|
|
25196
|
+
* Renders cursor or selection (depending on what exists)
|
|
25197
|
+
* it does on the contextTop. If contextTop is not available, do nothing.
|
|
24819
25198
|
*/
|
|
24820
25199
|
renderCursorOrSelection() {
|
|
24821
25200
|
if (!this.isEditing || !this.canvas) {
|
|
@@ -24871,12 +25250,12 @@ class IText extends ITextClickBehavior {
|
|
|
24871
25250
|
ctx.restore();
|
|
24872
25251
|
}
|
|
24873
25252
|
|
|
24874
|
-
/**
|
|
24875
|
-
* Finds and returns an array of clip paths that are applied to the parent
|
|
24876
|
-
* group(s) of the current FabricObject instance. The object's hierarchy is
|
|
24877
|
-
* traversed upwards (from the current object towards the root of the canvas),
|
|
24878
|
-
* checking each parent object for the presence of a `clipPath` that is not
|
|
24879
|
-
* absolutely positioned.
|
|
25253
|
+
/**
|
|
25254
|
+
* Finds and returns an array of clip paths that are applied to the parent
|
|
25255
|
+
* group(s) of the current FabricObject instance. The object's hierarchy is
|
|
25256
|
+
* traversed upwards (from the current object towards the root of the canvas),
|
|
25257
|
+
* checking each parent object for the presence of a `clipPath` that is not
|
|
25258
|
+
* absolutely positioned.
|
|
24880
25259
|
*/
|
|
24881
25260
|
findAncestorsWithClipPath() {
|
|
24882
25261
|
const clipPathAncestors = [];
|
|
@@ -24891,13 +25270,13 @@ class IText extends ITextClickBehavior {
|
|
|
24891
25270
|
return clipPathAncestors;
|
|
24892
25271
|
}
|
|
24893
25272
|
|
|
24894
|
-
/**
|
|
24895
|
-
* Returns cursor boundaries (left, top, leftOffset, topOffset)
|
|
24896
|
-
* left/top are left/top of entire text box
|
|
24897
|
-
* leftOffset/topOffset are offset from that left/top point of a text box
|
|
24898
|
-
* @private
|
|
24899
|
-
* @param {number} [index] index from start
|
|
24900
|
-
* @param {boolean} [skipCaching]
|
|
25273
|
+
/**
|
|
25274
|
+
* Returns cursor boundaries (left, top, leftOffset, topOffset)
|
|
25275
|
+
* left/top are left/top of entire text box
|
|
25276
|
+
* leftOffset/topOffset are offset from that left/top point of a text box
|
|
25277
|
+
* @private
|
|
25278
|
+
* @param {number} [index] index from start
|
|
25279
|
+
* @param {boolean} [skipCaching]
|
|
24901
25280
|
*/
|
|
24902
25281
|
_getCursorBoundaries() {
|
|
24903
25282
|
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -24911,11 +25290,11 @@ class IText extends ITextClickBehavior {
|
|
|
24911
25290
|
return this._getCursorBoundariesOriginal(index, skipCaching);
|
|
24912
25291
|
}
|
|
24913
25292
|
|
|
24914
|
-
/**
|
|
24915
|
-
* Caches and returns cursor left/top offset relative to instance's center point
|
|
24916
|
-
* @private
|
|
24917
|
-
* @param {number} index index from start
|
|
24918
|
-
* @param {boolean} [skipCaching]
|
|
25293
|
+
/**
|
|
25294
|
+
* Caches and returns cursor left/top offset relative to instance's center point
|
|
25295
|
+
* @private
|
|
25296
|
+
* @param {number} index index from start
|
|
25297
|
+
* @param {boolean} [skipCaching]
|
|
24919
25298
|
*/
|
|
24920
25299
|
_getCursorBoundariesOffsets(index, skipCaching) {
|
|
24921
25300
|
if (skipCaching) {
|
|
@@ -24927,9 +25306,9 @@ class IText extends ITextClickBehavior {
|
|
|
24927
25306
|
return this.cursorOffsetCache = this.__getCursorBoundariesOffsets(index);
|
|
24928
25307
|
}
|
|
24929
25308
|
|
|
24930
|
-
/**
|
|
24931
|
-
* Enhanced cursor boundaries using advanced hit testing when available
|
|
24932
|
-
* @private
|
|
25309
|
+
/**
|
|
25310
|
+
* Enhanced cursor boundaries using advanced hit testing when available
|
|
25311
|
+
* @private
|
|
24933
25312
|
*/
|
|
24934
25313
|
_getCursorBoundariesAdvanced(index) {
|
|
24935
25314
|
if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
|
|
@@ -24945,9 +25324,9 @@ class IText extends ITextClickBehavior {
|
|
|
24945
25324
|
};
|
|
24946
25325
|
}
|
|
24947
25326
|
|
|
24948
|
-
/**
|
|
24949
|
-
* Enhanced selection start from pointer using BiDi-aware hit testing
|
|
24950
|
-
* @override
|
|
25327
|
+
/**
|
|
25328
|
+
* Enhanced selection start from pointer using BiDi-aware hit testing
|
|
25329
|
+
* @override
|
|
24951
25330
|
*/
|
|
24952
25331
|
getSelectionStartFromPointer(e) {
|
|
24953
25332
|
if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
|
|
@@ -24961,9 +25340,9 @@ class IText extends ITextClickBehavior {
|
|
|
24961
25340
|
return Math.min(hitResult.charIndex, this._text.length);
|
|
24962
25341
|
}
|
|
24963
25342
|
|
|
24964
|
-
/**
|
|
24965
|
-
* Original cursor boundaries implementation
|
|
24966
|
-
* @private
|
|
25343
|
+
/**
|
|
25344
|
+
* Original cursor boundaries implementation
|
|
25345
|
+
* @private
|
|
24967
25346
|
*/
|
|
24968
25347
|
_getCursorBoundariesOriginal(index, skipCaching) {
|
|
24969
25348
|
const left = this._getLeftOffset(),
|
|
@@ -24977,10 +25356,10 @@ class IText extends ITextClickBehavior {
|
|
|
24977
25356
|
};
|
|
24978
25357
|
}
|
|
24979
25358
|
|
|
24980
|
-
/**
|
|
24981
|
-
* Calculates cursor left/top offset relative to instance's center point
|
|
24982
|
-
* @private
|
|
24983
|
-
* @param {number} index index from start
|
|
25359
|
+
/**
|
|
25360
|
+
* Calculates cursor left/top offset relative to instance's center point
|
|
25361
|
+
* @private
|
|
25362
|
+
* @param {number} index index from start
|
|
24984
25363
|
*/
|
|
24985
25364
|
__getCursorBoundariesOffsets(index) {
|
|
24986
25365
|
let topOffset = 0,
|
|
@@ -25014,29 +25393,29 @@ class IText extends ITextClickBehavior {
|
|
|
25014
25393
|
return boundaries;
|
|
25015
25394
|
}
|
|
25016
25395
|
|
|
25017
|
-
/**
|
|
25018
|
-
* Renders cursor on context Top, outside the animation cycle, on request
|
|
25019
|
-
* Used for the drag/drop effect.
|
|
25020
|
-
* If contextTop is not available, do nothing.
|
|
25396
|
+
/**
|
|
25397
|
+
* Renders cursor on context Top, outside the animation cycle, on request
|
|
25398
|
+
* Used for the drag/drop effect.
|
|
25399
|
+
* If contextTop is not available, do nothing.
|
|
25021
25400
|
*/
|
|
25022
25401
|
renderCursorAt(selectionStart) {
|
|
25023
25402
|
this._renderCursor(this.canvas.contextTop, this._getCursorBoundaries(selectionStart, true), selectionStart);
|
|
25024
25403
|
}
|
|
25025
25404
|
|
|
25026
|
-
/**
|
|
25027
|
-
* Renders cursor
|
|
25028
|
-
* @param {Object} boundaries
|
|
25029
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25405
|
+
/**
|
|
25406
|
+
* Renders cursor
|
|
25407
|
+
* @param {Object} boundaries
|
|
25408
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25030
25409
|
*/
|
|
25031
25410
|
renderCursor(ctx, boundaries) {
|
|
25032
25411
|
this._renderCursor(ctx, boundaries, this.selectionStart);
|
|
25033
25412
|
}
|
|
25034
25413
|
|
|
25035
|
-
/**
|
|
25036
|
-
* Return the data needed to render the cursor for given selection start
|
|
25037
|
-
* The left,top are relative to the object, while width and height are prescaled
|
|
25038
|
-
* to look think with canvas zoom and object scaling,
|
|
25039
|
-
* so they depend on canvas and object scaling
|
|
25414
|
+
/**
|
|
25415
|
+
* Return the data needed to render the cursor for given selection start
|
|
25416
|
+
* The left,top are relative to the object, while width and height are prescaled
|
|
25417
|
+
* to look think with canvas zoom and object scaling,
|
|
25418
|
+
* so they depend on canvas and object scaling
|
|
25040
25419
|
*/
|
|
25041
25420
|
getCursorRenderingData() {
|
|
25042
25421
|
let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -25059,9 +25438,9 @@ class IText extends ITextClickBehavior {
|
|
|
25059
25438
|
};
|
|
25060
25439
|
}
|
|
25061
25440
|
|
|
25062
|
-
/**
|
|
25063
|
-
* Render the cursor at the given selectionStart.
|
|
25064
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25441
|
+
/**
|
|
25442
|
+
* Render the cursor at the given selectionStart.
|
|
25443
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25065
25444
|
*/
|
|
25066
25445
|
_renderCursor(ctx, boundaries, selectionStart) {
|
|
25067
25446
|
const {
|
|
@@ -25077,10 +25456,10 @@ class IText extends ITextClickBehavior {
|
|
|
25077
25456
|
ctx.fillRect(left, top, width, height);
|
|
25078
25457
|
}
|
|
25079
25458
|
|
|
25080
|
-
/**
|
|
25081
|
-
* Renders text selection
|
|
25082
|
-
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25083
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25459
|
+
/**
|
|
25460
|
+
* Renders text selection
|
|
25461
|
+
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25462
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25084
25463
|
*/
|
|
25085
25464
|
renderSelection(ctx, boundaries) {
|
|
25086
25465
|
const selection = {
|
|
@@ -25090,8 +25469,8 @@ class IText extends ITextClickBehavior {
|
|
|
25090
25469
|
this._renderSelection(ctx, selection, boundaries);
|
|
25091
25470
|
}
|
|
25092
25471
|
|
|
25093
|
-
/**
|
|
25094
|
-
* Renders drag start text selection
|
|
25472
|
+
/**
|
|
25473
|
+
* Renders drag start text selection
|
|
25095
25474
|
*/
|
|
25096
25475
|
renderDragSourceEffect() {
|
|
25097
25476
|
const dragStartSelection = this.draggableTextDelegate.getDragStartSelection();
|
|
@@ -25102,12 +25481,12 @@ class IText extends ITextClickBehavior {
|
|
|
25102
25481
|
this.renderCursorAt(dragSelection);
|
|
25103
25482
|
}
|
|
25104
25483
|
|
|
25105
|
-
/**
|
|
25106
|
-
* Renders text selection
|
|
25107
|
-
* @private
|
|
25108
|
-
* @param {{ selectionStart: number, selectionEnd: number }} selection
|
|
25109
|
-
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25110
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25484
|
+
/**
|
|
25485
|
+
* Renders text selection
|
|
25486
|
+
* @private
|
|
25487
|
+
* @param {{ selectionStart: number, selectionEnd: number }} selection
|
|
25488
|
+
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25489
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25111
25490
|
*/
|
|
25112
25491
|
_renderSelection(ctx, selection, boundaries) {
|
|
25113
25492
|
const selectionStart = selection.selectionStart,
|
|
@@ -25169,34 +25548,34 @@ class IText extends ITextClickBehavior {
|
|
|
25169
25548
|
}
|
|
25170
25549
|
}
|
|
25171
25550
|
|
|
25172
|
-
/**
|
|
25173
|
-
* High level function to know the height of the cursor.
|
|
25174
|
-
* the currentChar is the one that precedes the cursor
|
|
25175
|
-
* Returns fontSize of char at the current cursor
|
|
25176
|
-
* Unused from the library, is for the end user
|
|
25177
|
-
* @return {Number} Character font size
|
|
25551
|
+
/**
|
|
25552
|
+
* High level function to know the height of the cursor.
|
|
25553
|
+
* the currentChar is the one that precedes the cursor
|
|
25554
|
+
* Returns fontSize of char at the current cursor
|
|
25555
|
+
* Unused from the library, is for the end user
|
|
25556
|
+
* @return {Number} Character font size
|
|
25178
25557
|
*/
|
|
25179
25558
|
getCurrentCharFontSize() {
|
|
25180
25559
|
const cp = this._getCurrentCharIndex();
|
|
25181
25560
|
return this.getValueOfPropertyAt(cp.l, cp.c, 'fontSize');
|
|
25182
25561
|
}
|
|
25183
25562
|
|
|
25184
|
-
/**
|
|
25185
|
-
* High level function to know the color of the cursor.
|
|
25186
|
-
* the currentChar is the one that precedes the cursor
|
|
25187
|
-
* Returns color (fill) of char at the current cursor
|
|
25188
|
-
* if the text object has a pattern or gradient for filler, it will return that.
|
|
25189
|
-
* Unused by the library, is for the end user
|
|
25190
|
-
* @return {String | TFiller} Character color (fill)
|
|
25563
|
+
/**
|
|
25564
|
+
* High level function to know the color of the cursor.
|
|
25565
|
+
* the currentChar is the one that precedes the cursor
|
|
25566
|
+
* Returns color (fill) of char at the current cursor
|
|
25567
|
+
* if the text object has a pattern or gradient for filler, it will return that.
|
|
25568
|
+
* Unused by the library, is for the end user
|
|
25569
|
+
* @return {String | TFiller} Character color (fill)
|
|
25191
25570
|
*/
|
|
25192
25571
|
getCurrentCharColor() {
|
|
25193
25572
|
const cp = this._getCurrentCharIndex();
|
|
25194
25573
|
return this.getValueOfPropertyAt(cp.l, cp.c, FILL);
|
|
25195
25574
|
}
|
|
25196
25575
|
|
|
25197
|
-
/**
|
|
25198
|
-
* Returns the cursor position for the getCurrent.. functions
|
|
25199
|
-
* @private
|
|
25576
|
+
/**
|
|
25577
|
+
* Returns the cursor position for the getCurrent.. functions
|
|
25578
|
+
* @private
|
|
25200
25579
|
*/
|
|
25201
25580
|
_getCurrentCharIndex() {
|
|
25202
25581
|
const cursorPosition = this.get2DCursorLocation(this.selectionStart, true),
|
|
@@ -25212,52 +25591,52 @@ class IText extends ITextClickBehavior {
|
|
|
25212
25591
|
super.dispose();
|
|
25213
25592
|
}
|
|
25214
25593
|
}
|
|
25215
|
-
/**
|
|
25216
|
-
* Index where text selection starts (or where cursor is when there is no selection)
|
|
25217
|
-
* @type Number
|
|
25594
|
+
/**
|
|
25595
|
+
* Index where text selection starts (or where cursor is when there is no selection)
|
|
25596
|
+
* @type Number
|
|
25218
25597
|
*/
|
|
25219
|
-
/**
|
|
25220
|
-
* Index where text selection ends
|
|
25221
|
-
* @type Number
|
|
25598
|
+
/**
|
|
25599
|
+
* Index where text selection ends
|
|
25600
|
+
* @type Number
|
|
25222
25601
|
*/
|
|
25223
|
-
/**
|
|
25224
|
-
* Color of text selection
|
|
25225
|
-
* @type String
|
|
25602
|
+
/**
|
|
25603
|
+
* Color of text selection
|
|
25604
|
+
* @type String
|
|
25226
25605
|
*/
|
|
25227
|
-
/**
|
|
25228
|
-
* Indicates whether text is in editing mode
|
|
25229
|
-
* @type Boolean
|
|
25606
|
+
/**
|
|
25607
|
+
* Indicates whether text is in editing mode
|
|
25608
|
+
* @type Boolean
|
|
25230
25609
|
*/
|
|
25231
|
-
/**
|
|
25232
|
-
* Indicates whether a text can be edited
|
|
25233
|
-
* @type Boolean
|
|
25610
|
+
/**
|
|
25611
|
+
* Indicates whether a text can be edited
|
|
25612
|
+
* @type Boolean
|
|
25234
25613
|
*/
|
|
25235
|
-
/**
|
|
25236
|
-
* Border color of text object while it's in editing mode
|
|
25237
|
-
* @type String
|
|
25614
|
+
/**
|
|
25615
|
+
* Border color of text object while it's in editing mode
|
|
25616
|
+
* @type String
|
|
25238
25617
|
*/
|
|
25239
|
-
/**
|
|
25240
|
-
* Width of cursor (in px)
|
|
25241
|
-
* @type Number
|
|
25618
|
+
/**
|
|
25619
|
+
* Width of cursor (in px)
|
|
25620
|
+
* @type Number
|
|
25242
25621
|
*/
|
|
25243
|
-
/**
|
|
25244
|
-
* Color of text cursor color in editing mode.
|
|
25245
|
-
* if not set (default) will take color from the text.
|
|
25246
|
-
* if set to a color value that fabric can understand, it will
|
|
25247
|
-
* be used instead of the color of the text at the current position.
|
|
25248
|
-
* @type String
|
|
25622
|
+
/**
|
|
25623
|
+
* Color of text cursor color in editing mode.
|
|
25624
|
+
* if not set (default) will take color from the text.
|
|
25625
|
+
* if set to a color value that fabric can understand, it will
|
|
25626
|
+
* be used instead of the color of the text at the current position.
|
|
25627
|
+
* @type String
|
|
25249
25628
|
*/
|
|
25250
|
-
/**
|
|
25251
|
-
* Delay between cursor blink (in ms)
|
|
25252
|
-
* @type Number
|
|
25629
|
+
/**
|
|
25630
|
+
* Delay between cursor blink (in ms)
|
|
25631
|
+
* @type Number
|
|
25253
25632
|
*/
|
|
25254
|
-
/**
|
|
25255
|
-
* Duration of cursor fade in (in ms)
|
|
25256
|
-
* @type Number
|
|
25633
|
+
/**
|
|
25634
|
+
* Duration of cursor fade in (in ms)
|
|
25635
|
+
* @type Number
|
|
25257
25636
|
*/
|
|
25258
|
-
/**
|
|
25259
|
-
* Indicates whether internal text char widths can be cached
|
|
25260
|
-
* @type Boolean
|
|
25637
|
+
/**
|
|
25638
|
+
* Indicates whether internal text char widths can be cached
|
|
25639
|
+
* @type Boolean
|
|
25261
25640
|
*/
|
|
25262
25641
|
_defineProperty(IText, "ownDefaults", iTextDefaultValues);
|
|
25263
25642
|
_defineProperty(IText, "type", 'IText');
|
|
@@ -25279,11 +25658,11 @@ const textboxDefaultValues = {
|
|
|
25279
25658
|
|
|
25280
25659
|
// @TODO this is not complete
|
|
25281
25660
|
|
|
25282
|
-
/**
|
|
25283
|
-
* Textbox class, based on IText, allows the user to resize the text rectangle
|
|
25284
|
-
* and wraps lines automatically. Textboxes have their Y scaling locked, the
|
|
25285
|
-
* user can only change width. Height is adjusted automatically based on the
|
|
25286
|
-
* wrapping of lines.
|
|
25661
|
+
/**
|
|
25662
|
+
* Textbox class, based on IText, allows the user to resize the text rectangle
|
|
25663
|
+
* and wraps lines automatically. Textboxes have their Y scaling locked, the
|
|
25664
|
+
* user can only change width. Height is adjusted automatically based on the
|
|
25665
|
+
* wrapping of lines.
|
|
25287
25666
|
*/
|
|
25288
25667
|
class Textbox extends IText {
|
|
25289
25668
|
static getDefaults() {
|
|
@@ -25293,22 +25672,23 @@ class Textbox extends IText {
|
|
|
25293
25672
|
};
|
|
25294
25673
|
}
|
|
25295
25674
|
|
|
25296
|
-
/**
|
|
25297
|
-
* Constructor
|
|
25298
|
-
* @param {String} text Text string
|
|
25299
|
-
* @param {Object} [options] Options object
|
|
25675
|
+
/**
|
|
25676
|
+
* Constructor
|
|
25677
|
+
* @param {String} text Text string
|
|
25678
|
+
* @param {Object} [options] Options object
|
|
25300
25679
|
*/
|
|
25301
25680
|
constructor(text, options) {
|
|
25302
25681
|
super(text, {
|
|
25303
25682
|
...Textbox.ownDefaults,
|
|
25304
25683
|
...options
|
|
25305
25684
|
});
|
|
25685
|
+
this.initializeEventListeners();
|
|
25306
25686
|
}
|
|
25307
25687
|
|
|
25308
|
-
/**
|
|
25309
|
-
* Creates the default control object.
|
|
25310
|
-
* If you prefer to have on instance of controls shared among all objects
|
|
25311
|
-
* make this function return an empty object and add controls to the ownDefaults object
|
|
25688
|
+
/**
|
|
25689
|
+
* Creates the default control object.
|
|
25690
|
+
* If you prefer to have on instance of controls shared among all objects
|
|
25691
|
+
* make this function return an empty object and add controls to the ownDefaults object
|
|
25312
25692
|
*/
|
|
25313
25693
|
static createControls() {
|
|
25314
25694
|
return {
|
|
@@ -25316,11 +25696,11 @@ class Textbox extends IText {
|
|
|
25316
25696
|
};
|
|
25317
25697
|
}
|
|
25318
25698
|
|
|
25319
|
-
/**
|
|
25320
|
-
* Unlike superclass's version of this function, Textbox does not update
|
|
25321
|
-
* its width.
|
|
25322
|
-
* @private
|
|
25323
|
-
* @override
|
|
25699
|
+
/**
|
|
25700
|
+
* Unlike superclass's version of this function, Textbox does not update
|
|
25701
|
+
* its width.
|
|
25702
|
+
* @private
|
|
25703
|
+
* @override
|
|
25324
25704
|
*/
|
|
25325
25705
|
initDimensions() {
|
|
25326
25706
|
if (!this.initialized) {
|
|
@@ -25349,9 +25729,9 @@ class Textbox extends IText {
|
|
|
25349
25729
|
this.height = this.calcTextHeight();
|
|
25350
25730
|
}
|
|
25351
25731
|
|
|
25352
|
-
/**
|
|
25353
|
-
* Advanced dimensions calculation using new layout engine
|
|
25354
|
-
* @private
|
|
25732
|
+
/**
|
|
25733
|
+
* Advanced dimensions calculation using new layout engine
|
|
25734
|
+
* @private
|
|
25355
25735
|
*/
|
|
25356
25736
|
initDimensionsAdvanced() {
|
|
25357
25737
|
if (!this.initialized) {
|
|
@@ -25406,9 +25786,9 @@ class Textbox extends IText {
|
|
|
25406
25786
|
this.dirty = true;
|
|
25407
25787
|
}
|
|
25408
25788
|
|
|
25409
|
-
/**
|
|
25410
|
-
* Generate style map from new layout format
|
|
25411
|
-
* @private
|
|
25789
|
+
/**
|
|
25790
|
+
* Generate style map from new layout format
|
|
25791
|
+
* @private
|
|
25412
25792
|
*/
|
|
25413
25793
|
_generateStyleMapFromLayout(layout) {
|
|
25414
25794
|
const map = {};
|
|
@@ -25430,12 +25810,12 @@ class Textbox extends IText {
|
|
|
25430
25810
|
return map;
|
|
25431
25811
|
}
|
|
25432
25812
|
|
|
25433
|
-
/**
|
|
25434
|
-
* Generate an object that translates the style object so that it is
|
|
25435
|
-
* broken up by visual lines (new lines and automatic wrapping).
|
|
25436
|
-
* The original text styles object is broken up by actual lines (new lines only),
|
|
25437
|
-
* which is only sufficient for Text / IText
|
|
25438
|
-
* @private
|
|
25813
|
+
/**
|
|
25814
|
+
* Generate an object that translates the style object so that it is
|
|
25815
|
+
* broken up by visual lines (new lines and automatic wrapping).
|
|
25816
|
+
* The original text styles object is broken up by actual lines (new lines only),
|
|
25817
|
+
* which is only sufficient for Text / IText
|
|
25818
|
+
* @private
|
|
25439
25819
|
*/
|
|
25440
25820
|
_generateStyleMap(textInfo) {
|
|
25441
25821
|
let realLineCount = 0,
|
|
@@ -25462,10 +25842,10 @@ class Textbox extends IText {
|
|
|
25462
25842
|
return map;
|
|
25463
25843
|
}
|
|
25464
25844
|
|
|
25465
|
-
/**
|
|
25466
|
-
* Returns true if object has a style property or has it on a specified line
|
|
25467
|
-
* @param {Number} lineIndex
|
|
25468
|
-
* @return {Boolean}
|
|
25845
|
+
/**
|
|
25846
|
+
* Returns true if object has a style property or has it on a specified line
|
|
25847
|
+
* @param {Number} lineIndex
|
|
25848
|
+
* @return {Boolean}
|
|
25469
25849
|
*/
|
|
25470
25850
|
styleHas(property, lineIndex) {
|
|
25471
25851
|
if (this._styleMap && !this.isWrapping) {
|
|
@@ -25477,10 +25857,10 @@ class Textbox extends IText {
|
|
|
25477
25857
|
return super.styleHas(property, lineIndex);
|
|
25478
25858
|
}
|
|
25479
25859
|
|
|
25480
|
-
/**
|
|
25481
|
-
* Returns true if object has no styling or no styling in a line
|
|
25482
|
-
* @param {Number} lineIndex , lineIndex is on wrapped lines.
|
|
25483
|
-
* @return {Boolean}
|
|
25860
|
+
/**
|
|
25861
|
+
* Returns true if object has no styling or no styling in a line
|
|
25862
|
+
* @param {Number} lineIndex , lineIndex is on wrapped lines.
|
|
25863
|
+
* @return {Boolean}
|
|
25484
25864
|
*/
|
|
25485
25865
|
isEmptyStyles(lineIndex) {
|
|
25486
25866
|
if (!this.styles) {
|
|
@@ -25517,11 +25897,11 @@ class Textbox extends IText {
|
|
|
25517
25897
|
return true;
|
|
25518
25898
|
}
|
|
25519
25899
|
|
|
25520
|
-
/**
|
|
25521
|
-
* @protected
|
|
25522
|
-
* @param {Number} lineIndex
|
|
25523
|
-
* @param {Number} charIndex
|
|
25524
|
-
* @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
|
|
25900
|
+
/**
|
|
25901
|
+
* @protected
|
|
25902
|
+
* @param {Number} lineIndex
|
|
25903
|
+
* @param {Number} charIndex
|
|
25904
|
+
* @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
|
|
25525
25905
|
*/
|
|
25526
25906
|
_getStyleDeclaration(lineIndex, charIndex) {
|
|
25527
25907
|
if (this._styleMap && !this.isWrapping) {
|
|
@@ -25535,59 +25915,59 @@ class Textbox extends IText {
|
|
|
25535
25915
|
return super._getStyleDeclaration(lineIndex, charIndex);
|
|
25536
25916
|
}
|
|
25537
25917
|
|
|
25538
|
-
/**
|
|
25539
|
-
* @param {Number} lineIndex
|
|
25540
|
-
* @param {Number} charIndex
|
|
25541
|
-
* @param {Object} style
|
|
25542
|
-
* @private
|
|
25918
|
+
/**
|
|
25919
|
+
* @param {Number} lineIndex
|
|
25920
|
+
* @param {Number} charIndex
|
|
25921
|
+
* @param {Object} style
|
|
25922
|
+
* @private
|
|
25543
25923
|
*/
|
|
25544
25924
|
_setStyleDeclaration(lineIndex, charIndex, style) {
|
|
25545
25925
|
const map = this._styleMap[lineIndex];
|
|
25546
25926
|
super._setStyleDeclaration(map.line, map.offset + charIndex, style);
|
|
25547
25927
|
}
|
|
25548
25928
|
|
|
25549
|
-
/**
|
|
25550
|
-
* @param {Number} lineIndex
|
|
25551
|
-
* @param {Number} charIndex
|
|
25552
|
-
* @private
|
|
25929
|
+
/**
|
|
25930
|
+
* @param {Number} lineIndex
|
|
25931
|
+
* @param {Number} charIndex
|
|
25932
|
+
* @private
|
|
25553
25933
|
*/
|
|
25554
25934
|
_deleteStyleDeclaration(lineIndex, charIndex) {
|
|
25555
25935
|
const map = this._styleMap[lineIndex];
|
|
25556
25936
|
super._deleteStyleDeclaration(map.line, map.offset + charIndex);
|
|
25557
25937
|
}
|
|
25558
25938
|
|
|
25559
|
-
/**
|
|
25560
|
-
* probably broken need a fix
|
|
25561
|
-
* Returns the real style line that correspond to the wrapped lineIndex line
|
|
25562
|
-
* Used just to verify if the line does exist or not.
|
|
25563
|
-
* @param {Number} lineIndex
|
|
25564
|
-
* @returns {Boolean} if the line exists or not
|
|
25565
|
-
* @private
|
|
25939
|
+
/**
|
|
25940
|
+
* probably broken need a fix
|
|
25941
|
+
* Returns the real style line that correspond to the wrapped lineIndex line
|
|
25942
|
+
* Used just to verify if the line does exist or not.
|
|
25943
|
+
* @param {Number} lineIndex
|
|
25944
|
+
* @returns {Boolean} if the line exists or not
|
|
25945
|
+
* @private
|
|
25566
25946
|
*/
|
|
25567
25947
|
_getLineStyle(lineIndex) {
|
|
25568
25948
|
const map = this._styleMap[lineIndex];
|
|
25569
25949
|
return !!this.styles[map.line];
|
|
25570
25950
|
}
|
|
25571
25951
|
|
|
25572
|
-
/**
|
|
25573
|
-
* Set the line style to an empty object so that is initialized
|
|
25574
|
-
* @param {Number} lineIndex
|
|
25575
|
-
* @param {Object} style
|
|
25576
|
-
* @private
|
|
25952
|
+
/**
|
|
25953
|
+
* Set the line style to an empty object so that is initialized
|
|
25954
|
+
* @param {Number} lineIndex
|
|
25955
|
+
* @param {Object} style
|
|
25956
|
+
* @private
|
|
25577
25957
|
*/
|
|
25578
25958
|
_setLineStyle(lineIndex) {
|
|
25579
25959
|
const map = this._styleMap[lineIndex];
|
|
25580
25960
|
super._setLineStyle(map.line);
|
|
25581
25961
|
}
|
|
25582
25962
|
|
|
25583
|
-
/**
|
|
25584
|
-
* Wraps text using the 'width' property of Textbox. First this function
|
|
25585
|
-
* splits text on newlines, so we preserve newlines entered by the user.
|
|
25586
|
-
* Then it wraps each line using the width of the Textbox by calling
|
|
25587
|
-
* _wrapLine().
|
|
25588
|
-
* @param {Array} lines The string array of text that is split into lines
|
|
25589
|
-
* @param {Number} desiredWidth width you want to wrap to
|
|
25590
|
-
* @returns {Array} Array of lines
|
|
25963
|
+
/**
|
|
25964
|
+
* Wraps text using the 'width' property of Textbox. First this function
|
|
25965
|
+
* splits text on newlines, so we preserve newlines entered by the user.
|
|
25966
|
+
* Then it wraps each line using the width of the Textbox by calling
|
|
25967
|
+
* _wrapLine().
|
|
25968
|
+
* @param {Array} lines The string array of text that is split into lines
|
|
25969
|
+
* @param {Number} desiredWidth width you want to wrap to
|
|
25970
|
+
* @returns {Array} Array of lines
|
|
25591
25971
|
*/
|
|
25592
25972
|
_wrapText(lines, desiredWidth) {
|
|
25593
25973
|
this.isWrapping = true;
|
|
@@ -25601,12 +25981,12 @@ class Textbox extends IText {
|
|
|
25601
25981
|
return wrapped;
|
|
25602
25982
|
}
|
|
25603
25983
|
|
|
25604
|
-
/**
|
|
25605
|
-
* For each line of text terminated by an hard line stop,
|
|
25606
|
-
* measure each word width and extract the largest word from all.
|
|
25607
|
-
* The returned words here are the one that at the end will be rendered.
|
|
25608
|
-
* @param {string[]} lines the lines we need to measure
|
|
25609
|
-
*
|
|
25984
|
+
/**
|
|
25985
|
+
* For each line of text terminated by an hard line stop,
|
|
25986
|
+
* measure each word width and extract the largest word from all.
|
|
25987
|
+
* The returned words here are the one that at the end will be rendered.
|
|
25988
|
+
* @param {string[]} lines the lines we need to measure
|
|
25989
|
+
*
|
|
25610
25990
|
*/
|
|
25611
25991
|
getGraphemeDataForRender(lines) {
|
|
25612
25992
|
const splitByGrapheme = this.splitByGrapheme,
|
|
@@ -25639,17 +26019,17 @@ class Textbox extends IText {
|
|
|
25639
26019
|
};
|
|
25640
26020
|
}
|
|
25641
26021
|
|
|
25642
|
-
/**
|
|
25643
|
-
* Helper function to measure a string of text, given its lineIndex and charIndex offset
|
|
25644
|
-
* It gets called when charBounds are not available yet.
|
|
25645
|
-
* Override if necessary
|
|
25646
|
-
* Use with {@link Textbox#wordSplit}
|
|
25647
|
-
*
|
|
25648
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
25649
|
-
* @param {String} text
|
|
25650
|
-
* @param {number} lineIndex
|
|
25651
|
-
* @param {number} charOffset
|
|
25652
|
-
* @returns {number}
|
|
26022
|
+
/**
|
|
26023
|
+
* Helper function to measure a string of text, given its lineIndex and charIndex offset
|
|
26024
|
+
* It gets called when charBounds are not available yet.
|
|
26025
|
+
* Override if necessary
|
|
26026
|
+
* Use with {@link Textbox#wordSplit}
|
|
26027
|
+
*
|
|
26028
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
26029
|
+
* @param {String} text
|
|
26030
|
+
* @param {number} lineIndex
|
|
26031
|
+
* @param {number} charOffset
|
|
26032
|
+
* @returns {number}
|
|
25653
26033
|
*/
|
|
25654
26034
|
_measureWord(word, lineIndex) {
|
|
25655
26035
|
let charOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -25664,26 +26044,26 @@ class Textbox extends IText {
|
|
|
25664
26044
|
return width;
|
|
25665
26045
|
}
|
|
25666
26046
|
|
|
25667
|
-
/**
|
|
25668
|
-
* Override this method to customize word splitting
|
|
25669
|
-
* Use with {@link Textbox#_measureWord}
|
|
25670
|
-
* @param {string} value
|
|
25671
|
-
* @returns {string[]} array of words
|
|
26047
|
+
/**
|
|
26048
|
+
* Override this method to customize word splitting
|
|
26049
|
+
* Use with {@link Textbox#_measureWord}
|
|
26050
|
+
* @param {string} value
|
|
26051
|
+
* @returns {string[]} array of words
|
|
25672
26052
|
*/
|
|
25673
26053
|
wordSplit(value) {
|
|
25674
26054
|
return value.split(this._wordJoiners);
|
|
25675
26055
|
}
|
|
25676
26056
|
|
|
25677
|
-
/**
|
|
25678
|
-
* Wraps a line of text using the width of the Textbox as desiredWidth
|
|
25679
|
-
* and leveraging the known width o words from GraphemeData
|
|
25680
|
-
* @private
|
|
25681
|
-
* @param {Number} lineIndex
|
|
25682
|
-
* @param {Number} desiredWidth width you want to wrap the line to
|
|
25683
|
-
* @param {GraphemeData} graphemeData an object containing all the lines' words width.
|
|
25684
|
-
* @param {Number} reservedSpace space to remove from wrapping for custom functionalities
|
|
25685
|
-
* @returns {Array} Array of line(s) into which the given text is wrapped
|
|
25686
|
-
* to.
|
|
26057
|
+
/**
|
|
26058
|
+
* Wraps a line of text using the width of the Textbox as desiredWidth
|
|
26059
|
+
* and leveraging the known width o words from GraphemeData
|
|
26060
|
+
* @private
|
|
26061
|
+
* @param {Number} lineIndex
|
|
26062
|
+
* @param {Number} desiredWidth width you want to wrap the line to
|
|
26063
|
+
* @param {GraphemeData} graphemeData an object containing all the lines' words width.
|
|
26064
|
+
* @param {Number} reservedSpace space to remove from wrapping for custom functionalities
|
|
26065
|
+
* @returns {Array} Array of line(s) into which the given text is wrapped
|
|
26066
|
+
* to.
|
|
25687
26067
|
*/
|
|
25688
26068
|
_wrapLine(lineIndex, desiredWidth, _ref) {
|
|
25689
26069
|
let {
|
|
@@ -25741,11 +26121,11 @@ class Textbox extends IText {
|
|
|
25741
26121
|
return graphemeLines;
|
|
25742
26122
|
}
|
|
25743
26123
|
|
|
25744
|
-
/**
|
|
25745
|
-
* Detect if the text line is ended with an hard break
|
|
25746
|
-
* text and itext do not have wrapping, return false
|
|
25747
|
-
* @param {Number} lineIndex text to split
|
|
25748
|
-
* @return {Boolean}
|
|
26124
|
+
/**
|
|
26125
|
+
* Detect if the text line is ended with an hard break
|
|
26126
|
+
* text and itext do not have wrapping, return false
|
|
26127
|
+
* @param {Number} lineIndex text to split
|
|
26128
|
+
* @return {Boolean}
|
|
25749
26129
|
*/
|
|
25750
26130
|
isEndOfWrapping(lineIndex) {
|
|
25751
26131
|
if (!this._styleMap[lineIndex + 1]) {
|
|
@@ -25759,12 +26139,12 @@ class Textbox extends IText {
|
|
|
25759
26139
|
return false;
|
|
25760
26140
|
}
|
|
25761
26141
|
|
|
25762
|
-
/**
|
|
25763
|
-
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
25764
|
-
* and counting style.
|
|
25765
|
-
* This is important only for splitByGrapheme at the end of wrapping.
|
|
25766
|
-
* If we are not wrapping the offset is always 1
|
|
25767
|
-
* @return Number
|
|
26142
|
+
/**
|
|
26143
|
+
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
26144
|
+
* and counting style.
|
|
26145
|
+
* This is important only for splitByGrapheme at the end of wrapping.
|
|
26146
|
+
* If we are not wrapping the offset is always 1
|
|
26147
|
+
* @return Number
|
|
25768
26148
|
*/
|
|
25769
26149
|
missingNewlineOffset(lineIndex, skipWrapping) {
|
|
25770
26150
|
if (this.splitByGrapheme && !skipWrapping) {
|
|
@@ -25773,12 +26153,12 @@ class Textbox extends IText {
|
|
|
25773
26153
|
return 1;
|
|
25774
26154
|
}
|
|
25775
26155
|
|
|
25776
|
-
/**
|
|
25777
|
-
* Gets lines of text to render in the Textbox. This function calculates
|
|
25778
|
-
* text wrapping on the fly every time it is called.
|
|
25779
|
-
* @param {String} text text to split
|
|
25780
|
-
* @returns {Array} Array of lines in the Textbox.
|
|
25781
|
-
* @override
|
|
26156
|
+
/**
|
|
26157
|
+
* Gets lines of text to render in the Textbox. This function calculates
|
|
26158
|
+
* text wrapping on the fly every time it is called.
|
|
26159
|
+
* @param {String} text text to split
|
|
26160
|
+
* @returns {Array} Array of lines in the Textbox.
|
|
26161
|
+
* @override
|
|
25782
26162
|
*/
|
|
25783
26163
|
_splitTextIntoLines(text) {
|
|
25784
26164
|
const newText = super._splitTextIntoLines(text),
|
|
@@ -25810,31 +26190,148 @@ class Textbox extends IText {
|
|
|
25810
26190
|
}
|
|
25811
26191
|
}
|
|
25812
26192
|
|
|
25813
|
-
/**
|
|
25814
|
-
*
|
|
25815
|
-
* @
|
|
25816
|
-
|
|
26193
|
+
/**
|
|
26194
|
+
* Initialize event listeners for safety snap functionality
|
|
26195
|
+
* @private
|
|
26196
|
+
*/
|
|
26197
|
+
initializeEventListeners() {
|
|
26198
|
+
var _this$canvas;
|
|
26199
|
+
// Track which side is being used for resize to handle position compensation
|
|
26200
|
+
let resizeOrigin = null;
|
|
26201
|
+
|
|
26202
|
+
// Detect resize origin during resizing
|
|
26203
|
+
this.on('resizing', e => {
|
|
26204
|
+
// Check transform origin to determine which side is being resized
|
|
26205
|
+
if (e.transform) {
|
|
26206
|
+
const {
|
|
26207
|
+
originX
|
|
26208
|
+
} = e.transform;
|
|
26209
|
+
// originX tells us which side is the anchor - opposite side is being dragged
|
|
26210
|
+
resizeOrigin = originX === 'right' ? 'left' : originX === 'left' ? 'right' : null;
|
|
26211
|
+
} else if (e.originX) {
|
|
26212
|
+
const {
|
|
26213
|
+
originX
|
|
26214
|
+
} = e;
|
|
26215
|
+
resizeOrigin = originX === 'right' ? 'left' : originX === 'left' ? 'right' : null;
|
|
26216
|
+
}
|
|
26217
|
+
});
|
|
26218
|
+
|
|
26219
|
+
// Only trigger safety snap after resize is complete (not during)
|
|
26220
|
+
// Use 'modified' event which fires after user releases the mouse
|
|
26221
|
+
this.on('modified', () => {
|
|
26222
|
+
const currentResizeOrigin = resizeOrigin; // Capture the value before reset
|
|
26223
|
+
// Small delay to ensure text layout is updated
|
|
26224
|
+
setTimeout(() => this.safetySnapWidth(currentResizeOrigin), 10);
|
|
26225
|
+
resizeOrigin = null; // Reset after capturing
|
|
26226
|
+
});
|
|
26227
|
+
|
|
26228
|
+
// Also listen to canvas-level modified event as backup
|
|
26229
|
+
(_this$canvas = this.canvas) === null || _this$canvas === void 0 || _this$canvas.on('object:modified', e => {
|
|
26230
|
+
if (e.target === this) {
|
|
26231
|
+
const currentResizeOrigin = resizeOrigin; // Capture the value before reset
|
|
26232
|
+
setTimeout(() => this.safetySnapWidth(currentResizeOrigin), 10);
|
|
26233
|
+
resizeOrigin = null; // Reset after capturing
|
|
26234
|
+
}
|
|
26235
|
+
});
|
|
26236
|
+
}
|
|
26237
|
+
|
|
26238
|
+
/**
|
|
26239
|
+
* Safety snap to prevent glyph clipping after manual resize.
|
|
26240
|
+
* Similar to Polotno - checks if any glyphs are too close to edges
|
|
26241
|
+
* and automatically expands width if needed.
|
|
26242
|
+
* @private
|
|
26243
|
+
* @param resizeOrigin - Which side was used for resizing ('left' or 'right')
|
|
26244
|
+
*/
|
|
26245
|
+
safetySnapWidth(resizeOrigin) {
|
|
26246
|
+
// For Textbox objects, we always want to check for clipping regardless of isWrapping flag
|
|
26247
|
+
if (!this._textLines || this.type.toLowerCase() !== 'textbox' || this._textLines.length === 0) {
|
|
26248
|
+
return;
|
|
26249
|
+
}
|
|
26250
|
+
const lineCount = this._textLines.length;
|
|
26251
|
+
if (lineCount === 0) return;
|
|
26252
|
+
let maxRequiredWidth = 0; // Width including RTL buffer
|
|
26253
|
+
|
|
26254
|
+
for (let i = 0; i < lineCount; i++) {
|
|
26255
|
+
const lineText = this._textLines[i].join(''); // Convert grapheme array to string
|
|
26256
|
+
const lineWidth = this.getLineWidth(i);
|
|
26257
|
+
|
|
26258
|
+
// RTL detection - regex for Arabic, Hebrew, and other RTL characters
|
|
26259
|
+
const rtlRegex = /[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\uFB50-\uFDFF\uFE70-\uFEFF]/;
|
|
26260
|
+
if (rtlRegex.test(lineText)) {
|
|
26261
|
+
// Add minimal RTL compensation buffer - just enough to prevent clipping
|
|
26262
|
+
const rtlBuffer = (this.fontSize || 16) * 0.15; // 15% of font size (much smaller)
|
|
26263
|
+
maxRequiredWidth = Math.max(maxRequiredWidth, lineWidth + rtlBuffer);
|
|
26264
|
+
} else {
|
|
26265
|
+
maxRequiredWidth = Math.max(maxRequiredWidth, lineWidth);
|
|
26266
|
+
}
|
|
26267
|
+
}
|
|
26268
|
+
|
|
26269
|
+
// Safety margin - how close glyphs can get before we snap
|
|
26270
|
+
const safetyThreshold = 2; // px - very subtle trigger
|
|
26271
|
+
|
|
26272
|
+
if (maxRequiredWidth > this.width - safetyThreshold) {
|
|
26273
|
+
var _this$canvas2;
|
|
26274
|
+
// Set width to exactly what's needed + minimal safety margin
|
|
26275
|
+
const newWidth = maxRequiredWidth + 1; // Add just 1px safety margin
|
|
26276
|
+
|
|
26277
|
+
// Store original position before width change
|
|
26278
|
+
const originalLeft = this.left;
|
|
26279
|
+
const originalTop = this.top;
|
|
26280
|
+
const widthIncrease = newWidth - this.width;
|
|
26281
|
+
|
|
26282
|
+
// Change width
|
|
26283
|
+
this.set('width', newWidth);
|
|
26284
|
+
|
|
26285
|
+
// Force text layout recalculation
|
|
26286
|
+
this.initDimensions();
|
|
26287
|
+
|
|
26288
|
+
// Only compensate position when resizing from left handle
|
|
26289
|
+
// Right handle resize doesn't shift the text position
|
|
26290
|
+
if (resizeOrigin === 'left') {
|
|
26291
|
+
// When resizing from left, the expansion pushes text right
|
|
26292
|
+
// Compensate by moving the textbox left by the width increase
|
|
26293
|
+
this.set({
|
|
26294
|
+
'left': originalLeft - widthIncrease,
|
|
26295
|
+
'top': originalTop
|
|
26296
|
+
});
|
|
26297
|
+
}
|
|
26298
|
+
this.setCoords();
|
|
26299
|
+
|
|
26300
|
+
// Also refresh the overlay editor if it exists
|
|
26301
|
+
if (this.__overlayEditor) {
|
|
26302
|
+
setTimeout(() => {
|
|
26303
|
+
this.__overlayEditor.refresh();
|
|
26304
|
+
}, 0);
|
|
26305
|
+
}
|
|
26306
|
+
(_this$canvas2 = this.canvas) === null || _this$canvas2 === void 0 || _this$canvas2.requestRenderAll();
|
|
26307
|
+
}
|
|
26308
|
+
}
|
|
26309
|
+
|
|
26310
|
+
/**
|
|
26311
|
+
* Returns object representation of an instance
|
|
26312
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
26313
|
+
* @return {Object} object representation of an instance
|
|
25817
26314
|
*/
|
|
25818
26315
|
toObject() {
|
|
25819
26316
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
25820
26317
|
return super.toObject(['minWidth', 'splitByGrapheme', ...propertiesToInclude]);
|
|
25821
26318
|
}
|
|
25822
26319
|
}
|
|
25823
|
-
/**
|
|
25824
|
-
* Minimum width of textbox, in pixels.
|
|
25825
|
-
* @type Number
|
|
25826
|
-
*/
|
|
25827
|
-
/**
|
|
25828
|
-
* Minimum calculated width of a textbox, in pixels.
|
|
25829
|
-
* fixed to 2 so that an empty textbox cannot go to 0
|
|
25830
|
-
* and is still selectable without text.
|
|
25831
|
-
* @type Number
|
|
25832
|
-
*/
|
|
25833
|
-
/**
|
|
25834
|
-
* Use this boolean property in order to split strings that have no white space concept.
|
|
25835
|
-
* this is a cheap way to help with chinese/japanese
|
|
25836
|
-
* @type Boolean
|
|
25837
|
-
* @since 2.6.0
|
|
26320
|
+
/**
|
|
26321
|
+
* Minimum width of textbox, in pixels.
|
|
26322
|
+
* @type Number
|
|
26323
|
+
*/
|
|
26324
|
+
/**
|
|
26325
|
+
* Minimum calculated width of a textbox, in pixels.
|
|
26326
|
+
* fixed to 2 so that an empty textbox cannot go to 0
|
|
26327
|
+
* and is still selectable without text.
|
|
26328
|
+
* @type Number
|
|
26329
|
+
*/
|
|
26330
|
+
/**
|
|
26331
|
+
* Use this boolean property in order to split strings that have no white space concept.
|
|
26332
|
+
* this is a cheap way to help with chinese/japanese
|
|
26333
|
+
* @type Boolean
|
|
26334
|
+
* @since 2.6.0
|
|
25838
26335
|
*/
|
|
25839
26336
|
_defineProperty(Textbox, "type", 'Textbox');
|
|
25840
26337
|
_defineProperty(Textbox, "textLayoutProperties", [...IText.textLayoutProperties, 'width']);
|