diff --git a/CHANGELOG.md b/CHANGELOG.md index a0773cc..409e076 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,3 +19,8 @@ - Se agrega analytics al proyecto - Se agrega la posibilidad de subir diagrama con sus formas para ayudar a mejorar la detección de formas - Se agregan funciones de procesamiento al repositorio + + +## 1.1.0 +- Se agrega la capacidad de cambiar el tamaño de letra y de desactivar el ajuste automático de escala, junto con la capacidad de elegirlo manualmente +- Se agrega api_key para compilador de C diff --git a/public/css/main.css b/public/css/main.css index 0068584..4fa4c5e 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -124,6 +124,7 @@ footer a:hover { /* EDIT */ +.drophidden .dropdown-toggle::before, .drophidden .dropdown-toggle::after { content: none; } @@ -147,6 +148,20 @@ footer a:hover { font-family: monospace; } +#change_zoom { + position: absolute; + right: 25px; + top: 105px; + z-index: 1001; +} + +#change_zoom > button { + border-radius: 40px; + width: 40px; + height: 40px; + outline: 0; +} + #add_shape { position: absolute; right: 25px; diff --git a/public/js/main.js b/public/js/main.js index 8d3d263..7ae3d10 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -1,7 +1,8 @@ window.dg = { - version: "v1.0.2", + version: "v1.1.0", config: { width: 1000, + autoScale: true, _fontSize: 0, _scale: 1, set fontSize(size) { @@ -68,10 +69,22 @@ function addInstall() { $(function() { addInstall(); - dg.config.scale = document.getElementById("main").clientWidth / dg.config.width; - $(window).on("resize", function() { - dg.config.scale = document.getElementById("main").clientWidth / dg.config.width; - }); + + function autoScale() { + if (dg.config.autoScale) { + dg.config.scale = document.getElementById("main").clientWidth / dg.config.width; + document.getElementById("shape-container").style.width = ""; + } else { + dg.config.width = document.getElementById("main").clientWidth / dg.config.scale; + document.getElementById("shape-container").style.width = dg.config.width + "px"; + } + // TODO cambiar de lugar + $("#shapeRange").val(Math.log2(dg.config.scale * 10)); + } + + $(window).on("resize", autoScale); + autoScale(); + document.getElementById("version").innerHTML = dg.version; dg.step.check(); }); diff --git a/public/js/menu.js b/public/js/menu.js index 1aabae0..a999a98 100644 --- a/public/js/menu.js +++ b/public/js/menu.js @@ -422,6 +422,52 @@ dg.menu = { } }, + generarAgregarZoom: function() { + + + var $todo = $(`