Skip to content

Fix Firefox toImage failures #104

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

Merged
merged 3 commits into from
Dec 14, 2015
Merged

Fix Firefox toImage failures #104

merged 3 commits into from
Dec 14, 2015

Conversation

etpinard
Copy link
Contributor

@@ -114,7 +114,7 @@ module.exports = function toSVG(gd, format) {
// Is this an IE thing? Any other attributes or style elements that can have quotes in them?
// TODO: this looks like a noop right now - what happened to it?
var ff = txt.style('font-family');
if(ff && ff.indexOf('"') !== -1) txt.style('font-family', ff.replace(/"/g, '"'));
if(ff && ff.indexOf('"') !== -1) txt.style('font-family', ff.replace(/"/g, '\\\''));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexcjohnson could you comment of the comment above this line?

This patch makes toImage work in FF 42.

Copy link
Member

Choose a reason for hiding this comment

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

lets put a lot of comments here . I would link the codepen example and bug issue and even this PR # in the code. In one year when something else goes wrong here we will be glad of it :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm thinking this was needed for when we passed svg to the back end for image gen... Then we turned it to a noop when we started doing this same fix on the back end... Then it became moot when we started passing json.

@etpinard
Copy link
Contributor Author

This codepen was pretty helpful in figuring out this bug: http://codepen.io/etpinard/pen/bEdQWK

@bpostlethwaite
Copy link
Member

includes a codepen :)

double 👯 !

@bpostlethwaite
Copy link
Member

FYI @cpsievert this might fix the Rstudio png bug

etpinard added a commit that referenced this pull request Dec 14, 2015
@etpinard etpinard merged commit e8e7854 into master Dec 14, 2015
@etpinard etpinard deleted the firefox-toImage branch December 14, 2015 17:48
@etpinard etpinard mentioned this pull request Feb 29, 2016
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.

3 participants