Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onCreate(instance) {
const {popper} = instance;
const {tooltip, content, arrow} = instance.popperChildren;
popper.style.transitionProperty = 'padding';
// Very first transition is jerky otherwise.
content.style.willChange = 'transform';
tooltip.style.textAlign = 'left';
flipper = new Flipper({element: popper});
flipper.addFlipped({
element: tooltip,
flipId: 'tooltip',
spring: 'veryGentle',
onStart() {
// .disable() hides the tippy by default now
instance.popperInstance.disableEventListeners();
},
onComplete() {
instance.enable();
wasManuallyUpdated = false;
},
// We need to ensure the popper's translation animation is in concert with
// the dimensions spring animation so it stays perfectly positioned
// throughout