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

Click keyword does not fire my callback (Vue.Js) #731

Closed
seansabour opened this issue Sep 12, 2018 · 2 comments
Closed

Click keyword does not fire my callback (Vue.Js) #731

seansabour opened this issue Sep 12, 2018 · 2 comments
Labels
Type: New Shape Request for new shape

Comments

@seansabour
Copy link

I'm hitting an issue where mermaid is not firing my callback

<template>
  <div class="panel-body points demo flow_chart mermaid" id="points" >
    graph LR
      id1((Start))
      click id1 test "wooo"
      id1-->id2
  </div>
</template>

<script>

  import mermaid from "mermaid"

  export default {
    name: 'Workflows',
    methods: {
      test() {
        alert("I was clicked")
      }
    },
    mounted() {
      mermaid.initialize({startOnLoad:true});
    }
  }
</script>

<style>

</style>

I've also tried to change test to this.test with no luck.

@anasameur
Copy link

anasameur commented May 6, 2019

test callback have to be declared on the windows object something like this

<script>

  import mermaid from "mermaid"

  export default {
    name: 'Workflows',
    methods: {
    },
    mounted() {
      mermaid.initialize({startOnLoad:true});
      windows.test = () => {
              alert("I was clicked")
        }
    }
  }
</script>

@stale
Copy link

stale bot commented Jul 5, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 5, 2019
@ThePenguin1140 ThePenguin1140 added Type: New Shape Request for new shape and removed wontfix labels Jul 6, 2019
knsv added a commit that referenced this issue Jul 21, 2019
mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
Bumps [cssnano](https://github.com/cssnano/cssnano) from 5.1.5 to 5.1.7.
- [Release notes](https://github.com/cssnano/cssnano/releases)
- [Commits](https://github.com/cssnano/cssnano/compare/cssnano@5.1.5...cssnano@5.1.7)

---
updated-dependencies:
- dependency-name: cssnano
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Shape Request for new shape
Projects
None yet
Development

No branches or pull requests

3 participants