Loading client-app/src/component/atlas/Atlas.js +13 −4 Original line number Diff line number Diff line Loading @@ -69,6 +69,15 @@ define([ REMOVE_LAYER: 'removeLayer' }, actions: { // Map actions LAYER_REMOVED: 'layerRemoved', ADD_LAYER: 'addLayer', REMOVE_LAYER: 'removeLayer', FIT_BOUNDS: 'fitBounds', REORDER_LAYERS: 'reorderLayers' }, _itemsSelected: {}, localTarget: 'localAtlas', target: redmicConfig.services.atlasLayer, Loading Loading @@ -169,12 +178,12 @@ define([ _defineSubscriptions: function() { if (!this.getMapChannel) { if (!this.mapChannel) { console.error('Map channel not defined for atlas "%s"', this.getChannel()); } this.subscriptionsConfig.push({ channel : this.getMapChannel('LAYER_REMOVED'), channel : this._buildChannel(this.mapChannel, 'LAYER_REMOVED'), callback: '_subLayerRemoved' },{ channel : this.catalogView.getChildChannel('browser', 'BUTTON_EVENT'), Loading @@ -186,10 +195,10 @@ define([ this.publicationsConfig.push({ event: 'ADD_LAYER', channel: this.getMapChannel('ADD_LAYER') channel: this._buildChannel(this.mapChannel, 'ADD_LAYER') },{ event: 'REMOVE_LAYER', channel: this.getMapChannel('REMOVE_LAYER') channel: this._buildChannel(this.mapChannel, 'REMOVE_LAYER') }); }, Loading client-app/src/component/atlas/_AtlasLayersManagement.js +1 −1 Original line number Diff line number Diff line Loading @@ -264,7 +264,7 @@ define([ const layerId = this._createLayerId(atlasItem), layerLabel = this._createLayerLabel(atlasItem), mapChannel = this.getMapChannel?.() ?? null, mapChannel = this.mapChannel, innerLayerDefinition = this._getLayerDefinitionByProtocol(atlasItem); return { Loading client-app/src/component/atlas/_AtlasThemesManagement.js +2 −2 Original line number Diff line number Diff line Loading @@ -199,7 +199,7 @@ define([ }); } this._publish(this.getMapChannel('REORDER_LAYERS'), { this._publish(this._buildChannel(this.mapChannel, 'REORDER_LAYERS'), { layerId: this._createLayerId(item.atlasItem), index: response.indexList, movedDown: movedDown Loading Loading @@ -295,7 +295,7 @@ define([ southWest = this._getLatLng(coordinates[0]), northEast = this._getLatLng(coordinates[2]); this._publish(this.getMapChannel('FIT_BOUNDS'), { this._publish(this._buildChannel(this.mapChannel, 'FIT_BOUNDS'), { bounds: L.latLngBounds(southWest, northEast) }); }, Loading client-app/src/component/mapQuery/QueryOnMap.js +1 −4 Original line number Diff line number Diff line Loading @@ -64,12 +64,9 @@ define([ this.inherited(arguments); if (!this.getMapChannel) { if (!this.mapChannel) { console.error('Map channel not defined for QueryOnMap "%s"', this.getChannel()); } // TODO cuando venga así desde fuera (string en lugar de función), quitar y usar directamente this.mapChannel = this.getMapChannel?.(); }, _defineSubscriptions: function() { Loading client-app/src/design/map/_AddAtlasComponent.js +7 −7 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ define([ const inheritedComponents = this.inherited(arguments); const mapInstance = inheritedComponents.map, getMapChannel = lang.hitch(mapInstance, mapInstance.getChannel); mapChannel = mapInstance?.getChannel(); let tabsDisplayer = inheritedComponents.tabsDisplayer; Loading @@ -55,9 +55,9 @@ define([ const tabsDisplayerChannel = tabsDisplayer.getChannel(), addTabChannel = tabsDisplayer.getChannel('ADD_TAB'); const atlas = this._createDesignAtlasComponent(getMapChannel, addTabChannel); const atlas = this._createDesignAtlasComponent(mapChannel, addTabChannel); const queryOnMap = this._createDesignQueryOnMapComponent(getMapChannel, tabsDisplayerChannel); const queryOnMap = this._createDesignQueryOnMapComponent(mapChannel, tabsDisplayerChannel); return lang.mixin(inheritedComponents, {atlas, queryOnMap}); }, Loading @@ -67,19 +67,19 @@ define([ return new TabsDisplayer(this.tabsDisplayerConfig); }, _createDesignAtlasComponent: function(getMapChannel, addTabChannel) { _createDesignAtlasComponent: function(mapChannel, addTabChannel) { this.mergeComponentAttribute('atlasConfig', { getMapChannel, addTabChannel mapChannel, addTabChannel }); return new Atlas(this.atlasConfig); }, _createDesignQueryOnMapComponent: function(getMapChannel, tabsDisplayerChannel) { _createDesignQueryOnMapComponent: function(mapChannel, tabsDisplayerChannel) { this.mergeComponentAttribute('queryOnMapConfig', { getMapChannel, tabsDisplayerChannel mapChannel, tabsDisplayerChannel }); return new QueryOnMap(this.queryOnMapConfig); Loading Loading
client-app/src/component/atlas/Atlas.js +13 −4 Original line number Diff line number Diff line Loading @@ -69,6 +69,15 @@ define([ REMOVE_LAYER: 'removeLayer' }, actions: { // Map actions LAYER_REMOVED: 'layerRemoved', ADD_LAYER: 'addLayer', REMOVE_LAYER: 'removeLayer', FIT_BOUNDS: 'fitBounds', REORDER_LAYERS: 'reorderLayers' }, _itemsSelected: {}, localTarget: 'localAtlas', target: redmicConfig.services.atlasLayer, Loading Loading @@ -169,12 +178,12 @@ define([ _defineSubscriptions: function() { if (!this.getMapChannel) { if (!this.mapChannel) { console.error('Map channel not defined for atlas "%s"', this.getChannel()); } this.subscriptionsConfig.push({ channel : this.getMapChannel('LAYER_REMOVED'), channel : this._buildChannel(this.mapChannel, 'LAYER_REMOVED'), callback: '_subLayerRemoved' },{ channel : this.catalogView.getChildChannel('browser', 'BUTTON_EVENT'), Loading @@ -186,10 +195,10 @@ define([ this.publicationsConfig.push({ event: 'ADD_LAYER', channel: this.getMapChannel('ADD_LAYER') channel: this._buildChannel(this.mapChannel, 'ADD_LAYER') },{ event: 'REMOVE_LAYER', channel: this.getMapChannel('REMOVE_LAYER') channel: this._buildChannel(this.mapChannel, 'REMOVE_LAYER') }); }, Loading
client-app/src/component/atlas/_AtlasLayersManagement.js +1 −1 Original line number Diff line number Diff line Loading @@ -264,7 +264,7 @@ define([ const layerId = this._createLayerId(atlasItem), layerLabel = this._createLayerLabel(atlasItem), mapChannel = this.getMapChannel?.() ?? null, mapChannel = this.mapChannel, innerLayerDefinition = this._getLayerDefinitionByProtocol(atlasItem); return { Loading
client-app/src/component/atlas/_AtlasThemesManagement.js +2 −2 Original line number Diff line number Diff line Loading @@ -199,7 +199,7 @@ define([ }); } this._publish(this.getMapChannel('REORDER_LAYERS'), { this._publish(this._buildChannel(this.mapChannel, 'REORDER_LAYERS'), { layerId: this._createLayerId(item.atlasItem), index: response.indexList, movedDown: movedDown Loading Loading @@ -295,7 +295,7 @@ define([ southWest = this._getLatLng(coordinates[0]), northEast = this._getLatLng(coordinates[2]); this._publish(this.getMapChannel('FIT_BOUNDS'), { this._publish(this._buildChannel(this.mapChannel, 'FIT_BOUNDS'), { bounds: L.latLngBounds(southWest, northEast) }); }, Loading
client-app/src/component/mapQuery/QueryOnMap.js +1 −4 Original line number Diff line number Diff line Loading @@ -64,12 +64,9 @@ define([ this.inherited(arguments); if (!this.getMapChannel) { if (!this.mapChannel) { console.error('Map channel not defined for QueryOnMap "%s"', this.getChannel()); } // TODO cuando venga así desde fuera (string en lugar de función), quitar y usar directamente this.mapChannel = this.getMapChannel?.(); }, _defineSubscriptions: function() { Loading
client-app/src/design/map/_AddAtlasComponent.js +7 −7 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ define([ const inheritedComponents = this.inherited(arguments); const mapInstance = inheritedComponents.map, getMapChannel = lang.hitch(mapInstance, mapInstance.getChannel); mapChannel = mapInstance?.getChannel(); let tabsDisplayer = inheritedComponents.tabsDisplayer; Loading @@ -55,9 +55,9 @@ define([ const tabsDisplayerChannel = tabsDisplayer.getChannel(), addTabChannel = tabsDisplayer.getChannel('ADD_TAB'); const atlas = this._createDesignAtlasComponent(getMapChannel, addTabChannel); const atlas = this._createDesignAtlasComponent(mapChannel, addTabChannel); const queryOnMap = this._createDesignQueryOnMapComponent(getMapChannel, tabsDisplayerChannel); const queryOnMap = this._createDesignQueryOnMapComponent(mapChannel, tabsDisplayerChannel); return lang.mixin(inheritedComponents, {atlas, queryOnMap}); }, Loading @@ -67,19 +67,19 @@ define([ return new TabsDisplayer(this.tabsDisplayerConfig); }, _createDesignAtlasComponent: function(getMapChannel, addTabChannel) { _createDesignAtlasComponent: function(mapChannel, addTabChannel) { this.mergeComponentAttribute('atlasConfig', { getMapChannel, addTabChannel mapChannel, addTabChannel }); return new Atlas(this.atlasConfig); }, _createDesignQueryOnMapComponent: function(getMapChannel, tabsDisplayerChannel) { _createDesignQueryOnMapComponent: function(mapChannel, tabsDisplayerChannel) { this.mergeComponentAttribute('queryOnMapConfig', { getMapChannel, tabsDisplayerChannel mapChannel, tabsDisplayerChannel }); return new QueryOnMap(this.queryOnMapConfig); Loading