import { Layer } from './types' ; export const transWebCode = ( data , codeData ) => { for ( let i = 0 ; i < data . length ; i ++ ) { if ( ! data [ i ] . panelData ) { data [ i ] . panelData = { } ; } data [ i ] . panelData . code = codeData [ i ] . style ; data [ i ] . style = codeData [ i ] . style ; if ( Array . isArray ( data [ i ] . children ) ) { transWebCode ( data [ i ] . children , codeData [ i ] . children ) ; } } return data ; } ;