Revert codestyle changes (#40)

* Revert "7f7efbb94bab8574e42d942ad82d414e007b2970"

Code style changes should probably be part of a PR
This commit is contained in:
Eliot Partridge
2019-08-30 10:53:14 -05:00
committed by GitHub
parent eefd9e9a2c
commit caf70a864f
446 changed files with 70667 additions and 70655 deletions
@@ -7,67 +7,67 @@ const FILLS = ['Orange', 'DodgerBlue', 'LimeGreen', 'Orchid', 'crimson', 'Aquama
const OUTLINES = ['Chocolate', 'SteelBlue', 'ForestGreen', 'DarkOrchid', 'darkred', 'DarkTurquoise'];
@Directive({
selector: '[setOutlineHidden]',
selector: '[setOutlineHidden]',
})
export class SetOutlineHidden {
@Input() setOutlineHidden = false;
@Input() setOutlineHidden = false;
}
@Component({
selector: 'set-selection',
templateUrl: 'set-selection.pug',
styleUrls: ['set-selection.scss'],
selector: 'set-selection',
templateUrl: 'set-selection.pug',
styleUrls: ['set-selection.scss'],
})
export class SetSelection implements OnChanges {
readonly exampleFills = FILLS;
readonly exampleOutlines = OUTLINES;
@Input() label?: string;
@Input() base?: string;
@Input() set?: SpriteSet<string>;
@Input() sets?: ColorExtraSets;
@Input() sprites?: ColorExtraSet;
@Input() circle?: string;
@Input() outlineHidden = false;
@Input() nonLockable = false;
@Input() compact = false;
@Input() onlyPatterns = false;
@Input() darken = true;
@Output() change = new EventEmitter<void>();
constructor(@Optional() private hidden: SetOutlineHidden) {
}
get isOutlineHidden() {
return this.hidden ? this.hidden.setOutlineHidden : this.outlineHidden;
}
get patternColors() {
const set = this.getSet();
const pat = this.set && set && set[this.set.pattern || 0];
readonly exampleFills = FILLS;
readonly exampleOutlines = OUTLINES;
@Input() label?: string;
@Input() base?: string;
@Input() set?: SpriteSet<string>;
@Input() sets?: ColorExtraSets;
@Input() sprites?: ColorExtraSet;
@Input() circle?: string;
@Input() outlineHidden = false;
@Input() nonLockable = false;
@Input() compact = false;
@Input() onlyPatterns = false;
@Input() darken = true;
@Output() change = new EventEmitter<void>();
constructor(@Optional() private hidden: SetOutlineHidden) {
}
get isOutlineHidden() {
return this.hidden ? this.hidden.setOutlineHidden : this.outlineHidden;
}
get patternColors() {
const set = this.getSet();
const pat = this.set && set && set[this.set.pattern || 0];
if (pat && !pat.colors) {
return 0;
} else if (pat) {
return getColorCount(pat);
} else {
return this.nonLockable ? 1 : 0;
}
}
get showColorPatterns(): boolean {
const type = this.set && this.set.type || 0;
const set = this.sets && this.sets[type];
return !!set && set.length > 1;
}
ngOnChanges() {
this.sprites = this.sets ? this.sets.map(s => s ? s[0] : undefined) : undefined;
}
onChange() {
const set = this.getSet();
if (pat && !pat.colors) {
return 0;
} else if (pat) {
return getColorCount(pat);
} else {
return this.nonLockable ? 1 : 0;
}
}
get showColorPatterns(): boolean {
const type = this.set && this.set.type || 0;
const set = this.sets && this.sets[type];
return !!set && set.length > 1;
}
ngOnChanges() {
this.sprites = this.sets ? this.sets.map(s => s ? s[0] : undefined) : undefined;
}
onChange() {
const set = this.getSet();
if (this.set && set) {
this.set.pattern = clamp(this.set.pattern || 0, 0, set.length - 1);
}
if (this.set && set) {
this.set.pattern = clamp(this.set.pattern || 0, 0, set.length - 1);
}
this.change.emit();
}
private getSet(): ColorExtraSet | undefined {
return this.set && this.sets && this.sets[this.set.type || 0];
}
this.change.emit();
}
private getSet(): ColorExtraSet | undefined {
return this.set && this.sets && this.sets[this.set.type || 0];
}
}