diff --git a/pom.xml b/pom.xml index b12db0a..da06d3e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.zenuml confluence-addon - 1.0.8 + 1.0.9 P and D Vision https://www.zenuml.com/ diff --git a/src/main/resources/atlassian-plugin.xml b/src/main/resources/atlassian-plugin.xml index 4056f96..3fe7c34 100644 --- a/src/main/resources/atlassian-plugin.xml +++ b/src/main/resources/atlassian-plugin.xml @@ -15,21 +15,24 @@ - com.atlassian.auiplugin:ajs - com.atlassian.auiplugin:dialog2 - confluence.editor.actions:editor-macro-browser - - - - - editor + + + + com.atlassian.auiplugin:ajs + com.atlassian.auiplugin:dialog2 + confluence.editor.actions:editor-macro-browser + + + + + atl.general diff --git a/src/main/resources/js/macro-customise.js b/src/main/resources/js/macro-customise.js index c6f8af9..318ea51 100644 --- a/src/main/resources/js/macro-customise.js +++ b/src/main/resources/js/macro-customise.js @@ -47,9 +47,9 @@ AJS.$(document).ready(function () { // return a dom node list function getAllShadowElements() { var elements = []; - AJS.$('sequence-diagram').each(function () { - if (this.shadowRoot.querySelector(".sequence-diagram-container")) { - elements.push(this.shadowRoot.querySelector(".sequence-diagram-container")) + AJS.$('diagram-as-code').each(function () { + if (this.shadowRoot.querySelector(".diagram-as-code.noEditor>.split>.sequence-diagram")) { + elements.push(this.shadowRoot.querySelector(".sequence-diagram")) } }); return elements; @@ -62,17 +62,14 @@ AJS.$(document).ready(function () { if (doms.length > 0) { var dslList = []; doms.forEach(function (dom) { - var dslEls = AJS.$(dom).find('.zenuml-dsl'); - if (dslEls.length > 0) { - var dslText = dslEls.text(); - // remove duplicate when upload mutiple same uml at the same time - if (dslList.indexOf(dslText) < 0) { - objects.push({ - dsl: dslText, - domtoimagePromise: domtoimage.toBlob(dom, { bgcolor: 'white' }) - }); - dslList.push(dslText); - } + var dslText = dom.__vue__.$store.state.code; + // remove duplicate when upload mutiple same uml at the same time + if (dslList.indexOf(dslText) < 0) { + objects.push({ + dsl: dslText, + domtoimagePromise: domtoimage.toBlob(dom, { bgcolor: 'white' }) + }); + dslList.push(dslText); } }) }