aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-10-16 11:07:36 -0400
committerbob <bcz@cs.brown.edu>2019-10-16 11:07:36 -0400
commit50fb344cd7c93539f00b3aebc8fa5be4aefc73fd (patch)
treee1e69f39b0d3aa0d236bf711f03b93616eddb7ab /src
parente4e6026dfb819dd141597e7a2dfab6c566f61fac (diff)
small fixes: cursors, pdf, dragging buttons
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/ColorBox.scss9
-rw-r--r--src/client/views/nodes/DocumentView.scss1
-rw-r--r--src/client/views/nodes/DocumentView.tsx2
-rw-r--r--src/client/views/nodes/FormattedTextBox.scss1
-rw-r--r--src/client/views/nodes/KeyValueBox.scss1
-rw-r--r--src/client/views/nodes/PDFBox.scss2
-rw-r--r--src/client/views/nodes/PDFBox.tsx6
-rw-r--r--src/server/authentication/models/current_user_utils.ts2
8 files changed, 18 insertions, 6 deletions
diff --git a/src/client/views/nodes/ColorBox.scss b/src/client/views/nodes/ColorBox.scss
index 32a7891c6..bf334c939 100644
--- a/src/client/views/nodes/ColorBox.scss
+++ b/src/client/views/nodes/ColorBox.scss
@@ -6,6 +6,15 @@
.sketch-picker {
margin:auto;
+ div {
+ cursor: crosshair;
+ }
+ .flexbox-fix {
+ cursor: pointer;
+ div {
+ cursor:pointer;
+ }
+ }
}
}
.colorBox-container-interactive {
diff --git a/src/client/views/nodes/DocumentView.scss b/src/client/views/nodes/DocumentView.scss
index b3e7898c1..69eb1a843 100644
--- a/src/client/views/nodes/DocumentView.scss
+++ b/src/client/views/nodes/DocumentView.scss
@@ -6,6 +6,7 @@
left:0;
border-radius: inherit;
transition : outline .3s linear;
+ cursor: grab;
// background: $light-color; //overflow: hidden;
transform-origin: left top;
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 8a320d39b..ebd0ca549 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -176,7 +176,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
handlers: {
dragComplete: action((emptyFunction))
},
- hideSource: !dropAction && !this.Document.onDragStart && !this.Document.onClick
+ hideSource: !dropAction && !this.Document.onDragStart
});
}
}
diff --git a/src/client/views/nodes/FormattedTextBox.scss b/src/client/views/nodes/FormattedTextBox.scss
index 29e8b14a8..0550f9708 100644
--- a/src/client/views/nodes/FormattedTextBox.scss
+++ b/src/client/views/nodes/FormattedTextBox.scss
@@ -12,6 +12,7 @@
.formattedTextBox-cont-scroll,
.formattedTextBox-cont-hidden {
+ cursor: text;
background: inherit;
padding: 0;
border-width: 0px;
diff --git a/src/client/views/nodes/KeyValueBox.scss b/src/client/views/nodes/KeyValueBox.scss
index 87a9565e8..6e8a36c6a 100644
--- a/src/client/views/nodes/KeyValueBox.scss
+++ b/src/client/views/nodes/KeyValueBox.scss
@@ -9,6 +9,7 @@
box-sizing: border-box;
display: inline-block;
pointer-events: all;
+ cursor: default;
.imageBox-cont img {
width: auto;
}
diff --git a/src/client/views/nodes/PDFBox.scss b/src/client/views/nodes/PDFBox.scss
index 1c1d6ec95..dd909e09f 100644
--- a/src/client/views/nodes/PDFBox.scss
+++ b/src/client/views/nodes/PDFBox.scss
@@ -15,7 +15,7 @@
width: 100%;
height: 100%;
background: lightslategray;
- .pdfBox-title-cont, .pdfBox-cont-interactive{
+ .pdfBox-cont, .pdfBox-cont-interactive{
width: 150%;
height: 100%;
position: relative;
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx
index 19797400f..f31128356 100644
--- a/src/client/views/nodes/PDFBox.tsx
+++ b/src/client/views/nodes/PDFBox.tsx
@@ -16,7 +16,6 @@ import { panZoomSchema } from '../collections/collectionFreeForm/CollectionFreeF
import { ContextMenu } from '../ContextMenu';
import { ContextMenuProps } from '../ContextMenuItem';
import { DocAnnotatableComponent } from "../DocComponent";
-import { InkingControl } from "../InkingControl";
import { PDFViewer } from "../pdf/PDFViewer";
import { documentSchema } from "./DocumentView";
import { FieldView, FieldViewProps } from './FieldView';
@@ -65,6 +64,7 @@ export class PDFBox extends DocAnnotatableComponent<FieldViewProps, PdfDocument>
}
}, { fireImmediately: true });
}
+
loaded = (nw: number, nh: number, np: number) => {
this.dataDoc.numPages = np;
this.Document.nativeWidth = nw * 96 / 72;
@@ -133,12 +133,12 @@ export class PDFBox extends DocAnnotatableComponent<FieldViewProps, PdfDocument>
<FontAwesomeIcon style={{ color: "white" }} icon={"arrow-right"} size="sm" />
</button>
</>;
- return !this.props.active() ? (null) :
+ return !this.active() ? (null) :
(<div className="pdfBox-ui" onKeyDown={e => e.keyCode === KeyCodes.BACKSPACE || e.keyCode === KeyCodes.DELETE ? e.stopPropagation() : true}
onPointerDown={e => e.stopPropagation()} style={{ display: this.active() ? "flex" : "none", position: "absolute", width: "100%", height: "100%", zIndex: 1, pointerEvents: "none" }}>
<div className="pdfBox-overlayCont" key="cont" onPointerDown={(e) => e.stopPropagation()} style={{ left: `${this._searching ? 0 : 100}%` }}>
<button className="pdfBox-overlayButton" title="Open Search Bar" />
- <input className="pdfBox-searchBar" placeholder="Search" autoFocus={true} ref={this._searchRef} onChange={this.searchStringChanged} onKeyDown={e => {
+ <input className="pdfBox-searchBar" placeholder="Search" ref={this._searchRef} onChange={this.searchStringChanged} onKeyDown={e => {
e.keyCode === KeyCodes.ENTER && this.search(this._searchString, !e.shiftKey);
}} />
<button title="Search" onClick={e => this.search(this._searchString, !e.shiftKey)}>
diff --git a/src/server/authentication/models/current_user_utils.ts b/src/server/authentication/models/current_user_utils.ts
index 0c9f09112..4abf85381 100644
--- a/src/server/authentication/models/current_user_utils.ts
+++ b/src/server/authentication/models/current_user_utils.ts
@@ -56,7 +56,7 @@ export class CurrentUserUtils {
{ title: "import folder", icon: "cloud-upload-alt", drag: 'Docs.Create.DirectoryImportDocument({ title: "Directory Import", width: 400, height: 400 })' },
{ title: "pen", icon: "pen-nib", click: 'activatePen(this.activePen.pen = sameDocs(this.activePen.pen, this) ? undefined : this,2, this.backgroundColor)', backgroundColor: "blue", unchecked: `!sameDocs(this.activePen.pen, this)`, activePen: doc },
{ title: "highlighter", icon: "pen", click: 'activateBrush(this.activePen.pen = sameDocs(this.activePen.pen, this) ? undefined : this,20,this.backgroundColor)', backgroundColor: "yellow", unchecked: `!sameDocs(this.activePen.pen, this)`, activePen: doc },
- { title: "eraser", icon: "eraser", click: 'activateEraser(this.activePen.pen = sameDocs(this.activePen.pen, this) ? undefined : this);', unchecked: `!sameDocs(this.activePen.pen, this)`, activePen: doc },
+ { title: "eraser", icon: "eraser", click: 'activateEraser(this.activePen.pen = sameDocs(this.activePen.pen, this) ? undefined : this);', unchecked: `!sameDocs(this.activePen.pen, this)`, backgroundColor: "pink", activePen: doc },
{ title: "none", icon: "pause", click: 'deactivateInk();this.activePen.pen = this;', unchecked: `!sameDocs(this.activePen.pen, this)`, activePen: doc },
];
return docProtoData.map(data => Docs.Create.FontIconDocument({