images
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 11 KiB |
|
@ -254,7 +254,7 @@ function onMouseMove(event) {
|
||||||
if (currentDroppable != droppableBelow) { // if there are any changes
|
if (currentDroppable != droppableBelow) { // if there are any changes
|
||||||
// we're flying in or out...
|
// we're flying in or out...
|
||||||
// note: both values can be null
|
// note: both values can be null
|
||||||
// currentDroppable=null if we were not over a droppable (e.g over an empty space)
|
// currentDroppable=null if we were not over a droppable before this event (e.g over an empty space)
|
||||||
// droppableBelow=null if we're not over a droppable now, during this event
|
// droppableBelow=null if we're not over a droppable now, during this event
|
||||||
|
|
||||||
if (currentDroppable) {
|
if (currentDroppable) {
|
||||||
|
@ -274,11 +274,11 @@ In the example below when the ball is dragged over the soccer gate, the gate is
|
||||||
|
|
||||||
[codetabs height=250 src="ball4"]
|
[codetabs height=250 src="ball4"]
|
||||||
|
|
||||||
Now we have the current "drop target" in the variable `currentDroppable` during the whole process and can use it to highlight or any other stuff.
|
Now we have the current "drop target", that we're flying over, in the variable `currentDroppable` during the whole process and can use it to highlight or any other stuff.
|
||||||
|
|
||||||
## Summary
|
## Summary
|
||||||
|
|
||||||
We considered a basic `Drag'n'Drop` algorithm.
|
We considered a basic Drag'n'Drop algorithm.
|
||||||
|
|
||||||
The key components:
|
The key components:
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 28 KiB |