Open why520crazy opened 8 years ago
elaborate more, create a jsfiddle with steps to reproduce.
http://jsfiddle.net/s8kc7wg0/650/ select text “Upload Log” and drag it to drop area, it will show dragover style.
Remove the ngf-drag-over-class or set the "reject" class to some non-existing class so it would not show the style on invalid drag.
When you drag over the content of what is being dragged is not completely available that's why it is not possible to detect the text or actual image being dragged. They will only be available after it has been dropped. So you can just have a specific pattern and make the reject class empty so it would not show it if you want only to allow dropping files from file system.
thanks.
http://jsfiddle.net/s8kc7wg0/654/
when set specific pattern ’.*‘, it's ok for drag the content, but drag file from file system can't be work, it should show over class , actually is reject class
Change it to ngf-pattern="*"
if set ngf-pattern="*"
, drag content “Upload Log” to drop area, it will show dragover style.
i expect that show dragover style only drag from system file.
this works for me
ngf-drag-over-class="{accept:'dragover', pattern:'!text/*'}"
I drag document selection text or link,it will show drag-over-show class,if i add ngf-pattern to filter,the text file can't be work .