aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMelissa Zhang <mzhang19096@gmail.com>2020-05-15 19:56:07 -0700
committerMelissa Zhang <mzhang19096@gmail.com>2020-05-15 19:56:07 -0700
commit2af870505bbd181ec0d121439da5dad9a0bcddcc (patch)
tree3c3e5e3a3c851909a24065c894aa1beba37a3126 /src
parent253d5efbbafe4a44c350fef7dda6d553a70a94c9 (diff)
merge fixes
Diffstat (limited to 'src')
-rw-r--r--src/client/documents/Documents.ts2
-rw-r--r--src/client/views/nodes/ComparisonBox.tsx17
-rw-r--r--src/client/views/nodes/DocumentContentsView.tsx25
3 files changed, 12 insertions, 32 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 90a99b85a..b36c8c8bf 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -560,7 +560,7 @@ export namespace Docs {
return InstanceFromProto(Prototypes.get(DocumentType.SCREENSHOT), "", options);
}
- export function ComparisonDocument(options: DocumentOptions = {}) {
+ export function ComparisonDocument(options: DocumentOptions = { title: "Comparison Box" }) {
return InstanceFromProto(Prototypes.get(DocumentType.COMPARISON), "", options);
}
diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx
index 7b35b2811..eef72895f 100644
--- a/src/client/views/nodes/ComparisonBox.tsx
+++ b/src/client/views/nodes/ComparisonBox.tsx
@@ -4,11 +4,11 @@ import { faAsterisk, faBrain, faFileAudio, faImage, faPaintBrush, faTimes, faClo
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { action, computed, observable, runInAction, Lambda } from 'mobx';
import { observer } from "mobx-react";
-import { Doc } from '../../../new_fields/Doc';
-import { documentSchema } from '../../../new_fields/documentSchemas';
-import { Id } from '../../../new_fields/FieldSymbols';
-import { createSchema, makeInterface } from '../../../new_fields/Schema';
-import { NumCast, StrCast } from '../../../new_fields/Types';
+import { Doc } from '../../../fields/Doc';
+import { documentSchema } from '../../../fields/documentSchemas';
+import { Id } from '../../../fields/FieldSymbols';
+import { createSchema, makeInterface } from '../../../fields/Schema';
+import { NumCast, StrCast } from '../../../fields/Types';
import { DragManager } from '../../util/DragManager';
import { ViewBoxAnnotatableComponent } from '../DocComponent';
import { FieldView, FieldViewProps } from './FieldView';
@@ -127,7 +127,8 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps, C
<>
<ContentFittingDocumentView {...this.props}
Document={beforeDoc}
- getTransform={this.props.ScreenToLocalTransform} />
+ parentActive={this.props.active} />
+ {/* getTransform={this.props.ScreenToLocalTransform} /> */}
<div className="clear-button before" onClick={(e) => this.clearBeforeDoc(e)}>
<FontAwesomeIcon className="clear-button before" icon={faTimes} size="sm" />
</div>
@@ -152,7 +153,9 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps, C
<>
<ContentFittingDocumentView {...this.props}
Document={afterDoc}
- getTransform={this.props.ScreenToLocalTransform} />
+ parentActive={this.props.active}
+ // getTransform={this.props.ScreenToLocalTransform}
+ />
<div className="clear-button after" onClick={(e) => this.clearAfterDoc(e)}>
<FontAwesomeIcon className="clear-button after" icon={faTimes} size="sm" />
</div>
diff --git a/src/client/views/nodes/DocumentContentsView.tsx b/src/client/views/nodes/DocumentContentsView.tsx
index c9db1ea01..ef56e6fcd 100644
--- a/src/client/views/nodes/DocumentContentsView.tsx
+++ b/src/client/views/nodes/DocumentContentsView.tsx
@@ -186,28 +186,6 @@ export class DocumentContentsView extends React.Component<DocumentViewProps & {
// layoutFrame = splits.length > 1 ? splits[0] + splits[1].replace(/{([^{}]|(?R))*}/, replacer4) : ""; // might have been more elegant if javascript supported recursive patterns
return (this.props.renderDepth > 12 || !layoutFrame || !this.layoutDoc) ? (null) :
-<<<<<<< HEAD
- this.props.forceLayout === "FormattedTextBox" && this.props.forceFieldKey ?
- <FormattedTextBox {...bindings.props} fieldKey={this.props.forceFieldKey} />
- :
- <ObserverJsxParser
- key={42}
- blacklistedAttrs={[]}
- renderInWrapper={false}
- components={{
- FormattedTextBox, ImageBox, DirectoryImportBox, FontIconBox, LabelBox, SliderBox, FieldView,
- CollectionFreeFormView, CollectionDockingView, CollectionSchemaView, CollectionView, WebBox, KeyValueBox,
- PDFBox, VideoBox, AudioBox, PresBox, YoutubeBox, PresElementBox, QueryBox,
- ColorBox, DashWebRTCVideo, LinkAnchorBox, InkingStroke, DocHolderBox, LinkBox, ScriptingBox,
- RecommendationsBox, ScreenshotBox, HTMLtag, ComparisonBox
- }}
- bindings={bindings}
- jsx={layoutFrame}
- showWarnings={true}
-
- onError={(test: any) => { console.log(test); }}
- />;
-=======
<ObserverJsxParser
key={42}
blacklistedAttrs={[]}
@@ -217,7 +195,7 @@ export class DocumentContentsView extends React.Component<DocumentViewProps & {
CollectionFreeFormView, CollectionDockingView, CollectionSchemaView, CollectionView, WebBox, KeyValueBox,
PDFBox, VideoBox, AudioBox, PresBox, YoutubeBox, PresElementBox, QueryBox,
ColorBox, DashWebRTCVideo, LinkAnchorBox, InkingStroke, DocHolderBox, LinkBox, ScriptingBox,
- RecommendationsBox, ScreenshotBox, HTMLtag
+ RecommendationsBox, ScreenshotBox, HTMLtag, ComparisonBox
}}
bindings={bindings}
jsx={layoutFrame}
@@ -225,6 +203,5 @@ export class DocumentContentsView extends React.Component<DocumentViewProps & {
onError={(test: any) => { console.log(test); }}
/>;
->>>>>>> 08b6bf8b51ab631c8cfe9c3e12bfb0ae2dd7b4c7
}
} \ No newline at end of file