Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
f50e2554
Commit
f50e2554
authored
Nov 21, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge waitForDragover in waitForDrop
parent
dffb297b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
dream/platform/src/jsplumb/jsplumb.js
dream/platform/src/jsplumb/jsplumb.js
+6
-14
No files found.
dream/platform/src/jsplumb/jsplumb.js
View file @
f50e2554
...
...
@@ -588,18 +588,6 @@
gadget
.
notifyDataChanged
();
}
// This will register a dragover handler that prevents default on the event,
// so that we can wait for drop
// TODO: add in waitForDrop
function
waitForDragover
(
gadget
)
{
return
loopEventListener
(
gadget
.
props
.
main
,
'
dragover
'
,
false
,
function
()
{
return
undefined
;
}
);
}
function
waitForDrop
(
gadget
)
{
var
callback
;
function
canceller
()
{
...
...
@@ -637,7 +625,12 @@
gadget
.
props
.
main
.
addEventListener
(
'
drop
'
,
callback
,
false
);
}
return
new
RSVP
.
Promise
(
resolver
,
canceller
);
return
new
RSVP
.
all
(
[
// loopEventListener adds an event listener that will prevent default for
// dragover
loopEventListener
(
gadget
.
props
.
main
,
'
dragover
'
,
false
,
function
()
{
return
undefined
;
}),
RSVP
.
Promise
(
resolver
,
canceller
)
]);
}
initGadgetMixin
(
gadget_klass
);
...
...
@@ -680,7 +673,6 @@
});
return
RSVP
.
all
([
waitForDragover
(
gadget
),
waitForDrop
(
gadget
),
waitForConnection
(
gadget
),
waitForConnectionDetached
(
gadget
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment