make the toolbar elements aligned vertically and with the same size

This commit is contained in:
bmatthieu3
2025-03-14 18:23:28 +01:00
committed by Matthieu Baumann
parent 5604ea2be6
commit 628ea826bf
9 changed files with 80 additions and 73 deletions

5
assets/icons/freq.svg Normal file
View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M3 4.5L6 7L6 5.25H18V7L21 4.5L18 2V3.75H6L6 2L3 4.5Z" />
<path d="M6.63935 11.9367C7.14967 10.7061 8.89138 10.7018 9.4077 11.9299L12.735 19.8442C13.9443 22.7205 18.0283 22.6965 19.2036 19.8061L21.1579 15H18.9989L17.351 19.0527C16.8472 20.2915 15.0969 20.3018 14.5787 19.0691L11.2514 11.1548C10.0466 8.28919 5.98264 8.29911 4.79189 11.1706L3.20392 15H5.36906L6.63935 11.9367Z" />
</svg>

After

Width:  |  Height:  |  Size: 623 B

2
assets/icons/inside.svg Normal file
View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4,3H9A1,1,0,0,1,9,5H5V9A1,1,0,0,1,3,9V4A1,1,0,0,1,4,3ZM9,19H5V15a1,1,0,0,0-2,0v5a1,1,0,0,0,1,1H9a1,1,0,0,0,0-2Zm11-5a1,1,0,0,0-1,1v4H15a1,1,0,0,0,0,2h5a1,1,0,0,0,1-1V15A1,1,0,0,0,20,14ZM20,3H15a1,1,0,0,0,0,2h4V9a1,1,0,0,0,2,0V4A1,1,0,0,0,20,3ZM7,8v8a1,1,0,0,0,1,1h8a1,1,0,0,0,1-1V8a1,1,0,0,0-1-1H8A1,1,0,0,0,7,8Z"/></svg>

After

Width:  |  Height:  |  Size: 555 B

View File

@@ -41,10 +41,5 @@
})*/ })*/
}); });
</script> </script>
<style>
.aladin-cat-browser-box {
width: 600px;
}
</style>
</body> </body>
</html> </html>

View File

@@ -396,14 +396,22 @@
border: 1px solid white; border: 1px solid white;
} }
.small-sized-icon { .aladin-container .small-sized-icon {
width: 1.2rem; width: 1.2rem;
height: 1.2rem; height: 1.2rem;
} }
.medium-sized-icon { .aladin-container .medium-sized-icon {
width: 1.7rem; width: 1.6rem;
height: 1.7rem; height: 1.6rem;
}
.aladin-container .medium-sized {
height: 1.6rem;
}
.aladin-container .small-sized {
height: 1.2rem;
} }
.aladin-input-text.aladin-dark-theme:focus, .aladin-input-number.aladin-dark-theme:focus { .aladin-input-text.aladin-dark-theme:focus, .aladin-input-number.aladin-dark-theme:focus {
@@ -535,25 +543,6 @@
flex: 2; flex: 2;
} }
.aladin-window-container {
position: absolute;
left: 0;
bottom: 300px;
width: 250px;
line-height: 1.3;
}
.aladin-window {
/*font-family: Verdana, Geneva, Tahoma, sans-serif;*/
background: white;
border: 1px solid #bbb;
border-radius: 2px;
padding: 4px;
top: 80px;
left: 110px;
}
.aladin-popup-container { .aladin-popup-container {
color: black; color: black;
position: absolute; position: absolute;
@@ -690,7 +679,7 @@
left: 100%; left: 100%;
display: none; display: none;
width: max-content; width: max-content;
z-index: 20; /*z-index: 20;*/
} }
.aladin-context-sub-menu, .aladin-context-sub-menu,
@@ -830,8 +819,8 @@
-moz-appearance: none; -moz-appearance: none;
-webkit-appearance: none; -webkit-appearance: none;
outline-style: none; outline-style: none;
padding: 0.3rem; padding: 0.2rem;
border-radius: 5px; border-radius: 0.2rem;
font-family: monospace; font-family: monospace;
box-sizing: border-box; box-sizing: border-box;
} }
@@ -853,13 +842,14 @@
outline: 0; outline: 0;
/*font: inherit;*/ /*font: inherit;*/
/* Personalize */ /* Personalize */
padding: 0.2em; padding: 0.2rem 0;
font-size: inherit; font-size: inherit;
border-radius: 0.25em; border-radius: 0.2rem;
box-shadow: 0 0 1em 0 rgba(0, 0, 0, 0.2); box-shadow: 0 0 1em 0 rgba(0, 0, 0, 0.2);
cursor: pointer; cursor: pointer;
font-family: monospace; font-family: monospace;
width: 100%; width: 100%;
box-sizing: content-box;
/* <option> colors */ /* <option> colors */
/* Remove focus outline */ /* Remove focus outline */
/* Remove IE arrow */ /* Remove IE arrow */
@@ -886,7 +876,7 @@
outline-style: none; outline-style: none;
padding: 0; padding: 0;
border: none; border: none;
border-radius: 5px; border-radius: 0.4rem;
width: 2rem; width: 2rem;
height: 1.5rem; height: 1.5rem;
cursor: pointer; cursor: pointer;
@@ -894,13 +884,13 @@
.aladin-input-color::-webkit-color-swatch { .aladin-input-color::-webkit-color-swatch {
border: none; border: none;
border-radius: 5px; border-radius: 0.4rem;
padding: 0; padding: 0;
} }
.aladin-input-color::-webkit-color-swatch-wrapper { .aladin-input-color::-webkit-color-swatch-wrapper {
border: none; border: none;
border-radius: 5px; border-radius: 0.4rem;
padding: 0; padding: 0;
} }
@@ -994,7 +984,6 @@
text-align: center; text-align: center;
padding: 4px; padding: 4px;
border-radius: 2px;
top:0%; top:0%;
left:0%; left:0%;
@@ -1112,15 +1101,22 @@
color: white; color: white;
border-radius: 5px; border-radius: 0.4rem;
height: 1.7rem;
width: 4.5rem;
} }
.aladin-stack-box { .aladin-stack-box {
width: 17rem; width: 17rem;
} }
.aladin-HiPS-filter-box {
margin-top: 0.4rem;
}
.aladin-HiPS-filter-box .aladin-horizontal-list {
justify-content: space-evenly;
width:100%;
}
.aladin-HiPS-browser-box .aladin-input-text { .aladin-HiPS-browser-box .aladin-input-text {
width: 100%; width: 100%;
min-width: 300px; min-width: 300px;
@@ -1137,13 +1133,12 @@
.aladin-location { .aladin-location {
position: absolute; position: absolute;
top: 0.2rem; top: 0.2rem;
left: 5.0rem; left: 4.7rem;
font-family: monospace; font-family: monospace;
color: white; color: white;
border-radius: 5px; border-radius: 0.2rem;
height: 1.7rem;
} }
.aladin-input-text { .aladin-input-text {
@@ -1151,14 +1146,14 @@
} }
.aladin-location .aladin-input-text { .aladin-location .aladin-input-text {
width: 13.5rem; border-radius: 0 0.2rem 0.2rem 0;
height: 100%; box-sizing: content-box;
border-radius: 0 0.4rem 0.4rem 0; width: 12.5rem;
} }
.aladin-location .aladin-location-copy { .aladin-location .aladin-location-copy {
margin-right: -0.2rem; margin-right: -0.2rem;
border-radius: 0.4rem 0px 0px 0.4rem; border-radius: 0.2rem 0 0 0.2rem;
border-right: none; border-right: none;
} }
@@ -1171,22 +1166,22 @@
font-family: monospace; font-family: monospace;
border-radius: 5px; border-radius: 0.4rem;
line-height: 1.7rem; line-height: 1.7rem;
} }
.aladin-fov .aladin-zoom-out { .aladin-fov .aladin-zoom-out {
margin-right: 0; margin-right: 0;
border-right: none; border-right: none;
border-radius: 5px 0px 0px 5px; border-radius: 0.4rem 0px 0px 0.4rem;
} }
.aladin-fov .aladin-zoom-in { .aladin-fov .aladin-zoom-in {
border-radius: 0px 5px 5px 0px; border-radius: 0px 0.4rem 0.4rem 0px;
} }
.aladin-status-bar { .aladin-status-bar {
border-radius: 3px; border-radius: 0.4rem;
padding: 0.4rem; padding: 0.4rem;
position: absolute; position: absolute;

View File

@@ -132,10 +132,6 @@ export class HiPSBrowserBox extends Box {
let filterEnabler = Input.checkbox({ let filterEnabler = Input.checkbox({
name: "filter-enabler", name: "filter-enabler",
checked: false, checked: false,
tooltip: {
content: "Filter off",
position: {direction: 'left'},
},
click(e) { click(e) {
let on = e.target.checked; let on = e.target.checked;
self.filterBox.enable(on); self.filterBox.enable(on);
@@ -155,12 +151,6 @@ export class HiPSBrowserBox extends Box {
}); });
filterEnabler.update({ filterEnabler.update({
tooltip: {
content: on
? "Filter on"
: "Filter off",
position: {direction: 'left'},
},
checked: on, checked: on,
}); });
}, },

View File

@@ -27,6 +27,10 @@ import { ALEvent } from "../../events/ALEvent.js";
import { Utils } from "../../Utils.ts"; import { Utils } from "../../Utils.ts";
import { AladinUtils } from "../../AladinUtils.js"; import { AladinUtils } from "../../AladinUtils.js";
import { Input } from "../Widgets/Input.js"; import { Input } from "../Widgets/Input.js";
import freqIconUrl from '../../../../assets/icons/freq.svg';
import inViewIconUrl from '../../../../assets/icons/inside.svg';
import targetIconUrl from '../../../../assets/icons/target.svg';
/****************************************************************************** /******************************************************************************
* Aladin Lite project * Aladin Lite project
* *
@@ -42,8 +46,13 @@ export class HiPSFilterBox extends Box {
let self; let self;
let regimeBtn = new TogglerActionButton({ let regimeBtn = new TogglerActionButton({
content: 'Regime', content: 'Freq',
tooltip: {content: 'Observation regime', position: {direction: 'bottom'}}, icon: {
monochrome: true,
size: 'medium',
url: freqIconUrl,
},
tooltip: {content: 'Observation bandwidth', position: {direction: 'bottom'}},
toggled: true, toggled: true,
actionOn: () => { actionOn: () => {
self._triggerFilteringCallback(); self._triggerFilteringCallback();
@@ -53,8 +62,13 @@ export class HiPSFilterBox extends Box {
} }
}); });
let spatialBtn = new TogglerActionButton({ let spatialBtn = new TogglerActionButton({
content: 'Inside view', content: 'In view',
tooltip: {content: 'Check for HiPS having observation in the view!', position: {direction: 'bottom'}}, icon: {
monochrome: true,
size: 'medium',
url: inViewIconUrl,
},
tooltip: {content: 'Survey in view only!', position: {direction: 'bottom'}},
toggled: false, toggled: false,
actionOn: () => { actionOn: () => {
self._requestMOCServer(); self._requestMOCServer();
@@ -64,7 +78,12 @@ export class HiPSFilterBox extends Box {
} }
}); });
let resolutionBtn = new TogglerActionButton({ let resolutionBtn = new TogglerActionButton({
content: 'Pixel res', content: 'Resolution',
icon: {
monochrome: true,
size: 'medium',
url: targetIconUrl,
},
tooltip: {content: 'Check for HiPS with a specific pixel resolution.', position: {direction: 'bottom'}}, tooltip: {content: 'Check for HiPS with a specific pixel resolution.', position: {direction: 'bottom'}},
toggled: false, toggled: false,
actionOn: () => { actionOn: () => {
@@ -76,7 +95,7 @@ export class HiPSFilterBox extends Box {
}); });
let logSlider = new Input({ let logSlider = new Input({
label: "Max res [°/px]:", label: "Max resolution [°/px]:",
name: "res", name: "res",
value: 0.1, value: 0.1,
type: 'range', type: 'range',
@@ -112,7 +131,7 @@ export class HiPSFilterBox extends Box {
type: "group", type: "group",
subInputs: [ subInputs: [
{ {
label: "Regime:", label: "Freq:",
name: "regime", name: "regime",
value: "Optical", value: "Optical",
type: 'select', type: 'select',

View File

@@ -48,16 +48,13 @@ import { ALEvent } from "../../events/ALEvent";
super({ super({
icon: { icon: {
monochrome: true, monochrome: true,
size: 'small', size: 'medium',
url: projectionIconUrl, url: projectionIconUrl,
}, },
classList: ['aladin-projection-control'], classList: ['aladin-projection-control'],
//content: [options.verbosity === 'full' ? ProjectionEnum[projectionName].label : projectionName], //content: [options.verbosity === 'full' ? ProjectionEnum[projectionName].label : projectionName],
content: projectionName, content: projectionName,
tooltip: {content: 'Change the view projection', position: {direction: 'bottom left'}}, tooltip: {content: 'Change the view projection', position: {direction: 'bottom left'}},
cssStyle: {
cursor: 'pointer',
},
...options ...options
}, aladin); }, aladin);

View File

@@ -58,6 +58,8 @@
...options ...options
}) })
this.addClass('medium-sized');
self = this; self = this;
this._addEventListeners(aladin); this._addEventListeners(aladin);

View File

@@ -110,10 +110,12 @@ export class Location extends DOMElement {
value: parseCoo(), value: parseCoo(),
}); });
field.addClass("medium-sized")
let copyBtn = new ActionButton({ let copyBtn = new ActionButton({
icon: { icon: {
monochrome: true, monochrome: true,
size: 'small', size: 'medium',
url: copyIconUrl, url: copyIconUrl,
}, },
tooltip: {content: 'Copy to clipboard!', position: {direction: 'bottom'}}, tooltip: {content: 'Copy to clipboard!', position: {direction: 'bottom'}},