Skip to content

send width and height to the api-server#195

Open
yuhengd3 wants to merge 2 commits intoopenplans:masterfrom
yuhengd3:master
Open

send width and height to the api-server#195
yuhengd3 wants to merge 2 commits intoopenplans:masterfrom
yuhengd3:master

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

Comments