Skip to content

Commit

Permalink
Clean up controllers for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmolo committed Aug 21, 2024
1 parent 86ad158 commit 9ba7ebe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions app/javascript/controllers/autocompleter_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,15 @@ export default class extends Controller {
}

this.verbose("autocompleter:activateMapOutlet()");
// set the map type so box is editable
this.mapOutlet.map_type = "hybrid"; // only if location_google
// set the map to stop ignoring place input
this.mapOutlet.ignorePlaceInput = false;
// open the map if not already open
if (!this.mapOutlet.opened && this.mapOutlet.hasToggleMapBtnTarget) {
this.verbose("autocompleter: open map");
this.mapOutlet.toggleMapBtnTarget.click();
}
// set the map type so box is editable
this.mapOutlet.map_type = "hybrid"; // only if location_google
// set the map to stop ignoring place input
this.mapOutlet.ignorePlaceInput = false;

// Often, this swap to location_google is for geolocating place_names and
// should pay attention to text only. But in some cases the swap (e.g., from
Expand Down Expand Up @@ -1614,7 +1614,7 @@ export default class extends Controller {
}

verbose(str) {
console.log(str);
// console.log(str);
// document.getElementById("log").
// insertAdjacentText("beforeend", str + "<br/>");
}
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/controllers/map_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ export default class extends GeocodeController {
// }

verbose(str) {
console.log(str);
// console.log(str);
// document.getElementById("log").
// insertAdjacentText("beforeend", str + "<br/>");
}
Expand Down

0 comments on commit 9ba7ebe

Please sign in to comment.