--
This commit is contained in:
parent
2b87ec6973
commit
2dfd25dc9f
@ -171,6 +171,7 @@ export const CropGeneral: FC<Props> = ({
|
||||
}
|
||||
>
|
||||
<img
|
||||
id="imgid"
|
||||
onLoad={(e) => {
|
||||
setImageWidth(e.currentTarget.naturalWidth);
|
||||
setImageHeight(e.currentTarget.naturalHeight);
|
||||
|
@ -32,7 +32,7 @@ export const NavigationPanel: FC<Props> = ({
|
||||
};
|
||||
const handleNextStep = () => {
|
||||
if (lastStep) {
|
||||
// onSaveImageClick();
|
||||
onSaveImageClick();
|
||||
} else {
|
||||
setCurrentStep(currentStep + 1);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import {
|
||||
} from "@/model/CropModal/CropModal"
|
||||
import { isImageBlobAGifFile } from "@/utils/isImageBlobAGifFile";
|
||||
import AlertModalDeleteImage from "./AlertModalDeleteImage"
|
||||
import { getModifiedImageBlob } from "./utils/imageManipulation";
|
||||
|
||||
const workSpaceTypesList: WorkSpaceTypesList = {
|
||||
images: [
|
||||
@ -181,7 +182,14 @@ export const CropModalInit: FC<CropOnOpenType> = ({
|
||||
};
|
||||
|
||||
const saveImagesAndRules = async (blob?: Blob) => {
|
||||
|
||||
const img = document.createElement("img");
|
||||
img.src = editedImages.mobile.url
|
||||
const bloba = await getModifiedImageBlob(img, editedImages.mobile.newRules.crop, editedImages.mobile.newRules.darken)
|
||||
const anchor = document.createElement("a");
|
||||
const blobUrl = URL.createObjectURL(bloba);
|
||||
anchor.setAttribute("download", "ЖОПА");
|
||||
anchor.href = blobUrl;
|
||||
anchor.click();
|
||||
// if (!selectedVariantId) return;
|
||||
|
||||
// uploadQuestionImage(questionId, quizId, imageBlob, (question, url) => {
|
||||
|
Loading…
Reference in New Issue
Block a user