nexshop-web-contents
Version:
Nexshop Web Contents Project
24 lines (22 loc) • 699 B
JavaScript
import {HORIZONTAL_LAYOUTS, VERTICAL_LAYOUTS} from "../constants/layouts";
import cloneDeep from 'lodash/cloneDeep';
export function createEmptySceneFromLayouts(id, orientation) {
const layout = orientation === 'horizontal' ? HORIZONTAL_LAYOUTS : VERTICAL_LAYOUTS;
return cloneDeep(layout.find(layout => layout.id === id));
}
export const createScene = (name, panels, folderId, resolution, orientation, relatedContents) => {
return {
name,
metaData: {
panels,
display: {
resolution,
orientation,
},
},
relatedContents,
folderId,
tags: [],
type: 'scene'
}
};