@overtone-art/canvas-editor-core 0.6.0 → 0.6.1
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.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.global.js +1 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1958,11 +1958,21 @@ var TextCurveManager = class {
|
|
|
1958
1958
|
if (!curve) return false;
|
|
1959
1959
|
return this.apply(layerId, curve, save);
|
|
1960
1960
|
}
|
|
1961
|
-
/**
|
|
1961
|
+
/**
|
|
1962
|
+
* Rebuild every curved layer — used after a state restore.
|
|
1963
|
+
*
|
|
1964
|
+
* `getAll` is the canvas stack, so this walks each group's children too:
|
|
1965
|
+
* curved text inside a group would otherwise keep the path geometry it was
|
|
1966
|
+
* restored with, and stop tracking its own text, font and size.
|
|
1967
|
+
*/
|
|
1962
1968
|
refreshAll() {
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1969
|
+
const visit = (layers) => {
|
|
1970
|
+
for (const layer of layers) {
|
|
1971
|
+
if (layer.meta.curve) this.refresh(layer.id);
|
|
1972
|
+
if (layer.children.length > 0) visit(layer.children);
|
|
1973
|
+
}
|
|
1974
|
+
};
|
|
1975
|
+
visit(this.layers.getAll());
|
|
1966
1976
|
}
|
|
1967
1977
|
/**
|
|
1968
1978
|
* Puts every line's path on the object as one shape, and hooks per-line
|