We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba15e06 commit c12611dCopy full SHA for c12611d
src/js/utils/floating-ui.js
@@ -150,20 +150,11 @@ function floatingUIposition(step, shouldCenter) {
150
*/
151
function placeArrow(el, middlewareData) {
152
const arrowEl = el.querySelector('.shepherd-arrow');
153
- if (arrowEl) {
154
- let left, top, right, bottom;
155
-
156
- if (middlewareData.arrow) {
157
- const { x: arrowX, y: arrowY } = middlewareData.arrow;
158
- left = arrowX != null ? `${arrowX}px` : '';
159
- top = arrowY != null ? `${arrowY}px` : '';
160
- }
161
+ if (arrowEl && middlewareData.arrow) {
+ const { x: arrowX, y: arrowY } = middlewareData.arrow;
162
Object.assign(arrowEl.style, {
163
- left,
164
- top,
165
- right,
166
- bottom
+ left: arrowX != null ? `${arrowX}px` : '',
+ top: arrowY != null ? `${arrowY}px` : ''
167
});
168
}
169
0 commit comments