diff options
author | bob <bcz@cs.brown.edu> | 2019-04-29 11:42:17 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-04-29 11:42:17 -0400 |
commit | e4a081e7c17b880c5376d0090c13f0d9153b5dca (patch) | |
tree | c43ecc26c712933c4b8694ad98bccd43adb8888a /src | |
parent | 68555c0e52308757cf609589b54b3452c43a1336 (diff) |
from last.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 7d55a2308..18449ed32 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -65,7 +65,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> if (text[0] === '#') { let command = text.slice(1, text.length); this._fieldKey = new Key(command); - this._title = this.getTitle; + this._title = this.selectionTitle; } else { if (SelectionManager.SelectedDocuments().length > 0) { @@ -101,7 +101,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> } @action onTitleUp = (e: PointerEvent): void => { if (Math.abs(e.clientX - this._downX) < 4 || Math.abs(e.clientY - this._downY) < 4) { - this._title = this.getTitle; + this._title = this.selectionTitle; this._edtingTitle = true; } document.removeEventListener("pointermove", this.onTitleMove); @@ -453,7 +453,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> } @computed - get getTitle(): string { + get selectionTitle(): string { if (SelectionManager.SelectedDocuments().length === 1) { let field = SelectionManager.SelectedDocuments()[0].props.Document.Get(this._fieldKey); if (field instanceof TextField) { @@ -534,7 +534,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> {this._edtingTitle ? <input ref={this.keyinput} className="title" type="text" name="dynbox" value={this._title} onBlur={this.titleBlur} onChange={this.titleChanged} onKeyPress={this.titleEntered} /> : - <div className="title" onPointerDown={this.onTitleDown} ><span>{`${this.getTitle}`}</span></div>} + <div className="title" onPointerDown={this.onTitleDown} ><span>{`${this.selectionTitle}`}</span></div>} <div className="documentDecorations-closeButton" onPointerDown={this.onCloseDown}>X</div> <div id="documentDecorations-topLeftResizer" className="documentDecorations-resizer" onPointerDown={this.onPointerDown} onContextMenu={(e) => e.preventDefault()}></div> <div id="documentDecorations-topResizer" className="documentDecorations-resizer" onPointerDown={this.onPointerDown} onContextMenu={(e) => e.preventDefault()}></div> |