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

fix setting image height/width from metadata #4853

Merged
merged 4 commits into from Jan 29, 2014
Merged

Conversation

minrk
Copy link
Member

@minrk minrk commented Jan 23, 2014

Needed updating after some recent metadata handling changes.

@ghost ghost assigned ellisonbg Jan 23, 2014
@damianavila
Copy link
Member

Test failed, maybe you can re-run it (there were false positive lately...)

@minrk
Copy link
Member Author

minrk commented Jan 25, 2014

Yup, it's a bit baffling because tests are all passing locally. I'll look into it in a bit.

@damianavila
Copy link
Member

Yes, I suppose that, because I read the code and it seems good to me...

@ellisonbg
Copy link
Member

Why use the native DOM setAttribute rather than jQuery's attr?

@Carreau
Copy link
Member

Carreau commented Jan 27, 2014

Why use the native DOM setAttribute rather than jQuery's attr?

Why use jQuery's attr when DOM's setAttribute works?

@ellisonbg
Copy link
Member

Because it is confusing when all the rest of our code uses jQuery for
things like this.

On Mon, Jan 27, 2014 at 10:53 AM, Matthias Bussonnier <
notifications@github.com> wrote:

Why use the native DOM setAttribute rather than jQuery's attr?

Why use jQuery's attr when DOM's setAttribute works?


Reply to this email directly or view it on GitHubhttps://github.com//pull/4853#issuecomment-33407546
.

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com

@minrk
Copy link
Member Author

minrk commented Jan 27, 2014

Matthias made this change as part of his load-performance PR, I didn't change anything about that. It avoids an unnecessary query when there is known to be only one relevant element. I'm not sure how much of an effect it has.

@ellisonbg
Copy link
Member

If attr works, I would prefer that.

@minrk
Copy link
Member Author

minrk commented Jan 27, 2014

I just did a performance test, and there seems to be no difference whatsoever between attr and setAttribute on one element (it's at most a single digit millisecond-level difference), so I will switch it back to attr.

when appending images.

This was an optimization with no apparent performance benefit.
@minrk
Copy link
Member Author

minrk commented Jan 27, 2014

tests are passing now.

@ellisonbg
Copy link
Member

+1 on merging.

ellisonbg added a commit that referenced this pull request Jan 29, 2014
fix setting image height/width from metadata
@ellisonbg ellisonbg merged commit 6e96761 into ipython:master Jan 29, 2014
@minrk minrk deleted the imgmd branch March 31, 2014 23:36
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
fix setting image height/width from metadata
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

4 participants