diff options
author | bobzel <zzzman@gmail.com> | 2021-09-10 10:14:04 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-09-10 10:14:04 -0400 |
commit | c9c9d00b581bc7f80edbf7848a8ffb3a8e64f005 (patch) | |
tree | 39cd429507e872efa3675de098155e6d76fe5000 /src/client/views/nodes/DocumentView.tsx | |
parent | d9419c89ccdac7435c87b27a55486b7a5980ae29 (diff) |
event handling fixes for ink. double click on deselected ink takes shows handles. lightbox view works. transparent fills are not selectable.
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 8b19fb204..a2d2f17b6 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -808,7 +808,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps </div>; return <div className="documentView-contentsView" style={{ - pointerEvents: (this.props.contentPointerEvents as any) || (this.isContentActive() ? "all" : "none"), + pointerEvents: this.rootDoc.type !== DocumentType.INK && ((this.props.contentPointerEvents as any) || (this.isContentActive())) ? "all" : "none", height: this.headerMargin ? `calc(100% - ${this.headerMargin}px)` : undefined, }}> <DocumentContentsView key={1} {...this.props} @@ -943,13 +943,13 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps const showTitleHover = this.ShowTitle?.includes(":hover"); const showCaption = !this.props.hideCaptions && this.Document._viewType !== CollectionViewType.Carousel ? StrCast(this.layoutDoc._showCaption) : undefined; const captionView = !showCaption ? (null) : - <div className="documentView-captionWrapper"> + <div className="documentView-captionWrapper" + style={{ pointerEvents: this.onClickHandler || this.Document.ignoreClick ? "none" : this.isContentActive() || this.props.isDocumentActive?.() ? "all" : undefined, }}> <FormattedTextBox {...OmitKeys(this.props, ['children']).omit} yPadding={10} xPadding={10} fieldKey={showCaption} fontSize={Math.min(32, 12 * this.props.ScreenToLocalTransform().Scale)} - hideOnLeave={true} styleProvider={this.captionStyleProvider} dontRegisterView={true} isContentActive={this.isContentActive} @@ -964,7 +964,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps height: this.titleHeight, color: lightOrDark(background), background, - pointerEvents: this.onClickHandler || this.Document.ignoreClick ? "none" : undefined, + pointerEvents: this.onClickHandler || this.Document.ignoreClick ? "none" : this.isContentActive() || this.props.isDocumentActive?.() ? "all" : undefined, }}> <EditableView ref={this._titleRef} contents={showTitle.split(";").map(field => field.trim()).map(field => targetDoc[field]?.toString()).join("\\")} |