From 191283a0e61e1f1b81429e6be6c5c1ef3da1a1b1 Mon Sep 17 00:00:00 2001 From: yipstanley Date: Sat, 13 Apr 2019 17:37:11 -0400 Subject: changed moving a doc --- .../views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 2 +- src/client/views/nodes/DocumentView.tsx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 1feb30db1..9914f3793 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -312,7 +312,7 @@ export class CollectionFreeFormView extends CollectionSubView { const pany: number = -this.props.Document.GetNumber(KeyStore.PanY, 0); return ( - runInAction(() => { this._pwidth = r.entry.width; this._pheight = r.entry.height })}> + runInAction(() => { this._pwidth = r.entry.width; this._pheight = r.entry.height; })}> {({ measureRef }) => (
{ onPointerDown = (e: React.PointerEvent): void => { this._downX = e.clientX; this._downY = e.clientY; + if (e.button === 2 && !this.isSelected()) { + return; + } if (e.shiftKey && e.buttons === 2) { if (this.props.isTopMost) { this.startDragging(e.pageX, e.pageY, e.altKey || e.ctrlKey); -- cgit v1.2.3-70-g09d2 From 7b7f1fb2865522da414314afbdb09847e7a9409c Mon Sep 17 00:00:00 2001 From: yipstanley Date: Sat, 13 Apr 2019 18:08:27 -0400 Subject: asdfjkl updates --- src/client/views/DocumentDecorations.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 2dc496bc1..a72f02f14 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -14,7 +14,7 @@ import './DocumentDecorations.scss'; import { DocumentView } from "./nodes/DocumentView"; import { LinkMenu } from "./nodes/LinkMenu"; import React = require("react"); -import { FieldWaiting } from "../../fields/Field"; +import { FieldWaiting, Field } from "../../fields/Field"; import { emptyFunction } from "../../Utils"; import { Main } from "./Main"; import { undo } from "prosemirror-history"; @@ -74,7 +74,20 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> // TODO: Change field with switch statement } else { - this._title = "changed"; + if (this._documents.length > 0) { + let field = this._documents[0].props.Document.Get(this._fieldKey); + if (field instanceof TextField) { + this._documents.forEach(d => { + d.props.Document.Set(this._fieldKey, new TextField(this._title)); + }); + } + else if (field instanceof NumberField) { + this._documents.forEach(d => { + d.props.Document.Set(this._fieldKey, new NumberField(+this._title)) + }); + } + this._title = "changed"; + } } e.target.blur(); } -- cgit v1.2.3-70-g09d2