wip: imagecolor refac, imagesurvey object refac

This commit is contained in:
Matthieu BAUMANN
2023-02-10 01:09:25 +01:00
parent a2188b8d65
commit 163a8faf38
74 changed files with 1229 additions and 1855 deletions

View File

@@ -54,6 +54,8 @@ export class Stack {
this.imgLayers = new Map();
this.selectedLayer = undefined;
this.backgroundColor = '#6699ff';
this._createComponent();
this._addListeners();
}
@@ -101,15 +103,13 @@ export class Stack {
layerBox.append(backgroundColorInput);
// Set a default background color
const defaultBackgroundColor = '#6699ff';
backgroundColorInput.val(defaultBackgroundColor);
self.view.aladin.setBackgroundColor(Color.hexToRgb(defaultBackgroundColor));
backgroundColorInput.val(this.backgroundColor);
self.view.aladin.setBackgroundColor(Color.hexToRgb(this.backgroundColor));
let updateBackgroundColor = function () {
const backgroundColor = backgroundColorInput.val();
self.view.aladin.setBackgroundColor(Color.hexToRgb(backgroundColor));
};
backgroundColorInput.on('input', updateBackgroundColor);
backgroundColorInput.on('input', () => {
self.backgroundColor = backgroundColorInput.val();
self.view.aladin.setBackgroundColor(Color.hexToRgb(self.backgroundColor));
});
layerBox.append('<div class="aladin-box-separator"></div>' +
'<div class="aladin-label">Overlay layers</div>');