diff options
| author | bobzel <zzzman@gmail.com> | 2023-08-31 15:44:46 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-08-31 15:44:46 -0400 |
| commit | a60edcbd8fd724ef9c228262370a7ad98f7aadd1 (patch) | |
| tree | 374d0c397238a72d8744f6192c1eb83f99f58954 /src/client/views/nodes/FontIconBox/FontIconBox.tsx | |
| parent | 5651f5428f8464ae0f131c73601b69aba11dff98 (diff) | |
added dragging off of recordings and option for webcam vs screen
Diffstat (limited to 'src/client/views/nodes/FontIconBox/FontIconBox.tsx')
| -rw-r--r-- | src/client/views/nodes/FontIconBox/FontIconBox.tsx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/client/views/nodes/FontIconBox/FontIconBox.tsx b/src/client/views/nodes/FontIconBox/FontIconBox.tsx index 9bc9f2b52..ea7c2de82 100644 --- a/src/client/views/nodes/FontIconBox/FontIconBox.tsx +++ b/src/client/views/nodes/FontIconBox/FontIconBox.tsx @@ -7,7 +7,7 @@ import * as React from 'react'; import { Doc, DocListCast, StrListCast } from '../../../../fields/Doc'; import { ScriptField } from '../../../../fields/ScriptField'; import { BoolCast, Cast, DocCast, NumCast, ScriptCast, StrCast } from '../../../../fields/Types'; -import { Utils } from '../../../../Utils'; +import { emptyFunction, setupMoveUpEvents, Utils } from '../../../../Utils'; import { CollectionViewType, DocumentType } from '../../../documents/DocumentTypes'; import { SelectionManager } from '../../../util/SelectionManager'; import { SettingsManager } from '../../../util/SettingsManager'; @@ -176,6 +176,18 @@ export class FontIconBox extends DocComponent<ButtonProps>() { ); } + dropdownItemDown = (e: React.PointerEvent, value: string | number) => { + setupMoveUpEvents( + this, + e, + (e: PointerEvent) => { + return ScriptCast(this.rootDoc.onDragScript)?.script.run({ this: this.layoutDoc, self: this.rootDoc, value: { doc: value, e } }).result; + }, + emptyFunction, + emptyFunction + ); + }; + /** * Dropdown list */ @@ -240,6 +252,7 @@ export class FontIconBox extends DocComponent<ButtonProps>() { background={SettingsManager.userVariantColor} type={Type.TERT} dropdownType={DropdownType.SELECT} + onItemDown={this.dropdownItemDown} items={list} tooltip={this.label} fillWidth |
