Skip to content

Commit

Permalink
teste
Browse files Browse the repository at this point in the history
  • Loading branch information
skaduhs5232 committed Apr 29, 2024
1 parent c6e718f commit f75229a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/extensions/image/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ function convertToBase64(input: HTMLInputElement, editor: ExitusEditor) {
const maxHeight = img.height > 700 ? 700 : img.height
const maxWidth = img.width > 700 ? 700 : img.width
//let newHeight, newWidth;
const newDimension =
img.width > img.height
? { width: maxWidth, height: Math.round(maxWidth / (img.width / img.height)) }
: { width: maxHeight * (img.width / img.height), height: maxHeight }
// const newDimension =
img.width > img.height
? { width: maxWidth, height: Math.round(maxWidth / (img.width / img.height)) }
: { width: maxHeight * (img.width / img.height), height: maxHeight }

const canvas = document.createElement('canvas')

Expand Down

0 comments on commit f75229a

Please sign in to comment.