diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-09-18 09:26:31 +0530 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-09-18 09:26:31 +0530 |
commit | c322504b7160d39a4da7ff40f5c67023be1bf6ed (patch) | |
tree | 43dffa00be1d78a91342233b23a109a404a88c9a /src/client/views/PreviewCursor.tsx | |
parent | 5639cf97dbeff337e9661c874da4e46b9ed1a0b4 (diff) | |
parent | 88fbc391b3dd3f36a2e7015bc59c3a306d3e7d57 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into acls_uv
Diffstat (limited to 'src/client/views/PreviewCursor.tsx')
-rw-r--r-- | src/client/views/PreviewCursor.tsx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/client/views/PreviewCursor.tsx b/src/client/views/PreviewCursor.tsx index ee5a390a7..f5f115e01 100644 --- a/src/client/views/PreviewCursor.tsx +++ b/src/client/views/PreviewCursor.tsx @@ -15,6 +15,7 @@ import { Utils } from '../../Utils'; import { Networking } from '../Network'; import { Upload } from '../../server/SharedMediaTypes'; import { basename } from 'path'; +import { CurrentUserUtils } from '../util/CurrentUserUtils'; @observer export class PreviewCursor extends React.Component<{}> { @@ -82,15 +83,7 @@ export class PreviewCursor extends React.Component<{}> { else { // creates text document FormattedTextBox.PasteOnLoad = e; - undoBatch(() => PreviewCursor._addLiveTextDoc(Docs.Create.TextDocument("", { - _width: 500, - limitHeight: 400, - _autoHeight: true, - _showTitle: Doc.UserDoc().showTitle ? "title" : undefined, - x: newPoint[0], - y: newPoint[1], - title: "-pasted text-" - })))(); + UndoManager.RunInBatch(() => PreviewCursor._addLiveTextDoc(CurrentUserUtils.GetNewTextDoc("-pasted text-", newPoint[0], newPoint[1], 500)), "paste"); } } else //pasting in images |