diff options
author | andrewdkim <adkim414@gmail.com> | 2019-08-14 16:52:19 -0400 |
---|---|---|
committer | andrewdkim <adkim414@gmail.com> | 2019-08-14 16:52:19 -0400 |
commit | e507271488fe4c8dcb548dc766ab131fa84f4437 (patch) | |
tree | fae2ecb5a84a9ff2cfe6f3c1d97556c217d89a15 | |
parent | a8b5ba65bafd35b2497753375a3e8aa8d37dad4d (diff) |
ink fix and overview fix
-rw-r--r-- | src/client/views/InkingCanvas.scss | 2 | ||||
-rw-r--r-- | src/client/views/InkingCanvas.tsx | 4 | ||||
-rw-r--r-- | src/client/views/animationtimeline/TimelineOverview.tsx | 6 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/client/views/InkingCanvas.scss b/src/client/views/InkingCanvas.scss index d95398f17..2052021d1 100644 --- a/src/client/views/InkingCanvas.scss +++ b/src/client/views/InkingCanvas.scss @@ -21,7 +21,7 @@ width: 8192px; height: 8192px; cursor: "crosshair"; - pointer-events: auto; + pointer-events: all; } diff --git a/src/client/views/InkingCanvas.tsx b/src/client/views/InkingCanvas.tsx index b08133d80..1cfa8d644 100644 --- a/src/client/views/InkingCanvas.tsx +++ b/src/client/views/InkingCanvas.tsx @@ -170,12 +170,12 @@ export class InkingCanvas extends React.Component<InkCanvasProps> { return [!penPaths.length ? (null) : <svg className={`inkingCanvas-paths-ink`} key="Pens" style={{ left: `${this.inkMidX - this.maxCanvasDim}px`, top: `${this.inkMidY - this.maxCanvasDim}px` }} > - {} + {penPaths} </svg>, !markerPaths.length ? (null) : <svg className={`inkingCanvas-paths-markers`} key="Markers" style={{ left: `${this.inkMidX - this.maxCanvasDim}px`, top: `${this.inkMidY - this.maxCanvasDim}px` }}> - {} + {markerPaths} </svg>]; } diff --git a/src/client/views/animationtimeline/TimelineOverview.tsx b/src/client/views/animationtimeline/TimelineOverview.tsx index 4fdf1381e..38b823cbc 100644 --- a/src/client/views/animationtimeline/TimelineOverview.tsx +++ b/src/client/views/animationtimeline/TimelineOverview.tsx @@ -25,6 +25,8 @@ export class TimelineOverview extends React.Component<TimelineOverviewProps>{ @action onPointerDown = (e:React.PointerEvent) => { + e.stopPropagation(); + e.preventDefault(); document.removeEventListener("pointermove", this.onPanX); document.removeEventListener("pointerup", this.onPointerUp); document.addEventListener("pointermove", this.onPanX); @@ -33,12 +35,16 @@ export class TimelineOverview extends React.Component<TimelineOverviewProps>{ @action onPanX = (e: PointerEvent) => { + e.stopPropagation(); + e.preventDefault(); let movX = (this.props.visibleStart / this.props.totalLength)* (this.DEFAULT_WIDTH * this.props.scale) + e.movementX; this.props.movePanX((movX / (this.DEFAULT_WIDTH * this.props.scale)) * this.props.totalLength); } @action onPointerUp = (e: PointerEvent) => { + e.stopPropagation(); + e.preventDefault(); document.removeEventListener("pointermove", this.onPanX); document.removeEventListener("pointerup", this.onPointerUp); } |