diff options
-rw-r--r-- | src/client/views/MainView.tsx | 4 | ||||
-rw-r--r-- | src/client/views/OverlayView.tsx | 12 | ||||
-rw-r--r-- | src/client/views/nodes/trails/PresBox.tsx | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 2aa7f392b..4bf6bb881 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -167,8 +167,8 @@ export class MainView extends React.Component { 'timelineHeightPercent', 'panX', 'panY', - 'x', - 'y', + 'overlayX', + 'overlayY', 'fitWidth', 'nativeWidth', 'nativeHeight', diff --git a/src/client/views/OverlayView.tsx b/src/client/views/OverlayView.tsx index 5242fabb8..2354e84ff 100644 --- a/src/client/views/OverlayView.tsx +++ b/src/client/views/OverlayView.tsx @@ -164,7 +164,7 @@ export class OverlayView extends React.Component { docScreenToLocalXf = computedFn( function docScreenToLocalXf(this: any, doc: Doc) { - return () => new Transform(-NumCast(doc.x), -NumCast(doc.y), 1); + return () => new Transform(-NumCast(doc.overlayX), -NumCast(doc.overlayY), 1); }.bind(this) ); @@ -175,8 +175,8 @@ export class OverlayView extends React.Component { const dref = React.createRef<HTMLDivElement>(); const onPointerMove = action((e: PointerEvent, down: number[]) => { if (e.buttons === 1) { - d.x = e.clientX + offsetx; - d.y = e.clientY + offsety; + d.overlayX = e.clientX + offsetx; + d.overlayY = e.clientY + offsety; } if (e.metaKey) { const dragData = new DragManager.DocumentDragData([d]); @@ -198,8 +198,8 @@ export class OverlayView extends React.Component { const onPointerDown = (e: React.PointerEvent) => { setupMoveUpEvents(this, e, onPointerMove, emptyFunction, emptyFunction); - offsetx = NumCast(d.x) - e.clientX; - offsety = NumCast(d.y) - e.clientY; + offsetx = NumCast(d.overlayX) - e.clientX; + offsety = NumCast(d.overlayY) - e.clientY; }; return ( <div @@ -207,7 +207,7 @@ export class OverlayView extends React.Component { ref={dref} key={d[Id]} onPointerDown={onPointerDown} - style={{ top: d.type === 'presentation' ? 0 : undefined, width: NumCast(d._width), height: NumCast(d._height), transform: `translate(${d.x}px, ${d.y}px)` }}> + style={{ top: d.type === 'presentation' ? 0 : undefined, width: NumCast(d._width), height: NumCast(d._height), transform: `translate(${d.overlayX}px, ${d.overlayY}px)` }}> <DocumentView Document={d} rootSelected={returnTrue} diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index 1dd03c52c..a4db2d777 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -715,8 +715,8 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { this.layoutDoc.presStatus = PresStatus.Edit; clearTimeout(this._presTimer); const pt = this.props.ScreenToLocalTransform().inverse().transformPoint(0, 0); - this.rootDoc.x = pt[0] + (this.props.PanelWidth() - 250); - this.rootDoc.y = pt[1] + 10; + this.rootDoc.overlayX = pt[0] + (this.props.PanelWidth() - 250); + this.rootDoc.overlayY = pt[1] + 10; this.rootDoc._height = 30; this.rootDoc._width = 248; Doc.AddDocToList(Doc.MyOverlayDocs, undefined, this.rootDoc); |