diff options
| author | bobzel <zzzman@gmail.com> | 2024-10-01 15:57:57 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-10-01 15:57:57 -0400 |
| commit | 8d7bf0588ca63c2d505a494865dcf9921eb1383d (patch) | |
| tree | 7ecfb7535513a03e9dca5271d5053f47bd87c038 /src/client/views/smartdraw | |
| parent | fe3c2d841b8c112f7f22ac9f7209d46b0c6b9669 (diff) | |
more lint fixes
Diffstat (limited to 'src/client/views/smartdraw')
| -rw-r--r-- | src/client/views/smartdraw/AnnotationPalette.tsx | 4 | ||||
| -rw-r--r-- | src/client/views/smartdraw/SmartDrawHandler.tsx | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/client/views/smartdraw/AnnotationPalette.tsx b/src/client/views/smartdraw/AnnotationPalette.tsx index 1c17469c3..f1e2e4f41 100644 --- a/src/client/views/smartdraw/AnnotationPalette.tsx +++ b/src/client/views/smartdraw/AnnotationPalette.tsx @@ -11,6 +11,7 @@ import { emptyFunction } from '../../../Utils'; import { Doc, DocListCast, returnEmptyDoclist } from '../../../fields/Doc'; import { DocData } from '../../../fields/DocSymbols'; import { ImageCast, NumCast } from '../../../fields/Types'; +import { ImageField } from '../../../fields/URLField'; import { DocumentType } from '../../documents/DocumentTypes'; import { Docs } from '../../documents/Documents'; import { makeUserTemplateButtonOrImage } from '../../util/DropConverter'; @@ -23,8 +24,6 @@ import { DocumentView, DocumentViewInternal } from '../nodes/DocumentView'; import { FieldView } from '../nodes/FieldView'; import './AnnotationPalette.scss'; import { DrawingOptions, SmartDrawHandler } from './SmartDrawHandler'; -import { ImageField } from '../../../fields/URLField'; -import { Copy } from '../../../fields/FieldSymbols'; interface AnnotationPaletteProps { Document: Doc; @@ -158,7 +157,6 @@ export class AnnotationPalette extends ObservableReactComponent<AnnotationPalett console.log('Error generating drawing', e); } } - // eslint-disable-next-line @typescript-eslint/no-unused-expressions this._opts.text !== '' ? (this._opts.text = `${this._opts.text} ~~~ ${this._userInput}`) : (this._opts.text = this._userInput); this._userInput = ''; this._isLoading = false; diff --git a/src/client/views/smartdraw/SmartDrawHandler.tsx b/src/client/views/smartdraw/SmartDrawHandler.tsx index 76bfe2a19..75ef55060 100644 --- a/src/client/views/smartdraw/SmartDrawHandler.tsx +++ b/src/client/views/smartdraw/SmartDrawHandler.tsx @@ -50,6 +50,7 @@ export interface DrawingOptions { @observer export class SmartDrawHandler extends ObservableReactComponent<object> { + // eslint-disable-next-line no-use-before-define static Instance: SmartDrawHandler; private _lastInput: DrawingOptions = { text: '', complexity: 5, size: 350, autoColor: true, x: 0, y: 0 }; @@ -395,7 +396,7 @@ export class SmartDrawHandler extends ObservableReactComponent<object> { defaultChecked={true} value={this._autoColor} size="small" - onChange={action(e => this._canInteract && (this._autoColor = !this._autoColor))} + onChange={action(() => this._canInteract && (this._autoColor = !this._autoColor))} /> </div> <div className="complexity"> |
