Skip to content

Commit

Permalink
26.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Dec 27, 2024
1 parent 32923e3 commit bf28489
Show file tree
Hide file tree
Showing 82 changed files with 11,988 additions and 12,776 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
27-DEC-2024: 26.0.0

- Updates DOMPurify from 3.2.2 to 3.2.3
- Adds dark mode specific colour scheme

05-DEC-2024: 25.0.3

- Adds entering custom zoom via toolbar in simple UI
- Adds back jszip to deployment

03-DEC-2024: 25.0.2

- Internal release
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
25.0.2
26.0.0
12 changes: 9 additions & 3 deletions etc/build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
<property file="build.properties" />
<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask" classpath="${jscompiler}" />

<target name="atlas">
<target name="merge">
</target>

<target name="app" depends="merge">
</target>

<target name="atlas" depends="app">
<concat destfile="${war.dir}/js/atlas-viewer.min.js" fixlastline="yes" append="no">
<file name="${basedir}/base-viewer.min.js" />
<file name="${war.dir}/js/orgchart.min.js" />
Expand Down Expand Up @@ -70,9 +76,9 @@
<delete file="${basedir}/base-viewer.min.js"/>
</target>

<target name="war" depends="javac" description="Create the stand-alone war file">
<target name="war" depends="app, javac" description="Create the stand-alone war file">
<zip destfile="${build.dir}/${war.name}" basedir="${war.dir}" >
</zip>
</target>

</project>
</project>
5 changes: 2 additions & 3 deletions etc/dependencies/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
"mermaid": "11.2.0",
"pako": "2.1.0",
"crypto-js": "3.1.2",
"dompurify": "3.2.2",
"dompurify": "3.2.3",
"spin.js": "2.0.0",
"roughjs": "4.6.6",
"mathjax": "3.2.2",
"jscolor": "^3.8.0"
"mathjax": "3.2.2"
}
}

Binary file removed src/main/webapp/images/hs.png
Binary file not shown.
Binary file removed src/main/webapp/images/hv.png
Binary file not shown.
5 changes: 0 additions & 5 deletions src/main/webapp/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5" ><![endif]-->
<!DOCTYPE html>
<html>
<head>
Expand Down Expand Up @@ -394,14 +393,10 @@
background-color:transparent;
}
.geEditor ::-webkit-scrollbar-thumb {
background-color:rgba(0,0,0,.1);
background-clip:padding-box;
border:solid transparent;
border-radius:10px;
}
.geEditor ::-webkit-scrollbar-thumb:hover {
background-color:rgba(0,0,0,.4);
}
.geTemplate {
border:1px solid transparent;
display:inline-block;
Expand Down
6,728 changes: 3,359 additions & 3,369 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/main/webapp/js/diagramly/ElectronApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,11 @@ mxStencilRegistry.allowEval = false;

if (currentFile != null)
{
if (editorUi.editor.graph.isEditing())
{
editorUi.editor.graph.stopEditing();
}

reply.isModified = currentFile.isModified();
reply.draftPath = EditorUi.enableDrafts && currentFile.fileObject? currentFile.fileObject.draftFileName : null;
}
Expand Down
80 changes: 64 additions & 16 deletions src/main/webapp/js/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ function render(data)
//Electron pdf export
if (mxIsElectron)
{
try
try
{
electron.registerMsgListener('get-svg-data', (arg) =>
{
Expand All @@ -384,16 +384,14 @@ function render(data)
{
bg = null;
}

if (data.theme == 'dark')

var theme = 'auto';

if (data.theme != null)
{
// TODO Support enableCssDarkMode?
graph.shapeForegroundColor = Editor.lightColor;
graph.shapeBackgroundColor = Editor.darkColor;
graph.stylesheet = graph.getDefaultStylesheet();
graph.refresh();
theme = data.theme;
}

var linkTarget = null;

if (data.linkTarget == 'same-win')
Expand All @@ -405,7 +403,8 @@ function render(data)
linkTarget = '_blank';
}

var svgRoot = graph.getSvg(bg, expScale, 0, false, null, true, null, null, linkTarget);
var svgRoot = graph.getSvg(bg, expScale, data.border, false, null,
true, null, null, linkTarget, null, null, theme);

if (graph.shadowVisible)
{
Expand All @@ -430,18 +429,67 @@ function render(data)
svgRoot.setAttribute('content', getFileXml());
}

electron.sendMessage('svg-data', Graph.xmlDeclaration + '\n' + ((editable) ? Graph.svgFileComment + '\n' : '') +
Graph.svgDoctype + '\n' + mxUtils.getXml(svgRoot));
electron.sendMessage('svg-data',
Graph.xmlDeclaration + '\n' +
((editable) ? Graph.svgFileComment + '\n' : '') +
Graph.svgDoctype + '\n' + mxUtils.getXml(svgRoot));
};

if (data.embedImages == '1')
function embedFontsDone()
{
var tmpEditor = new Editor();
tmpEditor.convertImages(svgRoot, doSend);
if (data.embedImages == '1')
{
var tmpEditor = new Editor();
tmpEditor.convertImages(svgRoot, doSend);
}
else
{
doSend();
}
}

if (data.embedFonts == '1')
{
var extFonts = graph.getCustomFonts();

// Adds external fonts
// TODO CSP will not allow external fonts!
if (extFonts.length > 0)
{
var svgDoc = svgRoot.ownerDocument;
var style = (svgDoc.createElementNS != null) ?
svgDoc.createElementNS(mxConstants.NS_SVG, 'style') : svgDoc.createElement('style');
(svgDoc.setAttributeNS != null) ? style.setAttributeNS('type', 'text/css') :
style.setAttribute('type', 'text/css');

var prefix = '';
var postfix = '';

for (var i = 0; i < extFonts.length; i++)
{
var fontName = extFonts[i].name, fontUrl = extFonts[i].url;

if (Graph.isCssFontUrl(fontUrl))
{
prefix += '@import url(' + Graph.rewriteGoogleFontUrl(fontUrl) + ');\n';
}
else
{
postfix += '@font-face {\n' +
'font-family: "' + fontName + '";\n' +
'src: url("' + fontUrl + '");\n}\n';
}
}

style.appendChild(svgDoc.createTextNode(prefix + postfix));
svgRoot.getElementsByTagName('defs')[0].appendChild(style);
}

EditorUi.prototype.replaceAlternateContent(svgRoot, null, embedFontsDone);
}
else
{
doSend();
embedFontsDone();
}
});

Expand Down
Loading

0 comments on commit bf28489

Please sign in to comment.