diff options
author | Wu Cheng-Han | 2015-12-24 01:01:02 -0600 |
---|---|---|
committer | Wu Cheng-Han | 2015-12-24 01:01:02 -0600 |
commit | 48de9a02a327d539457c2889d7de5fe8c6cd821d (patch) | |
tree | d61116ee2ef1656fd3dd8449e7207d1b84c0bb5c /public | |
parent | 48d5889a30ea7a16f724a9222e8df7b365edb307 (diff) |
Fixed sequence diagram might render multiple times
Diffstat (limited to '')
-rw-r--r-- | public/js/extra.js | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/public/js/extra.js b/public/js/extra.js index e8f7f5d0..efc89ccb 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -138,15 +138,18 @@ function finishView(view) { } } catch (err) {} //sequence diagram - var sequence = view.find(".sequence-diagram.raw").removeClass("raw"); - try { - sequence.sequenceDiagram({ - theme: 'simple' - }); - sequence.parent().parent().replaceWith(sequence); - } catch (err) { - console.error(err); - } + var sequences = view.find(".sequence-diagram.raw").removeClass("raw"); + sequences.each(function (key, value) { + try { + var sequence = $(value); + sequence.sequenceDiagram({ + theme: 'simple' + }); + sequence.parent().parent().replaceWith(sequence); + } catch (err) { + console.error(err); + } + }); //flowchart var flow = view.find(".flow-chart.raw").removeClass("raw"); flow.each(function (key, value) { |