diff options
author | aidahosa1 <aisosa_idahosa@brown.edu> | 2024-08-22 10:04:44 -0400 |
---|---|---|
committer | aidahosa1 <aisosa_idahosa@brown.edu> | 2024-08-22 10:04:44 -0400 |
commit | 593a894cf3b707d60b4baf1c400f138bd8b3a783 (patch) | |
tree | 690da15899321fd3faa17aec8a1fd0a21305d936 /src | |
parent | 3ab5b620e462a35d0dc23f67014fc5aa9ef4803c (diff) |
boutta get silly
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/InkingStroke.tsx | 7 | ||||
-rw-r--r-- | src/client/views/nodes/IconTagBox.tsx | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx index 55f28f415..62b79dd5a 100644 --- a/src/client/views/InkingStroke.tsx +++ b/src/client/views/InkingStroke.tsx @@ -447,6 +447,13 @@ export class InkingStroke extends ViewBoxAnnotatableComponent<FieldViewProps>() }), icon: 'paint-brush', }); + cm?.addItem({ + description: 'Create a hotkey', + event: action(() => { + InkStrokeProperties.Instance._controlButton = !InkStrokeProperties.Instance._controlButton; + }), + icon: 'satellite', + }); }, }; return ( diff --git a/src/client/views/nodes/IconTagBox.tsx b/src/client/views/nodes/IconTagBox.tsx index cdf2075cb..c72d48ef5 100644 --- a/src/client/views/nodes/IconTagBox.tsx +++ b/src/client/views/nodes/IconTagBox.tsx @@ -25,6 +25,7 @@ import { DragManager } from "../../util/DragManager"; import { setupMoveUpEvents } from "../../../ClientUtils"; import { returnFalse } from "../../../ClientUtils"; import { emptyFunction } from "../../../Utils"; +import { CollectionViewType } from "../../documents/DocumentTypes"; export interface IconTagProps { @@ -41,7 +42,9 @@ export class IconTagBox extends ObservableReactComponent<IconTagProps> { @computed get currentScale() { + // console.log(NumCast((this._props.doc.embedContainer as Doc)?._freeform_scale, 1)) return NumCast((this._props.doc.embedContainer as Doc)?._freeform_scale, 1); + } constructor(props: any) { @@ -150,6 +153,8 @@ export class IconTagBox extends ObservableReactComponent<IconTagProps> { }; + const isCard = DocCast(this._props.doc.embedContainer).type_collection === CollectionViewType.Card + return ( @@ -157,7 +162,7 @@ export class IconTagBox extends ObservableReactComponent<IconTagProps> { className="card-button-container" style={{ transformOrigin: 'top left', - transform: `scale(${1 / this.currentScale}) + transform: `scale(${ isCard ? 2 : 0.6 / this.currentScale}) translateY(${doc[DocData].showLabels ? ((NumCast(doc[DocData].keywordHeight)*(1-this.currentScale))) : 0}px) `, width: `${totalWidth}px`, |