Skip to content

Commit

Permalink
set view name on info button
Browse files Browse the repository at this point in the history
  • Loading branch information
brauliorivas committed Jul 17, 2024
1 parent 6e03d82 commit 07291a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/views/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ function scroll() {
window.scrollTo(scrollLocations[index].x, scrollLocations[index].y);
}

function setInfoButtonName(view) {
const button = document.getElementById("view-information-button");
button.innerText = view;
}

const drawView = (view) => {
paintButton(view);

Expand Down Expand Up @@ -88,6 +93,7 @@ const drawView = (view) => {
drawAll(viewCurrentObjects);
getVisible(viewCurrentObjects, viewVisibleObjects);
filters(viewObjects, viewCurrentObjects, viewVisibleObjects);
setInfoButtonName(getView());

canvas.onmousedown = (event) => {
mouseDown(event, viewVisibleObjects, dragTools);
Expand Down

0 comments on commit 07291a8

Please sign in to comment.