aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgeireann <60007097+geireann@users.noreply.github.com>2020-10-04 20:20:08 +0800
committergeireann <60007097+geireann@users.noreply.github.com>2020-10-04 20:20:08 +0800
commit3d266cb4636aad2e6fe39595b113b0dd52f4f329 (patch)
treef94b80fd2d6c675b05d4ebb63187677cde1a40c1 /src
parent805bf106c85f693f6e6d15c06cacd5e16079c707 (diff)
stepping through PDF fixes
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/TabDocView.tsx2
-rw-r--r--src/client/views/nodes/CollectionFreeFormDocumentView.tsx30
-rw-r--r--src/client/views/nodes/PresBox.tsx27
-rw-r--r--src/client/views/presentationview/PresElementBox.scss99
4 files changed, 24 insertions, 134 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx
index 8c1a003b9..70eb5b895 100644
--- a/src/client/views/collections/TabDocView.tsx
+++ b/src/client/views/collections/TabDocView.tsx
@@ -123,7 +123,7 @@ export class TabDocView extends React.Component<TabDocViewProps> {
@undoBatch
@action
public static PinDoc(doc: Doc, unpin = false, audioRange?: boolean) {
- if (unpin) console.log('remove unpin');
+ if (unpin) console.log('TODO: Remove UNPIN from this location');
//add this new doc to props.Document
const curPres = CurrentUserUtils.ActivePresentation;
if (curPres) {
diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
index d6f8ce19c..5a8ce4e14 100644
--- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
+++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
@@ -65,7 +65,7 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
w: Cast(doc["w-indexed"], listSpec("number"), [NumCast(doc._width)]).reduce((p, w, i) => (i <= timecode && w !== undefined) || p === undefined ? w : p, undefined as any as number),
x: Cast(doc["x-indexed"], listSpec("number"), [NumCast(doc.x)]).reduce((p, x, i) => (i <= timecode && x !== undefined) || p === undefined ? x : p, undefined as any as number),
y: Cast(doc["y-indexed"], listSpec("number"), [NumCast(doc.y)]).reduce((p, y, i) => (i <= timecode && y !== undefined) || p === undefined ? y : p, undefined as any as number),
- scroll: Cast(doc["scroll-indexed"], listSpec("number"), [NumCast(doc._scrollY, 0)]).reduce((p, s, i) => (i <= timecode && s !== undefined) || p === undefined ? s : p, undefined as any as number),
+ scroll: Cast(doc["scroll-indexed"], listSpec("number"), [NumCast(doc._scrollTop, 0)]).reduce((p, s, i) => (i <= timecode && s !== undefined) || p === undefined ? s : p, undefined as any as number),
opacity: Cast(doc["opacity-indexed"], listSpec("number"), [NumCast(doc.opacity, 1)]).reduce((p, o, i) => i <= timecode || p === undefined ? o : p, undefined as any as number),
});
}
@@ -97,24 +97,24 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
d["text-color"] = "grey";
} else { d["text-color"] = "black"; }
} else if (d.appearFrame === 0) {
- d["text-color"] = "black";
}
}
- public static updateScrollframe(doc: Doc, time: number) {
- const timecode = Math.round(time);
- const scrollIndexed = Cast(doc['scroll-indexed'], listSpec("number"), null);
- scrollIndexed?.length <= timecode + 1 && scrollIndexed.push(undefined as any as number);
- setTimeout(() => doc.dataTransition = "inherit", 1010);
- }
+ // public static updateScrollframe(doc: Doc, time: number) {
+ // console.log('update scroll frame');
+ // const timecode = Math.round(time);
+ // const scrollIndexed = Cast(doc['scroll-indexed'], listSpec("number"), null);
+ // scrollIndexed?.length <= timecode + 1 && scrollIndexed.push(undefined as any as number);
+ // setTimeout(() => doc.dataTransition = "inherit", 1010);
+ // }
- public static setupScroll(doc: Doc, timecode: number) {
- const scrollList = new List<number>();
- scrollList[timecode] = NumCast(doc._scrollY);
- doc["scroll-indexed"] = scrollList;
- doc.activeFrame = ComputedField.MakeFunction("self._currentFrame");
- doc._scrollY = ComputedField.MakeInterpolated("scroll", "activeFrame");
- }
+ // public static setupScroll(doc: Doc, timecode: number) {
+ // const scrollList = new List<number>();
+ // scrollList[timecode] = NumCast(doc._scrollTop);
+ // doc["scroll-indexed"] = scrollList;
+ // doc.activeFrame = ComputedField.MakeFunction("self._currentFrame");
+ // doc._scrollTop = ComputedField.MakeInterpolated("scroll", "activeFrame");
+ // }
public static updateKeyframe(docs: Doc[], time: number, targetDoc?: Doc) {
diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx
index 739f564a5..2af00586b 100644
--- a/src/client/views/nodes/PresBox.tsx
+++ b/src/client/views/nodes/PresBox.tsx
@@ -153,7 +153,6 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
setTimeout(() => targetDoc._viewTransition = undefined, 1010);
// targetDoc._currentFrame = curFrame + 1;
this.nextKeyframe(targetDoc, activeItem);
- // if (targetDoc.scrollProgressivize) CollectionFreeFormDocumentView.updateScrollframe(targetDoc, currentFrame);
if (activeItem.presProgressivize) CollectionFreeFormDocumentView.updateKeyframe(childDocs, currentFrame || 0, targetDoc);
else targetDoc.editing = true;
// if (activeItem.zoomProgressivize) this.zoomProgressivizeNext(targetDoc);
@@ -1252,22 +1251,13 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
const currentFrame = Cast(tagDoc._currentFrame, "number", null);
if (currentFrame === undefined) {
tagDoc._currentFrame = 0;
- CollectionFreeFormDocumentView.setupScroll(tagDoc, 0);
+ // CollectionFreeFormDocumentView.setupScroll(tagDoc, 0);
CollectionFreeFormDocumentView.setupKeyframes(childDocs, 0);
}
- CollectionFreeFormDocumentView.updateScrollframe(tagDoc, currentFrame);
+ // if (tagDoc.editScrollProgressivize) CollectionFreeFormDocumentView.updateScrollframe(tagDoc, currentFrame);
CollectionFreeFormDocumentView.updateKeyframe(childDocs, currentFrame || 0, tagDoc);
tagDoc._currentFrame = Math.max(0, (currentFrame || 0) + 1);
tagDoc.lastFrame = Math.max(NumCast(tagDoc._currentFrame), NumCast(tagDoc.lastFrame));
- // if (curDoc.zoomProgressivize) {
- // const resize = document.getElementById('resizable');
- // if (resize) {
- // resize.style.width = this.checkList(tagDoc, curDoc["viewfinder-width-indexed"]) + 'px';
- // resize.style.height = this.checkList(tagDoc, curDoc["viewfinder-height-indexed"]) + 'px';
- // resize.style.top = this.checkList(tagDoc, curDoc["viewfinder-top-indexed"]) + 'px';
- // resize.style.left = this.checkList(tagDoc, curDoc["viewfinder-left-indexed"]) + 'px';
- // }
- // }
}
@undoBatch
@@ -1281,15 +1271,6 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
}
CollectionFreeFormDocumentView.gotoKeyframe(childDocs.slice());
tagDoc._currentFrame = Math.max(0, (currentFrame || 0) - 1);
- // if (actItem.zoomProgressivize) {
- // const resize = document.getElementById('resizable');
- // if (resize) {
- // resize.style.width = this.checkList(tagDoc, actItem["viewfinder-width-indexed"]) + 'px';
- // resize.style.height = this.checkList(tagDoc, actItem["viewfinder-height-indexed"]) + 'px';
- // resize.style.top = this.checkList(tagDoc, actItem["viewfinder-top-indexed"]) + 'px';
- // resize.style.left = this.checkList(tagDoc, actItem["viewfinder-left-indexed"]) + 'px';
- // }
- // }
}
/**
@@ -1474,7 +1455,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
activeItem.scrollProgressivize = !activeItem.scrollProgressivize;
const targetDoc: Doc = this.targetDoc;
targetDoc.scrollProgressivize = !targetDoc.scrollProgressivize;
- CollectionFreeFormDocumentView.setupScroll(targetDoc, NumCast(targetDoc._currentFrame));
+ // CollectionFreeFormDocumentView.setupScroll(targetDoc, NumCast(targetDoc._currentFrame));
if (targetDoc.editScrollProgressivize) {
targetDoc.editScrollProgressivize = false;
targetDoc._currentFrame = 0;
@@ -1803,7 +1784,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
{this.topPanel}
{this.toolbar}
{this.newDocumentToolbarDropdown}
- <div className="presBox-listCont">
+ <div className="presBox-listCont" style={{ padding: 0 }}>
{mode !== CollectionViewType.Invalid ?
<CollectionView {...this.props}
ContainingCollectionDoc={this.props.Document}
diff --git a/src/client/views/presentationview/PresElementBox.scss b/src/client/views/presentationview/PresElementBox.scss
index 0fd32602a..d757fc1de 100644
--- a/src/client/views/presentationview/PresElementBox.scss
+++ b/src/client/views/presentationview/PresElementBox.scss
@@ -37,7 +37,7 @@ $slide-active: #5B9FDD;
overflow: hidden;
}
-
+
}
.presItem-slide {
@@ -80,46 +80,6 @@ $slide-active: #5B9FDD;
z-index: 1;
}
-.presElementBox-buttons {
- display: grid;
- grid-template-rows: 15px;
- top: 15px;
- left: -20;
- position: absolute;
- width: 100%;
- height: auto;
-
- .presElementBox-interaction {
- display: none;
- }
-
- .presElementBox-interaction-selected {
- color: grey;
- background-color: rgba(0, 0, 0, 0);
- float: left;
- padding: 0px;
- width: 20px;
- height: 20px;
- }
-}
-
-.presElementBox-name {
- z-index: 300;
- align-self: center;
- font-size: 13px;
- font-family: Roboto;
- font-weight: 500;
- position: relative;
- top: 1px;
- padding-left: 10px;
- padding-right: 10px;
- letter-spacing: normal;
- width: max-content;
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: pre;
-}
-
.presElementBox-time {
align-self: center;
position: relative;
@@ -152,30 +112,12 @@ $slide-active: #5B9FDD;
overflow: hidden;
}
-.presElementBox-closeIcon {
- cursor: pointer;
- position: absolute;
- border-radius: 100%;
- z-index: 300;
- right: 3px;
- top: 3px;
- width: 20px;
- height: 20px;
- display: flex;
- font-size: 75%;
- background-color: black;
- color: white;
- justify-content: center;
- align-items: center;
-}
-
-
.presItem-slideButtons {
display: flex;
grid-column: 7;
- width: 40px;
+ width: 60px;
justify-self: right;
- justify-content: space-evenly;
+ justify-content: flex-end;
.slideButton {
cursor: pointer;
@@ -188,7 +130,7 @@ $slide-active: #5B9FDD;
font-size: 75%;
justify-self: center;
align-self: center;
- background-color: rgba(0,0,0,0.5);
+ background-color: rgba(0, 0, 0, 0.5);
color: white;
justify-content: center;
align-items: center;
@@ -199,37 +141,4 @@ $slide-active: #5B9FDD;
background-color: rgba(0, 0, 0, 1);
transform: scale(1.15);
}
-}
-.presElementBox-expand {
- cursor: pointer;
- position: absolute;
- border-radius: 100%;
- z-index: 300;
- right: 26px;
- top: 3px;
- width: 20px;
- height: 20px;
- display: flex;
- font-size: 75%;
- background-color: black;
- color: white;
- justify-content: center;
- align-items: center;
-}
-
-.presElementBox-expand-selected {
- cursor: pointer;
- position: relative;
- border-radius: 100%;
- z-index: 300;
- width: 15px;
- height: 15px;
- display: flex;
- font-size: 75%;
- justify-self: right;
- align-self: center;
- background-color: rgba(0,0,0,0.5);
- color: white;
- justify-content: center;
- align-items: center;
} \ No newline at end of file