Skip to content

Commit

Permalink
chore: remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
micahg committed Aug 25, 2024
1 parent 9f0218d commit 1565630
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions packages/mui/src/utils/geometry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,34 +230,6 @@ export function zoomFromViewport(
return Math.max(zW, zH);
}

// // unrotate canvas
// const [cW, cH] = rotatedWidthAndHeight(
// -_angle,
// _canvas.width,
// _canvas.height,
// );
// const zW = _img.width / cW;
// const zH = _img.height / cH;

// // set zoom and offset x or y to compensate for viewport
// // aspect ratios that are different from the screen
// if (zH > zW) {
// _zoom = zH;
// const adj = cW * _zoom;
// if (adj < _fullRotW) {
// // its fucked to let x go negative, but calculateViewport compensates... on the other hand,
// // we only call this in display mode, so we could move the logic to calculateViewport
// _img.x -= (adj - _img.width) / 2;
// }
// } else {
// _zoom = zW;
// const adj = cH * _zoom;
// if (adj < _fullRotH) {
// // its fucked to let y go negative, but calculateViewport compensates... on the other hand,
// // we only call this in display mode, so we could move the logic to calculateViewport
// _img.y -= (adj - _img.height) / 2;
// }
// }
export function adjustImageToViewport(
angle: number,
zoom: number,
Expand Down

0 comments on commit 1565630

Please sign in to comment.