aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields
diff options
context:
space:
mode:
authorStanley Yip <33562077+yipstanley@users.noreply.github.com>2019-07-29 17:58:23 +0000
committerGitHub <noreply@github.com>2019-07-29 17:58:23 +0000
commit52da1fd396880603209b56cd49a590255d8b0b1f (patch)
tree6c8ea0463d13873598f1632a14871ae0c1da681f /src/new_fields
parent06daf2b00d8b906108905ca9bc5665b1b1b8007c (diff)
parentc361a566b2a3ce134bbb7e5906c23492c7012c7b (diff)
Merge pull request #224 from browngraphicslab/schema_view_improvements_2
schema view fixes
Diffstat (limited to 'src/new_fields')
-rw-r--r--src/new_fields/SchemaHeaderField.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/new_fields/SchemaHeaderField.ts b/src/new_fields/SchemaHeaderField.ts
index a6df31e81..d124a3907 100644
--- a/src/new_fields/SchemaHeaderField.ts
+++ b/src/new_fields/SchemaHeaderField.ts
@@ -48,11 +48,12 @@ export class SchemaHeaderField extends ObjectField {
color: string;
type: number;
- constructor(heading: string = "", color: string = RandomPastel(), type?: ColumnType) {
+ constructor(heading: string = "", color?: string, type?: ColumnType) {
+ console.log("CREATING SCHEMA HEADER FIELD");
super();
this.heading = heading;
- this.color = color;
+ this.color = color === "" || color === undefined ? RandomPastel() : color;
if (type) {
this.type = type;
}