Skip to content

Commit

Permalink
--amend --no-edit
Browse files Browse the repository at this point in the history
  • Loading branch information
nglgzz committed Jul 17, 2017
1 parent f46ccbd commit 0d1738e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 0 additions & 1 deletion d3.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export {
select,
drag,
event,
nest,
zoom,
zoomIdentity,
} from 'd3';
5 changes: 3 additions & 2 deletions src/parser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const parseNode = (node) => {
url: getURL(node.title.text),
fx: node.location.x,
fy: node.location.y,
// eslint-disable-next-line no-use-before-define
nodes: parseSubnodes(node.nodes),
};

Expand Down Expand Up @@ -102,7 +103,7 @@ const parseNode = (node) => {
* subnodes will be the same. The only difference is a color attribute on
* subnodes, which has a string with a valid CSS color format.
*/
const parseSubnodes = (subnodes) => (
const parseSubnodes = subnodes => (
subnodes.map((subnode) => {
const parsedSub = parseNode(subnode);

Expand Down Expand Up @@ -165,7 +166,7 @@ walkDir(input, (map, filename) => {
let trigger = map.trigger;

if (splitTitle[splitTitle.length - 1].trim(' ') === trigger) {
trigger = ''
trigger = '';
}

const parsedMap = {
Expand Down
5 changes: 3 additions & 2 deletions src/utils/d3.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { drag, event, nest, select, zoom } from 'd3';
import { getDimensions, getViewBox } from './dimensions';
import { drag, event, zoom } from 'd3';
import { getViewBox } from './dimensions';

/*
* Bind data to a <TAG> tag, inside a G element, inside the given root element.
Expand All @@ -21,6 +21,7 @@ export const d3Connections = (svg, connections) => (
.attr('class', 'mindmap-connection')
);

/* eslint-disable no-param-reassign */
/*
* Bind nodes to FOREIGNOBJECT tags on the given SVG,
* and set dimensions and html.
Expand Down
4 changes: 2 additions & 2 deletions src/utils/subnodesToHTML.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const subnodesToHTML = (subnodes, fcolor) => {
color = `style="border-left-color: ${subnodes[0].color}"`;
}

return subnodes.map(subnode => {
return subnodes.map((subnode) => {
let href = `href="${subnode.url}"`;
let emoji = categoryToIMG(subnode.category);

Expand All @@ -24,7 +24,7 @@ const subnodesToHTML = (subnodes, fcolor) => {
return `<div class="mindmap-subnode-group" ${color}>
<a ${href}>${subnode.text || ''} ${emoji}</a>
<div>${subnodesToHTML(subnode.nodes, color)}</div>
</div>`
</div>`;
}).join('');
};

Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
},

resolve: {
alias: { 'd3': path.resolve(__dirname, 'dist/d3.min.js') },
alias: { d3: path.resolve(__dirname, 'dist/d3.min.js') },
},

externals: {
Expand Down

0 comments on commit 0d1738e

Please sign in to comment.