aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-04-02 20:59:10 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-04-02 20:59:10 -0400
commit7304217fd9559c35e34c16d5e4e025875adc3252 (patch)
tree14033a56f0e53b3f7467ca8abe2be3ec170f0abd /src
parent85e1eeb77241303307ff5f98d550663e18b807b8 (diff)
put in a patch for inking up to canvas limit of 8192
Diffstat (limited to 'src')
-rw-r--r--src/client/views/InkingCanvas.scss10
-rw-r--r--src/client/views/InkingCanvas.tsx2
-rw-r--r--src/client/views/InkingStroke.tsx5
3 files changed, 9 insertions, 8 deletions
diff --git a/src/client/views/InkingCanvas.scss b/src/client/views/InkingCanvas.scss
index 214c70280..2128401b8 100644
--- a/src/client/views/InkingCanvas.scss
+++ b/src/client/views/InkingCanvas.scss
@@ -2,12 +2,12 @@
.inkingCanvas-paths-ink, .inkingCanvas-paths-markers, .inkingCanvas-noSelect, .inkingCanvas-canSelect {
position: absolute;
- top: -50000px;
- left: -50000px;
- width: 100000px;
- height: 100000px;
+ top: -4096px;
+ left: -4096px;
+ width: 8192px;
+ height: 8192px;
.inkingCanvas-children {
- transform: translate(50000px, 50000px);
+ transform: translate(4096px, 4096px);
pointer-events: none;
}
cursor:"crosshair";
diff --git a/src/client/views/InkingCanvas.tsx b/src/client/views/InkingCanvas.tsx
index 123ff679b..fcf6db390 100644
--- a/src/client/views/InkingCanvas.tsx
+++ b/src/client/views/InkingCanvas.tsx
@@ -18,7 +18,7 @@ interface InkCanvasProps {
@observer
export class InkingCanvas extends React.Component<InkCanvasProps> {
- static InkOffset: number = 50000;
+ static InkOffset: number = 4096;
private _currentStrokeId: string = "";
public static IntersectStrokeRect(stroke: StrokeData, selRect: { left: number, top: number, width: number, height: number }): boolean {
return stroke.pathData.reduce((inside, val) => inside ||
diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx
index 52111c711..44048f377 100644
--- a/src/client/views/InkingStroke.tsx
+++ b/src/client/views/InkingStroke.tsx
@@ -48,9 +48,10 @@ export class InkingStroke extends React.Component<StrokeProps> {
let pathStyle = this.createStyle();
let pathData = this.parseData(this.props.line);
+ let pointerEvents: any = InkingControl.Instance.selectedTool == InkTool.Eraser ? "all" : "none";
return (
- <path className={(this._strokeTool === InkTool.Highlighter) ? "highlight" : ""}
- d={pathData} style={{ ...pathStyle, pointerEvents: "all" }} strokeLinejoin="round" strokeLinecap="round"
+ <path className={(this._strokeTool === InkTool.Highlighter) ? "highlight" : "normal"}
+ d={pathData} style={{ ...pathStyle, pointerEvents: pointerEvents }} strokeLinejoin="round" strokeLinecap="round"
onPointerOver={this.deleteStroke} onPointerDown={this.deleteStroke} />
)
}