diff options
author | bobzel <zzzman@gmail.com> | 2023-03-22 14:20:09 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-03-22 14:20:09 -0400 |
commit | 2a4e86be98ad0f8d4aa4cb09b982d448b542d916 (patch) | |
tree | 6f1912bd4f5c049b83102db1d413d38372bb0fdc /src/client/util/DragManager.ts | |
parent | b25f333713706a7456ab418960082bcabe830f11 (diff) |
removed gitlike and branch stuff. updated fortawesome. added Z ordering buttons. moved ctrl-t/alt-t to edit text title into formattedTextBox
Diffstat (limited to 'src/client/util/DragManager.ts')
-rw-r--r-- | src/client/util/DragManager.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts index a56f87075..5a35fcd53 100644 --- a/src/client/util/DragManager.ts +++ b/src/client/util/DragManager.ts @@ -10,7 +10,9 @@ import { BoolCast, Cast, NumCast, ScriptCast, StrCast } from '../../fields/Types import { emptyFunction, Utils } from '../../Utils'; import { Docs, DocUtils } from '../documents/Documents'; import * as globalCssVariables from '../views/global/globalCssVariables.scss'; +import { Colors } from '../views/global/globalEnums'; import { DocumentView } from '../views/nodes/DocumentView'; +import { ScriptingGlobals } from './ScriptingGlobals'; import { SnappingManager } from './SnappingManager'; import { UndoManager } from './UndoManager'; @@ -590,3 +592,8 @@ export namespace DragManager { endDrag?.(); } } + +ScriptingGlobals.add(function toggleRaiseOnDrag(readOnly?: boolean) { + if (readOnly) return DragManager.GetRaiseWhenDragged() ? Colors.MEDIUM_BLUE : 'transparent'; + DragManager.SetRaiseWhenDragged(!DragManager.GetRaiseWhenDragged()); +}); |