File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export namespace StageLoader {
2626 data = convertV12toV13 ( data ) ;
2727 data = convertV13toV14 ( data ) ;
2828 data = convertV14toV15 ( data ) ;
29+ data = convertV15toV16 ( data ) ;
2930 return data as Serialized . File ;
3031 }
3132
@@ -286,4 +287,23 @@ export namespace StageLoader {
286287 }
287288 return data ;
288289 }
290+
291+ /**
292+ * 文本节点增加自动转换大小/手动转换大小功能
293+ * @param data
294+ */
295+ function convertV15toV16 ( data : Record < string , any > ) : Record < string , any > {
296+ if ( data . version >= 16 ) {
297+ return data ;
298+ }
299+ data . version = 16 ;
300+ for ( const node of data . entities ) {
301+ if ( node . type === "core:text_node" ) {
302+ if ( typeof node . sizeAdjust === "undefined" ) {
303+ node . sizeAdjust = "auto" ;
304+ }
305+ }
306+ }
307+ return data ;
308+ }
289309}
You can’t perform that action at this time.
0 commit comments