aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-08-30 13:10:54 -0400
committerbobzel <zzzman@gmail.com>2020-08-30 13:10:54 -0400
commit561a8d0bd130ea5c1fd68a4dd2344f0333d388cc (patch)
treed9b932529c86c26661967f573b26cbf9c2177f60 /src/client/views/nodes/DocumentView.tsx
parente8856332c19abe12fe43c940e35b49ab77aae612 (diff)
fixed importBox upload to give feedback, share code. fixed stacking autoHeight to happen immediately. fixed images to not need to request image information. changed doc decorations to change image native width. changed alert() when dropping on impermissibale doc. fixed allow dropping over images,etc. changed default image nativeSize to 900
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index f4eb71145..8c8562267 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -198,7 +198,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
this._mainCont.current && (this._multiTouchDisposer = InteractionUtils.MakeMultiTouchTarget(this._mainCont.current, this.onTouchStart.bind(this)));
// this._mainCont.current && (this.holdDisposer = InteractionUtils.MakeHoldTouchTarget(this._mainCont.current, this.handle1PointerHoldStart.bind(this)));
- if (!this.props.dontRegisterView) {
+ if (!BoolCast(this.rootDoc.dontRegisterView, this.props.dontRegisterView)) {
DocumentManager.Instance.DocumentViews.push(this);
}
}
@@ -627,7 +627,10 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
@undoBatch @action
drop = async (e: Event, de: DragManager.DropEvent) => {
if (this.props.Document === CurrentUserUtils.ActiveDashboard) {
- alert("linking to document tabs not yet supported. Drop link on document content.");
+ if ((e.target as any)?.closest?.("*.lm_content")) {
+ alert("You can't perform this move most likely because you don't have permission to modify the destination.");
+ }
+ else alert("linking to document tabs not yet supported. Drop link on document content.");
return;
}
const makeLink = action((linkDoc: Doc) => {