[Finishes #98332908] setImageURL shouldn't resize#3019
Merged
Conversation
Contributor
|
Nit: maybe |
Contributor
Author
|
Seems like there might still be an issue here, so I'm going to spend a little more time looking at this Monday. |
Contributor
Author
|
The original fix wasn't working, because over the course of run/reset we would apparently end up calling onPropertyChange for image. This would then create a new onload function. Each instance would only be called once, but because we could have multiple instances, we were still getting into cases where setting via the API would change the size. New approach is that we only create our onload function when setting to a new URL. Tested the following cases:
|
Contributor
Author
|
Note: Diff looks bigger than it is. Really I'm just wrapping the onload = function() in an if block. |
Contributor
|
LGTM. |
Bjvanminnen
added a commit
that referenced
this pull request
Jul 6, 2015
[Finishes #98332908] setImageURL shouldn't resize
deploy-code-org
added a commit
that referenced
this pull request
Jul 6, 2015
commit 29d37cd Merge: 3df4252 a42a3da Author: Bjvanminnen <Bjvanminnen@gmail.com> Date: Mon Jul 6 12:03:12 2015 -0700 Merge pull request #3019 from code-dot-org/imageResize [Finishes #98332908] setImageURL shouldn't resize commit 3df4252 Author: Continuous Integration <dev@code.org> Date: Mon Jul 6 18:33:40 2015 +0000 Automatically built. commit 370f507 Author: Brent Van Minnen <bjvanminnen@gmail.com> Date: Mon Jul 6 11:35:10 2015 -0700 Revert "Merge pull request #2992 from code-dot-org/apps-digest" This reverts commit 6ad6441, reversing changes made to fac267e. commit 370f507 Author: Brent Van Minnen <bjvanminnen@gmail.com> Date: Mon Jul 6 11:35:10 2015 -0700 Revert "Merge pull request #2992 from code-dot-org/apps-digest" This reverts commit 6ad6441, reversing changes made to fac267e.
deploy-code-org
added a commit
that referenced
this pull request
Jul 6, 2015
commit a05fd0f Merge: db4cf08 20b544a Author: Bjvanminnen <Bjvanminnen@gmail.com> Date: Mon Jul 6 12:28:54 2015 -0700 Merge pull request #3023 from code-dot-org/sharingCodeless able to properly share project without code commit db4cf08 Author: Continuous Integration <dev@code.org> Date: Mon Jul 6 19:10:55 2015 +0000 Automatically built. commit 29d37cd Merge: 3df4252 a42a3da Author: Bjvanminnen <Bjvanminnen@gmail.com> Date: Mon Jul 6 12:03:12 2015 -0700 Merge pull request #3019 from code-dot-org/imageResize [Finishes #98332908] setImageURL shouldn't resize commit 3df4252 Author: Continuous Integration <dev@code.org> Date: Mon Jul 6 18:33:40 2015 +0000 Automatically built. commit 370f507 Author: Brent Van Minnen <bjvanminnen@gmail.com> Date: Mon Jul 6 11:35:10 2015 -0700 Revert "Merge pull request #2992 from code-dot-org/apps-digest" This reverts commit 6ad6441, reversing changes made to fac267e. commit 370f507 Author: Brent Van Minnen <bjvanminnen@gmail.com> Date: Mon Jul 6 11:35:10 2015 -0700 Revert "Merge pull request #2992 from code-dot-org/apps-digest" This reverts commit 6ad6441, reversing changes made to fac267e.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We would have API code call setImageURL. This would result on us hitting the onload that we still had floating around from design mode on the element, which does a resize. We don't want to hit this onload other than the once, so clear it out as soon as we hit it.