Files
powerpoint-toolbox/node_modules/@fluentui/react-positioning/lib-commonjs/createVirtualElementFromClick.js
T
2025-03-07 19:22:02 +01:00

32 lines
716 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createVirtualElementFromClick", {
enumerable: true,
get: function() {
return createVirtualElementFromClick;
}
});
function createVirtualElementFromClick(nativeEvent) {
const left = nativeEvent.clientX;
const top = nativeEvent.clientY;
const right = left + 1;
const bottom = top + 1;
function getBoundingClientRect() {
return {
left,
top,
right,
bottom,
x: left,
y: top,
height: 1,
width: 1
};
}
return {
getBoundingClientRect
};
}