cpmadsen / hex_gen_js

0 stars 0 forks source link

Sidebar, Buttons, and Legend #30

Open Zeugmarout opened 7 months ago

Zeugmarout commented 7 months ago

These should be hideable/minimizable

They should not be affected by zoom

Example chat code that exempts page elements from zoom:

In JavaScript, you can change the zoom level of a page using the document.body.style.zoom property. However, adjusting the zoom level for specific elements, such as excluding a sidebar menu, is not directly supported.

A common approach to achieve a similar effect is by adjusting the size of individual elements using CSS. You can set the transform property to scale elements, but keep in mind that this will affect the layout and positioning of other elements as well.

Here's a simple example where the entire page is zoomed in, but a sidebar is excluded:

html Copy code <!DOCTYPE html>

In this example, the entire page is scaled using the transform: scale() CSS property. The sidebar and content are placed in separate containers, and the zoom effect is applied only to the content area. Adjust the scale value to control the zoom level. The JavaScript function toggleZoom is provided as an example to dynamically apply or remove the zoom effect. You can call this function in response to user actions, such as button clicks.