summary: adjusting styles for dropdown map
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 13 Dec 2016 15:10:50 +0000 (10:10 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 13 Dec 2016 15:10:50 +0000 (10:10 -0500)
details: changing coordinates for the city positions on the dropdown
map so they don't overlap neighboring cities. Adjusting the font size
of single line texts so they look similar to the size of double line
city texts

map.php
parts/interactive-map.php

diff --git a/map.php b/map.php
index b9b821b..161f440 100644 (file)
--- a/map.php
+++ b/map.php
          <text class="cls-7" transform="translate(167.91 336.89)">
 <!--            <tspan class="cls-8">Tunnel of Trees</tspan>-->
          </text>
-         <text id="831" class="cls-13" transform="translate(167.48 336.59)">
+         <text id="831" class="cls-13" transform="translate(167.48 340.59)">
             Tunnel of Trees
 <!--
             <tspan x="4.64" y="0">unnel of</tspan>
 <!--            <tspan x="50.72" y="0">ours</tspan>-->
          </text>
          <text id="837" class="cls-13" transform="translate(11.24 88.85)">Pictured Rocks</text>
-         <text id="835" class="cls-13" transform="translate(268.32 375.63)">
+         <text id="835" class="cls-13" transform="translate(250.32 375.63)">
             Cross in
             <tspan x="0" y="9.25">the Woods</tspan>
 <!--
index 44308e7..8dd6a0c 100644 (file)
@@ -64,16 +64,22 @@ $js_sites = json_encode($sites);
                    content.find('.map-title-link').html(sites[id]['title']);
                    content.find('.map-page-content').html(sites[id]['excerpt']);
                } catch(e){
-                   console.log("This page doesn't exit or it has the wrong id in the pages array");
+                   console.log("This page doesn't exist or it has the wrong id in the pages array");
                }
                    
                if( $(this).find('tspan').attr('y') === '9.25'){
                    $(this).find('tspan').attr('y', '14.25');
+               } else {
+                   $(this).css('font-size', '16px');
                }
                
            }, 
            function(){
-                $(this).find('tspan').attr('y', '9.25');
+               if( $(this).find('tspan').attr('y') === '14.25'){
+                   $(this).find('tspan').attr('y', '9.25');
+               } else {
+                   $(this).css('font-size', '11px');
+               }
            }
         );