Skip to content

Commit

Permalink
remove unnecessary base class
Browse files Browse the repository at this point in the history
  • Loading branch information
alienlike committed Dec 20, 2016
1 parent dda3bdd commit cc9ff46
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/components/style.components.ts
Expand Up @@ -4,19 +4,10 @@ import { Subscription } from 'rxjs/Subscription';
import { Observable } from 'rxjs/Observable';
import { FeatureComponent } from "./feature.component";

export abstract class StyleDirective implements OnChanges {

@Output() onChanged = new EventEmitter<any>();

ngOnChanges() {
this.onChanged.emit();
}
}

@Directive({
selector: 'aol-style-icon'
})
export class IconStyleDirective extends StyleDirective {
export class IconStyleDirective implements OnChanges {

// For usage info see: http://openlayers.org/en/latest/apidoc/ol.style.Icon.html
@Input('anchor') anchor: [number, number];
Expand All @@ -37,6 +28,8 @@ export class IconStyleDirective extends StyleDirective {
@Input('imgSize') imgSize: [number, number];
@Input('src') src: string;

@Output() onChanged = new EventEmitter<any>();

ngOnChanges() {
this.onChanged.emit(this.src);
}
Expand All @@ -45,7 +38,7 @@ export class IconStyleDirective extends StyleDirective {
@Directive({
selector: 'aol-style-stroke'
})
export class StrokeStyleDirective extends StyleDirective {
export class StrokeStyleDirective implements OnChanges {

// For usage info see: http://openlayers.org/en/latest/apidoc/ol.style.Stroke.html
@Input('color') color: [number, number, number, number];
Expand All @@ -54,6 +47,12 @@ export class StrokeStyleDirective extends StyleDirective {
@Input('lineDash') lineDash: number[];
@Input('miterLimit') miterLimit: number;
@Input('width') width: number;

@Output() onChanged = new EventEmitter<any>();

ngOnChanges() {
this.onChanged.emit();
}
}

@Component({
Expand Down

0 comments on commit cc9ff46

Please sign in to comment.