From 6efc3545ccca2bcb0aaf219b2a9ff1c4f06e9e91 Mon Sep 17 00:00:00 2001
From: geireann <60007097+geireann@users.noreply.github.com>
Date: Wed, 25 Nov 2020 00:10:33 +0800
Subject: loader
---
deploy/index.html | 20 +++
deploy/loader.css | 141 +++++++++++++++++++++
src/client/views/MainView.tsx | 7 +
.../views/collections/CollectionStackingView.tsx | 6 +-
src/client/views/nodes/PresBox.scss | 10 +-
src/client/views/nodes/PresBox.tsx | 1 +
6 files changed, 177 insertions(+), 8 deletions(-)
create mode 100644 deploy/loader.css
diff --git a/deploy/index.html b/deploy/index.html
index 282acc0ce..7b68af2ef 100644
--- a/deploy/index.html
+++ b/deploy/index.html
@@ -4,12 +4,32 @@
Dash Web
+
+
+
diff --git a/deploy/loader.css b/deploy/loader.css
new file mode 100644
index 000000000..065862013
--- /dev/null
+++ b/deploy/loader.css
@@ -0,0 +1,141 @@
+.dash-loader {
+ display: flex;
+ align-content: center;
+ justify-content: center;
+ background-color: lightcyan;
+ z-index: 10;
+ width: 100%;
+ height: 100%;
+}
+
+.dash-loader-container {
+ width: 100;
+ align-self: center;
+}
+
+.dash-d-path {
+ stroke-dasharray: 1000;
+ stroke-dashoffset: 1000;
+ animation: dash-d-path 10s linear infinite;
+}
+
+@keyframes dash-d-path {
+ 0% {
+ stroke-dashoffset: 1000;
+ /* stroke-width: 0px; */
+ }
+
+ 10% {
+ stroke-dashoffset: 0;
+ /* stroke-width: 20px; */
+ }
+
+ 90% {
+ stroke-dashoffset: 0;
+ /* stroke-width: 20px; */
+ }
+
+ 100% {
+ stroke-dashoffset: 1000;
+ /* stroke-width: 0px; */
+ }
+}
+
+.dash-a-path {
+ stroke-dasharray: 1000;
+ stroke-dashoffset: 1000;
+ animation: dash-a-path 10s linear infinite;
+}
+
+@keyframes dash-a-path {
+ 0% {
+ stroke-dashoffset: 1000;
+ /* stroke-width: 0px; */
+ }
+
+ 7% {
+ stroke-dashoffset: 1000;
+ /* stroke-width: 0px; */
+ }
+
+ 17% {
+ stroke-dashoffset: 0;
+ /* stroke-width: 20px; */
+ }
+
+ 90% {
+ stroke-dashoffset: 0;
+ /* stroke-width: 20px; */
+ }
+
+ 100% {
+ stroke-dashoffset: 1000;
+ /* stroke-width: 0px; */
+ }
+}
+
+.dash-s-path {
+ stroke-dasharray: 1000;
+ stroke-dashoffset: 1000;
+ animation: dash-s-path 10s linear infinite;
+}
+
+@keyframes dash-s-path {
+ 0% {
+ stroke-dashoffset: 1000;
+ /* stroke-width: 0px; */
+ }
+
+ 14% {
+ stroke-dashoffset: 1000;
+ /* stroke-width: 0px; */
+ }
+
+ 20% {
+ stroke-dashoffset: 0;
+ /* stroke-width: 20px; */
+ }
+
+ 90% {
+ stroke-dashoffset: 0;
+ /* stroke-width: 20px; */
+ }
+
+ 100% {
+ stroke-dashoffset: 1000;
+ /* stroke-width: 0px; */
+ }
+}
+
+.dash-h-path {
+ stroke-dasharray: 1000;
+ stroke-dashoffset: 1000;
+ animation: dash-h-path 10s linear infinite;
+}
+
+@keyframes dash-h-path {
+ 0% {
+ stroke-dashoffset: 1000;
+ /* stroke-width: 0px; */
+ }
+
+ 18% {
+ stroke-dashoffset: 1000;
+ /* stroke-width: 0px; */
+ }
+
+ 28% {
+ stroke-dashoffset: 0;
+ /* stroke-width: 20px; */
+ }
+
+ 90% {
+ stroke-dashoffset: 0;
+ /* stroke-width: 20px; */
+ }
+
+ 100% {
+ stroke-dashoffset: 1000;
+ /* stroke-width: 0px; */
+ }
+}
\ No newline at end of file
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 452ce61ff..2100f1458 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -85,6 +85,13 @@ export class MainView extends React.Component {
componentDidMount() {
document.getElementById("root")?.addEventListener("scroll", e => ((ele) => ele.scrollLeft = ele.scrollTop = 0)(document.getElementById("root")!));
+ const ele = document.getElementById("loader");
+ if (ele) {
+ setTimeout(() => {
+ // remove from DOM
+ ele.outerHTML = '';
+ }, 0);
+ }
new InkStrokeProperties();
this._sidebarContent.proto = undefined;
DocServer.setPlaygroundFields(["x", "y", "dataTransition", "_delayAutoHeight", "_autoHeight", "_showSidebar", "_sidebarWidthPercent", "_width", "_height", "_viewTransition", "_panX", "_panY", "_viewScale", "_scrollY", "_scrollTop", "hidden", "_curPage", "_viewType", "_chromeStatus"]); // can play with these fields on someone else's
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx
index 97eacaeab..d86a6816d 100644
--- a/src/client/views/collections/CollectionStackingView.tsx
+++ b/src/client/views/collections/CollectionStackingView.tsx
@@ -290,11 +290,11 @@ export class CollectionStackingView extends CollectionSubView (pos[axis] + pos1[axis]) / 2 ? 1 : 0;
}
});
- const oldDocs = this.childDocs.length;
+ // const oldDocs = this.childDocs.length;
if (super.onInternalDrop(e, de)) {
- const newDocs = this.childDocs.slice().filter((d: Doc, ind: number) => ind >= oldDocs);
+ // const newDocs = this.childDocs.slice().filter((d: Doc, ind: number) => ind >= oldDocs);
- //de.complete.docDragData.droppedDocuments;
+ const newDocs = de.complete.docDragData.droppedDocuments;
const docs = this.childDocList;
DragManager.docsBeingDragged = [];
if (docs && newDocs.length) {
diff --git a/src/client/views/nodes/PresBox.scss b/src/client/views/nodes/PresBox.scss
index de2aee8fa..56b3b0593 100644
--- a/src/client/views/nodes/PresBox.scss
+++ b/src/client/views/nodes/PresBox.scss
@@ -420,20 +420,20 @@ $light-background: #ececec;
background-color: #ececec;
border: 1px solid #9f9f9f;
grid-template-rows: max-content;
-
+
.frameList-header {
display: grid;
width: 100%;
height: 20px;
background-color: #9f9f9f;
-
+
.frameList-headerButtons {
display: flex;
grid-column: 7;
width: 60px;
justify-self: right;
justify-content: flex-end;
-
+
.headerButton {
cursor: pointer;
position: relative;
@@ -452,7 +452,7 @@ $light-background: #ececec;
transition: 0.2s;
margin-right: 3px;
}
-
+
.headerButton:hover {
background-color: rgba(0, 0, 0, 1);
transform: scale(1.15);
@@ -1061,7 +1061,7 @@ $light-background: #ececec;
background-color: #5a5a5a;
}
-
+
}
// .miniPres {
diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx
index 683cb938a..e1f93c991 100644
--- a/src/client/views/nodes/PresBox.tsx
+++ b/src/client/views/nodes/PresBox.tsx
@@ -610,6 +610,7 @@ export class PresBox extends ViewBoxBaseComponent
addDocumentFilter = (doc: Doc | Doc[]) => {
const docs = doc instanceof Doc ? [doc] : doc;
docs.forEach((doc, i) => {
+ if (doc.presentationTargetDoc) return true;
if (doc.type === DocumentType.LABEL) {
const audio = Cast(doc.annotationOn, Doc, null);
if (audio) {
--
cgit v1.2.3-70-g09d2