From 917deb0c0d73997f4ffa465e75ac05fdca7a8519 Mon Sep 17 00:00:00 2001 From: Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> Date: Wed, 5 Aug 2020 01:21:44 +0800 Subject: pres elements --- src/client/views/presentationview/PresElementBox.tsx | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/client/views/presentationview') diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx index 90eb8580e..b3d8cca98 100644 --- a/src/client/views/presentationview/PresElementBox.tsx +++ b/src/client/views/presentationview/PresElementBox.tsx @@ -251,10 +251,6 @@ export class PresElementBox extends ViewBoxBaseComponent doc)); // let value = this.getValue(this._heading); // value = typeof value === "string" ? `"${value}"` : value; - PresBox.Instance._dragArray.map(ele => { - ele.style.backgroundColor = "#d5dce2"; - ele.style.borderRadius = '5px'; - }); if (activeItem) { DragManager.StartDocumentDrag(PresBox.Instance._dragArray.map(ele => ele), dragData, e.clientX, e.clientY); activeItem.dragging = true; @@ -276,26 +272,21 @@ export class PresElementBox extends ViewBoxBaseComponent { e.stopPropagation(); e.preventDefault(); + // Command/ control click if (e.ctrlKey || e.metaKey) { PresBox.Instance.multiSelect(this.rootDoc, this._itemRef.current!, this._dragRef.current!); - console.log("cmmd click"); + // Shift click } else if (e.shiftKey) { PresBox.Instance.shiftSelect(this.rootDoc, this._itemRef.current!, this._dragRef.current!); + // Regular click } else { - PresBox.Instance.selectElement(this.rootDoc); + this.props.focus(this.rootDoc); PresBox.Instance._eleArray = []; PresBox.Instance._eleArray.push(this._itemRef.current!); PresBox.Instance._dragArray = []; PresBox.Instance._dragArray.push(this._dragRef.current!); - console.log("normal click"); } }} - // onClick={e => { - // if (this.props.active(true)) { - // e.stopPropagation(); - // e.preventDefault(); - // } - // }} onPointerDown={this.headerDown} > <> -- cgit v1.2.3-70-g09d2