mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-30 19:59:49 +02:00
Remove duplicate code
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import axios from "axios";
|
||||
import { $ } from 'select-dom';
|
||||
|
||||
export async function getBase64FromUrl(url) {
|
||||
const data = await fetch(url);
|
||||
@@ -57,7 +58,7 @@ export function onSaveImage(xyPostion, index, signKey, imgWH, image) {
|
||||
(data, ind) =>
|
||||
data.key === signKey && data.Width && data.Height && data.SignUrl
|
||||
);
|
||||
|
||||
|
||||
|
||||
if (updateFilter.length > 0) {
|
||||
let newWidth, newHeight;
|
||||
@@ -260,3 +261,14 @@ export const contactBookName = async (objectId, className) => {
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
export const modalAlign = () => {
|
||||
let modalDialog = $('.modal-dialog').getBoundingClientRect();
|
||||
let mobileHead = $('.mobileHead').getBoundingClientRect()
|
||||
let modal = $('.modal-dialog');
|
||||
if (modalDialog.left < mobileHead.left) {
|
||||
let leftOffset = mobileHead.left - modalDialog.left;
|
||||
modal.style.left = leftOffset + 'px';
|
||||
modal.style.top = (window.innerHeight/3) + 'px';
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user