update deps
This commit is contained in:
32
node_modules/popper.js/src/methods/destroy.js
generated
vendored
Normal file
32
node_modules/popper.js/src/methods/destroy.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import isModifierEnabled from '../utils/isModifierEnabled';
|
||||
import getSupportedPropertyName from '../utils/getSupportedPropertyName';
|
||||
|
||||
/**
|
||||
* Destroys the popper.
|
||||
* @method
|
||||
* @memberof Popper
|
||||
*/
|
||||
export default function destroy() {
|
||||
this.state.isDestroyed = true;
|
||||
|
||||
// touch DOM only if `applyStyle` modifier is enabled
|
||||
if (isModifierEnabled(this.modifiers, 'applyStyle')) {
|
||||
this.popper.removeAttribute('x-placement');
|
||||
this.popper.style.position = '';
|
||||
this.popper.style.top = '';
|
||||
this.popper.style.left = '';
|
||||
this.popper.style.right = '';
|
||||
this.popper.style.bottom = '';
|
||||
this.popper.style.willChange = '';
|
||||
this.popper.style[getSupportedPropertyName('transform')] = '';
|
||||
}
|
||||
|
||||
this.disableEventListeners();
|
||||
|
||||
// remove the popper if user explicitly asked for the deletion on destroy
|
||||
// do not use `remove` because IE11 doesn't support it
|
||||
if (this.options.removeOnDestroy) {
|
||||
this.popper.parentNode.removeChild(this.popper);
|
||||
}
|
||||
return this;
|
||||
}
|
Reference in New Issue
Block a user