Skip to content

Commit

Permalink
fixed coding style problems
Browse files Browse the repository at this point in the history
  • Loading branch information
nglgzz committed Jun 21, 2017
1 parent 4adfa4a commit 98ecc41
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions sass/main.sass
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ body
padding: 15px
text-align: center
text-decoration: none
transition: background-color 0.2s ease-out
transition: background-color .2s ease-out

&[href]:hover
background-color: $grey500
cursor: pointer
&[href]
&:hover
background-color: $grey500
cursor: pointer

.mindmap-node--editable
cursor: all-scroll
Expand Down
1 change: 0 additions & 1 deletion src/parser/emojis.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const conversionTable = {
'🎥': 'youtube',
'🤖': 'reddit',
'🔗': '',
'🔗': undefined,
};

// Category to emoji table, based on the table above.
Expand Down
2 changes: 0 additions & 2 deletions src/parser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,5 +218,3 @@ walkDir(input, (map, filename) => {
}
});
});


4 changes: 2 additions & 2 deletions src/utils/d3.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const d3Connections = (svg, connections) => (
export const d3Nodes = (svg, nodes) => (
bindData(svg, nodes, 'foreignObject')
.attr('class', 'mindmap-node')
.attr('id', node => node.text.replace(/^[ ./~\-:]*\d*|[ ./~\-:]/g, ''))
.attr('id', node => node.text.replace(/^[ ./~\-:+]*\d*|[ ./~\-:+]/g, ''))
.attr('width', node => node.width + 4)
.attr('height', node => node.height)
.html(node => node.html)
Expand All @@ -42,7 +42,7 @@ export const d3Nodes = (svg, nodes) => (
export const d3Subnodes = (svg, subnodes) => {
// Nest subnodes by parent.
const nestedSubs = nest()
.key(sub => sub.parent.replace(/^[ ./~\-:]*\d*|[ ./~\-:]/g, '')).entries(subnodes);
.key(sub => sub.parent.replace(/^[ ./~\-:+]*\d*|[ ./~\-:+]/g, '')).entries(subnodes);

// Generate HTML and dimensions for each subnode group.
nestedSubs.forEach((subGroup) => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/nodeToHTML.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { categoryToIMG, emojiTemplate } from '../parser/emojis';
import { categoryToIMG } from '../parser/emojis';

/*
* Return the HTML representation of a node.
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ module.exports = {
commonjs: 'd3',
amd: 'd3',
},*/
},
},
};

0 comments on commit 98ecc41

Please sign in to comment.