Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const modalDom = ReactDOM.findDOMNode(modal)
if (!modalDom) {
this.handleHide()
return
}
if (!hasClass(modalDom, 'modal-in')) {
this.handleHide()
return
}
removeClass(modalDom, 'modal-in')
const transitionEvent = whichTransitionEvent()
const eventHandler = modalDom.addEventListener(transitionEvent, () => {
modalDom.removeEventListener(transitionEvent, eventHandler)
this.handleHide()
})
addClass(modalDom, 'modal-out')
}
handleOrientation() {
this.onOrientationChange(this.landscape);
if (!this.targetNode){
return;
}
if (this.landscape) {
removeClass(this.targetNode, 'portrait');
addClass(this.targetNode, 'landscape');
} else {
removeClass(this.targetNode, 'landscape');
addClass(this.targetNode, 'portrait');
}
}
adjustModalStyle () {
const modal = this.refs['modal']
if (!modal) {
return
}
const modalDom = ReactDOM.findDOMNode(modal)
if (modalDom) {
addClass(modalDom, 'modal-in')
}
}
classNames.forEach((name) => {
addClass(node, name);
});
this.plugins[id] = node;
onResizeStart = () => {
$.addClass(findDOMNode(this.refs.mask), 'show');
};
['loading', 'error', 'play'].forEach(function (key) {
if (key === state && show) {
_class.addClass(_this.$dom, key);
} else {
_class.removeClass(_this.$dom, key);
}
});
};
handleOrientation() {
this.onOrientationChange(this.landscape);
if (!this.targetNode){
return;
}
if (this.landscape) {
removeClass(this.targetNode, 'portrait');
addClass(this.targetNode, 'landscape');
} else {
removeClass(this.targetNode, 'landscape');
addClass(this.targetNode, 'portrait');
}
}