Commit a090aa87 authored by seyed.takyar's avatar seyed.takyar
Browse files

One bug in the code related to moving layers Upwards is solved

parent 7827adcf
Pipeline #141531 passed with stage
in 2 minutes and 14 seconds
export interface EsriLayer {
[x: string]: any;
}
import { TestBed } from '@angular/core/testing';
import { LayerService } from './layer.service';
describe('LayerService', () => {
let service: LayerService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(LayerService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
......@@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class LayerServiceService {
export class LayerService {
constructor() { }
}
import { TestBed } from '@angular/core/testing';
import { MapService } from './map.service';
describe('MapService', () => {
let service: MapService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(MapService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class MapService {
constructor() { }
}
......@@ -106,7 +106,7 @@ import { ModelRunMetadataComponent } from './components/model-run-metadata/model
import { VisualizationPanelComponent } from './components/visualization-panel/visualization-panel.component';
import { EsriMapComponent } from './components/esri-map/esri-map.component';
import { DashboardComponent } from './components/dashboard/dashboard.component';
import { LayerEditorComponent } from './components/layer-editor/layer-editor.component';
import { LayerManagerComponent } from './components/layer-manager/layer-manager.component';
......@@ -129,7 +129,7 @@ import { LayerEditorComponent } from './components/layer-editor/layer-editor.com
VisualizationPanelComponent,
EsriMapComponent,
DashboardComponent,
LayerEditorComponent
LayerManagerComponent
],
......
......@@ -5,7 +5,7 @@
<app-layer-editor ></app-layer-editor>
<app-layer-manager ></app-layer-manager>
......@@ -391,7 +391,7 @@ export class EsriMapComponent implements OnInit {
}
if (layerToMoveIdx < layerList.viewModel.operationalItems.length) {
layerList.viewModel.moveListItem(event.item, null, null, layerToMoveIdx + 1);
layerList.viewModel.moveListItem(event.item, null, null, layerToMoveIdx + 2);
}
}
......
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LayerEditorComponent } from './layer-editor.component';
import { LayerManagerComponent } from './layer-manager.component';
describe('LayerEditorComponent', () => {
let component: LayerEditorComponent;
let fixture: ComponentFixture<LayerEditorComponent>;
describe('LayerManagerComponent', () => {
let component: LayerManagerComponent;
let fixture: ComponentFixture<LayerManagerComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ LayerEditorComponent ]
declarations: [ LayerManagerComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(LayerEditorComponent);
fixture = TestBed.createComponent(LayerManagerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
......
......@@ -3,12 +3,12 @@ import { Component, OnInit, SystemJsNgModuleLoader, ViewEncapsulation } from '@a
@Component({
selector: 'app-layer-editor',
templateUrl: './layer-editor.component.html',
styleUrls: ['./layer-editor.component.scss'],
selector: 'app-layer-manager',
templateUrl: './layer-manager.component.html',
styleUrls: ['./layer-manager.component.scss'],
encapsulation:ViewEncapsulation.Emulated
})
export class LayerEditorComponent implements OnInit {
export class LayerManagerComponent implements OnInit {
layerTypes : any = [];
selectedLayerType: string;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment