Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
// this.$element.innerHTML = "<b>Overwrite AbstractValueEditor.render() to generate your view</b>";
m.render(this.$element, m("b", "Overwrite AbstractValueEditor.render() to generate view"));
}
close() {
UIState.setOverlay();
// must destroy component for reuse
m.render(this.getElement(), m("i"));
},
export const render = (component) => {
const root = document.createElement('div');
m.render(root, component);
return root;
};
function init(element, config) {
var controller = new ctrl(config);
m.render(element, view(controller));
return api(controller);
}
const cb = (piece) => {
c.removeChild(prom);
onChoice(piece);
};
const box = PromotionBox(cb);
const left = colour === 'white' ? 75 * columnLetterToNumberFromZero(column) : ((75 * 7) - (75 * columnLetterToNumberFromZero(column)));
const promotionBox = m('div', {
style: `z-index: 100; position: absolute; left: ${left}px; top: 0px;`,
}, m(box));
c.appendChild(prom);
m.render(prom, promotionBox);
}
render() {
m.render(this.$element, m(View, this.viewModel));
}
}
export function renderOutro (dom: HTMLElement) {
m.render(dom, m('.intro.center',
m('h2', 'Panel-Slider'),
m('.lg-lt', {style: 'transform: rotate(180deg)'}, '➔'),
m('p', 'Swipe left or right to navigate.'),
m('p',
'© 2019 by Mike Linkovich | ',
m('a', {href: 'https://github.com/spacejack'}, 'Github')
)
))
}
render() {
m.render(this.$element, m(ArrayItemView, this.viewModel));
}
const triggerDownload = (name, ...contents) => {
const file = new window.Blob(contents, {type: 'text/plain'})
const href = window.URL.createObjectURL(file)
const container = document.getElementById('download-container')
m.render(container, m('a#downloader', { href, download: name }))
document.getElementById('downloader').click()
m.mount(container, null)
}