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

review issue. Update installation instructions. #1

Closed
andytwoods opened this issue Oct 23, 2018 · 1 comment
Closed

review issue. Update installation instructions. #1

andytwoods opened this issue Oct 23, 2018 · 1 comment

Comments

@andytwoods
Copy link

andytwoods commented Oct 23, 2018

As per openjournals/joss-reviews#1044 Functionality, Installation.

I couldnt get this to work:
https://github.com/davekinkead/reasons#embedding-reasons

I got it to work this the below. Perhaps you want to add an eg div instead of body though.

<html>
<body>
  <script src="reasons.js"></script>
  <script>
    let graph = [
        {id: 'p1', text: "Circular arguments work"},
        {id: 'c1', text: "Circular arguments work"},
        {from: 'p1', to: 'c1', type: "because"},
        {from: 'c1', to: 'p1', type: "because"}
      ]
    Reasons.mapper('body').render(graph)
  </script>
</body>
</html>
@davekinkead
Copy link
Owner

Thanks @andytwoods for taking the time to review this software.

The Reasons.mapper('element') function accepts any valid DOM reference. That could be a <body> tag with Reasons.mapper('body') or a <div id="map"> tag with Reasons.mapper('#map').

The readme has been updated to make this more explicit.

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

No branches or pull requests

2 participants