diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-12-13 14:25:45 -0500 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-12-13 14:25:45 -0500 |
commit | 529c9dbe42ab8f732bd8a244246eb1b94c3b5053 (patch) | |
tree | 13110af32830b25fca4eed583c6f23cee7ecd0ee /src/client/views/ScriptBox.tsx | |
parent | a2d2737fa4ec1a57f5288ed72eb44a2be4588ee8 (diff) | |
parent | 9a90830162cf176b58729385588accf3b589454d (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/ScriptBox.tsx')
-rw-r--r-- | src/client/views/ScriptBox.tsx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/views/ScriptBox.tsx b/src/client/views/ScriptBox.tsx index 65d96f364..ded2329b4 100644 --- a/src/client/views/ScriptBox.tsx +++ b/src/client/views/ScriptBox.tsx @@ -113,7 +113,15 @@ export class ScriptBox extends React.Component<ScriptBoxProps> { return; } - params.length && DragManager.StartButtonDrag([], text, "a script", {}, params, (button: Doc) => { }, clientX, clientY); + const div = document.createElement("div"); + div.style.width = "90"; + div.style.height = "20"; + div.style.background = "gray"; + div.style.position = "absolute"; + div.style.display = "inline-block"; + div.style.transform = `translate(${clientX}px, ${clientY}px)`; + div.innerHTML = "button"; + params.length && DragManager.StartButtonDrag([div], text, doc.title + "-instance", {}, params, (button: Doc) => { }, clientX, clientY); doc[fieldKey] = new ScriptField(script); overlayDisposer(); |