Skip to content

Commit

Permalink
fix(context): fix minors issues context module
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbeau committed Jul 29, 2019
1 parent a30c7c8 commit 7771fb9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { Component, Input, Output, EventEmitter, ChangeDetectorRef } from '@angular/core';

import { Context } from '../shared/context.interface';

Expand All @@ -13,10 +13,15 @@ export class ContextEditComponent {
}
set context(value: Context) {
this._context = value;
this.refresh();
}
private _context: Context;

@Output() submitForm: EventEmitter<any> = new EventEmitter();

constructor() {}
constructor(private cd: ChangeDetectorRef) {}

refresh() {
this.cd.detectChanges();
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
form {
margin: 0 10px;
}

.full-width {
width: 100%;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ export class ContextService {
context.layers.push(opts);
}

context.tools = this.tools.map(tool => String(tool.id));
context.tools = this.tools.map(tool => {id: String(tool.id)});

return context;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ import { ToolComponent } from '@igo2/common';
selector: 'igo-context-editor-tool',
templateUrl: './context-editor-tool.component.html'
})
export class ContextEditorToolComponent {
constructor() {}
}
export class ContextEditorToolComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ export class ContextManagerToolComponent {
}

managePermissions() {
this.toolState.toolbox.activateTool('permissionsContextManager');
this.toolState.toolbox.activateTool('contextPermissionManager');
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { Component } from '@angular/core';

import { ToolComponent } from '@igo2/common';

Expand All @@ -11,6 +11,4 @@ import { ToolComponent } from '@igo2/common';
selector: 'igo-context-permission-manager-tool',
templateUrl: './context-permission-manager-tool.component.html'
})
export class ContextPermissionManagerToolComponent {
constructor() {}
}
export class ContextPermissionManagerToolComponent {}

0 comments on commit 7771fb9

Please sign in to comment.