Skip to content

Commit

Permalink
Addressing further comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fkurmannucsc committed Jun 27, 2024
1 parent c5d0833 commit 427569f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,10 @@ function flipScreenshot(screenshot_id, flip_vertical) {

if (flip_vertical) {
direction = 'flipped_vertically';
scale_x = 1, scale_y = -1;
draw_x = 0, draw_y = -img.naturalHeight;
scale_x = 1;
scale_y = -1;
draw_x = 0;
draw_y = -img.naturalHeight;
}

let canvas = document.createElement('canvas');
Expand Down Expand Up @@ -397,9 +399,7 @@ function takeScreenshot(source, x, y, width, height, format = 'image/jpeg') {
}

function deleteScreenshot(screenshot_id) {
// Find screenshot area to remove.
document.querySelector(`.screenshot[data-id="${screenshot_id}"]`).remove();

delete window.shark.screenshots[screenshot_id];
}

Expand Down

0 comments on commit 427569f

Please sign in to comment.