mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 07:43:16 +10:00
create field position fix 🐛
This commit is contained in:
@ -8,7 +8,7 @@ export const createField = (
|
||||
customText = ""
|
||||
): any => {
|
||||
var rect = e.target.getBoundingClientRect();
|
||||
const fieldSize = { width: 192, height: 96 };
|
||||
const fieldSize = { width: 192, height: 64 };
|
||||
var newFieldX = e.clientX - rect.left - fieldSize.width / 2; //x position within the element.
|
||||
var newFieldY = e.clientY - rect.top - fieldSize.height / 2; //y position within the element.
|
||||
if (newFieldX < 0) newFieldX = 0;
|
||||
|
||||
Reference in New Issue
Block a user