Commit 63568025 authored by CarlosGC1989's avatar CarlosGC1989
Browse files

Refactoriza main y arregla error de tracking

parent 1378cf24
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -120,8 +120,9 @@ define([

		_formatColumn: function(unit, value) {

			if (value === '-')
			if (value === '-') {
				return value;
			}

			return value && (value.toFixed(3) + ' ' + unit);
		},
@@ -137,8 +138,9 @@ define([
				elementuuid: this.pathVariableId.id
			});

			if (target === this.target[1])
			if (target === this.target[1]) {
				return;
			}

			this.target[1] = target;

@@ -174,10 +176,11 @@ define([
				id: this.pathVariableId.activityid
			});

			if (this.target[2])
			if (this.target[2]) {
				this.target[2] = target;
			else
			} else {
				this.target.push(target);
			}

			this._emitEvt('GET', {
				target: target,
@@ -208,12 +211,13 @@ define([
			var cat = data.activityCategory,
				target;

			if (cat === 'at')
			if (cat === 'at') {
				target = this.pointTrackAnimalTarget;
			else if (cat === 'pt')
			} else if (cat === 'pt') {
				target = this.pointTrackPlatformTarget;
			else
			} else {
				return;
			}

			target = lang.replace(target, {
				activityid: this.pathVariableId.activityid
+0 −27
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ define([
	, "redmic/modules/browser/_Framework"
	, "redmic/modules/browser/_GeoJsonParser"
	, "redmic/modules/browser/ListImpl"
	, "redmic/modules/map/layer/WmsLayerImpl"
	, "redmic/modules/search/TextImpl"
	, "templates/CitationList"
], function(
@@ -41,7 +40,6 @@ define([
	, _Framework
	, _GeoJsonParser
	, ListImpl
	, WmsLayerImpl
	, TextImpl
	, TemplateList
){
@@ -100,20 +98,6 @@ define([
			}, this.browserConfig || {}], {
				arrayMergingStrategy: 'concatenate'
			});

			this.batimetriasLayerConfig = this._merge([{
				parentChannel: this.getChannel(),
				layer: OpenLayers.build({
					type: "wms",
					url: "https://atlas.redmic.es/geoserver/el/wms",
					props: {
						layers: ["batimetriaGlobal"],
						format: "image/png",
						transparent: true,
						tiled: true
					}
				})
			}, this.batimetriasLayerConfig || {}]);
		},

		_initializeMain: function() {
@@ -130,10 +114,6 @@ define([
			this.browserConfig.queryChannel = this.queryChannel;
			this.browser = new declare(exts)(this.browserConfig);

			this.batimetriasLayerConfig.mapChannel = this.map.getChannel();

			this.batimetriasLayer = new WmsLayerImpl(this.batimetriasLayerConfig);

			this.mapCenteringGateway = new MapCenteringGatewayImpl({
				parentChannel: this.getChannel(),
				channelsDefinition: [{
@@ -180,13 +160,6 @@ define([

			this.inherited(arguments);

			this._publish(this.map.getChannel("ADD_LAYER"), {
				layer: this.batimetriasLayer,
				layerId: "batimetrias",
				layerLabel: this.i18n.bathymetry,
				optional: true
			});

			this.browserAndSearchContainer = new BorderContainer({
				title: "<i class='fa fa-table'></i>",
				'class': "marginedContainer noScrolledContainer"
+2 −1
Original line number Diff line number Diff line
@@ -292,7 +292,8 @@ define([
			this.rowConfig = this._merge([this.rowConfig || {}, {
				parentChannel: this.getChannel(),
				template: this._getTemplate(item),
				idProperty: this.idProperty
				idProperty: this.idProperty,
				pathSeparator: this.pathSeparator
			}]);
		},