aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-04-03 17:26:43 -0400
committerbobzel <zzzman@gmail.com>2024-04-03 17:26:43 -0400
commitfa82331598ded65d7b3c91a239d99a43f370b1b8 (patch)
treeb74a9420d4c8f3164028dc7db084387e4ed706dc
parent6116b92bcd7da32d206383160562d6d9abf895f8 (diff)
from last
-rw-r--r--src/client/views/DocumentDecorations.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index d7b89be4a..2a44a9739 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -34,6 +34,7 @@ import { DocumentView, OpenWhereMod } from './nodes/DocumentView';
import { ImageBox } from './nodes/ImageBox';
import { KeyValueBox } from './nodes/KeyValueBox';
import { FormattedTextBox } from './nodes/formattedText/FormattedTextBox';
+import { identity } from 'lodash';
interface DocumentDecorationsProps {
PanelWidth: number;
@@ -429,7 +430,10 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora
const id = (this._resizeHdlId = e.currentTarget.className);
const pad = id.includes('Left') || id.includes('Right') ? Number(getComputedStyle(e.target as any).width.replace('px', '')) / 2 : 0;
const bounds = e.currentTarget.getBoundingClientRect();
- this._offset = { x: id.toLowerCase().includes('left') ? bounds.right - e.clientX - pad : bounds.left - e.clientX + pad, y: this._resizeHdlId.toLowerCase().includes('top') ? bounds.bottom - e.clientY - pad : bounds.top - e.clientY + pad };
+ this._offset = {
+ x: id.toLowerCase().includes('left') ? bounds.right - e.clientX - pad : bounds.left - e.clientX + pad, //
+ y: id.toLowerCase().includes('top') ? bounds.bottom - e.clientY - pad : bounds.top - e.clientY + pad,
+ };
this._resizeUndo = UndoManager.StartBatch('drag resizing');
this._snapPt = { x: e.pageX, y: e.pageY };
SelectionManager.Views.forEach(docView => docView.CollectionFreeFormView?.dragStarting(false, false));