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

Arrows endings are missing #419

Closed
sarankup opened this issue Nov 27, 2016 · 1 comment
Closed

Arrows endings are missing #419

sarankup opened this issue Nov 27, 2016 · 1 comment

Comments

@sarankup
Copy link

Hi,

Based on my page, users will keep modifying some of the value and I build the graph text in a variable (wscriptstr) and then pass it to render it as graph. Here is my code. All works well except the arrow ending. Please advise how to fix.

function renderchart(){
removechart();
var callback=function(code,bindEvents){
$("#id1").html(code);
bindEvents();
};
mermaidAPI.render('id1',wscriptstr,callback);
console.log('Chart rendered...');
}

function removechart(){
$('#id1').remove();
$('#idroot').html('

');
}

@sarankup
Copy link
Author

sarankup commented Nov 27, 2016

Hi,

I could solve this. It looks the mermaidAPI.render requires a new document element every time. If we pass the element which was already processed caused this issue. Here is the way, I could solve this issue.

`
function guid(){return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();}
function s4(){return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);}

function renderchart(){
$('#'+oldgraphid).remove();
oldgraphid='id'+guid();
$('#idroot').html('<div id="'+oldgraphid+'"></div>');
mermaidAPI.render(oldgraphid,wscriptstr,function(code,bindEvents){
$("#"+oldgraphid).html(code);
bindEvents();
});
console.log('Chart rendered...');
}
`

mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
)

Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.3.5 to 10.3.6.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](postcss/autoprefixer@10.3.5...10.3.6)

---
updated-dependencies:
- dependency-name: autoprefixer
  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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants