mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-18 11:44:07 +01:00
Fix for issue #175
This commit is contained in:
@@ -27,7 +27,10 @@ module.exports.draw = function (text, id) {
|
||||
gantt.yy.clear();
|
||||
gantt.parse(text);
|
||||
var elem = document.getElementById(id);
|
||||
w = elem.offsetWidth;
|
||||
w = elem.parentElement.offsetWidth;
|
||||
|
||||
console.log('id='+id,' w='+w);
|
||||
console.log(elem.parentElement);
|
||||
|
||||
if (typeof w === 'undefined') {
|
||||
w = 1200;
|
||||
|
||||
Reference in New Issue
Block a user