import { Layer } from './types' ; param { * } data const handleParentIsText = ( data , parent ) => { parent . style [ 'position' ] = parent . style [ 'position' ] ? parent . style [ 'position' ] : 'relative' ; for ( let child of data ) { child . style = { ... child . style , ... { 'position' : 'absolute' , 'left' : child . structure . x - parent . structure . x , 'top' : child . structure . y - parent . structure . y } } ; } return data ; } ; export default handleParentIsText ;