clean up
authorJulie Hill Roa <julie.hill.roa@gmail.com>
Thu, 3 Dec 2015 19:28:39 +0000 (20:28 +0100)
committerJulie Hill Roa <julie.hill.roa@gmail.com>
Thu, 3 Dec 2015 19:28:39 +0000 (20:28 +0100)
src/components/map/map.html
src/components/map/map.ts

index cbb5133..62ce16c 100644 (file)
@@ -4,7 +4,7 @@
     <div class="modal-dialog modal-sm">
         <div class="modal-content">
             <div class="modal-header">
-                <button type="button" class="close" (click)="html()">&times;</button>
+                <button type="button" class="close" (click)="closeModal()">&times;</button>
                 <h4 class="modal-title">What do you want ? </h4>
             </div>
             <div id="topLevel">
@@ -14,9 +14,9 @@
                 </div>
             </div>
             <div id="middleLevel">
+                <button type="button" class="btn btn-default" (click)="drillUp()">drill up</button>
                 <button type="button" class="btn btn-default" (click)="seeDetails()">See details</button>
                 <button type="button" class="btn btn-default" (click)="drillDown()">Drill down</button>
-                <button type="button" class="btn btn-default" (click)="drillUp()">drill up</button>
             </div>
             <div id="bottomLevel">
                 <div class="modal-body">
@@ -24,8 +24,8 @@
                 </div>
                 <div class="modal-footer">
                     <button type="button" class="btn btn-default" (click)="addUnit()">Yes</button>
-                    <button type="button" class="btn btn-default" (click)="seeDetails()">See details</button>
                     <button type="button" class="btn btn-default" (click)="drillUp()">Drill up</button>
+                    <button type="button" class="btn btn-default" (click)="seeDetails()">See details</button>
                 </div>
             </div>
 
index 8527eeb..2a43eae 100644 (file)
@@ -47,73 +47,32 @@ export class Map {
         this.hideModal = document.getElementById("divModal").style.visibility = "hidden";
     }
 
-    showModal() {
-        return this.hideModal = document.getElementById("divModal").style.visibility = "visible";
-    }
+    setActiveId(id) { this.activeId = id; }
 
-    closeModal() {
-        this.hideModal = document.getElementById("topLevel").style.visibility = "hidden";
-        this.hideModal = document.getElementById("middleLevel").style.visibility = "hidden";
-        this.hideModal = document.getElementById("bottomLevel").style.visibility = "hidden";
-        this.hideModal = document.getElementById("divModal").style.visibility = "hidden";
+    getMap() { return this.map; }
 
-        this.setRunned(false);
-
-    }
+    getHttp() { return this.http; }
 
-    html() {
-        this.currentMarker.setMap(null);
+    setcurrentPos(latlng) { this.currentPos = latlng; }
 
-        this.closeModal();
-    }
+    getcurrentPos() { return this.currentPos; }
 
-    setActiveId(id) {
-        this.activeId = id;
-    }
+    setParent(id) {  this.parent = id; }
 
-    getMap() {
-        return this.map;
-    }
+    getParent() { return this.parent; }
 
-    getHttp() {
-        return this.http;
-    }
+    setRunned(value) { this.runned = value; }
 
-    setcurrentPos(latlng) {
-        this.currentPos = latlng;
-    }
+    setupRunned(value) { this.uprunned = value; }
 
-    getcurrentPos() {
-        return this.currentPos;
-    }
+    setLevel(value) { this.LEVEL = value; }
 
-    setParent(id) {
-        this.parent = id;
-    }
+    getLevel(){ return this.LEVEL; }
 
-    getParent() {
-        return this.parent;
-    }
+    addLevel() { this.LEVEL++; }
 
-    setRunned(value) {
-        this.runned = value;
-    }
+    upLevel() { this.LEVEL--; }
 
-    setupRunned(value) {
-        this.uprunned = value;
-    }
-
-    setLevel(value) {
-        this.LEVEL = value;
-    }
-
-    addLevel() {
-        this.LEVEL++;
-    }
-
-    upLevel() {
-        this.LEVEL--;
-    }
 
     init() {
 
@@ -123,7 +82,6 @@ export class Map {
         map.setCenter(pos, 0);
         map.setZoom(7);
 
-
     }
 
     logError(error) {
@@ -283,7 +241,6 @@ export class Map {
         this.addLevel();
         this.getData('/' + id + '/children', this);
 
-
     }
 
     drillUp() {
@@ -373,6 +330,19 @@ export class Map {
 
     }
 
+    showModal() {
+        return this.hideModal = document.getElementById("divModal").style.visibility = "visible";
+    }
+
+    closeModal() {
+        this.hideModal = document.getElementById("topLevel").style.visibility = "hidden";
+        this.hideModal = document.getElementById("middleLevel").style.visibility = "hidden";
+        this.hideModal = document.getElementById("bottomLevel").style.visibility = "hidden";
+        this.hideModal = document.getElementById("divModal").style.visibility = "hidden";
+
+        this.setRunned(false);
+    }
+
 }