Skip to content

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

Merged
archmoj merged 42 commits into
masterfrom
issue-br3d
Nov 19, 2018
Merged

archmoj merged 42 commits into
masterfrom
issue-br3d

Conversation

@archmoj

@archmoj archmoj commented Nov 2, 2018 •

Copy link
Copy Markdown
Contributor

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
Comment thread package.json Outdated
"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
Copy Markdown
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
Comment thread package-lock.json Outdated
"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
Copy Markdown
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
Copy Markdown
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

archmoj commented Nov 14, 2018

Copy link
Copy Markdown
Contributor Author

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 : )

Comment thread package.json Outdated
"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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread 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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread package.json Outdated
"gl-plot3d": "git://github.com/gl-vis/gl-plot3d.git#99bd1d20bcec61bdba97cd86bcb2cd5b8b52bd17",
"gl-pointcloud2d": "^1.0.1",
"gl-scatter3d": "^1.0.14",
"gl-scatter3d": "git://github.com/gl-vis/gl-scatter3d.git#4353e3493e4e64d363c334fb62ac3e054c50fbf3",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@archmoj

archmoj commented Nov 19, 2018

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

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

Comment thread package-lock.json Outdated
"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
Copy Markdown
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
Copy Markdown
Contributor

Great PR 💃

@etpinard

Copy link
Copy Markdown
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