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

send width and height to the api-server #195

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yuhengd3
Copy link
Contributor

@yuhengd3 yuhengd3 commented Mar 1, 2020

@mjumbewu mjumbewu linked an issue Mar 1, 2020 that may be closed by this pull request
4 tasks
Comment on lines +63 to +67
var i, a;
for (i = 0; i < data.attachments.length; i++) {
a = data.attachments[i];
a.ratio = 100.0 * a.height / a.width;
}
Copy link
Member

Choose a reason for hiding this comment

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

@yuhengd3 What would you think about moving this into a separate function -- something like:

annotateWithAspectRatios: function(attachments) {
  var i, a;
  for (i = 0; i < data.attachments.length; i++) {
    a = data.attachments[i];
    a.ratio = 100.0 * a.height / a.width;
  }
},

Then from we could just call that from here:

this.annotateWithAspectRatios(data.attachments);

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.

Upload image size information
2 participants