diff options
| author | bob <bcz@cs.brown.edu> | 2019-11-21 13:14:39 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-11-21 13:14:39 -0500 |
| commit | ba3f889a61715b715a230d0d24894a5951fbbb3b (patch) | |
| tree | 7703efbfe47851630474cc6802538fcb1ca337ed /src/client/views/InkingStroke.tsx | |
| parent | b1fadd1137f35fe64b9dc8df42a3160882f4cccd (diff) | |
fixed inking on top of existing ink. fixed zooming maximally out.
Diffstat (limited to 'src/client/views/InkingStroke.tsx')
| -rw-r--r-- | src/client/views/InkingStroke.tsx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx index 74211cc90..723b8cac4 100644 --- a/src/client/views/InkingStroke.tsx +++ b/src/client/views/InkingStroke.tsx @@ -35,7 +35,6 @@ export class InkingStroke extends DocExtendableComponent<FieldViewProps, InkDocu @computed get PanelHeight() { return this.props.PanelHeight(); } render() { - // let pathData = this.parseData(this.props.line); let data: InkData = Cast(this.Document.data, InkField)?.inkData ?? []; let xs = data.map(p => p.x); let ys = data.map(p => p.y); @@ -48,15 +47,12 @@ export class InkingStroke extends DocExtendableComponent<FieldViewProps, InkDocu let height = bottom - top; let scaleX = this.PanelWidth / width; let scaleY = this.PanelHeight / height; - // let pathlength = this.props.count; // bcz: this is needed to force reactions to the line's data changes - return ( - <svg width={width} height={height} style={{ - transformOrigin: "top left", - transform: `translate(${left}px, ${top}px) scale(${scaleX}, ${scaleY})`, - mixBlendMode: this.Document.tool === InkTool.Highlighter ? "multiply" : "unset" - }}> - {points} - </svg> - ); + return <svg width={width} height={height} style={{ + transformOrigin: "top left", + transform: `translate(${left}px, ${top}px) scale(${scaleX}, ${scaleY})`, + mixBlendMode: this.Document.tool === InkTool.Highlighter ? "multiply" : "unset" + }}> + {points} + </svg>; } }
\ No newline at end of file |
