Skip to content

Commit eddf9c1

Browse files
committed
INTLV-22: Visualisation is initialised twice when there in another DOM updated event
1 parent 1e355b4 commit eddf9c1

File tree

4 files changed

+99
-147
lines changed

4 files changed

+99
-147
lines changed

PROGRESS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
- [X] Add a button to increase the number of iterations in the graph
101101
- [X] Kill and clear the previous graph instance to release memory ([INTLV-20 commit](https://github.com/xwiki-contrib/application-interactive-link-visualizer/commit/96a6f8267d0ef1f59c5387b37b3e154d8ca2e001))
102102
- [X] Move the application to `XWiki` space & encapsulate code ([commit](https://github.com/xwiki-contrib/application-interactive-link-visualizer/commit/faeb004ac22afb6161525711e3903bbcbf05f06a))
103-
- [X] Fixed JSX Editor gets console error of document returned as null & object not loading properly ([INTLV-21 commit]())
103+
- [X] Fixed: JSX Editor gets console error of document returned as null & object not loading properly ([INTLV-21 commit](https://github.com/xwiki-contrib/application-interactive-link-visualizer/commit/1e355b465492c230b2ac64a5ddfe189f9355579f))
104+
- [X] Fixed: Visualisation is initialised twice when there in another DOM updated event ([INTLV-22 commit]())
104105

105106
## Week 10 (07 August - 13 August 2023)
106107

application-interactive-link-visualizer-ui/src/main/resources/XWiki/InteractiveLinkVisualizer/Code/LinkVisualizerPanel.xml

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,19 @@
1-
<?xml version="1.1" encoding="UTF-8"?>
2-
3-
<!--
4-
* See the NOTICE file distributed with this work for additional
5-
* information regarding copyright ownership.
6-
*
7-
* This is free software; you can redistribute it and/or modify it
8-
* under the terms of the GNU Lesser General Public License as
9-
* published by the Free Software Foundation; either version 2.1 of
10-
* the License, or (at your option) any later version.
11-
*
12-
* This software is distributed in the hope that it will be useful,
13-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15-
* Lesser General Public License for more details.
16-
*
17-
* You should have received a copy of the GNU Lesser General Public
18-
* License along with this software; if not, write to the Free
19-
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20-
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21-
-->
22-
1+
<?xml version='1.1' encoding='UTF-8'?>
232
<xwikidoc version="1.5" reference="XWiki.InteractiveLinkVisualizer.Code.LinkVisualizerPanel" locale="">
243
<web>XWiki.InteractiveLinkVisualizer.Code</web>
254
<name>LinkVisualizerPanel</name>
265
<language/>
27-
<defaultLanguage/>
6+
<defaultLanguage>en</defaultLanguage>
287
<translation>0</translation>
29-
<creator>xwiki:XWiki.Admin</creator>
8+
<creator>XWiki.Admin</creator>
9+
<creationDate>1689193878000</creationDate>
3010
<parent>WebHome</parent>
31-
<author>xwiki:XWiki.Admin</author>
32-
<contentAuthor>xwiki:XWiki.Admin</contentAuthor>
33-
<version>1.1</version>
11+
<author>XWiki.Admin</author>
12+
<originalMetadataAuthor>XWiki.Admin</originalMetadataAuthor>
13+
<contentAuthor>XWiki.Admin</contentAuthor>
14+
<date>1691176537000</date>
15+
<contentUpdateDate>1691041061000</contentUpdateDate>
16+
<version>168.1</version>
3417
<title>LinkVisualizerPanel</title>
3518
<comment/>
3619
<minorEdit>false</minorEdit>
@@ -184,8 +167,8 @@
184167
style=
185168
"width: 100%;
186169
height: 350px;
187-
"&gt;
188-
&lt;/div&gt;
170+
">
171+
&lt;/div>
189172
{{/html}}
190173
#panelfooter()
191174
{{/velocity}}</content>
@@ -330,7 +313,7 @@ height: 350px;
330313
if (firstResult.length == 1) {
331314
let extraDocuments = "";
332315
if (firstResult[0].links) {
333-
extraDocuments = ' OR ' + firstResult[0].links.map(link =&gt; 'reference:' + escapeQueryChars(link.replace(/^entity:/, ''))).join(' OR ');
316+
extraDocuments = ' OR ' + firstResult[0].links.map(link => 'reference:' + escapeQueryChars(link.replace(/^entity:/, ''))).join(' OR ');
334317
}
335318
$.post(solrServiceURL, {
336319
outputSyntax: 'plain',
@@ -358,7 +341,7 @@ height: 350px;
358341

359342
const edges = [];
360343
tempData.forEach(function(obj) {
361-
if (obj.links &amp;&amp; obj.links.length &gt; 0) {
344+
if (obj.links &amp;&amp; obj.links.length > 0) {
362345
obj.links.forEach(function(link) {
363346
var target = link.replace(/^entity:/, '');
364347
var isValid = tempData.some(function(item) {
@@ -395,4 +378,4 @@ height: 350px;
395378
<use>currentPage</use>
396379
</property>
397380
</object>
398-
</xwikidoc>
381+
</xwikidoc>

application-interactive-link-visualizer-ui/src/main/resources/XWiki/InteractiveLinkVisualizer/Code/MainVisualisation.xml

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,19 @@
1-
<?xml version="1.1" encoding="UTF-8"?>
2-
3-
<!--
4-
* See the NOTICE file distributed with this work for additional
5-
* information regarding copyright ownership.
6-
*
7-
* This is free software; you can redistribute it and/or modify it
8-
* under the terms of the GNU Lesser General Public License as
9-
* published by the Free Software Foundation; either version 2.1 of
10-
* the License, or (at your option) any later version.
11-
*
12-
* This software is distributed in the hope that it will be useful,
13-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15-
* Lesser General Public License for more details.
16-
*
17-
* You should have received a copy of the GNU Lesser General Public
18-
* License along with this software; if not, write to the Free
19-
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20-
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21-
-->
22-
1+
<?xml version='1.1' encoding='UTF-8'?>
232
<xwikidoc version="1.5" reference="XWiki.InteractiveLinkVisualizer.Code.MainVisualisation" locale="">
243
<web>XWiki.InteractiveLinkVisualizer.Code</web>
254
<name>MainVisualisation</name>
265
<language/>
27-
<defaultLanguage/>
6+
<defaultLanguage>en</defaultLanguage>
287
<translation>0</translation>
29-
<creator>xwiki:XWiki.Admin</creator>
8+
<creator>XWiki.Admin</creator>
9+
<creationDate>1691175193000</creationDate>
3010
<parent>WebHome</parent>
31-
<author>xwiki:XWiki.Admin</author>
32-
<contentAuthor>xwiki:XWiki.Admin</contentAuthor>
33-
<version>1.1</version>
11+
<author>XWiki.Admin</author>
12+
<originalMetadataAuthor>XWiki.Admin</originalMetadataAuthor>
13+
<contentAuthor>XWiki.Admin</contentAuthor>
14+
<date>1691233201000</date>
15+
<contentUpdateDate>1691176498000</contentUpdateDate>
16+
<version>30.1</version>
3417
<title>MainVisualisation</title>
3518
<comment/>
3619
<minorEdit>false</minorEdit>
@@ -385,7 +368,7 @@ a.options-item.active, a.options-item.active:hover {
385368
<async_enabled>0</async_enabled>
386369
</property>
387370
<property>
388-
<content/>
371+
<content></content>
389372
</property>
390373
<property>
391374
<extensionPointId>org.xwiki.platform.panels.Applications</extensionPointId>
@@ -530,7 +513,7 @@ icon=icon:world</parameters>
530513
<async_enabled>0</async_enabled>
531514
</property>
532515
<property>
533-
<content/>
516+
<content></content>
534517
</property>
535518
<property>
536519
<extensionPointId>org.xwiki.platform.requirejs.module</extensionPointId>
@@ -547,4 +530,4 @@ path=$services.webjars.url('org.xwiki.contrib:application-interactive-link-visua
547530
<scope>wiki</scope>
548531
</property>
549532
</object>
550-
</xwikidoc>
533+
</xwikidoc>

0 commit comments

Comments
 (0)