DragAndDropOptions
Back to ListDescription: Create Option JSON object for use with the new Drag & Drop functions in the ACF-Plugin 1.7.7.4, now 1.7.8.2 is available.
FileMaker Prototype:
Set Variable [$$JSONoptions; ACF_Run("DragAndDropOptions")]
Category: UTILITY
The DragAndDropOptions Function
Example
Set Variable [$$JSONoptions; ACF_Run("DragAndDropOptions")]
The new Drag and Drop feature in the Plugin version 1.7.7.4 can accept a config object to style and specify the Drag and Drop area on the layout.
Function source:
function DragAndDropOptions ()
JSON js = JSON(
"extensions", JSONarray(
"pdf","png", "jpg", "xlsx","docx","jpeg","zip","pptx", "doc","rtf"
),
"highlight", true,
"border", true,
"copyOnDrop", false,
"allowDirectories", true,
"opacity", 0.15,
"dragOpacity", 0.3,
"debug", false,
"highlightColor", "magenta");
return js;
end
This includes:
- What file extensions to accept
- Enable a highligh for the area when Drag and Drop is active
- Enable having a border around the drag & Drop area
- Copy on Drop - Should be true
- Allow directories - Let users drag folders into the area. Receive folder path.
- Opaciti for the highlight, value between 0 and 1, default 0.12
- DragOpacity for the highlight, default 0.25
- Debug - false
- highlightColor can be any RGB hex color value or pick a name from the list below.
Accepted color names:
| Color | Hex | Color | Hex | Color | Hex |
|---|---|---|---|---|---|
| black | 000000 | white | FFFFFF | red | FF0000 |
| green | 00FF00 | blue | 0000FF | yellow | FFFF00 |
| cyan | 00FFFF | magenta | FF00FF | gray | 808080 |
| grey | 808080 | silver | C0C0C0 | maroon | 800000 |
| olive | 808000 | lime | 00FF00 | teal | 008080 |
| navy | 000080 | purple | 800080 | orange | FFA500 |
