redhotmagma-graphics-editor 1.49.1 → 1.49.3
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.
|
@@ -93,7 +93,6 @@ var Text = exports.Text = /*#__PURE__*/function (_CanvasObject) {
|
|
|
93
93
|
var prevState = this.toObject();
|
|
94
94
|
// store the outerHTML to get the default values as well
|
|
95
95
|
this._content = element.outerHTML;
|
|
96
|
-
this._style = _objectSpread(_objectSpread({}, (0, _StyleParams.collectStyleParams)(this._content)), this.getExplicitStyleParams());
|
|
97
96
|
this.build();
|
|
98
97
|
this.triggerChangeEvent(prevState);
|
|
99
98
|
}
|
|
@@ -147,12 +146,18 @@ var Text = exports.Text = /*#__PURE__*/function (_CanvasObject) {
|
|
|
147
146
|
// test browser info: Microsoft Edge 44.18362.449.0
|
|
148
147
|
var un = canvas && canvas.addToContainer();
|
|
149
148
|
this.wrappedObject = converter.importHTML(this.content, this.wrappedObject, false, true, this.getExplicitStyleParams());
|
|
149
|
+
this.updateStyleParams();
|
|
150
150
|
un && canvas.removeFromContainer();
|
|
151
151
|
if (triggerChange) {
|
|
152
152
|
var prevState = this.toObject();
|
|
153
153
|
this.triggerChangeEvent(prevState);
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
+
}, {
|
|
157
|
+
key: "updateStyleParams",
|
|
158
|
+
value: function updateStyleParams() {
|
|
159
|
+
this._style = _objectSpread(_objectSpread({}, (0, _StyleParams.collectStyleParams)(this._content)), this.getExplicitStyleParams());
|
|
160
|
+
}
|
|
156
161
|
|
|
157
162
|
/**
|
|
158
163
|
* Triggers the build function if the canvas is available, so the content can be imported correctly
|
package/package.json
CHANGED
|
@@ -64,10 +64,6 @@ export class Text extends CanvasObject implements TextInterface {
|
|
|
64
64
|
const prevState = this.toObject();
|
|
65
65
|
// store the outerHTML to get the default values as well
|
|
66
66
|
this._content = element.outerHTML;
|
|
67
|
-
this._style = {
|
|
68
|
-
...collectStyleParams(this._content),
|
|
69
|
-
...this.getExplicitStyleParams(),
|
|
70
|
-
};
|
|
71
67
|
this.build();
|
|
72
68
|
this.triggerChangeEvent(prevState);
|
|
73
69
|
}
|
|
@@ -130,6 +126,7 @@ export class Text extends CanvasObject implements TextInterface {
|
|
|
130
126
|
true,
|
|
131
127
|
this.getExplicitStyleParams()
|
|
132
128
|
);
|
|
129
|
+
this.updateStyleParams();
|
|
133
130
|
un && canvas.removeFromContainer();
|
|
134
131
|
if (triggerChange) {
|
|
135
132
|
const prevState = this.toObject();
|
|
@@ -137,6 +134,13 @@ export class Text extends CanvasObject implements TextInterface {
|
|
|
137
134
|
}
|
|
138
135
|
}
|
|
139
136
|
|
|
137
|
+
updateStyleParams() {
|
|
138
|
+
this._style = {
|
|
139
|
+
...collectStyleParams(this._content),
|
|
140
|
+
...this.getExplicitStyleParams(),
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
140
144
|
/**
|
|
141
145
|
* Triggers the build function if the canvas is available, so the content can be imported correctly
|
|
142
146
|
* @param canvas
|