Skip to content

Conversation

@josenavas
Copy link
Contributor

This aligns the div under the network with the rest of the page.
Adds a function to make sure the a single line of a node label is no longer than 35 characters. If it is, it just changes the last space on that line by a new line.

@codecov-io
Copy link

Codecov Report

Merging #2441 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #2441   +/-   ##
=======================================
  Coverage   94.14%   94.14%           
=======================================
  Files         164      164           
  Lines       19390    19390           
=======================================
  Hits        18254    18254           
  Misses       1136     1136

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2246db2...e2a9e62. Read the comment docs.


/**
*
* Funtion to format the node labels so they don't overlap
Copy link
Member

Choose a reason for hiding this comment

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

Funtion -> Function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

var limit = 35;
// Split the input string by the space characters
var labelArray = label.split(' ');
// For the new label
Copy link
Member

Choose a reason for hiding this comment

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

For the new label? Not sure what it means ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

var newLabel = labelArray[0];
var aux;
var lastNewLineIdx = 0;
// Note that the foor loop starts with 1 because we have already used the
Copy link
Member

Choose a reason for hiding this comment

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

foor -> 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.

ok

var labelArray = label.split(' ');
// For the new label
var newLabel = labelArray[0];
var aux;
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need this variable declared here or can we just declare it within the for loop (line 27)?

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 prefer to declare it here rather than being it declared in each iteration of the for loop.

@antgonza antgonza merged commit 053d207 into qiita-spots:dev Dec 17, 2017
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