fabric-vectr 6.7.2 → 6.7.4
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/dist/index.js +50 -40
- 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 +50 -40
- package/dist/index.mjs.map +1 -1
- package/dist/index.node.cjs +50 -40
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.mjs +50 -40
- package/dist/index.node.mjs.map +1 -1
- package/dist/package.json.min.mjs +1 -1
- package/dist/package.json.mjs +1 -1
- package/dist/src/canvas/SelectableCanvas.d.ts.map +1 -1
- package/dist/src/canvas/SelectableCanvas.min.mjs +1 -1
- package/dist/src/canvas/SelectableCanvas.min.mjs.map +1 -1
- package/dist/src/canvas/SelectableCanvas.mjs +2 -0
- package/dist/src/canvas/SelectableCanvas.mjs.map +1 -1
- package/dist/src/shapes/Group.d.ts.map +1 -1
- package/dist/src/shapes/Group.min.mjs +1 -1
- package/dist/src/shapes/Group.min.mjs.map +1 -1
- package/dist/src/shapes/Group.mjs +1 -1
- package/dist/src/shapes/Group.mjs.map +1 -1
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.d.ts.map +1 -1
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.min.mjs +1 -1
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.min.mjs.map +1 -1
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.mjs +2 -1
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.mjs.map +1 -1
- package/dist/src/shapes/Object/InteractiveObject.d.ts +6 -0
- package/dist/src/shapes/Object/InteractiveObject.d.ts.map +1 -1
- package/dist/src/shapes/Object/InteractiveObject.min.mjs +1 -1
- package/dist/src/shapes/Object/InteractiveObject.min.mjs.map +1 -1
- package/dist/src/shapes/Object/InteractiveObject.mjs +41 -35
- package/dist/src/shapes/Object/InteractiveObject.mjs.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 +2 -2
- package/dist/src/shapes/Text/Text.mjs.map +1 -1
- 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 +1 -0
- package/dist/src/shapes/Textbox.mjs.map +1 -1
- package/dist-extensions/src/canvas/SelectableCanvas.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Group.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Object/FabricObjectSVGExportMixin.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Object/InteractiveObject.d.ts +6 -0
- package/dist-extensions/src/shapes/Object/InteractiveObject.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Textbox.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/canvas/SelectableCanvas.ts +2 -0
- package/src/shapes/Group.ts +4 -1
- package/src/shapes/Object/FabricObjectSVGExportMixin.ts +4 -1
- package/src/shapes/Object/InteractiveObject.ts +7 -0
- package/src/shapes/Text/Text.ts +2 -2
- package/src/shapes/Textbox.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -366,7 +366,7 @@
|
|
|
366
366
|
}
|
|
367
367
|
const cache = new Cache();
|
|
368
368
|
|
|
369
|
-
var version = "6.7.
|
|
369
|
+
var version = "6.7.4";
|
|
370
370
|
|
|
371
371
|
// use this syntax so babel plugin see this import here
|
|
372
372
|
const VERSION = version;
|
|
@@ -5002,8 +5002,9 @@
|
|
|
5002
5002
|
withShadow,
|
|
5003
5003
|
additionalTransform
|
|
5004
5004
|
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
5005
|
+
var skipShadow = true;
|
|
5005
5006
|
let clipPath = this.clipPath;
|
|
5006
|
-
const styleInfo = noStyle ? '' : `style="${this.getSvgStyles()}" `,
|
|
5007
|
+
const styleInfo = noStyle ? '' : `style="${this.getSvgStyles(skipShadow)}" `,
|
|
5007
5008
|
shadowInfo = withShadow ? `style="${this.getSvgFilter()}" ` : '',
|
|
5008
5009
|
vectorEffect = this.strokeUniform ? 'vector-effect="non-scaling-stroke" ' : '',
|
|
5009
5010
|
absoluteClipPath = clipPath && clipPath.absolutePositioned,
|
|
@@ -9548,6 +9549,47 @@
|
|
|
9548
9549
|
*/
|
|
9549
9550
|
constructor(options) {
|
|
9550
9551
|
super();
|
|
9552
|
+
/**
|
|
9553
|
+
* The object's controls' position in viewport coordinates
|
|
9554
|
+
* Calculated by {@link Control#positionHandler} and {@link Control#calcCornerCoords}, depending on {@link padding}.
|
|
9555
|
+
* `corner/touchCorner` describe the 4 points forming the interactive area of the corner.
|
|
9556
|
+
* Used to draw and locate controls.
|
|
9557
|
+
*/
|
|
9558
|
+
/**
|
|
9559
|
+
* keeps the value of the last hovered corner during mouse move.
|
|
9560
|
+
* 0 is no corner, or 'mt', 'ml', 'mtr' etc..
|
|
9561
|
+
* It should be private, but there is no harm in using it as
|
|
9562
|
+
* a read-only property.
|
|
9563
|
+
* this isn't cleaned automatically. Non selected objects may have wrong values
|
|
9564
|
+
* @type [string]
|
|
9565
|
+
*/
|
|
9566
|
+
/**
|
|
9567
|
+
* a map of control visibility for this object.
|
|
9568
|
+
* this was left when controls were introduced to not break the api too much
|
|
9569
|
+
* this takes priority over the generic control visibility
|
|
9570
|
+
*/
|
|
9571
|
+
/**
|
|
9572
|
+
* holds the controls for the object.
|
|
9573
|
+
* controls are added by default_controls.js
|
|
9574
|
+
*/
|
|
9575
|
+
/**
|
|
9576
|
+
* internal boolean to signal the code that the object is
|
|
9577
|
+
* part of the move action.
|
|
9578
|
+
*/
|
|
9579
|
+
/**
|
|
9580
|
+
* A boolean used from the gesture module to keep tracking of a scaling
|
|
9581
|
+
* action when there is no scaling transform in place.
|
|
9582
|
+
* This is an edge case and is used twice in all codebase.
|
|
9583
|
+
* Probably added to keep track of some performance issues
|
|
9584
|
+
* @TODO use git blame to investigate why it was added
|
|
9585
|
+
* DON'T USE IT. WE WILL TRY TO REMOVE IT
|
|
9586
|
+
*/
|
|
9587
|
+
/**
|
|
9588
|
+
* When set to `true`, object's group should not cache
|
|
9589
|
+
* @type Boolean
|
|
9590
|
+
* @default false
|
|
9591
|
+
*/
|
|
9592
|
+
_defineProperty(this, "preventGroupCache", void 0);
|
|
9551
9593
|
Object.assign(this, this.constructor.createControls(), InteractiveFabricObject.ownDefaults);
|
|
9552
9594
|
this.setOptions(options);
|
|
9553
9595
|
}
|
|
@@ -10041,41 +10083,6 @@
|
|
|
10041
10083
|
// for subclasses
|
|
10042
10084
|
}
|
|
10043
10085
|
}
|
|
10044
|
-
/**
|
|
10045
|
-
* The object's controls' position in viewport coordinates
|
|
10046
|
-
* Calculated by {@link Control#positionHandler} and {@link Control#calcCornerCoords}, depending on {@link padding}.
|
|
10047
|
-
* `corner/touchCorner` describe the 4 points forming the interactive area of the corner.
|
|
10048
|
-
* Used to draw and locate controls.
|
|
10049
|
-
*/
|
|
10050
|
-
/**
|
|
10051
|
-
* keeps the value of the last hovered corner during mouse move.
|
|
10052
|
-
* 0 is no corner, or 'mt', 'ml', 'mtr' etc..
|
|
10053
|
-
* It should be private, but there is no harm in using it as
|
|
10054
|
-
* a read-only property.
|
|
10055
|
-
* this isn't cleaned automatically. Non selected objects may have wrong values
|
|
10056
|
-
* @type [string]
|
|
10057
|
-
*/
|
|
10058
|
-
/**
|
|
10059
|
-
* a map of control visibility for this object.
|
|
10060
|
-
* this was left when controls were introduced to not break the api too much
|
|
10061
|
-
* this takes priority over the generic control visibility
|
|
10062
|
-
*/
|
|
10063
|
-
/**
|
|
10064
|
-
* holds the controls for the object.
|
|
10065
|
-
* controls are added by default_controls.js
|
|
10066
|
-
*/
|
|
10067
|
-
/**
|
|
10068
|
-
* internal boolean to signal the code that the object is
|
|
10069
|
-
* part of the move action.
|
|
10070
|
-
*/
|
|
10071
|
-
/**
|
|
10072
|
-
* A boolean used from the gesture module to keep tracking of a scaling
|
|
10073
|
-
* action when there is no scaling transform in place.
|
|
10074
|
-
* This is an edge case and is used twice in all codebase.
|
|
10075
|
-
* Probably added to keep track of some performance issues
|
|
10076
|
-
* @TODO use git blame to investigate why it was added
|
|
10077
|
-
* DON'T USE IT. WE WILL TRY TO REMOVE IT
|
|
10078
|
-
*/
|
|
10079
10086
|
_defineProperty(InteractiveFabricObject, "ownDefaults", interactiveObjectDefaultValues);
|
|
10080
10087
|
|
|
10081
10088
|
/***
|
|
@@ -12073,7 +12080,7 @@
|
|
|
12073
12080
|
const ownCache = FabricObject.prototype.shouldCache.call(this);
|
|
12074
12081
|
if (ownCache) {
|
|
12075
12082
|
for (let i = 0; i < this._objects.length; i++) {
|
|
12076
|
-
if (this._objects[i].willDrawShadow()) {
|
|
12083
|
+
if (this._objects[i].willDrawShadow() || this._objects[i].preventGroupCache) {
|
|
12077
12084
|
this.ownCaching = false;
|
|
12078
12085
|
return false;
|
|
12079
12086
|
}
|
|
@@ -14144,6 +14151,8 @@
|
|
|
14144
14151
|
const obj = this.searchPossibleTargets(objects, pointer);
|
|
14145
14152
|
if (obj) {
|
|
14146
14153
|
if (obj instanceof Group) {
|
|
14154
|
+
// Let text in group can be edited after isolation
|
|
14155
|
+
obj.interactive = true;
|
|
14147
14156
|
this.isolatedObject = obj;
|
|
14148
14157
|
this.discardActiveObject();
|
|
14149
14158
|
// The newly created group object has its child node coords initialized, otherwise it cannot be selected.
|
|
@@ -19816,8 +19825,8 @@
|
|
|
19816
19825
|
_getCacheCanvasDimensions() {
|
|
19817
19826
|
const dims = super._getCacheCanvasDimensions();
|
|
19818
19827
|
const fontSize = this.fontSize;
|
|
19819
|
-
dims.width += fontSize * dims.zoomX;
|
|
19820
|
-
dims.height += fontSize * dims.zoomY;
|
|
19828
|
+
dims.width += fontSize * dims.zoomX * 2;
|
|
19829
|
+
dims.height += fontSize * dims.zoomY * 2;
|
|
19821
19830
|
return dims;
|
|
19822
19831
|
}
|
|
19823
19832
|
|
|
@@ -23786,6 +23795,7 @@
|
|
|
23786
23795
|
// clear cache and re-calculate height
|
|
23787
23796
|
this.height = this.calcTextHeight();
|
|
23788
23797
|
}
|
|
23798
|
+
this.preventGroupCache = this.path ? true : false;
|
|
23789
23799
|
}
|
|
23790
23800
|
|
|
23791
23801
|
/**
|