diff options
author | bobzel <zzzman@gmail.com> | 2025-03-21 18:58:21 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-03-21 18:58:21 -0400 |
commit | 7e4d793eaa7e5b6b564355a11fa02a5611645f20 (patch) | |
tree | acab0bf2057a26b4daeead8ce8d4568afa167b2a /src/client/util/DragManager.ts | |
parent | 2d64242ce924a5ba18e3c8dd0a6efe54db2e3f9a (diff) |
trying to improve how data / layout / root and templtae docs are accessed.
Diffstat (limited to 'src/client/util/DragManager.ts')
-rw-r--r-- | src/client/util/DragManager.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts index 2a7859f09..e2e4c0fe4 100644 --- a/src/client/util/DragManager.ts +++ b/src/client/util/DragManager.ts @@ -280,11 +280,12 @@ export namespace DragManager { export function StartButtonDrag(eles: HTMLElement[], script: string, title: string, vars: { [name: string]: FieldType }, params: string[], initialize: (button: Doc) => void, downX: number, downY: number, options?: DragOptions) { const finishDrag = (e: DragCompleteEvent) => { const bd = Docs.Create.ButtonDocument({ toolTip: title, z: 1, _width: 150, _height: 50, title, onClick: ScriptField.MakeScript(script) }); + const bdData = bd[DocData]; params.forEach(p => { - Object.keys(vars).indexOf(p) !== -1 && (bd[DocData][p] = new PrefetchProxy(vars[p] as Doc)); + Object.keys(vars).indexOf(p) !== -1 && (bdData[p] = new PrefetchProxy(vars[p] as Doc)); }); // copy all "captured" arguments into document parameterfields initialize?.(bd); - bd[DocData]['onClick-paramFieldKeys'] = new List<string>(params); + bd.$onClick_paramFieldKeys = new List<string>(params); e.docDragData && (e.docDragData.droppedDocuments = [bd]); return e; }; |