commit 2e0e81ba753a15161dc2b95672b90d19ea7f6721
Author: Martin Matas <nouzovekonto@gmail.com>
Date:   Mon Jun 10 11:06:13 2019 +0200

    Introduced group include/exclude support for Timeline, fixed bug with redrawing hidden nodes (refs #7562)

diff --git a/sources/imiger-core/src/main/webapp/js/components/group.js b/sources/imiger-core/src/main/webapp/js/components/group.js
index bbf1fb0..ddf0214 100644
--- a/sources/imiger-core/src/main/webapp/js/components/group.js
+++ b/sources/imiger-core/src/main/webapp/js/components/group.js
@@ -168,6 +168,11 @@ class Group extends Node {
 	include() {
 		super.include();
 
+        this.vertexList.forEach(vertex => {
+            var notifyTimeline = new CustomEvent('imigerInclude', { detail: { entityID: vertex.id } });
+            document.dispatchEvent(notifyTimeline);
+        });
+
 		// set edges' ends
 		let inEdgeList = this.inEdgeList;
 		inEdgeList.forEach(edge => {
diff --git a/sources/imiger-core/src/main/webapp/js/components/vertexContextMenuList.js b/sources/imiger-core/src/main/webapp/js/components/vertexContextMenuList.js
index dcc4669..2aea4c1 100644
--- a/sources/imiger-core/src/main/webapp/js/components/vertexContextMenuList.js
+++ b/sources/imiger-core/src/main/webapp/js/components/vertexContextMenuList.js
@@ -119,6 +119,8 @@ class VertexContextMenuList {
 
 		// add the vertex to the group
 		group.addVertex(this._vertex);
+        var notifyTimeline = new CustomEvent('imigerExclude', { detail: { entityID: this._vertex.id } });
+        document.dispatchEvent(notifyTimeline);
 
 		app.viewportComponent.contextMenuComponent.close();
 	}
diff --git a/sources/imiger-core/src/main/webapp/js/timeline/cz/kajda/data/Entity.js b/sources/imiger-core/src/main/webapp/js/timeline/cz/kajda/data/Entity.js
index 7edc98d..e75a151 100644
--- a/sources/imiger-core/src/main/webapp/js/timeline/cz/kajda/data/Entity.js
+++ b/sources/imiger-core/src/main/webapp/js/timeline/cz/kajda/data/Entity.js
@@ -81,6 +81,7 @@ var Entity = new Class("cz.kajda.data.Entity", {
         _continuous : null,
         _properties : null,
         _description : null,
+        _visible : true,
         /**
          * @author Michal Fiala
          * Array for subEntities
@@ -144,6 +145,22 @@ var Entity = new Class("cz.kajda.data.Entity", {
             return this._continuous;
         },
 
+        /**
+         * Checks whether the entity is visible or not.
+         * @returns {Boolean}
+         */
+        isVisible : function() {
+            return this._visible;
+        },
+
+        /**
+         * Set whether the entity is visible or not.
+         * @param isVisible {Boolean}
+         */
+        setVisibility : function(isVisible) {
+            this._visible = isVisible;
+        },
+
         /**
          * Returns property value if is available.
          * Otherwise returns null.
diff --git a/sources/imiger-core/src/main/webapp/js/timeline/cz/kajda/timeline/Timeline.js b/sources/imiger-core/src/main/webapp/js/timeline/cz/kajda/timeline/Timeline.js
index 76d7f02..e64b8d9 100644
--- a/sources/imiger-core/src/main/webapp/js/timeline/cz/kajda/timeline/Timeline.js
+++ b/sources/imiger-core/src/main/webapp/js/timeline/cz/kajda/timeline/Timeline.js
@@ -504,12 +504,14 @@ var Timeline = Class("cz.kajda.timeline.Timeline", {
 
             _handleIMiGErExclude : function(e) {
                 var entity = this.getEntities().get(e.originalEvent.detail.entityID);
-                $('div[data-entity=' + entity.getId() + ']').hide();
+                entity.setVisibility(false);
+                this.redraw();
             },
 
             _handleIMiGErInclude : function(e) {
                 var entity = this.getEntities().get(e.originalEvent.detail.entityID);
-                $('div[data-entity=' + entity.getId() + ']').show();
+                entity.setVisibility(true);
+                this.redraw();
             },
 
             _handleIMiGErClick : function(e) {
diff --git a/sources/imiger-core/src/main/webapp/js/timeline/cz/kajda/timeline/render/BandItemRenderer.js b/sources/imiger-core/src/main/webapp/js/timeline/cz/kajda/timeline/render/BandItemRenderer.js
index cc7d635..e622193 100644
--- a/sources/imiger-core/src/main/webapp/js/timeline/cz/kajda/timeline/render/BandItemRenderer.js
+++ b/sources/imiger-core/src/main/webapp/js/timeline/cz/kajda/timeline/render/BandItemRenderer.js
@@ -184,18 +184,21 @@ var BandItemRenderer = new Class("cz.kajda.timeline.render.BandItemRenderer", {
         /** @see cz.kajda.timeline.render.AbstractItemRenderer#render */
         render : function(item) {
             var itemWrapper = $("<div>");
-            var element = item.getEntity().isContinuous() ? this._renderContinuous(item) : this._renderMoment(item);
-            element.addClass(this.DURATION_CLASS);
-            var titleEl = $("<div>")
+
+            if (item.getEntity().isVisible()) {
+                var element = item.getEntity().isContinuous() ? this._renderContinuous(item) : this._renderMoment(item);
+                element.addClass(this.DURATION_CLASS);
+                var titleEl = $("<div>")
                     .addClass(this.LABEL_CLASS)
                     .text(item.getEntity().getTitle());
-            
-            itemWrapper.append(element)
+
+                itemWrapper.append(element)
                     .append(titleEl);
-            
-            item.setLabelElement(titleEl);
-            item.setDurationElement(element);                
-            
+
+                item.setLabelElement(titleEl);
+                item.setDurationElement(element);
+            }
+
             return itemWrapper;
         },
         
