incandenza 3 years ago
parent
commit
11e38919c6
10 changed files with 53 additions and 41 deletions
  1. BIN
      asset/c_FA_48.png
  2. BIN
      asset/c_FI_48.png
  3. BIN
      asset/c_FL_48.png
  4. BIN
      asset/c_UD_48.png
  5. 3 3
      asset/pois.js
  6. 25 25
      asset/river.html
  7. 8 8
      asset/uda.css
  8. 17 5
      asset/udatinos.js
  9. BIN
      media/lc.png
  10. BIN
      media/rain.mp4

BIN
asset/c_FA_48.png


BIN
asset/c_FI_48.png


BIN
asset/c_FL_48.png


BIN
asset/c_UD_48.png


+ 3 - 3
asset/pois.js

@@ -298,7 +298,7 @@ var poi=Object.create(poiAlpha);
     //28
     poi=Object.create(poiAlpha);
     poi.x = 26;
-    poi.y = 211;
+    poi.y = 411;
     poi.id = "3";
     poi.type = 'I'; 
     poi.cat = 'UD'
@@ -306,7 +306,7 @@ var poi=Object.create(poiAlpha);
 
     //29
     poi=Object.create(poiAlpha);
-    poi.x = 79;
+    poi.x =180;
     poi.y = 701;
     poi.id = "4";
     poi.type = 'I'; 
@@ -333,7 +333,7 @@ var poi=Object.create(poiAlpha);
     //32
     poi=Object.create(poiAlpha);
     poi.x= 301;
-    poi.y= 123;
+    poi.y= 323;
     poi.id="Two";
     poi.type = 'T'; //looking for "asset/T_2.html"
     poi.cat = 'UD'

+ 25 - 25
asset/river.html

@@ -13,27 +13,27 @@
 
 
 
-	<div id="primary" class="content-area">
-  <ul style="list-style-type:none;">
-    <li>
-      <input type="checkbox" id="FI" checked="false">
-      <label>Fiume</label>
-    </li>
-    <li>
-      <input type="checkbox" id="FL" checked="false">
-      <label>Flora</label>
-    </li>
-    <li>
-      <input type="checkbox" id="FA" checked="false">
-      <label>Fauna</label>
-    </li>
-    <li>
-      <input type="checkbox" id="UD" checked="false">
-      <label>Udatinos</label>
-    </li>
-
-
-  </ul>
+	<!-- <div id="primary" class="content-area"> -->
+  <!-- <ul style="list-style-type:none;"> -->
+    <!-- <li> -->
+      <!-- <input type="checkbox" id="FI" checked="false"> -->
+      <!-- <label>Fiume</label> -->
+    <!-- </li> -->
+    <!-- <li> -->
+      <!-- <input type="checkbox" id="FL" checked="false"> -->
+      <!-- <label>Flora</label> -->
+    <!-- </li> -->
+    <!-- <li> -->
+      <!-- <input type="checkbox" id="FA" checked="false"> -->
+      <!-- <label>Fauna</label> -->
+    <!-- </li> -->
+    <!-- <li> -->
+      <!-- <input type="checkbox" id="UD" checked="false"> -->
+      <!-- <label>Udatinos</label> -->
+    <!-- </li> -->
+<!--  -->
+<!--  -->
+  <!-- </ul> -->
 
 	</div><!-- #primary -->
 
@@ -60,7 +60,7 @@
   </div>
 
 
-<img src="asset/c_FI_48.png" class="cat cat_FI"/>
-<img src="asset/c_FL_48.png" class="cat cat_FL"/>
-<img src="asset/c_FA_48.png" class="cat cat_FA"/>
-<img src="asset/c_UD_48.png" class="cat cat_UD"/>
+<img src="asset/c_FI_48.png" id="FI" class="cat cat_FI" />
+<img src="asset/c_FL_48.png" id="FL" class="cat cat_FL"/>
+<img src="asset/c_FA_48.png" id="FA" class="cat cat_FA"/>
+<img src="asset/c_UD_48.png" id="UD" class="cat cat_UD"/>

+ 8 - 8
asset/uda.css

@@ -1157,23 +1157,23 @@ li{
 
 .cat_FI{
  position: absolute;
- top: 50px;
- left: 300px;
+ top: 10px;
+ left: 10px;
 }
 .cat_FL{
  position: absolute;
- top: 150px;
- left: 300px;
+ top: 85px;
+ left: 10px;
 }
 .cat_FA{
  position: absolute;
- top: 250px;
- left: 300px;
+ top: 160px;
+ left: 10px;
 }
 .cat_UD{
  position: absolute;
- top: 350px;
- left: 300px;
+ top: 235px;
+ left: 10px;
 }
 
 .cat_OFF{

+ 17 - 5
asset/udatinos.js

@@ -78,10 +78,22 @@ function toRiver(){
                if($jq(this).hasClass( "cat_OFF" )){
                  //is going on
                   $jq(this).removeClass( "cat_OFF" );   
-               }else{
+                  for (let i=0; i<pois.length; i++) {
+
+                    var img = null;
+                    if(this.id == pois[i].cat){
+                      addPin(pois[i],i);
+                    }
+                  }
+              }else{
                  //is going off
                   $jq(this).addClass( "cat_OFF" );   
-               }
+                   for (let i=0; i<pois.length; i++) {
+                    if(this.id == pois[i].cat){
+                      $jq('#pin_'+i).remove();
+                    }
+                  }
+                }
             });
 
 
@@ -130,7 +142,7 @@ function toRiver(){
               modal.$elm.html('');
             });
              for (let i=0; i<pois.length; i++) {
-               if($jq('#' + pois[i].cat).is(":checked")) {
+               if(!$jq('#' + pois[i].cat).hasClass("cat_OFF")) {
                 addPin(pois[i],i);
                }
              }
@@ -150,7 +162,7 @@ function isFree(poi,j){
     }
    }
   //[0,0,156,188] check if overlapped with checkboxes rectangle
-  return !poi.isOverlapped([0,0,156,188]);
+  return !poi.isOverlapped([0,0,160,350]);
 }
 
 $jq( document ).ready(function() {
@@ -174,7 +186,7 @@ $jq( document ).ready(function() {
 });
 
 var intervalId = setInterval(function() {
-  if(Date.now()-timeRef>=3330000 && state==1){
+  if(Date.now()-timeRef>=60000 && state==1){
     toScsv();
   }
 }, 5000);

BIN
media/lc.png


BIN
media/rain.mp4