diff options
author | Jenny Yu <jennyyu212@outlook.com> | 2022-06-08 19:00:02 -0700 |
---|---|---|
committer | Jenny Yu <jennyyu212@outlook.com> | 2022-06-08 19:00:02 -0700 |
commit | dff15ea5cc4b351f9bea90c1822e1b02d4f0730b (patch) | |
tree | e3e893b6b8fdf95e9860673f0b4357e26dc9ff1d /src/client/views/OverlayView.tsx | |
parent | 88a8f35c33bbff61b0058a66d7bcc586d483deca (diff) | |
parent | 0ae3de67900489a6ffd43eabaa810c3ec3fdddd9 (diff) |
fix: merge conflicts
Diffstat (limited to 'src/client/views/OverlayView.tsx')
-rw-r--r-- | src/client/views/OverlayView.tsx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/client/views/OverlayView.tsx b/src/client/views/OverlayView.tsx index 6796db51e..ab5dc74c9 100644 --- a/src/client/views/OverlayView.tsx +++ b/src/client/views/OverlayView.tsx @@ -7,7 +7,7 @@ import ReactLoading from 'react-loading'; import { Doc, WidthSym, HeightSym } from "../../fields/Doc"; import { Id } from "../../fields/FieldSymbols"; import { Cast, NumCast } from "../../fields/Types"; -import { emptyFunction, returnEmptyDoclist, returnEmptyFilter, returnFalse, returnOne, returnTrue, setupMoveUpEvents, Utils } from "../../Utils"; +import { emptyFunction, returnEmptyDoclist, returnEmptyFilter, returnFalse, returnOne, returnTrue, returnZero, setupMoveUpEvents, Utils } from "../../Utils"; import { DocUtils } from "../documents/Documents"; import { CurrentUserUtils } from "../util/CurrentUserUtils"; import { DragManager } from "../util/DragManager"; @@ -148,9 +148,11 @@ export class OverlayView extends React.Component { return remove; } - removeOverlayDoc = (doc: Doc | Doc[]) => (doc instanceof Doc ? [doc] : doc).map(doc => Doc.RemoveDocFromList((Doc.UserDoc().myOverlayDocs as Doc), "data", doc)).length ? true : false; - - + removeOverlayDoc = (doc: Doc | Doc[]) => { + (doc instanceof Doc ? [doc] : doc).forEach(doc => Doc.RemoveDocFromList((Doc.UserDoc().myOverlayDocs as Doc), undefined, doc)); + return true; + } + docScreenToLocalXf = computedFn(function docScreenToLocalXf(this: any, doc: Doc) { return () => new Transform(-NumCast(doc.x), -NumCast(doc.y), 1); }.bind(this)); @@ -199,7 +201,7 @@ export class OverlayView extends React.Component { ScreenToLocalTransform={this.docScreenToLocalXf(d)} renderDepth={1} isDocumentActive={returnTrue} - isContentActive={emptyFunction} + isContentActive={returnTrue} whenChildContentsActiveChanged={emptyFunction} focus={DocUtils.DefaultFocus} styleProvider={DefaultStyleProvider} |