Simplify the Layers panel tree structure Rust -> JS encoding (#3744)

* replace custom layer structure encoding with simple JSON tree

* add leftover files

* Renames

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Ayush Amawate
2026-02-12 20:06:58 +00:00
committed by GitHub
co-authored by Keavon Chambers
parent bb6fea95e4
commit 9ae13634d0
6 changed files with 48 additions and 183 deletions
+6 -6
View File
@@ -796,13 +796,13 @@ export class TriggerSaveActiveDocument extends JsMessage {
export class DocumentChanged extends JsMessage {}
export type DataBuffer = {
pointer: bigint;
length: bigint;
export type LayerStructureEntry = {
layerId: bigint;
children: LayerStructureEntry[];
};
export class UpdateDocumentLayerStructureJs extends JsMessage {
readonly dataBuffer!: DataBuffer;
export class UpdateDocumentLayerStructure extends JsMessage {
readonly layerStructure!: LayerStructureEntry[];
}
export type TextAlign = "Left" | "Center" | "Right" | "JustifyLeft";
@@ -1717,7 +1717,7 @@ export const messageMakers: Record<string, MessageMaker> = {
UpdateDocumentArtwork,
UpdateDocumentBarLayout,
UpdateDocumentLayerDetails,
UpdateDocumentLayerStructureJs,
UpdateDocumentLayerStructure,
UpdateDocumentRulers,
UpdateDocumentScrollbars,
UpdateExportReorderIndex,