diff options
| author | bobzel <zzzman@gmail.com> | 2021-09-04 00:46:41 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-09-04 00:46:41 -0400 |
| commit | 9a4bd3ca5dbe192eec20bf405a9904ef8b546de6 (patch) | |
| tree | dedb50e4979820099db02912d187ae740c59a995 /src/client/views/InkingStroke.tsx | |
| parent | 85345138396771a30f9d0e7a26837edc0a972bee (diff) | |
added top/left clip bounds to ink decorations
Diffstat (limited to 'src/client/views/InkingStroke.tsx')
| -rw-r--r-- | src/client/views/InkingStroke.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx index 90eb52dd2..e713cedee 100644 --- a/src/client/views/InkingStroke.tsx +++ b/src/client/views/InkingStroke.tsx @@ -114,7 +114,7 @@ export class InkingStroke extends ViewBoxBaseComponent<FieldViewProps, InkDocume }; } - componentUI = () => { + componentUI = (boundsLeft: number, boundsTop: number) => { const { inkData, inkScaleX, inkScaleY, inkStrokeWidth } = this.inkScaledData(); const screenInkWidth = this.props.ScreenToLocalTransform().inverse().transformDirection(inkStrokeWidth, inkStrokeWidth); @@ -129,6 +129,7 @@ export class InkingStroke extends ViewBoxBaseComponent<FieldViewProps, InkDocume return <div className="inkstroke-UI" style={{ left: screenOrigin[0], top: screenOrigin[1], + clip: `rect(${boundsTop - screenOrigin[1]}px, 10000px, 10000px, ${boundsLeft - screenOrigin[0]}px)` }} > {InteractionUtils.CreatePolyline(screenPts, screenLeft, screenTop, Colors.MEDIUM_BLUE, screenInkWidth[0], overlayWidth, StrCast(inkDoc.strokeBezier), StrCast(inkDoc.fillColor, "none"), |
