aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-08-29 10:06:42 -0400
committerbobzel <zzzman@gmail.com>2022-08-29 10:06:42 -0400
commit5c25ba79fb24309cb9861d440778cbb902acd123 (patch)
treed412758e819ce05fe4ae8bf18885b0fcab29d7c1
parent85a16b4adc7a092d5ef27c3550cdc81bdb2f97b7 (diff)
fixed background colors of pileup icons.
-rw-r--r--src/client/views/nodes/CollectionFreeFormDocumentView.tsx12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
index c07772b53..cfa4bb160 100644
--- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
+++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
@@ -1,12 +1,14 @@
import { action, computed, observable } from 'mobx';
import { observer } from 'mobx-react';
import { Doc, Opt } from '../../../fields/Doc';
+import { InkField } from '../../../fields/InkField';
import { List } from '../../../fields/List';
import { listSpec } from '../../../fields/Schema';
import { ComputedField } from '../../../fields/ScriptField';
import { Cast, NumCast, StrCast } from '../../../fields/Types';
import { TraceMobx } from '../../../fields/util';
import { numberRange } from '../../../Utils';
+import { DocumentType } from '../../documents/DocumentTypes';
import { DocumentManager } from '../../util/DocumentManager';
import { SelectionManager } from '../../util/SelectionManager';
import { Transform } from '../../util/Transform';
@@ -16,11 +18,6 @@ import { StyleProp } from '../StyleProvider';
import './CollectionFreeFormDocumentView.scss';
import { DocumentView, DocumentViewProps } from './DocumentView';
import React = require('react');
-import { InkField } from '../../../fields/InkField';
-import { DocumentType } from '../../documents/DocumentTypes';
-import { Field } from '../../util/ProsemirrorCopy/prompt';
-import { RefField } from '../../../fields/RefField';
-import { ObjectField } from '../../../fields/ObjectField';
export interface CollectionFreeFormDocumentViewProps extends DocumentViewProps {
dataProvider?: (doc: Doc, replica: string) => { x: number; y: number; zIndex?: number; color?: string; backgroundColor?: string; opacity?: number; highlight?: boolean; z: number; transition?: string } | undefined;
@@ -62,10 +59,10 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
return this.dataProvider?.opacity;
}
get BackgroundColor() {
- return this.dataProvider?.backgroundColor;
+ return this.dataProvider?.backgroundColor ?? Cast(this.Document._backgroundColor, 'string', null);
}
get Color() {
- return this.dataProvider?.color;
+ return this.dataProvider?.color ?? Cast(this.Document._color, 'string', null);
}
get Highlight() {
return this.dataProvider?.highlight;
@@ -226,7 +223,6 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
PanelWidth: this.panelWidth,
PanelHeight: this.panelHeight,
};
- console.log('WIdth = ' + this.panelWidth() + ' ' + this.dataProvider?.transition);
return (
<div
className={'collectionFreeFormDocumentView-container'}