Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds crop selection presets (square, 3:2, 4:3, 5:4, 7:5, 16:9) #54

Merged
merged 3 commits into from
Oct 31, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reset state
  • Loading branch information
joelabair committed Aug 22, 2018
commit e11fb5961cb955c51be473bd2d21ebeb988e7fa9
5 changes: 4 additions & 1 deletion src/js/ui/crop.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class Crop extends Submenu {
*/
changeStandbyMode() {
this.actions.stopDrawingMode();
this.setPresetButtonActive();
}

/**
Expand All @@ -120,7 +121,9 @@ class Crop extends Submenu {
this._els[key].classList.remove('active');
}
});
this._els[preset].classList.add('active');
if (preset) {
this._els[preset].classList.add('active');
}
}
}

Expand Down