Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
children(this.$trigger).forEach(($this, i) => {
const $content = children(this.$container)[i]
removeClass(this.classes.SELECTED, $this)
hideElement($content)
this.leave(`${getData('type', $this)}Module`)
if (getData('type', $this) === typeName) {
addClass(this.classes.SELECTED, $this)
$content.style.display = 'block'
// showElement($content)
}
})
updateStatus(status) {
if (status === 'error') {
removeClass(this.classes.LOADED, this.content)
this.loader.innerHTML = 'load ImageError click open video'
removeClass(this.classes.HIDE, this.loader)
// todo show error tip
} else if (status === 'loading') {
removeClass(this.classes.LOADED, this.content)
this.loader.innerHTML = 'loading'
removeClass(this.classes.HIDE, this.loader)
// todo show loadind tip
} else if (status === 'loaded') {
addClass(this.classes.LOADED, this.content)
addClass(this.classes.HIDE, this.loader)
}
}
}
elements.forEach(el => {
removeClass(className, el)
})
}
destroy() {
if (this.is('initialized')) {
this.unbind()
if (this.options.vertical === true) {
removeClass(this.classes.VERTICAL, this.element)
}
if (this.options.theme) {
removeClass(this.getThemeClass(), this.element)
}
if (this.is('disabled')) {
removeClass(this.classes.DISABLED, this.element)
this.element.disable = false
}
this.leave('initialized')
}
this.trigger(EVENTS.DESTROY)
super.destroy()
}
}
labelActive(index) {
this.index = index
const BASE_INDEX = -1
if (this.instance.current.indexOf(index) !== BASE_INDEX) {
removeClass(this.instance.classes.DROPDOWNOPEN, this.$dropdown)
return
}
this.instance.toggle(index)
removeClass(
this.instance.classes.ACTIVE,
this.$dropdownItems[this.instance.prev[0]]
)
addClass(this.instance.classes.ACTIVE, this.$dropdownItems[index])
html(this.$dropdownItems[index].innerHTML, this.$dropdownlabel)
removeClass(this.instance.classes.DROPDOWNOPEN, this.$dropdown)
}
leave(state) {
if (this.states[state]) {
this.states[state] = false
const classes = this.wizard.classes.STEP
removeClass(classes[state.toUpperCase()], this.pane)
removeClass(classes[state.toUpperCase()], this.$element)
this.trigger(EVENTS.STATECHANGE, false, state)
}
}
deletePoster() {
this.data.poster = ''
removeClass(this.classes.POSTERSELECTED, this.$poster)
removeClass(this.classes.POSTERENTERCHANGE, this.$poster)
setStyle('backgroundImage', 'none', this.$videoPoster)
}
destroy() {
if (this.is('initialized')) {
this.unbind()
if (this.$wrap === this.element) {
if (this.options.theme) {
removeClass(this.getThemeClasss(), this.$wrap)
}
removeClass(this.classes.WRAP, this.$wrap)
removeClass(
this.getClass(this.classes.MODE, 'mode', this.mode),
this.$wrap
)
removeClass(
this.getClass(this.classes.TRIGGER, 'trigger', this.options.trigger),
this.$wrap
)
removeClass(
this.getClass(
this.classes.OUTSIDEPLACEMENT,
'placement',
this.options.placement
),
this.$wrap
)
if (this.$lens) {
show() {
if (hasClass(this.classes.HIDE, this.$element)) {
removeClass(this.classes.HIDE, this.$element)
}
}
}
selectMarker(marker) {
removeClass(
this.classes.MARKERACTIVE,
query(`.${this.classes.MARKERACTIVE}`, this.$actionBar)
)
addClass(this.classes.MARKERACTIVE, marker)
this.$marker = marker
compose(
this.markers.length > 2
? addClass(this.classes.DELETEACTIVE)
: removeClass(this.classes.DELETEACTIVE),
find(`.${this.classes.DELETE}`)
)(this.$handle)
this.leave('noSelectedMarker')
this.enter('SelectedMarker')
if (this.is('gradientModule')) {