aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/SidebarAnnos.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2021-04-04 13:38:55 -0400
committerusodhi <61431818+usodhi@users.noreply.github.com>2021-04-04 13:38:55 -0400
commit15c1c952c50bb2de972c614e46c5f33c2b2952cc (patch)
treee8d7330336b80939e82749290c22ef5a05b01224 /src/client/views/SidebarAnnos.tsx
parent479dff344ff2cf92ace9c68c3ce6d03e6e6dce22 (diff)
parentee17752109ba1238d645a4df7cee1cf60855f8df (diff)
merging
Diffstat (limited to 'src/client/views/SidebarAnnos.tsx')
-rw-r--r--src/client/views/SidebarAnnos.tsx10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/client/views/SidebarAnnos.tsx b/src/client/views/SidebarAnnos.tsx
index 6b0b928b3..b5bdf4ca8 100644
--- a/src/client/views/SidebarAnnos.tsx
+++ b/src/client/views/SidebarAnnos.tsx
@@ -22,8 +22,7 @@ interface ExtraProps {
layoutDoc: Doc;
rootDoc: Doc;
dataDoc: Doc;
- annotationsActive: (outsideReaction: boolean) => boolean;
- whenActiveChanged: (isActive: boolean) => void;
+ whenChildContentsActiveChanged: (isActive: boolean) => void;
ScreenToLocalTransform: () => Transform;
sidebarAddDocument: (doc: (Doc | Doc[]), suffix: string) => boolean;
removeDocument: (doc: (Doc | Doc[]), suffix: string) => boolean;
@@ -47,7 +46,7 @@ export class SidebarAnnos extends React.Component<FieldViewProps & ExtraProps> {
anchorMenuClick = (anchor: Doc) => {
const startup = StrListCast(this.props.rootDoc.docFilters).map(filter => filter.split(":")[0]).join(" ");
const target = Docs.Create.TextDocument(startup, {
- title: "anno",
+ title: "-note-",
annotationOn: this.props.rootDoc, _width: 200, _height: 50, _fitWidth: true, _autoHeight: true, _fontSize: StrCast(Doc.UserDoc().fontSize),
_fontFamily: StrCast(Doc.UserDoc().fontFamily)
});
@@ -98,7 +97,7 @@ export class SidebarAnnos extends React.Component<FieldViewProps & ExtraProps> {
};
return !this.props.layoutDoc._showSidebar ? (null) :
<div style={{
- position: "absolute", pointerEvents: this.props.active() ? "all" : undefined, top: 0, right: 0,
+ position: "absolute", pointerEvents: this.props.isContentActive() ? "all" : undefined, top: 0, right: 0,
background: this.props.styleProvider?.(this.props.rootDoc, this.props, StyleProp.WidgetColor),
width: `${this.panelWidth()}px`,
height: "100%"
@@ -120,9 +119,8 @@ export class SidebarAnnos extends React.Component<FieldViewProps & ExtraProps> {
scaleField={this.sidebarKey() + "-scale"}
isAnnotationOverlay={false}
select={emptyFunction}
- active={this.props.annotationsActive}
scaling={returnOne}
- whenActiveChanged={this.props.whenActiveChanged}
+ whenChildContentsActiveChanged={this.props.whenChildContentsActiveChanged}
childHideDecorationTitle={returnTrue}
removeDocument={this.removeDocument}
moveDocument={this.moveDocument}