Composite

Live example

Source

import 'normalize.css';

import CompositeComponent from 'paraviewweb/src/Component/Native/Composite';
import BGColorComponent from 'paraviewweb/src/Component/Native/BackgroundColor';

const container = document.querySelector('.content');
container.style.position = 'relative';
container.style.width = '100%';
container.style.height = '600px';

const composite = new CompositeComponent();
const green = new BGColorComponent('green');
const red = new BGColorComponent('red');
const blue = new BGColorComponent('blue');
const pink = new BGColorComponent('pink');

composite.addViewport(green);
composite.addViewport(red);
composite.addViewport(blue);
composite.addViewport(pink);

composite.setContainer(container);