Merge pull request #1203 from mermaid-js/develop

Release
This commit is contained in:
Sidharth Vinod
2023-04-19 19:49:57 +05:30
committed by GitHub
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -5,6 +5,7 @@ describe('Auto sync tests', () => {
cy.clearLocalStorage();
cy.visit('/');
cy.url().should('contain', '/edit#pako');
cy.window().should('have.property', 'editorLoaded', true);
});
it('should dim diagram when code is edited', () => {
+7 -1
View File
@@ -30,6 +30,7 @@
const newText = editorMode === 'code' ? code : mermaid;
if (newText !== text) {
// console.log('updating editor text', newText);
editor.setScrollTop(0);
editor.setValue(newText);
text = newText;
}
@@ -143,7 +144,12 @@
if (divEl.parentElement) {
resizeObserver.observe(divEl.parentElement);
}
// console.log(`editor mounted`);
// @ts-ignore
if (window.Cypress) {
// @ts-ignore
window.editorLoaded = true;
}
return () => {
// console.log(`editor disposed`);
editor?.dispose();