Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/shepherd.js/src/js/utils/ drwxrwxr-x | |
| Viewing file: Select action/file-type: function _getCenteredStylePopperModifier() {
return [
{
name: 'applyStyles',
fn({ state }) {
Object.keys(state.elements).forEach((name) => {
if (name !== 'popper') {
return;
}
const style = {
position: 'fixed',
left: '50%',
top: '50%',
transform: 'translate(-50%, -50%)'
};
const attributes = state.attributes[name] || {};
const element = state.elements[name];
Object.assign(element.style, style);
Object.keys(attributes).forEach((name) => {
const value = attributes[name];
if (value === false) {
element.removeAttribute(name);
} else {
element.setAttribute(name, value === true ? '' : value);
}
});
});
}
},
{
name: 'computeStyles',
options: {
adaptive: false
}
}
];
}
/**
* Generates the array of options for a tooltip that doesn't have a
* target element in the DOM -- and thus is positioned in the center
* of the view
*
* @param {Step} step The step instance
* @return {Object} The final Popper options object
*/
export function makeCenteredPopper(step) {
const centeredStylePopperModifier = _getCenteredStylePopperModifier();
let popperOptions = {
placement: 'top',
strategy: 'fixed',
modifiers: [
{
name: 'focusAfterRender',
enabled: true,
phase: 'afterWrite',
fn() {
setTimeout(() => {
if (step.el) {
step.el.focus();
}
}, 300);
}
}
]
};
popperOptions = {
...popperOptions,
modifiers: Array.from(
new Set([...popperOptions.modifiers, ...centeredStylePopperModifier])
)
};
return popperOptions;
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0047 ]-- |