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

Additional trimming and padding options #235

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

aidenfoxx
Copy link

@aidenfoxx aidenfoxx commented Sep 16, 2023

Description

Adds the ability to:

  • Constrain the trim operation to a specific axis ("Horizontal" or "Vertical"), defaulting to "Both"
  • Separately specify the X and Y values of the padding option

The impetus for the change was to enable better exporting of game assets such as text, where the height may need to remain the same, but the width should be constrained to the content.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • This change requires a documentation update

image

Comment on lines +3555 to -3458
var lblContact = dialog.add("group", undefined , {name: "lblContact"});
lblContact.getText = function() { var t=[]; for ( var n=0; n<lblContact.children.length; n++ ) { var text = lblContact.children[n].text || ''; if ( text === '' ) text = ' '; t.push( text ); } return t.join('\n'); };
lblContact.orientation = "column";
lblContact.alignChildren = ["center","center"];
lblContact.spacing = 0;

lblContact.add("statictext", undefined, "To get the most recent version, or leave feedback, go to:", {name: "lblContact"});
lblContact.add("statictext", undefined, "https://github.com/antipalindrome/Photoshop-Export-Layers-to-Files-Fast", {name: "lblContact"});
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why this changed when importing the updated UI.

@@ -1361,7 +1422,7 @@ function showDialog() {
fields.txtScale.onChange = function() {
var scaleNum = parseInt(this.text, 10);
if (isNaN(scaleNum)) {
scaleNum = prefs.paddingValue;
scaleNum = prefs.scaleValue;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this was previously a copypasta mistake?

@aidenfoxx aidenfoxx marked this pull request as ready for review September 16, 2023 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant