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

wrap text to fit inside workflow step boxes #37

Merged
merged 3 commits into from
Oct 15, 2014
Merged

Conversation

zackgalbreath
Copy link
Contributor

@jeffbaumes This is still a WIP as it only works properly if the "Show Script" button has already been clicked before the workflow is selected. Nonetheless, I wanted to share it with you as-is to see if you have any suggestions on how to get this functionality working more robustly.

This is still a WIP as it only works properly if "Show Script"
button has already been clicked before the workflow is selected.
while (word = words.pop()) {
line.push(word);
tspan.text(line.join(" "));
if (tspan.node().getComputedTextLength() > width) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem is here: getComputedTextLength() returns zero when the editor div is hidden, presumably because it is of size 0x0.

@jeffbaumes
Copy link
Member

Thanks for doing this! Hope to get to this tomorrow.

@jeffbaumes
Copy link
Member

Fixed things up a bit and it should now be ready to merge.
screen shot 2014-10-15 at 2 22 38 pm

jeffbaumes added a commit that referenced this pull request Oct 15, 2014
wrap text to fit inside workflow step boxes
@jeffbaumes jeffbaumes merged commit c1996b4 into master Oct 15, 2014
@jeffbaumes jeffbaumes deleted the svg_wrap_text branch October 15, 2014 18:27
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.

2 participants