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

viewGenerator key being dropped in config merge #142

Closed
gregorykan opened this issue Oct 29, 2018 · 4 comments
Labels

Comments

@gregorykan
Copy link

@gregorykan gregorykan commented Oct 29, 2018

hi! i just noticed that viewGenerator was being lost in a merge in initializeGraphState in graph.helper.js:

var newConfig = Object.assign({}, _utils2.default.merge(_graph5.default, config || {}));

adding the viewGenerator key to graph.config.js seemed to fix the issue.

@LonelyPrincess

This comment has been minimized.

Copy link
Collaborator

@LonelyPrincess LonelyPrincess commented Oct 29, 2018

Hi there!

OMG, this is strange... 🤔 I would have sworn I fixed that when we closed #130. Is that issue any different from what you're saying? In the pull request I submitted for that bug I added the viewGenerator key to the global config object, so what you're reporting should no longer happen.

Could you give me more information on what you're trying? Are you using the latest master branch? The viewGenerator key was added to graph.config.js in this commit.

@gregorykan

This comment has been minimized.

Copy link
Author

@gregorykan gregorykan commented Oct 29, 2018

hi @LonelyPrincess ! thanks for following up. sorry i forgot to mention that basic information - i'm using 2.0.0-rc1.

so i could use master or wait for the next release?

@gregorykan

This comment has been minimized.

Copy link
Author

@gregorykan gregorykan commented Oct 29, 2018

after installing off the latest master, i tried running npm run dist:transpile but am getting:

react-d3-graph [master] :> npm run dist:transpile

> react-d3-graph@2.0.0-rc1 dist:transpile <project-path>/client/node_modules/react-d3-graph
> ./node_modules/babel-cli/bin/babel.js -d lib src

SyntaxError: src/components/graph/Graph.jsx: Unexpected token (132:15)
  130 |      * @returns {undefined}
  131 |      */
> 132 |     _onDragEnd = () =>
      |                ^
  133 |         !this.state.config.staticGraph &&
  134 |         this.state.config.automaticRearrangeAfterDropNode &&
  135 |         this.state.simulation.alphaTarget(this.state.config.d3.alphaTarget).restart();
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-d3-graph@2.0.0-rc1 dist:transpile: `./node_modules/babel-cli/bin/babel.js -d lib src`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the react-d3-graph@2.0.0-rc1 dist:transpile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     <user-path>/.npm/_logs/2018-10-30T00_12_01_990Z-debug.log
@gregorykan

This comment has been minimized.

Copy link
Author

@gregorykan gregorykan commented Dec 4, 2018

fixed in rc2

@gregorykan gregorykan closed this Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.