Skip to content
Snippets Groups Projects
Commit 676ef123 authored by rhenck's avatar rhenck
Browse files

[editor] Refactor variable from useless setter to normal

parent eafdb8ae
No related branches found
No related tags found
No related merge requests found
...@@ -66,8 +66,8 @@ export class CanvasDragOverlayComponent implements OnInit { ...@@ -66,8 +66,8 @@ export class CanvasDragOverlayComponent implements OnInit {
childComponent.location.nativeElement.firstChild.style.cursor = 'inherit'; childComponent.location.nativeElement.firstChild.style.cursor = 'inherit';
} }
set selected(newValue: boolean) { setSelected(newValue: boolean): void {
this._selected = newValue; this.selected = newValue;
} }
click(event: MouseEvent): void { click(event: MouseEvent): void {
......
...@@ -38,7 +38,7 @@ export class CanvasSectionComponent implements OnInit { ...@@ -38,7 +38,7 @@ export class CanvasSectionComponent implements OnInit {
this.canvasComponents.forEach((component: CanvasDragOverlayComponent) => { this.canvasComponents.forEach((component: CanvasDragOverlayComponent) => {
selectedElements.forEach((selectedElement: UnitUIElement) => { selectedElements.forEach((selectedElement: UnitUIElement) => {
if (component.element === selectedElement) { if (component.element === selectedElement) {
component.selected = true; component.setSelected(true);
} }
}); });
}); });
...@@ -46,7 +46,7 @@ export class CanvasSectionComponent implements OnInit { ...@@ -46,7 +46,7 @@ export class CanvasSectionComponent implements OnInit {
clearSelection(): void { clearSelection(): void {
this.canvasComponents.forEach((canvasComponent: CanvasDragOverlayComponent) => { this.canvasComponents.forEach((canvasComponent: CanvasDragOverlayComponent) => {
canvasComponent.selected = false; canvasComponent.setSelected(false);
}); });
} }
......
...@@ -69,7 +69,7 @@ export class PageCanvasComponent implements OnInit, OnDestroy { ...@@ -69,7 +69,7 @@ export class PageCanvasComponent implements OnInit, OnDestroy {
} }
this.selectedComponentElements.push(event.componentElement); this.selectedComponentElements.push(event.componentElement);
this.unitService.selectElement(event.componentElement.element); this.unitService.selectElement(event.componentElement.element);
event.componentElement.selected = true; event.componentElement.setSelected(true);
} }
private clearSelection() { private clearSelection() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment