diff options
author | vkalev <vjk1883@gmail.com> | 2021-07-02 11:58:06 -0500 |
---|---|---|
committer | vkalev <vjk1883@gmail.com> | 2021-07-02 11:58:06 -0500 |
commit | 89c8891e9def96a871d36ab7772e453b8d8c21c1 (patch) | |
tree | bccc168a34846dc26a19ebadee265d0b0a07a2a9 /src/client/views/InkControl.tsx | |
parent | d9b5d949c22658531504c95cc94e30c824519cd1 (diff) |
indicator appears on hover for ink control points to be added
Diffstat (limited to 'src/client/views/InkControl.tsx')
-rw-r--r-- | src/client/views/InkControl.tsx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/client/views/InkControl.tsx b/src/client/views/InkControl.tsx index ae0fc0b22..accb16f61 100644 --- a/src/client/views/InkControl.tsx +++ b/src/client/views/InkControl.tsx @@ -51,8 +51,7 @@ export class InkControl extends React.Component<InkControlProps> { } /** - * Deletes the currently selected points. - * @param e Keyboard Event. + * Deletes the currently selected point. */ @action onDelete = (e: KeyboardEvent) => { @@ -63,7 +62,6 @@ export class InkControl extends React.Component<InkControlProps> { /** * Changes the current selected control point. - * @param i The number of the point to be selected. */ @action changeCurrPoint = (i: number) => { @@ -85,8 +83,8 @@ export class InkControl extends React.Component<InkControlProps> { return ( <svg height="10" width="10" key={`ctrl${control.I}`}> <rect - x={(control.X - left) * scaleX} - y={(control.Y - top) * scaleY} + x={(control.X - left - strokeWidth / 2) * scaleX} + y={(control.Y - top - strokeWidth / 2) * scaleY} height={this._overControl ? strokeWidth * 1.5 : strokeWidth} width={this._overControl ? strokeWidth * 1.5 : strokeWidth} strokeWidth={strokeWidth / 6} stroke="#1F85DE" |