You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
859 B
33 lines
859 B
'use strict';
|
|
|
|
import {setupResponsiveness} from './toolbar/responsive.jsx';
|
|
import {setupPublish} from "./toolbar/publish.jsx";
|
|
|
|
const rootAttributes = {
|
|
previewFrame: document.getElementById('preview_frame'),
|
|
}
|
|
|
|
setupResponsiveness(rootAttributes);
|
|
setupPublish(rootAttributes)
|
|
|
|
// const responsiveness = connectResponsiveness(rootAttributes);
|
|
// setTimeout(() => responsiveness.selectMode('tablet'), 5000)
|
|
// setTimeout(() => responsiveness.selectMode('mobile'), 10000)
|
|
|
|
const previewFrame = rootAttributes.previewFrame;
|
|
initDataOptions();
|
|
|
|
/**
|
|
* Functions
|
|
*/
|
|
|
|
function initDataOptions() {
|
|
const dataOptionsSelect = document.getElementById('data-options');
|
|
if (!dataOptionsSelect) {
|
|
return;
|
|
}
|
|
|
|
dataOptionsSelect.addEventListener('change', function () {
|
|
previewFrame.src = window.devTool.previewFrameUrl + '?data=' + this.value;
|
|
});
|
|
}
|
|
|