Commit 66004ca1 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Renombra métodos de diseño, refina widgets

Renombra algunos métodos de los nuevos diseños, para indicar que están
destinados a llamarse desde otros mixins que se apliquen a la misma
instancia.

Retoca detalles de widget de estaciones de observación, antes de
propagar su lógica a otros widgets.

Aplica el cambio hacia el nuevo diseño al widget de mapa de estaciones
que generan series temporales.
parent 07fe4d49
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ define([
		//   Base común para los controladores de diseño.
		//   Reúne funciones básicas usadas por todos los controladores de diseño.

		_prepareComponentDefinition: function(/*Array*/ baseDefinitionArray, /*Object*/ extensionEnableFlags,
		prepareComponentDefinition: function(/*Array*/ baseDefinitionArray, /*Object*/ extensionEnableFlags,
			/*Object*/ extensionDefinitions) {
			// summary:
			//   Recibe un array de definiciones base del componente y dos objetos, uno de flags de activación y otro
@@ -25,7 +25,7 @@ define([
			return declare(baseDefinitionArray);
		},

		_mergeComponentAttribute: function(/*String*/ attrName, /*Object*/ objToMerge, /*Object?*/ mergeOpts) {
		mergeComponentAttribute: function(/*String*/ attrName, /*Object*/ objToMerge, /*Object?*/ mergeOpts) {
			// summary:
			//   Recibe un nombre de atributo, un objeto para mezclar con el valor actual del atributo y un objeto
			//   opcional para configurar parámetros de la mezcla.
@@ -41,7 +41,7 @@ define([
			this.inherited(arguments);

			// Este método debe devolver un objeto con las instancias de los componentes, indexadas por su propName.
			const componentInstances = this._createDesignControllerComponents?.();
			const componentInstances = this.createDesignControllerComponents?.();

			for (let key in componentInstances) {
				this._setComponentInstance(componentInstances[key], key);
+2 −2
Original line number Diff line number Diff line
@@ -36,13 +36,13 @@ define([
			this.inherited(arguments);

			// Este método debe devolver un objeto con los nodos de maquetación, indexados por su propName.
			const layoutNodes = this._createDesignLayoutNodes?.();
			const layoutNodes = this.createDesignLayoutNodes?.();

			for (let propName in layoutNodes) {
				this._setLayoutNode(layoutNodes[propName], propName);
			}

			this._populateDesignLayoutNodes?.();
			this.populateDesignLayoutNodes?.();
		},

		_setLayoutNode: function(/*Object*/ node, /*String*/ nodePropName) {
+7 −7
Original line number Diff line number Diff line
@@ -25,20 +25,20 @@ define([

			const parentChannel = this.getChannel();

			this._mergeComponentAttribute('tabsDisplayerConfig', {
			this.mergeComponentAttribute('tabsDisplayerConfig', {
				parentChannel
			});

			this._mergeComponentAttribute('atlasConfig', {
			this.mergeComponentAttribute('atlasConfig', {
				parentChannel
			});

			this._mergeComponentAttribute('queryOnMapConfig', {
			this.mergeComponentAttribute('queryOnMapConfig', {
				parentChannel
			});
		},

		_createDesignControllerComponents: function() {
		createDesignControllerComponents: function() {

			let inheritedComponents = this.inherited(arguments);

@@ -69,7 +69,7 @@ define([

		_createDesignAtlasComponent: function(getMapChannel, addTabChannel) {

			this._mergeComponentAttribute('atlasConfig', {
			this.mergeComponentAttribute('atlasConfig', {
				getMapChannel, addTabChannel
			});

@@ -78,14 +78,14 @@ define([

		_createDesignQueryOnMapComponent: function(getMapChannel, tabsDisplayerChannel) {

			this._mergeComponentAttribute('queryOnMapConfig', {
			this.mergeComponentAttribute('queryOnMapConfig', {
				getMapChannel, tabsDisplayerChannel
			});

			return new QueryOnMap(this.queryOnMapConfig);
		},

		_populateDesignLayoutNodes: function() {
		populateDesignLayoutNodes: function() {

			this.inherited(arguments);

+8 −8
Original line number Diff line number Diff line
@@ -62,17 +62,17 @@ define([
			const parentChannel = this.getChannel(),
				target = this._getTarget?.();

			this._mergeComponentAttribute('tabsDisplayerConfig', {
			this.mergeComponentAttribute('tabsDisplayerConfig', {
				parentChannel
			});

			this._mergeComponentAttribute('searchConfig', {
			this.mergeComponentAttribute('searchConfig', {
				parentChannel,
				target,
				itemLabel: null
			});

			this._mergeComponentAttribute('browserConfig', {
			this.mergeComponentAttribute('browserConfig', {
				parentChannel,
				selectorChannel: parentChannel,
				target,
@@ -94,12 +94,12 @@ define([
				arrayMergingStrategy: 'concatenate'
			});

			this._BrowserComponentDefinition = this._prepareComponentDefinition(
			this._BrowserComponentDefinition = this.prepareComponentDefinition(
				[ListImpl, _Framework, _ButtonsInRow, _GeoJsonParser], this.enabledBrowserExtensions,
				browserComponentExtensionDefinitions);
		},

		_createDesignControllerComponents: function() {
		createDesignControllerComponents: function() {

			let inheritedComponents = this.inherited(arguments);

@@ -141,7 +141,7 @@ define([
			return new TextImpl(this.searchConfig);
		},

		_populateDesignLayoutNodes: function() {
		populateDesignLayoutNodes: function() {

			this.inherited(arguments);

+6 −6
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ define([

			const parentChannel = this.getChannel();

			this._mergeComponentAttribute('mapLayerConfig', {
			this.mergeComponentAttribute('mapLayerConfig', {
				parentChannel,
				selectorChannel: parentChannel,
				idProperty: 'uuid',
@@ -59,17 +59,17 @@ define([
				getPopupContent: lang.hitch(this, this._getPopupContent)
			});

			this._mergeComponentAttribute('mapCenteringConfig', {
			this.mergeComponentAttribute('mapCenteringConfig', {
				parentChannel
			});

			const mapLayerComponentBaseDefinition = mapLayerComponentDefinitions[this.mapLayerDefinition];

			this._MapLayerComponentDefinition = this._prepareComponentDefinition([mapLayerComponentBaseDefinition],
			this._MapLayerComponentDefinition = this.prepareComponentDefinition([mapLayerComponentBaseDefinition],
				this.enabledMapLayerExtensions, mapLayerComponentExtensionDefinitions);
		},

		_createDesignControllerComponents: function() {
		createDesignControllerComponents: function() {

			let inheritedComponents = this.inherited(arguments);

@@ -83,7 +83,7 @@ define([

			const mapChannel = mapInstance.getChannel();

			this._mergeComponentAttribute('mapLayerConfig', {
			this.mergeComponentAttribute('mapLayerConfig', {
				mapChannel
			});

@@ -95,7 +95,7 @@ define([
			return new MapCenteringGatewayImpl(this.mapCenteringConfig);
		},

		_populateDesignLayoutNodes: function() {
		populateDesignLayoutNodes: function() {

			this.inherited(arguments);

Loading