From 9d6500df82b3d5d60b539cb0156fe51477e07729 Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Fri, 25 Aug 2017 17:47:47 +0200
Subject: [PATCH] info window contains valid identifiedElement object

---
 frontend-js/.idea/workspace.xml               | 294 +++++++-----------
 .../src/main/js/map/data/IdentifiedElement.js |   2 +-
 .../main/js/map/window/AbstractInfoWindow.js  | 195 ++++++------
 .../src/main/js/map/window/AliasInfoWindow.js | 197 ++++++------
 .../src/main/js/map/window/PointInfoWindow.js |  29 +-
 .../main/js/map/window/ReactionInfoWindow.js  |   4 +
 6 files changed, 324 insertions(+), 397 deletions(-)

diff --git a/frontend-js/.idea/workspace.xml b/frontend-js/.idea/workspace.xml
index 1422114f46..d9343e2ca6 100644
--- a/frontend-js/.idea/workspace.xml
+++ b/frontend-js/.idea/workspace.xml
@@ -6,28 +6,11 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="c119f0dd-fdda-4d02-a51e-86bc6ef7e50c" name="Default" comment="">
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.jshintrc" afterPath="$PROJECT_DIR$/.jshintrc" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/ServerConnector.js" afterPath="$PROJECT_DIR$/src/main/js/ServerConnector.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/gui/ContextMenu.js" afterPath="$PROJECT_DIR$/src/main/js/gui/ContextMenu.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/gui/admin/MapsAdminPanel.js" afterPath="$PROJECT_DIR$/src/main/js/gui/admin/MapsAdminPanel.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/gui/export/GraphicsExportPanel.js" afterPath="$PROJECT_DIR$/src/main/js/gui/export/GraphicsExportPanel.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/gui/leftPanel/AbstractDbPanel.js" afterPath="$PROJECT_DIR$/src/main/js/gui/leftPanel/AbstractDbPanel.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/gui/leftPanel/ProjectInfoPanel.js" afterPath="$PROJECT_DIR$/src/main/js/gui/leftPanel/ProjectInfoPanel.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/gui/leftPanel/PublicationListDialog.js" afterPath="$PROJECT_DIR$/src/main/js/gui/leftPanel/PublicationListDialog.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/gui/topMenu/TopMenu.js" afterPath="$PROJECT_DIR$/src/main/js/gui/topMenu/TopMenu.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/map/AbstractCustomMap.js" afterPath="$PROJECT_DIR$/src/main/js/map/AbstractCustomMap.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/map/CustomMap.js" afterPath="$PROJECT_DIR$/src/main/js/map/CustomMap.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/map/marker/AbstractMarker.js" afterPath="$PROJECT_DIR$/src/main/js/map/marker/AbstractMarker.js" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/map/data/IdentifiedElement.js" afterPath="$PROJECT_DIR$/src/main/js/map/data/IdentifiedElement.js" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/map/window/AbstractInfoWindow.js" afterPath="$PROJECT_DIR$/src/main/js/map/window/AbstractInfoWindow.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/minerva.js" afterPath="$PROJECT_DIR$/src/main/js/minerva.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/js/ServerConnector-test.js" afterPath="$PROJECT_DIR$/src/test/js/ServerConnector-test.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/js/map/CustomMap-test.js" afterPath="$PROJECT_DIR$/src/test/js/map/CustomMap-test.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/js/map/Submap-test.js" afterPath="$PROJECT_DIR$/src/test/js/map/Submap-test.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/js/map/data/TargettingStructure-test.js" afterPath="$PROJECT_DIR$/src/test/js/map/data/TargettingStructure-test.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/js/map/marker/AliasMarker-test.js" afterPath="$PROJECT_DIR$/src/test/js/map/marker/AliasMarker-test.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/js/map/overlay/DrugDbOverlay-test.js" afterPath="$PROJECT_DIR$/src/test/js/map/overlay/DrugDbOverlay-test.js" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/js/mocha-config.js" afterPath="$PROJECT_DIR$/src/test/js/mocha-config.js" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/map/window/AliasInfoWindow.js" afterPath="$PROJECT_DIR$/src/main/js/map/window/AliasInfoWindow.js" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/map/window/PointInfoWindow.js" afterPath="$PROJECT_DIR$/src/main/js/map/window/PointInfoWindow.js" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/js/map/window/ReactionInfoWindow.js" afterPath="$PROJECT_DIR$/src/main/js/map/window/ReactionInfoWindow.js" />
     </list>
     <ignored path="$PROJECT_DIR$/.tmp/" />
     <ignored path="$PROJECT_DIR$/temp/" />
@@ -41,26 +24,6 @@
   </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
-      <file leaf-file-name="ContextMenu.js" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/js/gui/ContextMenu.js">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="306">
-              <caret line="18" column="30" lean-forward="false" selection-start-line="18" selection-start-column="30" selection-end-line="18" selection-end-column="30" />
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="GraphicsExportPanel.js" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/js/gui/export/GraphicsExportPanel.js">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="119">
-              <caret line="7" column="0" lean-forward="true" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
       <file leaf-file-name="ServerConnector.js" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/main/js/ServerConnector.js">
           <provider selected="true" editor-type-id="text-editor">
@@ -75,27 +38,12 @@
         <entry file="file://$PROJECT_DIR$/src/test/js/ServerConnector-test.js">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="405">
-              <caret line="99" column="45" lean-forward="true" selection-start-line="99" selection-start-column="45" selection-end-line="99" selection-end-column="45" />
+              <caret line="99" column="45" lean-forward="false" selection-start-line="99" selection-start-column="45" selection-end-line="99" selection-end-column="45" />
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="ProjectInfoPanel.js" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/js/gui/leftPanel/ProjectInfoPanel.js">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="85">
-              <caret line="5" column="48" lean-forward="true" selection-start-line="5" selection-start-column="48" selection-end-line="5" selection-end-column="48" />
-              <folding>
-                <marker date="1503674575853" expanded="true" signature="3501:3507" ph=" " />
-                <marker date="1503674575853" expanded="true" signature="4277:4283" ph=" " />
-                <marker date="1503674575853" expanded="true" signature="4786:4792" ph=" " />
-                <marker date="1503674575853" expanded="true" signature="5097:5103" ph=" " />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
       <file leaf-file-name="minerva.js" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/main/js/minerva.js">
           <provider selected="true" editor-type-id="text-editor">
@@ -110,11 +58,11 @@
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="TopMenu.js" pinned="false" current-in-tab="true">
+      <file leaf-file-name="TopMenu.js" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/main/js/gui/topMenu/TopMenu.js">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="337">
-              <caret line="180" column="10" lean-forward="true" selection-start-line="180" selection-start-column="10" selection-end-line="180" selection-end-column="10" />
+            <state relative-caret-position="269">
+              <caret line="176" column="49" lean-forward="false" selection-start-line="176" selection-start-column="49" selection-end-line="176" selection-end-column="49" />
               <folding>
                 <marker date="1503674880088" expanded="true" signature="2338:2390" ph="..." />
                 <marker date="1503674880088" expanded="true" signature="4001:4033" ph="..." />
@@ -124,31 +72,61 @@
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="AbstractDbOverlay.js" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/js/map/overlay/AbstractDbOverlay.js">
+      <file leaf-file-name="AbstractInfoWindow.js" pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/main/js/map/window/AbstractInfoWindow.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="-1482">
+              <caret line="96" column="31" lean-forward="true" selection-start-line="96" selection-start-column="31" selection-end-line="96" selection-end-column="31" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="AliasInfoWindow.js" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/js/map/window/AliasInfoWindow.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="221">
+              <caret line="218" column="2" lean-forward="false" selection-start-line="218" selection-start-column="2" selection-end-line="218" selection-end-column="2" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="IdentifiedElement.js" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/js/map/data/IdentifiedElement.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="337">
+              <caret line="102" column="29" lean-forward="false" selection-start-line="102" selection-start-column="29" selection-end-line="102" selection-end-column="29" />
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="AbstractCustomMap.js" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/js/map/AbstractCustomMap.js">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="0">
-              <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+            <state relative-caret-position="226">
+              <caret line="685" column="29" lean-forward="false" selection-start-line="685" selection-start-column="29" selection-end-line="685" selection-end-column="29" />
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="AbstractDbPanel.js" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/js/gui/leftPanel/AbstractDbPanel.js">
+      <file leaf-file-name="PointInfoWindow.js" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/js/map/window/PointInfoWindow.js">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="102">
-              <caret line="6" column="17" lean-forward="false" selection-start-line="6" selection-start-column="17" selection-end-line="6" selection-end-column="17" />
+            <state relative-caret-position="451">
+              <caret line="41" column="0" lean-forward="false" selection-start-line="41" selection-start-column="0" selection-end-line="41" selection-end-column="0" />
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="PublicationListDialog.js" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/js/gui/leftPanel/PublicationListDialog.js">
+      <file leaf-file-name="ReactionInfoWindow.js" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/js/map/window/ReactionInfoWindow.js">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="116">
-              <caret line="9" column="0" lean-forward="false" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
+            <state relative-caret-position="17">
+              <caret line="14" column="41" lean-forward="false" selection-start-line="14" selection-start-column="41" selection-end-line="14" selection-end-column="41" />
               <folding />
             </state>
           </provider>
@@ -158,12 +136,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>ongoingTouches</find>
-      <find>firstFingerIdfirstFingerId</find>
-      <find>firstFingerId</find>
-      <find>searchDb</find>
-      <find>makeLeftClick</find>
-      <find>GuiConnector</find>
       <find>makeL</find>
       <find>trigger</find>
       <find>MakeL</find>
@@ -188,6 +160,12 @@
       <find>getProject</find>
       <find>getPRoject</find>
       <find>GuiConn</find>
+      <find>new AliasInfoWindow</find>
+      <find>new PointInfoWindow</find>
+      <find>getEle</find>
+      <find>getI</find>
+      <find>getEl</find>
+      <find>getIde</find>
     </findStrings>
     <replaceStrings>
       <replace>ValidationError</replace>
@@ -203,9 +181,6 @@
   <component name="IdeDocumentHistory">
     <option name="CHANGED_PATHS">
       <list>
-        <option value="$PROJECT_DIR$/src/main/js/gui/leftPanel/LeftPanel.js" />
-        <option value="$PROJECT_DIR$/src/main/js/gui/Panel.js" />
-        <option value="$PROJECT_DIR$/src/test/js/gui/leftPanel/OverlayPanel-test.js" />
         <option value="$PROJECT_DIR$/src/test/js/gui/leftPanel/ProjectInfoPanel-test.js" />
         <option value="$PROJECT_DIR$/src/test/js/gui/Panel-test.js" />
         <option value="$PROJECT_DIR$/src/main/js/gui/leftPanel/SubmapPanel.js" />
@@ -220,7 +195,6 @@
         <option value="$PROJECT_DIR$/src/main/js/gui/LoginDialog.js" />
         <option value="$PROJECT_DIR$/src/main/js/gui/admin/CommentsAdminPanel.js" />
         <option value="$PROJECT_DIR$/src/main/js/Admin.js" />
-        <option value="$PROJECT_DIR$/src/main/js/map/window/AliasInfoWindow.js" />
         <option value="$PROJECT_DIR$/src/test/js/google-map-mock.js" />
         <option value="$PROJECT_DIR$/src/main/js/map/TouchMap.js" />
         <option value="$PROJECT_DIR$/src/test/js/gui/admin/EditProjectDialog-test.js" />
@@ -237,7 +211,6 @@
         <option value="$PROJECT_DIR$/src/main/js/gui/admin/MapsAdminPanel.js" />
         <option value="$PROJECT_DIR$/src/test/js/mocha-config.js" />
         <option value="$PROJECT_DIR$/src/main/js/map/CustomMap.js" />
-        <option value="$PROJECT_DIR$/src/main/js/map/window/AbstractInfoWindow.js" />
         <option value="$PROJECT_DIR$/src/main/js/map/marker/AbstractMarker.js" />
         <option value="$PROJECT_DIR$/src/test/js/map/Submap-test.js" />
         <option value="$PROJECT_DIR$/src/test/js/map/overlay/DrugDbOverlay-test.js" />
@@ -254,6 +227,11 @@
         <option value="$PROJECT_DIR$/src/main/js/ServerConnector.js" />
         <option value="$PROJECT_DIR$/src/main/js/minerva.js" />
         <option value="$PROJECT_DIR$/src/main/js/gui/topMenu/TopMenu.js" />
+        <option value="$PROJECT_DIR$/src/main/js/map/window/ReactionInfoWindow.js" />
+        <option value="$PROJECT_DIR$/src/main/js/map/window/PointInfoWindow.js" />
+        <option value="$PROJECT_DIR$/src/main/js/map/window/AliasInfoWindow.js" />
+        <option value="$PROJECT_DIR$/src/main/js/map/data/IdentifiedElement.js" />
+        <option value="$PROJECT_DIR$/src/main/js/map/window/AbstractInfoWindow.js" />
       </list>
     </option>
   </component>
@@ -330,41 +308,6 @@
               <item name="main" type="462c0819:PsiDirectoryNode" />
               <item name="js" type="462c0819:PsiDirectoryNode" />
             </path>
-            <path>
-              <item name="frontend-js" type="b2602c69:ProjectViewProjectNode" />
-              <item name="frontend-js" type="462c0819:PsiDirectoryNode" />
-              <item name="src" type="462c0819:PsiDirectoryNode" />
-              <item name="main" type="462c0819:PsiDirectoryNode" />
-              <item name="js" type="462c0819:PsiDirectoryNode" />
-              <item name="gui" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="frontend-js" type="b2602c69:ProjectViewProjectNode" />
-              <item name="frontend-js" type="462c0819:PsiDirectoryNode" />
-              <item name="src" type="462c0819:PsiDirectoryNode" />
-              <item name="main" type="462c0819:PsiDirectoryNode" />
-              <item name="js" type="462c0819:PsiDirectoryNode" />
-              <item name="gui" type="462c0819:PsiDirectoryNode" />
-              <item name="admin" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="frontend-js" type="b2602c69:ProjectViewProjectNode" />
-              <item name="frontend-js" type="462c0819:PsiDirectoryNode" />
-              <item name="src" type="462c0819:PsiDirectoryNode" />
-              <item name="main" type="462c0819:PsiDirectoryNode" />
-              <item name="js" type="462c0819:PsiDirectoryNode" />
-              <item name="gui" type="462c0819:PsiDirectoryNode" />
-              <item name="leftPanel" type="462c0819:PsiDirectoryNode" />
-            </path>
-            <path>
-              <item name="frontend-js" type="b2602c69:ProjectViewProjectNode" />
-              <item name="frontend-js" type="462c0819:PsiDirectoryNode" />
-              <item name="src" type="462c0819:PsiDirectoryNode" />
-              <item name="main" type="462c0819:PsiDirectoryNode" />
-              <item name="js" type="462c0819:PsiDirectoryNode" />
-              <item name="gui" type="462c0819:PsiDirectoryNode" />
-              <item name="topMenu" type="462c0819:PsiDirectoryNode" />
-            </path>
             <path>
               <item name="frontend-js" type="b2602c69:ProjectViewProjectNode" />
               <item name="frontend-js" type="462c0819:PsiDirectoryNode" />
@@ -380,7 +323,7 @@
               <item name="main" type="462c0819:PsiDirectoryNode" />
               <item name="js" type="462c0819:PsiDirectoryNode" />
               <item name="map" type="462c0819:PsiDirectoryNode" />
-              <item name="overlay" type="462c0819:PsiDirectoryNode" />
+              <item name="window" type="462c0819:PsiDirectoryNode" />
             </path>
             <path>
               <item name="frontend-js" type="b2602c69:ProjectViewProjectNode" />
@@ -464,7 +407,7 @@
       </list>
     </option>
   </component>
-  <component name="RunManager" selected="npm.build-deploy">
+  <component name="RunManager" selected="Node.js.test without coverage">
     <configuration name="AddProjectDialog" type="mocha-javascript-test-runner" factoryName="Mocha" temporary="true" nameIsGenerated="true">
       <node-interpreter>project</node-interpreter>
       <node-options />
@@ -703,7 +646,7 @@
       <workItem from="1503502231792" duration="5017000" />
       <workItem from="1503560609163" duration="22426000" />
       <workItem from="1503648028157" duration="9357000" />
-      <workItem from="1503673204553" duration="1696000" />
+      <workItem from="1503673204553" duration="2778000" />
     </task>
     <servers />
   </component>
@@ -740,7 +683,7 @@
     </history-entry>
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="38649000" />
+    <option name="totallyTimeSpent" value="39731000" />
   </component>
   <component name="ToolWindowManager">
     <frame x="-8" y="-8" width="1936" height="1176" extended-state="6" />
@@ -749,9 +692,10 @@
       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18020834" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.5679475" sideWeight="0.33802083" order="7" side_tool="true" content_ui="tabs" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
       <window_info id="V8 CPU Profiling" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.34489223" sideWeight="0.66197914" order="0" side_tool="false" content_ui="tabs" />
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
-      <window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.33833176" sideWeight="0.49791667" order="10" side_tool="false" content_ui="tabs" x="-170" y="502" width="1920" height="493" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.33833176" sideWeight="0.49791667" order="10" side_tool="false" content_ui="tabs" x="-170" y="502" width="1920" height="493" />
       <window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
       <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
@@ -763,7 +707,6 @@
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
       <window_info id="Inspection Results" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3298969" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
     </layout>
     <layout-to-restore>
@@ -799,28 +742,6 @@
     <watches-manager />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/main/js/ObjectWithListeners.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="170">
-          <caret line="10" column="9" lean-forward="false" selection-start-line="10" selection-start-column="9" selection-end-line="10" selection-end-column="9" />
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/js/gui/LoginDialog.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="234">
-          <caret line="89" column="0" lean-forward="true" selection-start-line="89" selection-start-column="0" selection-end-line="89" selection-end-column="0" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/js/gui/AbstractGuiElement.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="119">
-          <caret line="7" column="34" lean-forward="true" selection-start-line="7" selection-start-column="34" selection-end-line="7" selection-end-column="34" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/node_modules/bluebird/js/release/promise.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="216">
@@ -847,13 +768,6 @@
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="187">
           <caret line="11" column="23" lean-forward="false" selection-start-line="11" selection-start-column="23" selection-end-line="11" selection-end-column="23" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/js/map/window/AliasInfoWindow.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1428">
-          <caret line="84" column="40" lean-forward="false" selection-start-line="84" selection-start-column="40" selection-end-line="84" selection-end-column="40" />
           <folding />
         </state>
       </provider>
@@ -1030,14 +944,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/js/map/window/AbstractInfoWindow.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="187">
-          <caret line="11" column="19" lean-forward="false" selection-start-line="11" selection-start-column="19" selection-end-line="11" selection-end-column="19" />
-          <folding />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/js/map/CustomMap.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="218">
@@ -1102,14 +1008,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/js/map/AbstractCustomMap.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="153">
-          <caret line="9" column="43" lean-forward="true" selection-start-line="9" selection-start-column="43" selection-end-line="9" selection-end-column="43" />
-          <folding />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/js/gui/ContextMenu.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="306">
@@ -1121,7 +1019,7 @@
     <entry file="file://$PROJECT_DIR$/src/main/js/gui/export/GraphicsExportPanel.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="119">
-          <caret line="7" column="0" lean-forward="true" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
+          <caret line="7" column="0" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
           <folding />
         </state>
       </provider>
@@ -1129,7 +1027,7 @@
     <entry file="file://$PROJECT_DIR$/src/main/js/gui/leftPanel/ProjectInfoPanel.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="85">
-          <caret line="5" column="48" lean-forward="true" selection-start-line="5" selection-start-column="48" selection-end-line="5" selection-end-column="48" />
+          <caret line="5" column="48" lean-forward="false" selection-start-line="5" selection-start-column="48" selection-end-line="5" selection-end-column="48" />
           <folding>
             <marker date="1503674575853" expanded="true" signature="3501:3507" ph=" " />
             <marker date="1503674575853" expanded="true" signature="4277:4283" ph=" " />
@@ -1166,7 +1064,7 @@
     <entry file="file://$PROJECT_DIR$/src/test/js/ServerConnector-test.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="405">
-          <caret line="99" column="45" lean-forward="true" selection-start-line="99" selection-start-column="45" selection-end-line="99" selection-end-column="45" />
+          <caret line="99" column="45" lean-forward="false" selection-start-line="99" selection-start-column="45" selection-end-line="99" selection-end-column="45" />
           <folding />
         </state>
       </provider>
@@ -1193,8 +1091,8 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/src/main/js/gui/topMenu/TopMenu.js">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="337">
-          <caret line="180" column="10" lean-forward="true" selection-start-line="180" selection-start-column="10" selection-end-line="180" selection-end-column="10" />
+        <state relative-caret-position="269">
+          <caret line="176" column="49" lean-forward="false" selection-start-line="176" selection-start-column="49" selection-end-line="176" selection-end-column="49" />
           <folding>
             <marker date="1503674880088" expanded="true" signature="2338:2390" ph="..." />
             <marker date="1503674880088" expanded="true" signature="4001:4033" ph="..." />
@@ -1203,6 +1101,54 @@
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/js/map/AbstractCustomMap.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="226">
+          <caret line="685" column="29" lean-forward="false" selection-start-line="685" selection-start-column="29" selection-end-line="685" selection-end-column="29" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/js/map/window/PointInfoWindow.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="451">
+          <caret line="41" column="0" lean-forward="false" selection-start-line="41" selection-start-column="0" selection-end-line="41" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/js/map/window/ReactionInfoWindow.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="17">
+          <caret line="14" column="41" lean-forward="false" selection-start-line="14" selection-start-column="41" selection-end-line="14" selection-end-column="41" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/js/map/window/AliasInfoWindow.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="221">
+          <caret line="218" column="2" lean-forward="false" selection-start-line="218" selection-start-column="2" selection-end-line="218" selection-end-column="2" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/js/map/data/IdentifiedElement.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="337">
+          <caret line="102" column="29" lean-forward="false" selection-start-line="102" selection-start-column="29" selection-end-line="102" selection-end-column="29" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/js/map/window/AbstractInfoWindow.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-1482">
+          <caret line="96" column="31" lean-forward="true" selection-start-line="96" selection-start-column="31" selection-end-line="96" selection-end-column="31" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
   </component>
   <component name="masterDetails">
     <states>
diff --git a/frontend-js/src/main/js/map/data/IdentifiedElement.js b/frontend-js/src/main/js/map/data/IdentifiedElement.js
index caa6ef2d22..25733acd23 100644
--- a/frontend-js/src/main/js/map/data/IdentifiedElement.js
+++ b/frontend-js/src/main/js/map/data/IdentifiedElement.js
@@ -100,7 +100,7 @@ IdentifiedElement.prototype.getId = function() {
 };
 
 IdentifiedElement.prototype.setId = function(id) {
-  // some elements are identfied by id that is not a number (like point on the
+  // some elements are identified by id that is not a number (like point on the
   // map)
   if (!isNaN(id)) {
     id = parseInt(id);
diff --git a/frontend-js/src/main/js/map/window/AbstractInfoWindow.js b/frontend-js/src/main/js/map/window/AbstractInfoWindow.js
index a9cb40dcbc..23ddf813c4 100644
--- a/frontend-js/src/main/js/map/window/AbstractInfoWindow.js
+++ b/frontend-js/src/main/js/map/window/AbstractInfoWindow.js
@@ -14,7 +14,7 @@ var TargettingStructure = require('../data/TargettingStructure');
 
 /**
  * Class representing any info window in our map.
- * 
+ *
  * @param abstractMarker
  *          {@link AbstractMarker} to which this window is pointing, can be null
  */
@@ -22,6 +22,8 @@ function AbstractInfoWindow(params) {
   // call super constructor
   ObjectWithListeners.call(this);
 
+  this.setIdentifiedElement(params.identifiedElement);
+
   this.setCustomMap(params.map);
   this.setGoogleMarker(params.marker);
 
@@ -32,15 +34,15 @@ function AbstractInfoWindow(params) {
   this.registerPropertyType("overlayFullView");
 
   // listener called when user want to see all data about specific data overlay
-  var onOverlayFullViewChanged = function(e) {
+  var onOverlayFullViewChanged = function (e) {
     var self = e.object;
     // first change the content of the element
-    return self.update().then(function() {
+    return self.update().then(function () {
       if (e.newVal) {
         var element = new IdentifiedElement({
-          objectId : self.getElementId(),
-          modelId : self.getCustomMap().getId(),
-          type : self.getElementType()
+          objectId: self.getElementId(),
+          modelId: self.getCustomMap().getId(),
+          type: self.getElementType()
         });
         var topMap = self.getCustomMap().getTopMap();
         return topMap.retrieveOverlayDetailDataForElement(element, self.getOverlayFullViewArray());
@@ -72,12 +74,12 @@ AbstractInfoWindow.prototype.constructor = AbstractInfoWindow;
 
 /**
  * Returns <code>true</code> if overlay should visualize all possible values.
- * 
+ *
  * @param overlayName
  *          name of the overlay
- * @returns <code>true</code> if overlay should visualize all possible values
+ * @returns boolean, <code>true</code> if overlay should visualize all possible values
  */
-AbstractInfoWindow.prototype.isOverlayFullView = function(overlayName) {
+AbstractInfoWindow.prototype.isOverlayFullView = function (overlayName) {
   if (this._overlayFullView[overlayName] === undefined) {
     this._overlayFullView[overlayName] = false;
   }
@@ -87,15 +89,15 @@ AbstractInfoWindow.prototype.isOverlayFullView = function(overlayName) {
 /**
  * Returns associative array with information if specific overlay should present
  * all possible results or only specified by the data searched by user.
- * 
+ *
  * @returns {Array} with information if specific overlay should present all
  *          possible results or only specified by the data searched by user
  */
-AbstractInfoWindow.prototype.getOverlayFullViewArray = function() {
+AbstractInfoWindow.prototype.getOverlayFullViewArray = function () {
   return this._overlayFullView;
 };
 
-AbstractInfoWindow.prototype.setOverlayFullView = function(overlayName, value) {
+AbstractInfoWindow.prototype.setOverlayFullView = function (overlayName, value) {
   var oldVal = this._overlayFullView[overlayName];
   this._overlayFullView[overlayName] = value;
   return this.firePropertyChangeListener("overlayFullView", overlayName + "," + oldVal, value);
@@ -103,11 +105,11 @@ AbstractInfoWindow.prototype.setOverlayFullView = function(overlayName, value) {
 
 /**
  * This method checks if {@link AbstractInfoWindow} is opened.
- * 
+ *
  * @returns {Boolean} <code>true</code> if window is opened,
  *          <code>false</code> otherwise
  */
-AbstractInfoWindow.prototype.isOpened = function() {
+AbstractInfoWindow.prototype.isOpened = function () {
   if (this.googleInfowindow === undefined) {
     return false;
   }
@@ -122,7 +124,7 @@ AbstractInfoWindow.prototype.isOpened = function() {
 /**
  * Opens Info Window.
  */
-AbstractInfoWindow.prototype.open = function(newMarker) {
+AbstractInfoWindow.prototype.open = function (newMarker) {
   var self = this;
   if (self.googleInfowindow === null) {
     logger.warn("Cannot open window.");
@@ -133,18 +135,18 @@ AbstractInfoWindow.prototype.open = function(newMarker) {
   }
   self.googleInfowindow.open(self.getCustomMap().getGoogleMap(), self.getGoogleMarker());
 
-  return self.update().then(function() {
+  return self.update().then(function () {
     return self.callListeners("onShow");
   });
 };
 
 /**
  * Sets new content of the info window.
- * 
+ *
  * @param content
  *          new content of the window
  */
-AbstractInfoWindow.prototype.setContent = function(content) {
+AbstractInfoWindow.prototype.setContent = function (content) {
   this._content = content;
   if (this.googleInfowindow !== undefined) {
     this.googleInfowindow.setContent(content);
@@ -153,46 +155,46 @@ AbstractInfoWindow.prototype.setContent = function(content) {
 
 /**
  * Returns content visualized in the info window.
- * 
+ *
  * @returns {String} content visualized in the info window
  */
-AbstractInfoWindow.prototype.getContent = function() {
+AbstractInfoWindow.prototype.getContent = function () {
   return this._content;
 };
 
 /**
  * Creates div for an overlay data.
- * 
+ *
  * @param overlay
  *          corresponding {@link OverlayCollection}
  * @param data
  *          data taken from overlay
  * @returns string representing div for given overlay data
  */
-AbstractInfoWindow.prototype.createOverlayInfoDiv = function(overlay, data) {
+AbstractInfoWindow.prototype.createOverlayInfoDiv = function (overlay, data) {
   var alias = this.alias;
   if (alias !== undefined) {
     if (alias.getType() !== undefined) {
       if (overlay.name === "drug") {
         if (alias.getType().toUpperCase() === "RNA" || //
-        alias.getType().toUpperCase() === "PROTEIN" || //
-        alias.getType().toUpperCase() === "GENE") {
+          alias.getType().toUpperCase() === "PROTEIN" || //
+          alias.getType().toUpperCase() === "GENE") {
           return this._createDrugInfoDiv(overlay, data);
         } else {
           return null;
         }
       } else if (overlay.name === "chemical") {
         if (this.alias.getType().toUpperCase() === "RNA" || //
-        alias.getType().toUpperCase() === "PROTEIN" || //
-        alias.getType().toUpperCase() === "GENE") {
+          alias.getType().toUpperCase() === "PROTEIN" || //
+          alias.getType().toUpperCase() === "GENE") {
           return this._createChemicalInfoDiv(overlay, data);
         } else {
           return null;
         }
       } else if (overlay.name === "mirna") {
         if (alias.getType().toUpperCase() === "RNA" || //
-        alias.getType().toUpperCase() === "PROTEIN" || //
-        alias.getType().toUpperCase() === "GENE") {
+          alias.getType().toUpperCase() === "PROTEIN" || //
+          alias.getType().toUpperCase() === "GENE") {
           return this._createMiRnaInfoDiv(overlay, data);
         } else {
           return null;
@@ -220,27 +222,27 @@ AbstractInfoWindow.prototype.createOverlayInfoDiv = function(overlay, data) {
 
 /**
  * Creates and returns div for drug overlay information.
- * 
+ *
  * @param data
  *          data taken from drug iverlay
  * @returns {String} with a div for drug overlay information
  */
-AbstractInfoWindow.prototype._createDrugInfoDiv = function(overlay, data) {
+AbstractInfoWindow.prototype._createDrugInfoDiv = function (overlay, data) {
   return this._createTargetInfoDiv({
-    overlay : overlay,
-    data : data,
-    name : "Interacting drugs"
+    overlay: overlay,
+    data: data,
+    name: "Interacting drugs"
   });
 };
 
 /**
  * Creates and returns div for comment overlay information.
- * 
+ *
  * @param data
  *          data taken from comment iverlay
  * @returns {String} with a div for comment overlay information
  */
-AbstractInfoWindow.prototype._createCommentInfoDiv = function(overlay, data) {
+AbstractInfoWindow.prototype._createCommentInfoDiv = function (overlay, data) {
   if (data.length === 0 || data[0] === undefined) {
     return null;
   }
@@ -272,7 +274,7 @@ AbstractInfoWindow.prototype._createCommentInfoDiv = function(overlay, data) {
 
 /**
  * Creates and returns div for unknown overlay.
- * 
+ *
  * @param overlay
  *          some {@link OverlayCollection}
  * @param data
@@ -280,7 +282,7 @@ AbstractInfoWindow.prototype._createCommentInfoDiv = function(overlay, data) {
  * @returns Dom element with a div for overlay information
  */
 
-AbstractInfoWindow.prototype._createDefaultInfoDiv = function(overlay, data) {
+AbstractInfoWindow.prototype._createDefaultInfoDiv = function (overlay, data) {
   var divElement = document.createElement("div");
   var count = 0;
 
@@ -288,7 +290,7 @@ AbstractInfoWindow.prototype._createDefaultInfoDiv = function(overlay, data) {
   var title = document.createTextNode(overlay.getName());
   titleElement.appendChild(title);
   divElement.appendChild(titleElement);
-  for ( var searchId in data) {
+  for (var searchId in data) {
     if (data.hasOwnProperty(searchId) && data[searchId] !== undefined && data[searchId] !== null) {
       count++;
       var resultTitleElement = document.createElement("h4");
@@ -314,27 +316,27 @@ AbstractInfoWindow.prototype._createDefaultInfoDiv = function(overlay, data) {
 
 /**
  * Returns google.maps.Marker object where this info window is attached.
- * 
+ *
  * @returns google.maps.Marker object where this info window is attached
  */
-AbstractInfoWindow.prototype.getGoogleMarker = function() {
+AbstractInfoWindow.prototype.getGoogleMarker = function () {
   return this._marker;
 };
 
-AbstractInfoWindow.prototype.setGoogleMarker = function(marker) {
+AbstractInfoWindow.prototype.setGoogleMarker = function (marker) {
   this._marker = marker;
 };
 
 /**
  * Returns {@link AbstractCustomMap} where this window is presented.
- * 
+ *
  * @returns {@link AbstractCustomMap} where this window is presented
  */
-AbstractInfoWindow.prototype.getCustomMap = function() {
+AbstractInfoWindow.prototype.getCustomMap = function () {
   return this.customMap;
 };
 
-AbstractInfoWindow.prototype.setCustomMap = function(map) {
+AbstractInfoWindow.prototype.setCustomMap = function (map) {
   if (map === undefined) {
     throw new Error("Map must be defined");
   }
@@ -344,11 +346,11 @@ AbstractInfoWindow.prototype.setCustomMap = function(map) {
 /**
  * Returns html DOM object with content that should presented when waiting for
  * some data from server.
- * 
+ *
  * @returns {String} html with content that should presented when waiting for
  *          some data from server
  */
-AbstractInfoWindow.prototype.createWaitingContentDiv = function() {
+AbstractInfoWindow.prototype.createWaitingContentDiv = function () {
   var result = document.createElement("div");
   var img = document.createElement("img");
   img.src = GuiConnector.getImgPrefix() + GuiConnector.getLoadingImg();
@@ -362,7 +364,7 @@ AbstractInfoWindow.prototype.createWaitingContentDiv = function() {
 /**
  * This is a generic method that updates content of the window.
  */
-AbstractInfoWindow.prototype._updateContent = function() {
+AbstractInfoWindow.prototype._updateContent = function () {
   var contentDiv = null;
   var self = this;
 
@@ -371,10 +373,10 @@ AbstractInfoWindow.prototype._updateContent = function() {
   } else {
     self.setContent(self.createWaitingContentDiv());
 
-    return self.createContentDiv().then(function(content) {
+    return self.createContentDiv().then(function (content) {
       contentDiv = content;
       return self.createOverlaysDiv();
-    }).then(function(overlaysDiv) {
+    }).then(function (overlaysDiv) {
       if (overlaysDiv !== undefined && overlaysDiv !== null) {
         contentDiv.appendChild(overlaysDiv);
       }
@@ -389,14 +391,14 @@ AbstractInfoWindow.prototype._updateContent = function() {
 
 /**
  * Creates and returns div with overlays content.
- * 
+ *
  * @returns {String} with html representing data taken from
  *          {@link OverlayCollection} for this window
  */
-AbstractInfoWindow.prototype.createOverlaysDiv = function() {
+AbstractInfoWindow.prototype.createOverlaysDiv = function () {
   var self = this;
   var result = document.createElement("div");
-  return this.getOverlaysData(self.getOverlayFullViewArray()).then(function(overlayData) {
+  return this.getOverlaysData(self.getOverlayFullViewArray()).then(function (overlayData) {
     for (var i = 0; i < overlayData.length; i++) {
       var overlay = overlayData[i].overlay;
       var data = overlayData[i].data;
@@ -412,11 +414,11 @@ AbstractInfoWindow.prototype.createOverlaysDiv = function() {
 /**
  * Abstract method (to be implemented by subclasses) for updating content.
  */
-AbstractInfoWindow.prototype.update = function() {
+AbstractInfoWindow.prototype.update = function () {
   return this._updateContent();
 };
 
-AbstractInfoWindow.prototype._createTargetInfoDiv = function(params) {
+AbstractInfoWindow.prototype._createTargetInfoDiv = function (params) {
   var overlay = params.overlay;
   var data = params.data;
   var name = params.name;
@@ -437,7 +439,7 @@ AbstractInfoWindow.prototype._createTargetInfoDiv = function(params) {
     checkbox.id = "checkbox-" + name + "-" + this.getElementType() + "-" + this.getElementId();
     checkbox.type = "checkbox";
     checkbox.checked = self.isOverlayFullView(overlay.getName());
-    var checkboxClickedFunction = function() {
+    var checkboxClickedFunction = function () {
       return self.setOverlayFullView(overlay.getName(), this.checked).then(null, GuiConnector.alert);
     };
     checkbox.onclick = checkboxClickedFunction;
@@ -451,7 +453,7 @@ AbstractInfoWindow.prototype._createTargetInfoDiv = function(params) {
     result.appendChild(checkboxDiv);
   }
   count = 0;
-  for ( var dataId in data) {
+  for (var dataId in data) {
     if (data.hasOwnProperty(dataId)) {
       count++;
     }
@@ -468,7 +470,7 @@ AbstractInfoWindow.prototype._createTargetInfoDiv = function(params) {
   return result;
 };
 
-AbstractInfoWindow.prototype._createTableForTargetDiv = function(data, overlay) {
+AbstractInfoWindow.prototype._createTableForTargetDiv = function (data, overlay) {
   var self = this;
   var table = document.createElement("table");
   table.className = "minerva-window-drug-table";
@@ -484,13 +486,13 @@ AbstractInfoWindow.prototype._createTableForTargetDiv = function(data, overlay)
   table.appendChild(header);
   var row;
 
-  var onclick = function() {
+  var onclick = function () {
     // ';' enforces single query (in case there are ',' characters in the name)
     return overlay.searchByQuery(this.innerHTML + ";");
   };
 
   var count = 0;
-  for ( var searchId in data) {
+  for (var searchId in data) {
     if (data.hasOwnProperty(searchId)) {
 
       row = document.createElement("tr");
@@ -509,20 +511,20 @@ AbstractInfoWindow.prototype._createTableForTargetDiv = function(data, overlay)
         }
       }
       var link = Functions.createElement({
-        type : "a",
-        onclick : onclick,
-        href : "#",
-        content : nameContent,
+        type: "a",
+        onclick: onclick,
+        href: "#",
+        content: nameContent,
       });
 
       var nameTd = Functions.createElement({
-        type : "td",
+        type: "td",
       });
       nameTd.appendChild(link);
       row.appendChild(nameTd);
 
       var referencesCell = Functions.createElement({
-        type : "td",
+        type: "td",
       });
       referencesCell.appendChild(self.getGuiUtils().createAnnotationList(annotations));
 
@@ -553,73 +555,74 @@ AbstractInfoWindow.prototype._createTableForTargetDiv = function(data, overlay)
   return table;
 };
 
-AbstractInfoWindow.prototype.init = function() {
+AbstractInfoWindow.prototype.init = function () {
   var self = this;
-  return ServerConnector.getConfiguration().then(function(configuration) {
+  return ServerConnector.getConfiguration().then(function (configuration) {
     self.getGuiUtils().setConfiguration(configuration);
     self.getGuiUtils().setMap(self.getCustomMap());
   });
 };
-AbstractInfoWindow.prototype.setGuiUtils = function(guiUtils) {
+AbstractInfoWindow.prototype.setGuiUtils = function (guiUtils) {
   this._guiUtils = guiUtils;
 };
-AbstractInfoWindow.prototype.getGuiUtils = function() {
+AbstractInfoWindow.prototype.getGuiUtils = function () {
   return this._guiUtils;
 };
 
 /**
  * Creates and returns DOM div for chemical overlay information.
- * 
+ *
  * @param data
  *          data taken from chemical overlay
  * @returns DOM element with a div for comment overlay information
  */
-AbstractInfoWindow.prototype._createChemicalInfoDiv = function(overlay, data) {
+AbstractInfoWindow.prototype._createChemicalInfoDiv = function (overlay, data) {
   return this._createTargetInfoDiv({
-    overlay : overlay,
-    data : data,
-    name : "Interacting chemicals",
+    overlay: overlay,
+    data: data,
+    name: "Interacting chemicals",
   });
 };
 
 /**
  * Creates and returns DOM div for mi rna overlay information.
- * 
+ *
  * @param data
  *          data taken from mi rna overlay
  * @returns DOM element with a div for comment overlay information
  */
-AbstractInfoWindow.prototype._createMiRnaInfoDiv = function(overlay, data) {
+AbstractInfoWindow.prototype._createMiRnaInfoDiv = function (overlay, data) {
   return this._createTargetInfoDiv({
-    overlay : overlay,
-    data : data,
-    name : "Interacting Micro RNAs"
+    overlay: overlay,
+    data: data,
+    name: "Interacting Micro RNAs"
   });
 };
 
-/**
- * Abstract method returning identifier of the object for which this window was
- * created.
- */
-AbstractInfoWindow.prototype.getElementId = function() {
-  throw new Error("Not implemented");
+AbstractInfoWindow.prototype.setIdentifiedElement = function (identifiedElement) {
+  if (identifiedElement === undefined) {
+    throw new Error("identifiedElement cannot be undefined");
+  }
+  this._identifiedElement = identifiedElement;
+};
+
+AbstractInfoWindow.prototype.getIdentifiedElement = function () {
+  return this._identifiedElement;
 };
 
+
 /**
- * Abstract method returning type of the object for which this window was
- * created.
+ * Method returning identifier of the object for which this window was created.
  */
-AbstractInfoWindow.prototype.getElementType = function() {
-  throw new Error("Not implemented");
+AbstractInfoWindow.prototype.getElementId = function () {
+  return this.getIdentifiedElement().getId();
 };
 
-AbstractInfoWindow.prototype.getIdentifiedElement = function() {
-  var self = this;
-  return new IdentifiedElement({
-    id : self.getElementId(),
-    type : self.getElementType(),
-    modelId : self.getCustomMap().getId()
-  });
+/**
+ * Method returning type of the object for which this window was created.
+ */
+AbstractInfoWindow.prototype.getElementType = function () {
+  return this.getIdentifiedElement().getType();
 };
 
 module.exports = AbstractInfoWindow;
diff --git a/frontend-js/src/main/js/map/window/AliasInfoWindow.js b/frontend-js/src/main/js/map/window/AliasInfoWindow.js
index 4fb18d9a55..7edbbd32bd 100644
--- a/frontend-js/src/main/js/map/window/AliasInfoWindow.js
+++ b/frontend-js/src/main/js/map/window/AliasInfoWindow.js
@@ -5,7 +5,9 @@ var functions = require('../../Functions');
 
 var AbstractInfoWindow = require('./AbstractInfoWindow');
 var Alias = require('../data/Alias');
+var IdentifiedElement = require('../data/IdentifiedElement');
 var LayoutAlias = require('../data/LayoutAlias');
+
 var pileup = require('pileup');
 
 var Promise = require("bluebird");
@@ -14,6 +16,9 @@ var Promise = require("bluebird");
  * Class representing info window that should be opened when clicking on alias.
  */
 function AliasInfoWindow(params) {
+  if (params.identifiedElement === undefined) {
+    params.identifiedElement = new IdentifiedElement(params.alias);
+  }
   // call super constructor
   AbstractInfoWindow.call(this, params);
 
@@ -24,8 +29,8 @@ function AliasInfoWindow(params) {
   var point = new google.maps.Point(alias.x + alias.width / 2, alias.y + alias.height / 2);
   var latLng = this.customMap.fromPointToLatLng(point);
   this.googleInfowindow = new google.maps.InfoWindow({
-    content : this.content,
-    position : latLng
+    content: this.content,
+    position: latLng
   });
 }
 
@@ -37,26 +42,26 @@ AliasInfoWindow.prototype.constructor = AliasInfoWindow;
  * Updates content of info window. The content will be automatically obtained
  * from {@link CustomMap} instance. The only optional parameter is {@link Alias}
  * data.
- * 
+ *
  * @param newAlias
  *          optional {@link Alias} data for which this {@link AliasInfoWindow}
  *          was created
  */
-AliasInfoWindow.prototype.update = function(newAlias) {
+AliasInfoWindow.prototype.update = function (newAlias) {
   if (this.alias === undefined && newAlias !== undefined) {
     this.alias = newAlias;
   }
   return this._updateContent();
 };
 
-AliasInfoWindow.prototype.init = function() {
+AliasInfoWindow.prototype.init = function () {
   var self = this;
   var alias = self.getAlias();
-  return AbstractInfoWindow.prototype.init.call(self).then(function() {
+  return AbstractInfoWindow.prototype.init.call(self).then(function () {
     return self.getCustomMap().getModel().getAliasById(alias.getId(), true);
-  }).then(function(alias) {
+  }).then(function (alias) {
     return self.update(alias);
-  }).then(function(){
+  }).then(function () {
     return self.open();
   });
 };
@@ -64,15 +69,15 @@ AliasInfoWindow.prototype.init = function() {
 /**
  * Creates and returns chart representing data related to alias on different
  * layouts.
- * 
+ *
  * @returns {String} html string representing chart with data related to alias
  *          on different layouts
  */
-AliasInfoWindow.prototype.createChartDiv = function() {
+AliasInfoWindow.prototype.createChartDiv = function () {
   var result = document.createElement("div");
   var rows = [];
   var self = this;
-  return Promise.each(self.layoutAliases, function(data, i) {
+  return Promise.each(self.layoutAliases, function (data, i) {
     var rowDiv = document.createElement("div");
     if (i % 2 === 0) {
       rowDiv.className = "mapChartRowEvenDiv";
@@ -87,7 +92,7 @@ AliasInfoWindow.prototype.createChartDiv = function() {
 
     rows[i] = rowDiv;
     if (data !== undefined && data !== null) {
-      return functions.overlayToColor(data).then(function(color) {
+      return functions.overlayToColor(data).then(function (color) {
         var value = parseFloat(data.value);
         var description = data.description;
         if (description === null || description === undefined || description === "") {
@@ -157,7 +162,7 @@ AliasInfoWindow.prototype.createChartDiv = function() {
       rowDiv.appendChild(emptyDiv);
       return Promise.resolve();
     }
-  }).then(function() {
+  }).then(function () {
     for (var i = 0; i < rows.length; i++) {
       result.appendChild(rows[i]);
     }
@@ -167,10 +172,10 @@ AliasInfoWindow.prototype.createChartDiv = function() {
 
 /**
  * Methods that creates and return DOM object with the content of the window.
- * 
+ *
  * @returns DOM object representing html code for content of the info window
  */
-AliasInfoWindow.prototype.createContentDiv = function() {
+AliasInfoWindow.prototype.createContentDiv = function () {
   var self = this;
   var alias = self.getAlias();
   if (alias.isComplete()) {
@@ -183,19 +188,19 @@ AliasInfoWindow.prototype.createContentDiv = function() {
 
     result.appendChild(layoutsDiv);
 
-    return self.getCustomMap().getAliasVisibleLayoutsData(alias.getId()).then(function(layoutAliases) {
+    return self.getCustomMap().getAliasVisibleLayoutsData(alias.getId()).then(function (layoutAliases) {
       self.layoutAliases = layoutAliases;
       return self.getCustomMap().getTopMap().getVisibleDataOverlays();
-    }).then(function(dataOverlays) {
+    }).then(function (dataOverlays) {
       self.layoutNames = [];
       for (var i = 0; i < dataOverlays.length; i++) {
         self.layoutNames.push(dataOverlays[i].getName());
       }
       return self.createChartDiv();
-    }).then(function(chartDiv) {
+    }).then(function (chartDiv) {
       layoutsDiv.appendChild(chartDiv);
       return self.createGenomicDiv();
-    }).then(function(genomicDiv) {
+    }).then(function (genomicDiv) {
       layoutsDiv.appendChild(genomicDiv);
       return result;
     });
@@ -206,32 +211,14 @@ AliasInfoWindow.prototype.createContentDiv = function() {
 
 /**
  * Returns array with data taken from all known {@link OverlayCollection}.
- * 
+ *
  * @returns array with data from {@link OverlayCollection}
  */
-AliasInfoWindow.prototype.getOverlaysData = function(general) {
+AliasInfoWindow.prototype.getOverlaysData = function (general) {
   return this.getCustomMap().getTopMap().getOverlayDataForAlias(this.getAlias(), general);
 };
 
-/**
- * Method returning identifier of the object for which this window was created.
- */
-AliasInfoWindow.prototype.getElementId = function() {
-  if (this.alias !== undefined) {
-    return this.alias.getId();
-  } else {
-    return null;
-  }
-};
-
-/**
- * Method returning type of the object for which this window was created.
- */
-AliasInfoWindow.prototype.getElementType = function() {
-  return "ALIAS";
-};
-
-AliasInfoWindow.prototype.createGenomicDiv = function() {
+AliasInfoWindow.prototype.createGenomicDiv = function () {
   var self = this;
 
   var result = document.createElement("div");
@@ -248,71 +235,71 @@ AliasInfoWindow.prototype.createGenomicDiv = function() {
   var genomes = [];
   var genomeUrls = [];
 
-  var pileupSource = [ {
-    viz : pileup.viz.scale(),
-    name : 'Scale'
+  var pileupSource = [{
+    viz: pileup.viz.scale(),
+    name: 'Scale'
   }, {
-    viz : pileup.viz.location(),
-    name : 'Location'
-  } ];
+    viz: pileup.viz.location(),
+    name: 'Location'
+  }];
   var pileupRange = {
-    contig : 'chr1',
-    start : 3000000000,
-    stop : 0
+    contig: 'chr1',
+    start: 3000000000,
+    stop: 0
   };
 
   var globalGeneVariants = [];
 
   return Promise.each(
-      self.layoutAliases,
-      function(data) {
-        if (data !== null && data !== undefined && data.getType() === LayoutAlias.GENETIC_VARIANT) {
-          geneticInformation = true;
-          return Promise.each(data.getGeneVariants(), function(variant) {
-            return self.getCustomMap().getReferenceGenome(variant.getReferenceGenomeType(),
-                variant.getReferenceGenomeVersion()).then(
-                function(genome) {
-                  if (genome.getUrl() !== null && genome.getUrl() !== undefined) {
-                    if (genomes[genome.getUrl()] === undefined) {
-                      genomes[genome.getUrl()] = genome;
-                      genomeUrls.push(genome.getUrl());
-                    }
-                  } else {
-                    logger.warn("Genome for " + variant.getReferenceGenomeType() + ","
-                        + variant.getReferenceGenomeVersion() + " not loaded");
-                  }
-                },
-                function() {
-                  logger.warn("Genome for " + variant.getReferenceGenomeType() + ","
-                      + variant.getReferenceGenomeVersion() + " not loaded");
-
-                });
-          });
+    self.layoutAliases,
+    function (data) {
+      if (data !== null && data !== undefined && data.getType() === LayoutAlias.GENETIC_VARIANT) {
+        geneticInformation = true;
+        return Promise.each(data.getGeneVariants(), function (variant) {
+          return self.getCustomMap().getReferenceGenome(variant.getReferenceGenomeType(),
+            variant.getReferenceGenomeVersion()).then(
+            function (genome) {
+              if (genome.getUrl() !== null && genome.getUrl() !== undefined) {
+                if (genomes[genome.getUrl()] === undefined) {
+                  genomes[genome.getUrl()] = genome;
+                  genomeUrls.push(genome.getUrl());
+                }
+              } else {
+                logger.warn("Genome for " + variant.getReferenceGenomeType() + ","
+                  + variant.getReferenceGenomeVersion() + " not loaded");
+              }
+            },
+            function () {
+              logger.warn("Genome for " + variant.getReferenceGenomeType() + ","
+                + variant.getReferenceGenomeVersion() + " not loaded");
 
-        }
-      }).then(function() {
+            });
+        });
+
+      }
+    }).then(function () {
     for (var i = 0; i < genomeUrls.length; i++) {
       var genome = genomes[genomeUrls[i]];
       pileupSource.splice(0, 0, {
-        viz : pileup.viz.genome(),
-        isReference : pileupSource.length === 2,
-        data : pileup.formats.twoBit({
-          url : genome.getUrl()
+        viz: pileup.viz.genome(),
+        isReference: pileupSource.length === 2,
+        data: pileup.formats.twoBit({
+          url: genome.getUrl()
         }),
-        name : 'Reference ' + genome.getVersion()
+        name: 'Reference ' + genome.getVersion()
       });
       for (var k = 0; k < genome.getGeneMappings().length; k++) {
         var mapping = genome.getGeneMappings()[k];
         pileupSource.push({
-          viz : pileup.viz.genes(),
-          data : pileup.formats.bigBed({
-            url : mapping.getUrl()
+          viz: pileup.viz.genes(),
+          data: pileup.formats.bigBed({
+            url: mapping.getUrl()
           }),
-          name : 'Genes ' + mapping.getName()
+          name: 'Genes ' + mapping.getName()
         });
       }
     }
-    return Promise.each(self.layoutAliases, function(data, i) {
+    return Promise.each(self.layoutAliases, function (data, i) {
       globalGeneVariants[i] = [];
       if (data !== null && data !== undefined && data.getType() === LayoutAlias.GENETIC_VARIANT) {
         var geneVariants = data.getGeneVariants();
@@ -328,7 +315,7 @@ AliasInfoWindow.prototype.createGenomicDiv = function() {
         }
       }
     });
-  }).then(function() {
+  }).then(function () {
     if (geneticInformation) {
       if (genomeUrls.length === 0) {
         contentElement.innerHTML = "No reference genome data available on minerva platform";
@@ -337,13 +324,13 @@ AliasInfoWindow.prototype.createGenomicDiv = function() {
           if (globalGeneVariants[iter].length > 0) {
             var vcfContent = self.createVcfString(globalGeneVariants[iter]);
             pileupSource.push({
-              viz : pileup.viz.variants(),
-              data : pileup.formats.vcf({
-                content : vcfContent
+              viz: pileup.viz.variants(),
+              data: pileup.formats.vcf({
+                content: vcfContent
               }),
-              name : self.layoutNames[iter] + ' - Variants',
-              options : {
-                variantHeightByFrequency : true
+              name: self.layoutNames[iter] + ' - Variants',
+              options: {
+                variantHeightByFrequency: true
               },
             });
           }
@@ -360,8 +347,8 @@ AliasInfoWindow.prototype.createGenomicDiv = function() {
           logger.debug("Pileup destroyed");
         }
         self.pileup = pileup.create(contentElement, {
-          range : pileupRange,
-          tracks : pileupSource
+          range: pileupRange,
+          tracks: pileupSource
         });
       }
 
@@ -372,7 +359,7 @@ AliasInfoWindow.prototype.createGenomicDiv = function() {
   });
 };
 
-AliasInfoWindow.prototype.createVcfString = function(geneVariants) {
+AliasInfoWindow.prototype.createVcfString = function (geneVariants) {
   var result = "";
   result += "##fileformat=VCFv4.0\n";
   result += "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n";
@@ -387,29 +374,29 @@ AliasInfoWindow.prototype.createVcfString = function(geneVariants) {
       variantId = variant.getVariantIdentifier();
     }
     result += variant.getContig() + "\t" + //
-    variant.getPosition() + "\t" + //
-    variantId + "\t" + //
-    variant.getOriginalDna() + "\t" + //
-    variant.getModifiedDna() + "\t" + //
-    "100.0\t" + //
-    "PASS\t" + //
-    additionalInfo + "\n";
+      variant.getPosition() + "\t" + //
+      variantId + "\t" + //
+      variant.getOriginalDna() + "\t" + //
+      variant.getModifiedDna() + "\t" + //
+      "100.0\t" + //
+      "PASS\t" + //
+      additionalInfo + "\n";
   }
   return result;
 };
 
-AliasInfoWindow.prototype.setAlias = function(alias) {
+AliasInfoWindow.prototype.setAlias = function (alias) {
   if (alias === undefined || alias === null || (!(alias instanceof Alias))) {
     throw new Error("invalid alias");
   }
   this.alias = alias;
 };
 
-AliasInfoWindow.prototype.getAlias = function() {
+AliasInfoWindow.prototype.getAlias = function () {
   return this.alias;
 };
 
-AliasInfoWindow.prototype.destroy = function() {
+AliasInfoWindow.prototype.destroy = function () {
   if (this.pileup !== undefined) {
     this.pileup.destroy();
   }
diff --git a/frontend-js/src/main/js/map/window/PointInfoWindow.js b/frontend-js/src/main/js/map/window/PointInfoWindow.js
index 7a32e32dd2..c850896c7a 100644
--- a/frontend-js/src/main/js/map/window/PointInfoWindow.js
+++ b/frontend-js/src/main/js/map/window/PointInfoWindow.js
@@ -3,8 +3,12 @@
 var Promise = require("bluebird");
 
 var AbstractInfoWindow = require('./AbstractInfoWindow');
+var IdentifiedElement = require('../data/IdentifiedElement');
 
 function PointInfoWindow(params) {
+  if (params.identifiedElement === undefined) {
+    params.identifiedElement = new IdentifiedElement(params.point);
+  }
   // call super constructor
   AbstractInfoWindow.call(this, params);
 
@@ -13,8 +17,8 @@ function PointInfoWindow(params) {
   var point = this.pointData.getPoint();
   var latLng = this.getCustomMap().fromPointToLatLng(point);
   this.googleInfowindow = new google.maps.InfoWindow({
-    content : this.content,
-    position : latLng
+    content: this.content,
+    position: latLng
   });
   this.googleInfowindow.open(this.getCustomMap().getGoogleMap(), this.getGoogleMarker());
   this.update();
@@ -23,7 +27,7 @@ function PointInfoWindow(params) {
 PointInfoWindow.prototype = Object.create(AbstractInfoWindow.prototype);
 PointInfoWindow.prototype.constructor = PointInfoWindow;
 
-PointInfoWindow.prototype.createContentDiv = function() {
+PointInfoWindow.prototype.createContentDiv = function () {
   var result = document.createElement("div");
   var title = document.createElement("h3");
   title.innerHTML = "Point: " + this.pointData.getPoint();
@@ -32,26 +36,9 @@ PointInfoWindow.prototype.createContentDiv = function() {
   return Promise.resolve(result);
 };
 
-PointInfoWindow.prototype.getOverlaysData = function(general) {
+PointInfoWindow.prototype.getOverlaysData = function (general) {
   return this.getCustomMap().getTopMap().getOverlayDataForPoint(this.pointData, general);
 };
 
-/**
- * Method returning identifier of the object for which this window was created.
- */
-PointInfoWindow.prototype.getElementId = function() {
-  if (this.pointData !== undefined) {
-    return this.pointData.getId();
-  } else {
-    return null;
-  }
-};
-
-/**
- * Method returning type of the object for which this window was created.
- */
-PointInfoWindow.prototype.getElementType = function() {
-  return "POINT";
-};
 
 module.exports = PointInfoWindow;
diff --git a/frontend-js/src/main/js/map/window/ReactionInfoWindow.js b/frontend-js/src/main/js/map/window/ReactionInfoWindow.js
index 1df46abffa..4ff09bae2e 100644
--- a/frontend-js/src/main/js/map/window/ReactionInfoWindow.js
+++ b/frontend-js/src/main/js/map/window/ReactionInfoWindow.js
@@ -3,6 +3,7 @@
 var Promise = require("bluebird");
 
 var AbstractInfoWindow = require('./AbstractInfoWindow');
+var IdentifiedElement = require('../data/IdentifiedElement');
 var Reaction = require('../data/Reaction');
 
 /**
@@ -10,6 +11,9 @@ var Reaction = require('../data/Reaction');
  * reaction.
  */
 function ReactionInfoWindow(params) {
+  if (params.identifiedElement === undefined) {
+    params.identifiedElement = new IdentifiedElement(params.reaction);
+  }
   // call super constructor
   AbstractInfoWindow.call(this, params);
 
-- 
GitLab