Merge pull request #5532 from KDSBrowne/xx.fix-whiteboard-textarea-flicker
Prevent whiteboard textarea flickering
This commit is contained in:
commit
f2cc11b08d
@ -138,9 +138,11 @@ export default class TextDrawComponent extends Component {
|
|||||||
|
|
||||||
renderViewerTextShape(results) {
|
renderViewerTextShape(results) {
|
||||||
const styles = TextDrawComponent.getViewerStyles(results);
|
const styles = TextDrawComponent.getViewerStyles(results);
|
||||||
|
const { isChrome, isEdge } = this.props.browserType;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<g>
|
<g>
|
||||||
|
{ isChrome || isEdge ? null :
|
||||||
<clipPath id={this.props.annotation.id}>
|
<clipPath id={this.props.annotation.id}>
|
||||||
<rect
|
<rect
|
||||||
x={results.x}
|
x={results.x}
|
||||||
@ -149,7 +151,7 @@ export default class TextDrawComponent extends Component {
|
|||||||
height={results.height}
|
height={results.height}
|
||||||
/>
|
/>
|
||||||
</clipPath>
|
</clipPath>
|
||||||
|
}
|
||||||
<foreignObject
|
<foreignObject
|
||||||
clipPath={`url(#${this.props.annotation.id})`}
|
clipPath={`url(#${this.props.annotation.id})`}
|
||||||
x={results.x}
|
x={results.x}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { withTracker } from 'meteor/react-meteor-data';
|
import { withTracker } from 'meteor/react-meteor-data';
|
||||||
|
import deviceInfo from '/imports/utils/deviceInfo';
|
||||||
import TextShapeService from './service';
|
import TextShapeService from './service';
|
||||||
import TextDrawComponent from './component';
|
import TextDrawComponent from './component';
|
||||||
|
|
||||||
@ -20,5 +21,6 @@ export default withTracker((params) => {
|
|||||||
isActive,
|
isActive,
|
||||||
setTextShapeValue: TextShapeService.setTextShapeValue,
|
setTextShapeValue: TextShapeService.setTextShapeValue,
|
||||||
resetTextShapeActiveId: TextShapeService.resetTextShapeActiveId,
|
resetTextShapeActiveId: TextShapeService.resetTextShapeActiveId,
|
||||||
|
browserType: deviceInfo.browserType(),
|
||||||
};
|
};
|
||||||
})(TextDrawContainer);
|
})(TextDrawContainer);
|
||||||
|
@ -18,6 +18,7 @@ const deviceInfo = {
|
|||||||
isChrome: !!window.chrome && !!window.chrome.webstore,
|
isChrome: !!window.chrome && !!window.chrome.webstore,
|
||||||
isFirefox: typeof InstallTrigger !== 'undefined',
|
isFirefox: typeof InstallTrigger !== 'undefined',
|
||||||
isIE: 'ActiveXObject' in window,
|
isIE: 'ActiveXObject' in window,
|
||||||
|
isEdge: !document.documentMode && window.StyleMedia,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
osType() {
|
osType() {
|
||||||
|
Loading…
Reference in New Issue
Block a user