readded focus on click

This commit is contained in:
Mario Voigt 2020-08-21 18:06:35 +02:00
parent d7455adbd1
commit d7a6382243

View File

@ -171,6 +171,18 @@
e.preventDefault(); e.preventDefault();
}; };
this.viewModeHandler = function(e) {
if (scope.__firstPerson) {
e.target.className = e.target.className.replace(" focused", "");
scope.__firstPerson = false;
scope.disableFirstPersonViewerMode();
} else {
e.target.className += " focused";
scope.__firstPerson = true;
scope.enableFirstPersonViewerMode();
}
};
// Check if option values are correct // Check if option values are correct
this.adjustUserConfiguration(); this.adjustUserConfiguration();
// Initialize rendering // Initialize rendering
@ -516,6 +528,8 @@
logo.className += "clickable pull-left madeleine-logo"; logo.className += "clickable pull-left madeleine-logo";
view.className += "clickable pull-right icon-mad-view"; view.className += "clickable pull-right icon-mad-view";
Lily.bind(view, "click", this.viewModeHandler);
var rotator = document.createElement("div"); var rotator = document.createElement("div");
rotator.style.cssText += "background:transparent;position:absolute;padding:15px 10px;right:0;"; rotator.style.cssText += "background:transparent;position:absolute;padding:15px 10px;right:0;";