-
Notifications
You must be signed in to change notification settings - Fork 38
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
Newbie question: How to use without doing "grunt dist" #33
Comments
Some debugging shows that the reason for the exception is that viz is undefined in https://github.com/mstefaniuk/graph-viz-d3-js/blob/master/src/js/transformer.js#L6 To me, this is strange since viz loads without problems: |
To be honest I usually try to define test for changes in this component and then I'm using it in graphviz.it website. If you want to use non-minified versions directly I suppose you should to add path to viz.js. Bundled worker has inlined this library. |
viz.js is found as it is. I've added an explicit path to it, but the problem persists. The problem is not that it in not found. The problem seems to have something to to with how it's initialized. That's why the viz argument to the function in I can have a look at the development setup for graphviz.it for clues. What do you mean with "undled worker has inlined this library.". Is it that the code is incorporated in dist/layout-worker.js? |
Exactly. I had problem you mentioned for long time and solved it in that way. But to reiterate - I would prefer to add a test for output result in rendering component instead of testing it through |
While developing/debugging, it would be nice to have shorter iterations that the one minute it takes to "grunt dist". I tried "grunt build" and used:
But in Chrome Version 57.0.2987.110 (64-bit) on Ubuntu 14.04, I get:
layout-worker.js:18 Uncaught DOMException: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': TypeError: viz is not a function could not be cloned.
at onmessage (http://madrox.netinsight.se:8084/bower_components/graphviz-d3-renderer/src/js/layout-worker.js:18:9)
layout-worker.js:18 Uncaught DataCloneError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': TypeError: viz is not a function could not be cloned.
And with Firefox 48.0 on Ubuntu 14.04, I get:
DataCloneError: The object could not be cloned.layout-worker.js:18
Is there a better way? graphviz.it has "grunt development", but not graph-viz-d3-js
The text was updated successfully, but these errors were encountered: