Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
26240e9
avances sequia
MartaEY Nov 10, 2025
8198f41
Merge pull request #58 from lcsc/wind
MartaEY Nov 26, 2025
50dc213
Corrección colores capas calculadas
manuelarretxea Nov 28, 2025
053714e
Merge branch 'dev' of github.com:lcsc/AnemUI into epm
manuelarretxea Nov 28, 2025
1f9f4de
CsMenuInput: nuevo método para reseteo de input
manuelarretxea Nov 28, 2025
d5c1ff7
Merge branch 'dev' of github.com:lcsc/AnemUI into etm
manuelarretxea Nov 28, 2025
94220f3
Merge pull request #59 from lcsc/etm
manuelarretxea Nov 28, 2025
af71eaf
avances sequia
MartaEY Nov 28, 2025
d8e9dba
Merge pull request #60 from lcsc/epm
manuelarretxea Nov 28, 2025
41a123e
changes to paint negative values
MartaEY Dec 3, 2025
c2e8bdd
Añadida nueva paleta de tramoado para incertidumbre
manuelarretxea Dec 4, 2025
3b6e01f
Merge branch 'dev' of github.com:lcsc/AnemUI into fri
manuelarretxea Dec 4, 2025
1d7f4ee
Cambios AnemUI - 05/12/2025
manuelarretxea Dec 5, 2025
7a3dc38
Merge pull request #61 from lcsc/fri
manuelarretxea Dec 5, 2025
4471619
Mejora tramado paleta incertidumbre: nueva clase DotPatternPainter
manuelarretxea Dec 9, 2025
ab53f32
Merge branch 'dev' of github.com:lcsc/AnemUI into fri
manuelarretxea Dec 9, 2025
c52a2a7
Merge pull request #62 from lcsc/fri
manuelarretxea Dec 9, 2025
8d4542a
Arreglado error en la lógica de CsmenuItem para opciones deshabilitadas
manuelarretxea Dec 10, 2025
9e15ee4
Merge branch 'dev' of github.com:lcsc/AnemUI into fri
manuelarretxea Dec 10, 2025
df4c00d
Merge pull request #63 from lcsc/fri
manuelarretxea Dec 10, 2025
6440b72
Corrección capas de incertidumbre
manuelarretxea Dec 11, 2025
7a7248c
Merge branch 'dev' of github.com:lcsc/AnemUI into fri
manuelarretxea Dec 11, 2025
b87ab8d
Merge pull request #64 from lcsc/fri
manuelarretxea Dec 11, 2025
cdb1d39
Nueva disposición de botón de incertidumbre en menú superior
manuelarretxea Dec 16, 2025
737913a
Merge branch 'dev' of github.com:lcsc/AnemUI into fri
manuelarretxea Dec 16, 2025
498ea9c
Merge pull request #65 from lcsc/fri
manuelarretxea Dec 16, 2025
03be51d
Implementación de calendario bilingüe español/inglés
manuelarretxea Dec 17, 2025
6062df1
fix conflict
MartaEY Dec 17, 2025
edc8788
DateFrame: Integración de traducciones en la clase language
manuelarretxea Dec 17, 2025
1eb8625
Merge pull request #66 from lcsc/fri
manuelarretxea Dec 17, 2025
ad3e9c3
Merge pull request #67 from lcsc/dev
danielvilas Dec 18, 2025
8ba238d
Versionado 0.2.1
Dec 18, 2025
8516c5f
Merge pull request #68 from lcsc/main
danielvilas Dec 18, 2025
d3b425f
Version para cs-dev
Dec 18, 2025
9f5eda1
Graph.tsx: Refactorización leyenda inferior
manuelarretxea Dec 22, 2025
6828fce
Merge branch 'dev' into etm with colorLegend refactoring
manuelarretxea Dec 22, 2025
8331319
Merge branch 'dev' into drought
MartaEY Dec 22, 2025
c518038
git problems
MartaEY Dec 23, 2025
5237e1c
fix git
MartaEY Dec 23, 2025
cadb654
Ajustes gráficas
manuelarretxea Jan 5, 2026
fb086e5
Merge pull request #72 from lcsc/fri
manuelarretxea Jan 5, 2026
d46fd7b
Eliminada clase ElementManager y sus referencias
manuelarretxea Jan 7, 2026
b3e6c62
Merge branch 'dev' of github.com:lcsc/AnemUI into fri
manuelarretxea Jan 7, 2026
ae89443
Merge pull request #73 from lcsc/fri
manuelarretxea Jan 7, 2026
a284bdf
fix nexus auth
manuelarretxea Jan 7, 2026
9d9b006
Merge branch 'dev' of github.com:lcsc/AnemUI into fri
manuelarretxea Jan 7, 2026
af36cf1
Merge pull request #74 from lcsc/fri
manuelarretxea Jan 7, 2026
24718bb
Revert "fix nexus auth"
manuelarretxea Jan 7, 2026
8901541
Merge pull request #75 from lcsc/fri
manuelarretxea Jan 7, 2026
fe1cab4
Merge remote-tracking branch 'origin/dev' into drought
MartaEY Jan 8, 2026
453cb9d
version
danielvilas Jan 14, 2026
097265a
version
danielvilas Jan 14, 2026
8c59753
Version
danielvilas Jan 14, 2026
3536ffd
Merge remote-tracking branch 'origin/dev' into drought
MartaEY Jan 19, 2026
08c5aa6
fix on featurelayer
MartaEY Jan 19, 2026
5b88e20
Merge pull request #82 from lcsc/drought
MartaEY Jan 19, 2026
c81928e
reforzado mapeo de soporte espacial
MartaEY Jan 21, 2026
af8e5e5
Merge pull request #83 from lcsc/drought
MartaEY Jan 21, 2026
21ea7c7
Adapataciones en gráficos, paleta e intervalos de tiempo
manuelarretxea Jan 23, 2026
d4a214e
Merge branch 'dev' of github.com:lcsc/AnemUI into sri
manuelarretxea Jan 23, 2026
e3b752b
Merge pull request #84 from lcsc/sri
manuelarretxea Jan 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added anemui-core/assets/images/banner_logos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 27 additions & 7 deletions anemui-core/css/graphcontainer.scss
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
div.GraphContainer {
@include bgFrame(12px);
position: absolute;

position: fixed;
left: 50%;
top: 30%;
transform: translate(-50%, -30%);
top: 50%;
transform: translate(-50%, -50%);
padding: 0.8em 1.5em;
background-color: rgba(255, 255, 255, 1);
background-color: rgba(255, 255, 255, 0.98);
background: white;
color: #333;
box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
z-index: 2000;
width: fit-content;
position: relative;
max-width: 90vw;
max-height: 85vh;
overflow: auto;
cursor: move;

// Responsive para pantallas pequeñas
@media (max-width: 768px) {
left: 5%;
top: 10%;
transform: none;
max-width: 90vw;
padding: 0.5em 1em;
}

@media (max-width: 480px) {
left: 2%;
top: 5%;
max-width: 96vw;
padding: 0.3em 0.5em;
}

a.popup-close-button {
position: absolute;
Expand Down Expand Up @@ -67,7 +86,8 @@ div.GraphContainer {

.dygraph-legend {
text-align: center;
width: 1024px;
width: 100% !important;
max-width: 100%;
background-color: transparent !important;
left: 0px !important;
}
Expand Down
7 changes: 7 additions & 0 deletions anemui-core/css/open-layers-map.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
@import "~ol/ol.css";

// Desactivar suavizado solo para la capa de incertidumbre
.uncertainty-layer canvas {
image-rendering: pixelated;
image-rendering: -moz-crisp-edges;
image-rendering: crisp-edges;
}

// .marker {
// width: 20px;
// height: 20px;
Expand Down
12 changes: 8 additions & 4 deletions anemui-core/css/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -580,16 +580,15 @@ ul .two-columns {
/* ---------------------------------------------------
SELECTORES DE CAPAS
----------------------------------------------------- */

div.row.selectDiv{
width: 260px;
margin: 0.45rem 0rem;
width: 240px;
margin: 0.45rem 0rem;
}

.uncDiv input.form-check-input {
visibility: visible;
margin: 0px auto;
width: 4rem !important;
width: 4rem !important;
height: 2rem !important;
background-color: $color_8;
box-shadow: 0.5px 0.5px 3px $color_3;
Expand Down Expand Up @@ -632,6 +631,11 @@ div.slider.visible {
display: none;
}

.uncDiv .inputDiv {
background-color: transparent !important;
box-shadow: none !important;
}

.closeDiv .icon {
height: 30px;
width: 30px;
Expand Down
60 changes: 58 additions & 2 deletions anemui-core/css/topbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,22 @@
@include desktop {
width: 45%;
#title {
font-size: 1.2em;
font-size: 0.95em;
padding: 0.7rem 1rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}

@include md-desktop {
width: 40%;
#title {
font-size: 1.5em;
font-size: 1.1em;
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
Expand Down Expand Up @@ -514,6 +520,56 @@ input.selection-param-input {
min-width: fit-content;
}

// Contenedor del checkbox de incertidumbre
.inputDiv[role^="uncertainty-"] {
background: none !important;
box-shadow: none !important;
padding: 0 !important;

&:hover {
background: none !important;
color: $color_10 !important;
}
}

.menu-checkbox {
padding: 0;
margin-left: 15px;
display: flex;
align-items: center;
gap: 8px;
background: none !important; // Eliminar el fondo destacado

.title {
white-space: nowrap;
font-size: 0.7em;
font-style: italic;
line-height: 1.2;
margin: 0;
padding: 0;
}

.form-check {
margin: 0;
padding: 0;
display: flex;
align-items: center;
background: none !important;

.form-check-input {
margin: 0;
cursor: pointer;
width: 2.5em;
height: 1.25em;

&:focus {
box-shadow: none;
border-color: #0d6efd;
}
}
}
}

.menu-input {
width: 150px !important;
min-width: 150px !important;
Expand Down
3 changes: 2 additions & 1 deletion anemui-core/env/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ module.exports={
isTileDebugEnabled:false,
mapboxMapID:'b0rja/clo334xwq00jn01r28vwe1h6k',
mapboxAccessToken:'pk.eyJ1IjoiYjByamEiLCJhIjoiY2s5NjhvYjlkMGRsczNlbDQ3YXhvZTBvZyJ9.S3-_Wjl7BXcCLDOXNSbr_A',
logo:'logo_aemet.png',
// logo:'logo_aemet.png',
logo:'banner_logos.png',
initialZoom:6,
ncSignif:7,
dataSource: 'nc' // 'nc' or 'zarr'
Expand Down
4 changes: 2 additions & 2 deletions anemui-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lcsc/anemui-core",
"version": "0.2.1-SNAPSHOT",
"version": "0.2.3-SNAPSHOT",
"description": "Climatic Services Viewer Core",
"main": "./src/index.ts",
"types": "./src/index.ts",
Expand Down Expand Up @@ -82,6 +82,6 @@
"zarr": "^0.6.3"
},
"devDependencies": {
"@lcsc/anemui-test": ">=0.1.0-20250826"
"@lcsc/anemui-test": ">=0.2.3-202512180942"
}
}
85 changes: 64 additions & 21 deletions anemui-core/src/BaseApp.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { addChild, mount } from "tsx-create-element";
import { MainFrame } from "./ui/MainFrame";
import { MenuBar, MenuBarListener } from './ui/MenuBar';
import { MenuBar, MenuBarListener } from './ui/MenuBar';
import { CsMap } from "./CsMap";
import { DownloadFrame, DownloadIframe, DownloadOptionsDiv } from "./ui/DownloadFrame";
import LayerFrame from './ui/LayerFrame'
import PaletteFrame from "./ui/PaletteFrame";
import PaletteFrame from "./ui/PaletteFrame";
import { CsLatLong, CsMapEvent, CsMapListener } from "./CsMapTypes";
import { DateSelectorFrame, DateFrameListener } from "./ui/DateFrame";
import { loadLatLongData } from "./data/CsDataLoader";
Expand All @@ -17,13 +17,12 @@ import { downloadTCSVChunked } from "./data/ChunkDownloader";
import { DEF_STYLE_STATIONS, CsOpenLayerGeoJsonLayer, OpenLayerMap } from "./OpenLayersMap";
import { LoginFrame } from "./ui/LoginFrame";
import { PaletteManager } from "./PaletteManager";
import { ElementManager } from "./ElementManager";
import { fromLonLat } from "ol/proj";
import Dygraph from "dygraphs";
import { Style } from 'ol/style.js';
import { FeatureLike } from "ol/Feature";
import LeftBar from "./ui/LeftBar";
import RightBar from "./ui/RightBar";
import LeftBar from "./ui/LeftBar";
import RightBar from "./ui/RightBar";
import Language from "./language/language";
import { renderers, folders, defaultRenderer } from "./tiles/Support";
import CsCookies from "./cookies/CsCookies";
Expand Down Expand Up @@ -81,7 +80,6 @@ export abstract class BaseApp implements CsMapListener, MenuBarListener, DateFra
protected graph: CsGraph
protected infoFrame: InfoFrame
protected loginFrame: LoginFrame
protected elementManager: ElementManager

protected state: CsViewerData;
protected timesJs: CsTimesJsData;
Expand Down Expand Up @@ -580,7 +578,7 @@ export abstract class BaseApp implements CsMapListener, MenuBarListener, DateFra
//TODO on change
let timeSpan = this.getTimeSpan(_timesJs.times[varId])
// let timeIndex = typeof _timesJs.times[varId] === 'string'? 0:_timesJs.times[varId].length - 1
let timeIndex = timeSpan == CsTimeSpan.Year? 0:_timesJs.times[varId].length - 1
let timeIndex = timeSpan == CsTimeSpan.Year? 0 : _timesJs.times[varId].length - 1
let legendTitle: string;
if (_timesJs.legendTitle[varId] != undefined) {
legendTitle = _timesJs.legendTitle[varId]
Expand All @@ -594,8 +592,8 @@ export abstract class BaseApp implements CsMapListener, MenuBarListener, DateFra
varName = varId
}

let uncertainty = _timesJs.times[varId + UNCERTAINTY_LAYER] != undefined
let uncertainty = _timesJs.times[varId + UNCERTAINTY_LAYER] != undefined

if (this.state == undefined) this.state = INITIAL_STATE;
this.state = {
...this.state,
Expand All @@ -618,6 +616,7 @@ export abstract class BaseApp implements CsMapListener, MenuBarListener, DateFra
public getTimeSpan (time:string[]): CsTimeSpan {
if(typeof time === 'string') return CsTimeSpan.Year
let number
let yearCount = 1
if (time.length<=12) number = time.length
else {
const result = time.reduce((acc, curr) => {
Expand All @@ -627,15 +626,25 @@ export abstract class BaseApp implements CsMapListener, MenuBarListener, DateFra
}
return acc;
}, []);
yearCount = result.length
number = time.length / result.length;
}
// Caso especial: si hay exactamente 365 o 366 elementos totales, es día juliano
// independientemente de si las fechas cruzan dos años
if (time.length === 365 || time.length === 366) {
return CsTimeSpan.Day;
}

switch (number) {
case 1:
return CsTimeSpan.Year;
case 1:
return yearCount > 1 ? CsTimeSpan.YearSeries : CsTimeSpan.Year;
case 4:
return CsTimeSpan.Season;
case 12:
return CsTimeSpan.Month;
case 365:
case 366:
return CsTimeSpan.Day;
default:
return CsTimeSpan.Date;
}
Expand Down Expand Up @@ -681,24 +690,25 @@ export abstract class BaseApp implements CsMapListener, MenuBarListener, DateFra
try {
this.menuBar.update();
this.leftBar.update();
this.csMap.updateDate(this.state.selectedTimeIndex, this.state);
await this.csMap.updateDate(this.state.selectedTimeIndex, this.state);
this.csMap.updateRender(this.state.support);

// Wait for data only if we have computed data tiles layer
if (computedDataTilesLayer && this.state.computedLayer) {
if (computedDataTilesLayer && this.state.computedLayer) {
await this.waitForDataLoad();
}

if (!dateChanged) this.dateSelectorFrame.update();
this.paletteFrame.update();
this.layerFrame.update();
this.changeUrl();

} catch (error) {
console.error('Error during update:', error);
// Continue with update even if there's an error
if (!dateChanged) this.dateSelectorFrame.update();
this.paletteFrame.update();
this.layerFrame.update();
this.changeUrl();
}
}
Expand Down Expand Up @@ -777,14 +787,37 @@ export abstract class BaseApp implements CsMapListener, MenuBarListener, DateFra
this.csMap.refreshFeatureLayer()
}

/**
* Verifica si estamos en modo climatología con ciclo temporal (mensual o estacional)
*/
protected isClimatologyCyclicMode(): boolean {
return this.state.climatology &&
(this.state.timeSpan === CsTimeSpan.Day || this.state.timeSpan === CsTimeSpan.Month || this.state.timeSpan === CsTimeSpan.Season);
}

public dateDateBack(): void {
if (this.state.selectedTimeIndex == 0) return;
this.state.selectedTimeIndex--;
if (this.state.selectedTimeIndex == 0) {
if (this.isClimatologyCyclicMode()) {
this.state.selectedTimeIndex = this.state.times.length - 1;
} else {
return;
}
} else {
this.state.selectedTimeIndex--;
}
this.update()
}

public dateDateForward(): void {
if (this.state.selectedTimeIndex == this.state.times.length - 1) return;
this.state.selectedTimeIndex++;
if (this.state.selectedTimeIndex == this.state.times.length - 1) {
if (this.isClimatologyCyclicMode()) {
this.state.selectedTimeIndex = 0;
} else {
return;
}
} else {
this.state.selectedTimeIndex++;
}
this.update()
}

Expand Down Expand Up @@ -955,6 +988,16 @@ export abstract class BaseApp implements CsMapListener, MenuBarListener, DateFra
}

public showPercentileClockForPoint(latlng: CsLatLong, currentValue: number, historicalData: number[]): void {


}

/**
* Resetea la capa de incertidumbre: la oculta y desactiva el checkbox
* Útil cuando se cambia de contexto (ej: cambiar horizonte de predicción)
* Usa el método toggleUncertaintyLayer del MenuBar para mantener consistencia
*/
public resetUncertaintyLayer(): void {
// Llamar al método del MenuBar que coordina todo el comportamiento
this.getMenuBar().toggleUncertaintyLayer(false);
}
}
Loading