Skip to content

Commit

Permalink
fix: usr: fixed mxgraph viewer patch (refs #105)
Browse files Browse the repository at this point in the history
Fixed the patch of the viewer of diagrams in XML format, caused by a
recent change in the Drawio scripts.
  • Loading branch information
Michele Tessaro committed May 14, 2022
1 parent 13658fd commit 76a60a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/javascripts/drawioEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ window.onDrawioViewerLoad = function() {

// Patch the code `mxEvent.addListener(g,"click",b)`
var code = GraphViewer.prototype.addToolbar.toString();
var searchRegex = /mxEvent\.addListener\(([a-zA-Z]),"click",([a-zA-Z])\)/;
var searchRegex = /mxEvent\.addListener\(([a-zA-Z]+),"click",([a-zA-Z]+)\)/;
var replaceRules = "mxEvent.addListener($1,\"click\",(typeof($2)==='string'?eval($2):$2))";

code = code.replace(searchRegex, replaceRules);
Expand Down
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name 'Redmine Drawio plugin'
author 'Michele Tessaro'
description 'Wiki macro plugin for inserting drawio diagrams into Wiki pages and Issues'
version '1.3.0'
version '1.3.1'
url 'https://github.com/mikitex70/redmine_drawio'
author_url 'https://github.com/mikitex70'

Expand Down

0 comments on commit 76a60a2

Please sign in to comment.