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

Implementation of break lines, sub & superscripts and bold & italic styles in WebGL texts #3207

Merged
merged 42 commits into from
Nov 19, 2018

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Nov 2, 2018

This PR fixes plotly/plotly.R#1334 and plotly.js #3196 as well as #2551 and #1165 by enabling webgl texts to be drawn on multiple lines using < br > tags. Also another feature is added i.e. to enable using various styles namely italic, bold, sub and super script with webgl texts.
@etpinard
@alexcjohnson

@archmoj archmoj added bug something broken status: reviewable labels Nov 2, 2018
package.json Outdated
@@ -78,9 +78,9 @@
"gl-mat4": "^1.2.0",
"gl-mesh3d": "^2.0.1",
"gl-plot2d": "^1.3.1",
"gl-plot3d": "^1.5.10",
"gl-plot3d": "git://github.com/gl-vis/gl-plot3d.git#1c8aadc60eb026bd839f3c4e4a73dab719748843 ",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@archmoj archmoj changed the title Supporting break lines in texts in 3D scenes Implementation of break lines, sub & superscripts and bold & italic styles in WebGL texts Nov 4, 2018
@archmoj archmoj added feature something new and removed bug something broken labels Nov 4, 2018
@etpinard etpinard added this to the v1.43.0 milestone Nov 5, 2018
@@ -4554,7 +4539,7 @@
"glslify": "^6.1.0",
"robust-orientation": "^1.1.3",
"split-polygon": "^1.0.0",
"vectorize-text": "^3.0.0"
"vectorize-text": "git://github.com/archmoj/vectorize-text.git#457db88a269e6412c6f6007f1ba88d06bdfbc08c"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Link to corresponding PR on vectorize-text module
mikolalysenko/vectorize-text#8

@etpinard
Copy link
Contributor

@archmoj wait, how did go about removing the line break in date labels on 3D axis ticks? I don't anything in plotly.js. Did you disable <br> formatting for all 3D axis ticks?

I was imagining a small if-block in plotly.js that would remove <br> from data tick text values. That way, graphs like https://codepen.io/etpinard/pen/bQqjvw that use ticktext and tickvals could still appear on multiple lines in the tick labels.

I apologise if my comments weren't clear enough.

@archmoj
Copy link
Contributor Author

archmoj commented Nov 14, 2018

Thanks for the comment. I could easily control that in gl-axes3d and plotly.js side too.
And I am sure we could keep the vectorize-text this way as is more flexible now : )

package.json Outdated
@@ -77,10 +77,10 @@
"gl-line3d": "^1.1.5",
"gl-mat4": "^1.2.0",
"gl-mesh3d": "^2.0.1",
"gl-plot2d": "^1.3.1",
"gl-plot3d": "^1.5.10",
"gl-plot2d": "git://github.com/gl-vis/gl-plot2d.git#bd8a9798589ca4461604ca041479820d6a915103",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

package.json Outdated
"gl-plot2d": "^1.3.1",
"gl-plot3d": "^1.5.10",
"gl-plot2d": "git://github.com/gl-vis/gl-plot2d.git#bd8a9798589ca4461604ca041479820d6a915103",
"gl-plot3d": "git://github.com/gl-vis/gl-plot3d.git#99bd1d20bcec61bdba97cd86bcb2cd5b8b52bd17",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

package.json Outdated
"gl-pointcloud2d": "^1.0.1",
"gl-scatter3d": "^1.0.14",
"gl-scatter3d": "git://github.com/gl-vis/gl-scatter3d.git#4353e3493e4e64d363c334fb62ac3e054c50fbf3",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@archmoj
Copy link
Contributor Author

archmoj commented Nov 19, 2018

The modules are upgraded and the tests are passed on CI.
@etpinard Could I continue & resolve the conflicts before merge this?

@archmoj archmoj closed this Nov 19, 2018
@archmoj archmoj reopened this Nov 19, 2018
@etpinard
Copy link
Contributor

Yes go ahead and resolve the conflict in this PR. Thanks!

@@ -4804,7 +4804,7 @@
},
"gl-select-static": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/gl-select-static/-/gl-select-static-2.0.2.tgz",
"resolved": "http://registry.npmjs.org/gl-select-static/-/gl-select-static-2.0.2.tgz",
Copy link
Contributor

Choose a reason for hiding this comment

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

Please put back https here.

@etpinard
Copy link
Contributor

Great PR 💃

@etpinard
Copy link
Contributor

... make sure to close

once merged.

@archmoj archmoj merged commit 50ca29e into master Nov 19, 2018
@archmoj archmoj deleted the issue-br3d branch November 19, 2018 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Line breaks in 3D plot titles do not work
2 participants