From b2cf58d83b9f2c2636975bccc53212dd1b09856e Mon Sep 17 00:00:00 2001 From: ljungster Date: Sat, 7 May 2022 10:31:59 -0400 Subject: images correct width --- .../collections/CollectionNoteTakingView.scss | 1 + .../views/collections/CollectionNoteTakingView.tsx | 37 +++++++--------------- 2 files changed, 12 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionNoteTakingView.scss b/src/client/views/collections/CollectionNoteTakingView.scss index c0297a648..a878033ed 100644 --- a/src/client/views/collections/CollectionNoteTakingView.scss +++ b/src/client/views/collections/CollectionNoteTakingView.scss @@ -116,6 +116,7 @@ position: absolute; display: flex; flex-direction: column; + align-items: center; top: 0; left: 0; width: 100%; diff --git a/src/client/views/collections/CollectionNoteTakingView.tsx b/src/client/views/collections/CollectionNoteTakingView.tsx index d3b3778a7..50390957a 100644 --- a/src/client/views/collections/CollectionNoteTakingView.tsx +++ b/src/client/views/collections/CollectionNoteTakingView.tsx @@ -1,7 +1,6 @@ import React = require("react"); -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { CursorProperty } from "csstype"; -import { action, computed, IReactionDisposer, observable, reaction, runInAction } from "mobx"; +import { action, computed, IReactionDisposer, observable, reaction } from "mobx"; import { observer } from "mobx-react"; import { DataSym, Doc, HeightSym, Opt, WidthSym } from "../../../fields/Doc"; import { Id } from "../../../fields/FieldSymbols"; @@ -10,8 +9,9 @@ import { listSpec } from "../../../fields/Schema"; import { SchemaHeaderField } from "../../../fields/SchemaHeaderField"; import { BoolCast, Cast, NumCast, ScriptCast, StrCast } from "../../../fields/Types"; import { TraceMobx } from "../../../fields/util"; -import { emptyFunction, returnEmptyDoclist, returnFalse, returnTrue, returnZero, setupMoveUpEvents, smoothScroll, Utils } from "../../../Utils"; +import { emptyFunction, returnEmptyDoclist, returnFalse, returnTrue, returnZero, smoothScroll, Utils } from "../../../Utils"; import { Docs, DocUtils } from "../../documents/Documents"; +import { DocumentType } from '../../documents/DocumentTypes'; import { DragManager, dropActionType } from "../../util/DragManager"; import { SnappingManager } from "../../util/SnappingManager"; import { Transform } from "../../util/Transform"; @@ -22,11 +22,11 @@ import { LightboxView } from "../LightboxView"; import { CollectionFreeFormDocumentView } from "../nodes/CollectionFreeFormDocumentView"; import { DocFocusOptions, DocumentView, DocumentViewProps, ViewAdjustment } from "../nodes/DocumentView"; import { StyleProp } from "../StyleProvider"; -import { CollectionNoteTakingViewFieldColumn } from "./CollectionNoteTakingViewFieldColumn"; import "./CollectionNoteTakingView.scss"; +import CollectionNoteTakingViewDivider from "./CollectionNoteTakingViewDivider"; +import { CollectionNoteTakingViewFieldColumn } from "./CollectionNoteTakingViewFieldColumn"; import { CollectionSubView } from "./CollectionSubView"; import { CollectionViewType } from "./CollectionView"; -import CollectionNoteTakingViewDivider from "./CollectionNoteTakingViewDivider"; const _global = (window /* browser */ || global /* node */) as any; @@ -310,7 +310,12 @@ export class CollectionNoteTakingView extends CollectionSubView { if (DragManager.docsBeingDragged.length && this.childDocList) { - const col = this.getClientColumn(e) - const colStartXCoords = this.columnStartXCoords - // console.log(col) const clientY = e.clientY - // const clientX = e.clientX let dropInd = -1; let dropAfter = 0; - const length = this._docXfs.length //TODO get the nodes in the doc this._docXfs.forEach((cd, i) => { //TODO need to write your own function for this, or make sure you're properly updating the fields @@ -400,7 +399,6 @@ export class CollectionNoteTakingView extends CollectionSubView this.filteredChildren.find((fdoc, i) => ndoc === fdoc && i < insertInd) ? off + 1 : off, 0); @@ -410,17 +408,6 @@ export class CollectionNoteTakingView extends CollectionSubView { - - } - - //plj added this - @action - onPointerDown = (e: React.PointerEvent) => { - - } - getClientColumn = (e: React.PointerEvent): number => { const clientX = e.clientX const numColumns = this.columnHeaders.length @@ -652,7 +639,6 @@ export class CollectionNoteTakingView extends CollectionSubView this._scroll = e.currentTarget.scrollTop)} onPointerOver={this.onPointerOver} - onPointerDown={this.onPointerDown} onDrop={this.onExternalDrop.bind(this)} onContextMenu={this.onContextMenu} onWheel={e => this.props.isContentActive(true) && e.stopPropagation()} -- cgit v1.2.3-70-g09d2