aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kim <andrewdkim@users.noreply.github.com>2019-04-22 17:55:26 -0400
committerAndrew Kim <andrewdkim@users.noreply.github.com>2019-04-22 17:55:26 -0400
commitdc998e4871e1e5ddd63eedb1b0c175d5aea6da8b (patch)
tree4f38410bd316bda75a20e14ba63902aa5e749b43 /src
parentb1654dd5e2648c412f6c6a1013fa2ab167999a95 (diff)
new changes
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx4
-rw-r--r--src/client/views/nodes/Timeline.tsx15
2 files changed, 11 insertions, 8 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index a54fe601a..1de4d157f 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -297,14 +297,12 @@ export class CollectionFreeFormView extends CollectionSubView {
<InkingCanvas getScreenTransform={this.getTransform} Document={this.props.Document} >
{this.childViews}
</InkingCanvas>
-
</CollectionFreeFormLinksView>
<CollectionFreeFormRemoteCursors {...this.props} key="remoteCursors" />
</CollectionFreeFormViewPannableContents>
<CollectionFreeFormOverlayView {...this.getDocumentViewProps(this.props.Document)} />
-
</MarqueeView>
- <Timeline {...this.getDocumentViewProps(this.props.Document)}/>
+ <Timeline {...this.props}/>
</div>
);
}
diff --git a/src/client/views/nodes/Timeline.tsx b/src/client/views/nodes/Timeline.tsx
index d1036bab8..b92223d59 100644
--- a/src/client/views/nodes/Timeline.tsx
+++ b/src/client/views/nodes/Timeline.tsx
@@ -7,13 +7,14 @@ import { KeyStore } from "../../../fields/KeyStore";
import { Document } from "../../../fields/Document";
import { KeyFrame } from "./KeyFrame";
import { CollectionViewProps } from "../collections/CollectionBaseView";
-import { CollectionSubView } from "../collections/CollectionSubView";
+import { CollectionSubView, SubCollectionViewProps } from "../collections/CollectionSubView";
import { DocumentViewProps } from "./DocumentView";
import { Opt } from '../../../fields/Field';
+import { CollectionFreeFormView } from "../collections/collectionFreeForm/CollectionFreeFormView";
@observer
-export class Timeline extends React.Component<DocumentViewProps> {
+export class Timeline extends React.Component<SubCollectionViewProps> {
@observable private _inner = React.createRef<HTMLDivElement>();
@observable private _isRecording: Boolean = false;
@observable private _currentBar: any = null;
@@ -69,15 +70,19 @@ export class Timeline extends React.Component<DocumentViewProps> {
componentDidMount() {
this.createBar(5);
- let doc: Document;
+ let doc: Document = this.props.Document;
+ let childrenList = this.props.Document.GetList(this.props.fieldKey, [] as Document[]);
let keyFrame = new KeyFrame();
this._keyFrames.push(keyFrame);
let keys = [KeyStore.X, KeyStore.Y];
this._reactionDisposer = reaction(() => {
- return keys.map(key => doc.GetNumber(key, 0));
+ childrenList.forEach( (element:Document) => {
+ return keys.map(key => element.GetNumber(key, 0));
+ });
}, data => {
keys.forEach((key, index) => {
- keyFrame.document().SetNumber(key, data[index]);
+ console.log("moved!");
+ //keyFrame.document().SetNumber(key, data[index]);
});
});
}