From cc5b0bf6567d46a17138f351bd6a8bd2387219c7 Mon Sep 17 00:00:00 2001 From: kimdahey Date: Sat, 14 Sep 2019 15:55:05 -0400 Subject: exlude fieldviewProps q ad --- src/client/views/webcam/DashWebCam.tsx | 115 +++++++++++++++++++++++---------- 1 file changed, 80 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/client/views/webcam/DashWebCam.tsx b/src/client/views/webcam/DashWebCam.tsx index 3659bbc6e..ce33114eb 100644 --- a/src/client/views/webcam/DashWebCam.tsx +++ b/src/client/views/webcam/DashWebCam.tsx @@ -2,6 +2,8 @@ import React = require("react"); import { observer } from "mobx-react"; import { FieldViewProps, FieldView } from "../nodes/FieldView"; import { observable } from "mobx"; +import { DocumentDecorations } from "../DocumentDecorations"; +import { InkingControl } from "../InkingControl"; @@ -23,8 +25,13 @@ interface WebcamProps { videoConstraints?: MediaStreamConstraints["video"]; } +interface OuterWebcamProps { + local: FieldViewProps; + external: WebcamProps & React.HtmlHTMLAttributes; +} + @observer -export class DashWebCam extends React.Component> { +export class DashWebCam extends React.Component { static defaultProps = { audio: true, imageSmoothing: true, @@ -63,13 +70,14 @@ export class DashWebCam extends React.Component ({ optional: [{ sourceId: id }] }); @@ -214,12 +222,12 @@ export class DashWebCam extends React.Component { + this._ignore = e.timeStamp; + } + onPrePointer = (e: React.PointerEvent) => { + this._ignore = e.timeStamp; + } + onPostPointer = (e: React.PointerEvent) => { + if (this._ignore !== e.timeStamp) { + e.stopPropagation(); + } + } + onPostWheel = (e: React.WheelEvent) => { + if (this._ignore !== e.timeStamp) { + e.stopPropagation(); + } + } @@ -271,6 +296,9 @@ export class DashWebCam extends React.Component +