aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MainOverlayTextBox.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-05-31 18:18:05 -0400
committerbob <bcz@cs.brown.edu>2019-05-31 18:18:05 -0400
commitd1b0f462ced168f3a9ac5d007ba1219e98a3b6cf (patch)
tree1f18ae22381bc93976fa37005accd7c9c803dc60 /src/client/views/MainOverlayTextBox.tsx
parent0348b9f5ecb5419965bcd9eb5a37d629dd4f3a6e (diff)
stacking views and more..
Diffstat (limited to 'src/client/views/MainOverlayTextBox.tsx')
-rw-r--r--src/client/views/MainOverlayTextBox.tsx11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/client/views/MainOverlayTextBox.tsx b/src/client/views/MainOverlayTextBox.tsx
index 6e8e6f8ce..24327b995 100644
--- a/src/client/views/MainOverlayTextBox.tsx
+++ b/src/client/views/MainOverlayTextBox.tsx
@@ -7,6 +7,8 @@ import { Transform } from '../util/Transform';
import "normalize.css";
import "./MainOverlayTextBox.scss";
import { FormattedTextBox } from './nodes/FormattedTextBox';
+import { CollectionDockingView } from './collections/CollectionDockingView';
+import { Doc } from '../../new_fields/Doc';
interface MainOverlayTextBoxProps {
}
@@ -82,6 +84,11 @@ export class MainOverlayTextBox extends React.Component<MainOverlayTextBoxProps>
document.removeEventListener('pointerup', this.textBoxUp);
}
+ addDocTab = (doc: Doc, location: string) => {
+ if (true) { // location === "onRight") { need to figure out stack to add "inTab"
+ CollectionDockingView.Instance.AddRightSplit(doc);
+ }
+ }
render() {
if (FormattedTextBox.InputBoxOverlay && this._textTargetDiv) {
let textRect = this._textTargetDiv.getBoundingClientRect();
@@ -91,10 +98,10 @@ export class MainOverlayTextBox extends React.Component<MainOverlayTextBoxProps>
style={{ width: `${textRect.width * s}px`, height: `${textRect.height * s}px` }}>
<FormattedTextBox fieldKey={this._textFieldKey} hideOnLeave={this._textHideOnLeave} isOverlay={true} Document={FormattedTextBox.InputBoxOverlay.props.Document} isSelected={returnTrue} select={emptyFunction} isTopMost={true}
selectOnLoad={true} ContainingCollectionView={undefined} whenActiveChanged={emptyFunction} active={returnTrue}
- ScreenToLocalTransform={this._textXf} PanelWidth={returnZero} PanelHeight={returnZero} focus={emptyFunction} addDocTab={emptyFunction} />
+ ScreenToLocalTransform={this._textXf} PanelWidth={returnZero} PanelHeight={returnZero} focus={emptyFunction} addDocTab={this.addDocTab} />
</div>
</ div>;
}
- else return (null);
+ else return (null); Z
}
} \ No newline at end of file