Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DnD for mobile #699

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
9 changes: 9 additions & 0 deletions drag/demo/demo.view.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ namespace $.$$ {
const {rem,px} = $mol_style_unit

$mol_style_define( $mol_drag_demo , {

Task_content: {
padding: $mol_gap.text,
color: $mol_theme.control,

':hover': {
background: $mol_theme.hover,
},
},

Task_drop:{
'@': {
Expand Down
3 changes: 1 addition & 2 deletions drag/demo/demo.view.tree
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ $mol_drag_demo $mol_example_large
Sub <= Task_drop* $mol_drop
adopt?transfer <=> transfer_adopt?transfer null
receive?obj <=> receive_before*?obj null
Sub <= Task_link* $mol_link
uri <= task_uri* \
Sub <= Task_content* $mol_text
sub / <= task_title* \
tags /
\drag
Expand Down
2 changes: 1 addition & 1 deletion drag/demo/demo.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace $.$$ {

transfer_adopt( transfer : DataTransfer ) {

const uri = transfer.getData( "text/uri-list" )
const uri = transfer.getData( "text/uri-list" ) || transfer.getData( "text/plain" )
if( !uri ) return

return this.task_list().find( task => this.task_uri( task ) === uri )
Expand Down