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

Make the axis label and gridline colors configurable #113

Merged
merged 5 commits into from
Jun 24, 2015

Conversation

ziggythehamster
Copy link
Contributor

This also fixes a regression from the KineticJS upgrade, which broke painting the axis in anything other than black. Using setAttr on the context makes it work as expected and now the axis is painted in the correct color.

@ziggythehamster ziggythehamster changed the title Make the axis labels and colors configurable Make the axis label and gridline colors configurable Apr 2, 2015
@@ -37,6 +37,7 @@
"license": "LGPL 3",
"scripts": {
"build": "browserify -d ./src/main.js -p [minifyify --map peaks.min.map --output peaks.min.map] -s peaks -o peaks.min.js",
"build-max": "browserify ./src/main.js -s peaks -o peaks.js",
Copy link
Contributor

Choose a reason for hiding this comment

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

What is build-max done for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I take the outputted peaks.js file and drop it into a Broccoli pipeline which minifies it and inlines it with my other JavaScript. It does not work very well when it tries to minify the already minified version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, I didn't intend for that commit to make it to this PR, but it doesn't hurt anything for it to be there ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

It does not, but it does not help to carry over more and more things without a need.

I agree though building a non-minified artefact can be useful :-)

@thom4parisot
Copy link
Contributor

Thanks a lot. If I understand well, context would not pick the change unless setAttr is called?

@ziggythehamster
Copy link
Contributor Author

Correct - context in this case is actually a Kinetic/Konva object rather than a native canvas, and setting the property doesn't actually do anything unless you use Kinetic/Konva's API to set it (setAttr).

@thom4parisot
Copy link
Contributor

👍

thom4parisot pushed a commit that referenced this pull request Jun 24, 2015
Make the axis label and gridline colors configurable
@thom4parisot thom4parisot merged commit 6a6eb16 into bbc:master Jun 24, 2015
@ziggythehamster ziggythehamster deleted the configurable-axis-colors branch June 24, 2015 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants