import { SKLayer } from '../types' ; import filterHideLayer from './filterHideLayer' ; import handleBorderCoordinate from './handleBorderCoordinate' ; import handleOpacity from './handleOpacity' ; import fixPosition from './fixPosition' ; import handleSlice from './handleSlice' ; import formatCoordinate from './formatCoordinate' ; import trimByMask from './trimByMask' ; import handleNotFillLayerOrder from './handleNotFillLayerOrder' ; import { handlePanel } from './handlePanel' ; /**
 * 分别对每个画板进行处理
 */ export default ( layer , type ) : SKLayer => { let layers = [ layer ] ; if ( type === 'code' || type === 'lowcode' ) { layers = handleBorderCoordinate ( layers ) ; } layers = handleOpacity ( layers ) ; layers = formatCoordinate ( layers ) ; layers = fixPosition ( layers ) ; layers = trimByMask ( layers ) ; if ( type === 'code' || type === 'lowcode' ) { layers = handleSlice ( layers ) ; } layers = filterHideLayer ( layers ) ; layers = handleNotFillLayerOrder ( layers ) ; layers = handlePanel ( layers ) ; return layers [ 0 ] ; } ;