Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
init() {
this.inline = this.instance.getElement('inline')
prepend(this.inline, this.content)
}
init() {
this.image = this.instance.getElement('image')
this.image.ondragstart = () => false
prepend(this.image, this.content)
}
classes: this.classes
}
)
}
this.toolbar = templateEngine.render(
this.api.options.templates.toolbar.call(this),
{
classes: this.classes,
filters: this.filters,
sort: this.sort,
reverse: this.reverse
}
)
prepend(this.toolbar, this.api.element)
this.handleFilters()
this.handleSort()
this.handleReverse()
}
iconClass: this.options.iconClass
})
unit = templateEngine.render(this.options.templates.unit.call(this), {
classes: this.classes,
icon
})
}
const html = templateEngine.render(this.options.template.call(this), {
classes: this.classes
})
const wrap = parseHTML(html)
for (let i = 0; i < this.options.max; i++) {
prepend(unit, wrap)
}
return wrap
}
createIcon() {
this.$icon = this.options.getIcon.call(this)
if (!this.$icon) {
this.$icon = parseHTML(
template.render(this.options.templates.icon.call(this), {
classes: this.classes
})
)
prepend(this.$icon, this.$label)
}
}
initialize() {
this.$wrap = wrap(`<div class="${this.classes.WRAP}"></div>`, this.element)
this.$control = document.createElement('div')
prepend(this.$control, this.$wrap)
if (this.options.input) {
addClass(this.classes.INPUT, this.element)
} else {
setStyle('display', 'none', this.element)
}
addClass(this.classes.WRAP, this.$wrap)
addClass(this.classes.CONTROL, this.$control)
if (this.options.theme) {
addClass(this.getThemeClass(), this.$wrap)
}
if (this.options.vertical) {
addClass(this.classes.VERTICAL, this.$wrap)
this.windowImage = query(`.${this.classes.WINDOWIMAGE}`, this.window)
this.lens = parseHTML(this.creatHTML('lens'))
if (this.configuration.overlay) {
this.overlayContainer = parseHTML(this.creatHTML('overlay'))
this.overlay = query(`.${this.classes.OVERLAY}`, this.overlayContainer)
this.lensImage = parseHTML(this.creatHTML('lensImage'))
}
this.setStyle()
addClass(this.getClass('{namespace}-modeWindow'), this.container)
append(this.window, this.container)
if (!this.configuration.overlay) {
append(this.lens, this.container)
} else {
prepend(this.lens, this.overlayContainer)
append(this.lensImage, this.lens)
append(this.overlayContainer, this.container)
}
this.initPositon()
const offset = this.getElementOffset()
this.lastOffset = JSON.stringify(offset)
this.bind()
}
classes: this.classes
}
)
}
this.toolbar = templateEngine.render(
this.instance.options.templates.toolbar.call(this),
{
classes: this.classes,
filters: this.filters,
sort: this.sort,
reverse: this.reverse
}
)
prepend(this.toolbar, this.instance.element)
this.handleFilters()
this.handleSort()
this.handleReverse()
}