pm-controls
Version:
ProModel Controls
32 lines (29 loc) • 947 B
text/typescript
import {
Component,
Input
} from '@angular/core';
import { Orientation } from '../../../../objects/enums/orientation';
({
selector: 'pm-stack-panel',
//templateUrl: './app/controls/components/panels/stack-panel/stack-panel.html',
templateUrl: './stack-panel.html'
})
export class StackPanelComponent {
() Orientation : Orientation = Orientation.Horizontal;
() HorizontalAlignment: string = "Left";
() Padding: string;
() BackgroundClass: string;
get StackPanelOrientation() {
switch (this.Orientation)
{
case Orientation.Vertical: return "stack-panel-vertical";
case Orientation.Horizontal: return "stack-panel-horizontal";
}
}
get StackPanelHorizontalAlignment() {
switch (this.HorizontalAlignment.toLowerCase()) {
case 'left': return;
case 'right': return "stack-panel-horizontal-alignment-right";
}
}
}