aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/MainView.tsx3
-rw-r--r--src/client/views/animationtimeline/Keyframe.tsx4
-rw-r--r--src/client/views/animationtimeline/TimelineMenu.scss13
-rw-r--r--src/client/views/animationtimeline/TimelineMenu.tsx18
-rw-r--r--src/client/views/animationtimeline/Track.tsx2
-rw-r--r--src/new_fields/Doc.ts3
6 files changed, 27 insertions, 16 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index f38367d98..270e9b183 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -149,6 +149,9 @@ export class MainView extends React.Component {
if (targets && targets.length && targets[0].className.toString().indexOf("contextMenu") === -1) {
ContextMenu.Instance.closeMenu();
}
+ if (targets && targets.length && targets[0].className.toString().indexOf("timeline-menu-container") === -1) {
+ TimelineMenu.Instance.closeMenu();
+ }
});
globalPointerUp = () => this.isPointerDown = false;
diff --git a/src/client/views/animationtimeline/Keyframe.tsx b/src/client/views/animationtimeline/Keyframe.tsx
index 9dae3896f..b27cb6d98 100644
--- a/src/client/views/animationtimeline/Keyframe.tsx
+++ b/src/client/views/animationtimeline/Keyframe.tsx
@@ -231,10 +231,6 @@ export class Keyframe extends React.Component<IProps> {
return;
}
});
-
- let index = this.regiondata.keyframes!.indexOf(TK);
- console.log(toJS(this.regiondata.keyframes!));
-
return TK;
}
diff --git a/src/client/views/animationtimeline/TimelineMenu.scss b/src/client/views/animationtimeline/TimelineMenu.scss
index 458c1eda1..ed047e52d 100644
--- a/src/client/views/animationtimeline/TimelineMenu.scss
+++ b/src/client/views/animationtimeline/TimelineMenu.scss
@@ -1,7 +1,16 @@
.timeline-menu-container{
position: absolute;
z-index: 10000;
- width: 500px;
- height: 500px;
+ width: 150px;
+ height: auto;
background-color: black;
+ .timeline-menu-button{
+ width:100%;
+ height: 30px;
+
+ }
+ .timeline-menu-input{
+ width:100%;
+ height: 30px;
+ }
} \ No newline at end of file
diff --git a/src/client/views/animationtimeline/TimelineMenu.tsx b/src/client/views/animationtimeline/TimelineMenu.tsx
index adbd21e62..52f6f6535 100644
--- a/src/client/views/animationtimeline/TimelineMenu.tsx
+++ b/src/client/views/animationtimeline/TimelineMenu.tsx
@@ -95,20 +95,20 @@ export class TimelineMenu extends React.Component {
switch(this._type){
case "keyframe":
menu = [
- <button> Show Schema</button>,
- <button> Delete Keyframe</button>,
- <input placeholder="Move Keyframe"/>
+ <button className="timeline-menu-button"> Show Schema</button>,
+ <button className="timeline-menu-button"> Delete Keyframe</button>,
+ <input className="timeline-menu-input"placeholder="Move Keyframe"/>
];
break;
case "region" :
menu = [
- <button onClick={this.addEase}>Add Ease</button>,
- <button onClick={this.addPath}>Add Path</button>,
- <input placeholder="fadeIn"/>,
- <input placeholder="fadeOut"/>,
- <input placeholder="position"/>,
- <input placeholder="duration"/>,
+ <button className="timeline-menu-button" onClick={this.addEase}>Add Ease</button>,
+ <button className="timeline-menu-button"onClick={this.addPath}>Add Path</button>,
+ <input className="timeline-menu-input"placeholder="fadeIn"/>,
+ <input className="timeline-menu-input"placeholder="fadeOut"/>,
+ <input className="timeline-menu-input"placeholder="position"/>,
+ <input className="timeline-menu-input"placeholder="duration"/>,
];
break;
case "timeline":
diff --git a/src/client/views/animationtimeline/Track.tsx b/src/client/views/animationtimeline/Track.tsx
index fc2cacba8..363ab4074 100644
--- a/src/client/views/animationtimeline/Track.tsx
+++ b/src/client/views/animationtimeline/Track.tsx
@@ -128,8 +128,10 @@ export class Track extends React.Component<IProps> {
private applyKeys = async (kf: Doc) => {
let kfNode = await Cast(kf.key, Doc) as Doc;
let docFromApply = kfNode;
+ console.log(Doc.allKeys(docFromApply));
if (this.filterKeys(Doc.allKeys(this.props.node)).length > this.filterKeys(Doc.allKeys(kfNode)).length) docFromApply = this.props.node;
this.filterKeys(Doc.allKeys(docFromApply)).forEach(key => {
+ console.log(key);
if (!kfNode[key]) {
this.props.node[key] = undefined;
} else {
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index c01f4e8cf..b272bc1b9 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -425,12 +425,13 @@ export namespace Doc {
export function MakeCopy(doc: Doc, copyProto: boolean = false): Doc {
const copy = new Doc;
Object.keys(doc).forEach(key => {
- const field = ProxyField.WithoutProxy(() => doc[key]);
if (key === "proto" && copyProto) {
+ const field = doc[key];
if (field instanceof Doc) {
copy[key] = Doc.MakeCopy(field);
}
} else {
+ const field = ProxyField.WithoutProxy(() => doc[key]);
if (field instanceof RefField) {
copy[key] = field;
} else if (field instanceof ObjectField) {