Skip to content

Commit

Permalink
20.4.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Sep 30, 2022
1 parent 6bb117b commit b725015
Show file tree
Hide file tree
Showing 34 changed files with 1,655 additions and 371 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
29-SEP-2022: 20.4.0

- [conf cloud] Fixed bug that instances without configuration store diagrams as compressed XML [DID-6387]
- Applies fill=stroke for some stencils [DS-918]
- Fixed image export text shift in lightbox [DID-6374]

27-SEP-2022: 20.3.7

- [conf cloud] Fixes conf pdf export of diagrams with () in their name
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
20.3.7
20.4.0
2 changes: 2 additions & 0 deletions etc/build/build.xml
Expand Up @@ -299,6 +299,7 @@
<file name="EditorUi.js" />
<file name="DiffSync.js" />
<file name="Settings.js" />
<file name="DrawioFilePuller.js" />
<file name="DrawioFileSync.js" />
<file name="App.js" />
<file name="Menus.js" />
Expand Down Expand Up @@ -382,6 +383,7 @@
<file name="EditorUi.js" />
<file name="DiffSync.js" />
<file name="Settings.js" />
<file name="DrawioFilePuller.js" />
<file name="DrawioFileSync.js" />
</sources>

Expand Down
275 changes: 152 additions & 123 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/main/webapp/js/diagramly/Devel.js
Expand Up @@ -239,6 +239,7 @@ mxscript(drawDevUrl + 'js/diagramly/Editor.js');
mxscript(drawDevUrl + 'js/diagramly/EditorUi.js');
mxscript(drawDevUrl + 'js/diagramly/DiffSync.js');
mxscript(drawDevUrl + 'js/diagramly/Settings.js');
mxscript(drawDevUrl + 'js/diagramly/DrawioFilePuller.js');
mxscript(drawDevUrl + 'js/diagramly/DrawioFileSync.js');

//Comments
Expand Down
14 changes: 14 additions & 0 deletions src/main/webapp/js/diagramly/DrawioFile.js
Expand Up @@ -1529,6 +1529,15 @@ DrawioFile.prototype.getLatestVersion = function(success, error)
success(null);
};

/**
* Hook for subclassers to get the latest version ID of this file
* and return it in the success handler.
*/
DrawioFile.prototype.getLatestVersionId = function(success, error)
{
success(-1);
};

/**
* Returns the last modified date of this file.
*/
Expand All @@ -1553,6 +1562,11 @@ DrawioFile.prototype.getCurrentRevisionId = function()
return this.getDescriptorRevisionId(this.getDescriptor());
};

DrawioFile.prototype.getPullingInterval = function()
{
return 10000;
};

/**
* Sets the current etag.
*/
Expand Down
52 changes: 52 additions & 0 deletions src/main/webapp/js/diagramly/DrawioFilePuller.js
@@ -0,0 +1,52 @@
DrawioFilePuller = function(file, sync)
{
this.file = file;
this.sync = sync;

};

DrawioFilePuller.prototype.start = function(pullingInterval)
{
var updateStatus = mxUtils.bind(this, function()
{
this.sync.lastModified = this.file.getLastModifiedDate();
this.sync.updateStatus();
});

this.intId = setInterval(mxUtils.bind(this, function()
{
this.file.getLatestVersionId(mxUtils.bind(this, function(latestVersionId)
{
if (latestVersionId != this.file.getCurrentRevisionId())
{
this.file.getLatestVersion(mxUtils.bind(this, function(latestFile)
{
this.file.mergeFile(latestFile, updateStatus);
}), mxUtils.bind(this, function()
{
// TODO Error handling
}));
}
else
{
updateStatus();
}
}), mxUtils.bind(this, function()
{
// TODO Error handling
}));
}), pullingInterval);

this._isConnected = true;
};

DrawioFilePuller.prototype.stop = function()
{
clearInterval(this.intId);
this._isConnected = false;
};

DrawioFilePuller.prototype.isConnected = function()
{
return this._isConnected;
};
33 changes: 32 additions & 1 deletion src/main/webapp/js/diagramly/DrawioFileSync.js
Expand Up @@ -301,8 +301,24 @@ DrawioFileSync.prototype.start = function()
this.key = this.file.getChannelKey();
}

if (this.pusher == null && this.channelId != null &&
var updateStatus = false;

if (DrawioFileSync.PULLING_MODE && this.puller == null &&
document.visibilityState != 'hidden')
{
if (this.puller == null)
{
this.puller = new DrawioFilePuller(this.file, this);
}

this.puller.start(this.file.getPullingInterval());
EditorUi.debug('DrawioFileSync.start (Pulling)', [this,
'v' + DrawioFileSync.PROTOCOL],
'rev', this.file.getCurrentRevisionId());
updateStatus = true;
}
else if (!DrawioFileSync.PULLING_MODE && this.pusher == null &&
this.channelId != null && document.visibilityState != 'hidden')
{
this.pusher = this.ui.getPusher();

Expand Down Expand Up @@ -337,6 +353,11 @@ DrawioFileSync.prototype.start = function()
this.installListeners();
}

updateStatus = true;
}

if (updateStatus)
{
window.setTimeout(mxUtils.bind(this, function()
{
this.lastModified = this.file.getLastModifiedDate();
Expand Down Expand Up @@ -428,6 +449,10 @@ DrawioFileSync.prototype.isConnected = function()
{
return this.pusher.connection.state == 'connected';
}
else if (this.puller != null)
{
return this.puller.isConnected();
}
else
{
return false;
Expand Down Expand Up @@ -2006,6 +2031,12 @@ DrawioFileSync.prototype.stop = function()
this.p2pCollab = null;
}
}
else if (this.puller != null)
{
EditorUi.debug('DrawioFileSync.stop (Pulling)', [this]);
this.puller.stop();
this.puller = null;
}

this.updateOnlineState();
this.updateStatus();
Expand Down
8 changes: 4 additions & 4 deletions src/main/webapp/js/diagramly/sidebar/Sidebar-Electrical.js
Expand Up @@ -713,7 +713,7 @@
20, 70, '', 'Permanent Magnet', null, null, this.getTagsForStencil(gnmess, 'permanent magnet', dtmem).join(' ')),
this.createVertexTemplateEntry(mem + 'thermal_element',
100, 32, '', 'Thermal Element', null, null, this.getTagsForStencil(gnmess, 'thermal element', dtmem).join(' ')),
this.createVertexTemplateEntry(mem + 'igniter_plug',
this.createVertexTemplateEntry(mem + 'igniter_plug2',
72, 39, '', 'Igniter Plug', null, null, this.getTagsForStencil(gnmess, 'igniter plug', dtmem).join(' ')),
this.createVertexTemplateEntry('shape=mxgraph.arrows2.arrow;verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;strokeWidth=1;dy=0;dx=10;notch=0;',
100, 30, '', 'Pickup Head', null, null, this.getTagsForStencil(gnmess, 'pickup head', dtmem).join(' ')),
Expand Down Expand Up @@ -759,9 +759,9 @@
53, 24, '', '2-Conductor Plug', null, null, this.getTagsForStencil(gnmess, '2 conductor plug two', dtmer).join(' ')),
this.createVertexTemplateEntry(mem + '3_conductor_plug',
53, 24, '', '3 Conductor Plug', null, null, this.getTagsForStencil(gnmess, '3 conductor plug', dtmer).join(' ')),
this.createVertexTemplateEntry(mem + 'normalled_jacks',
this.createVertexTemplateEntry(mem + 'normalled_jacks2',
230, 65, '', 'Normalled Jacks', null, null, this.getTagsForStencil(gnmess, 'normalled jacks', dtmer).join(' ')),
this.createVertexTemplateEntry(mem + 'normalled_jack',
this.createVertexTemplateEntry(mem + 'normalled_jack2',
110, 65, '', 'Normalled Jack', null, null, this.getTagsForStencil(gnmess, 'normalled jack', dtmer).join(' ')),
this.createVertexTemplateEntry(mem + 'coaxial_outside_conductor',
300, 150, '', 'Coaxial Outside Conductor', null, null, this.getTagsForStencil(gnmess, 'coaxial outside conductor', dtmer).join(' ')),
Expand Down Expand Up @@ -972,7 +972,7 @@
130, 130, '', 'Cable Group', null, null, this.getTagsForStencil(gnmetr, 'cable group', dtmetr).join(' ')),
this.createVertexTemplateEntry(metr + 'overground_enclosure;',
130, 136, '', 'Overground Enclosure', null, null, this.getTagsForStencil(gnmetr, 'overground enclosure', dtmetr).join(' ')),
this.createVertexTemplateEntry(metr + 'optical_fiber;',
this.createVertexTemplateEntry(metr + 'optical_fiber2;',
130, 80, '', 'Optical Fiber', null, null, this.getTagsForStencil(gnmetr, 'optical fiber', dtmetr).join(' ')),
this.createVertexTemplateEntry('verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;strokeWidth=1;shape=ellipse;',
10, 10, '', 'Terminal', null, null, this.getTagsForStencil(gnmetr, 'terminal', dtmetr).join(' ')),
Expand Down
8 changes: 4 additions & 4 deletions src/main/webapp/js/diagramly/sidebar/Sidebar-Floorplan.js
Expand Up @@ -79,7 +79,7 @@
80, 165, '', 'Door, Double Action', null, null, this.getTagsForStencil(gn, 'doorDoubleAction', dt).join(' ')),
this.createVertexTemplateEntry(s + 'opening;',
50, 10, '', 'Opening', null, null, this.getTagsForStencil(gn, 'opening', dt).join(' ')),
this.createVertexTemplateEntry(s + 'bathtub;',
this.createVertexTemplateEntry(s + 'bathtub2;',
180, 60, '', 'Bathtub', null, null, this.getTagsForStencil(gn, 'bathtub', dt).join(' ')),
this.createVertexTemplateEntry(s + 'bed_double;',
200, 180, '', 'Bed, Double', null, null, this.getTagsForStencil(gn, 'bed_double', dt).join(' ')),
Expand Down Expand Up @@ -125,13 +125,13 @@
75, 62, '', 'Range 2', null, null, this.getTagsForStencil(gn, 'range_2', dt).join(' ')),
this.createVertexTemplateEntry(s + 'refrigerator;',
60, 62, '', 'Refrigerator', null, null, this.getTagsForStencil(gn, 'refrigerator', dt).join(' ')),
this.createVertexTemplateEntry(s + 'shower;',
this.createVertexTemplateEntry(s + 'shower2;',
100, 100, '', 'Shower', null, null, this.getTagsForStencil(gn, 'shower', dt).join(' ')),
this.createVertexTemplateEntry(s + 'sink_1;',
40, 35, '', 'Sink 1', null, null, this.getTagsForStencil(gn, 'sink_1', dt).join(' ')),
this.createVertexTemplateEntry(s + 'sink_2;',
this.createVertexTemplateEntry(s + 'sink_22;',
40, 35, '', 'Sink 2', null, null, this.getTagsForStencil(gn, 'sink_2', dt).join(' ')),
this.createVertexTemplateEntry(s + 'sink_double;',
this.createVertexTemplateEntry(s + 'sink_double2;',
80, 35, '', 'Sink Double', null, null, this.getTagsForStencil(gn, 'sink_double', dt).join(' ')),
this.createVertexTemplateEntry(s + 'sofa;',
90, 80, '', 'Sofa', null, null, this.getTagsForStencil(gn, 'sofa', dt).join(' ')),
Expand Down

0 comments on commit b725015

Please sign in to comment.