Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-drag-and-drop-v2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
xblock-drag-and-drop-v2
Commits
e8ebe95e
Commit
e8ebe95e
authored
Feb 02, 2016
by
Jillian Vogel
Committed by
Jonathan Piacenti
Feb 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OC-1320 Minor fix to allow zone.align to work with keyboard events
parent
2503e174
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
drag_and_drop_v2/public/js/drag_and_drop.js
+4
-3
No files found.
drag_and_drop_v2/public/js/drag_and_drop.js
View file @
e8ebe95e
...
@@ -586,20 +586,21 @@ function DragAndDropBlock(runtime, element, configuration) {
...
@@ -586,20 +586,21 @@ function DragAndDropBlock(runtime, element, configuration) {
};
};
var
placeItem
=
function
(
$zone
,
$item
)
{
var
placeItem
=
function
(
$zone
,
$item
)
{
var
item_id
;
var
$anchor
;
var
$anchor
;
if
(
$item
!==
undefined
)
{
if
(
$item
!==
undefined
)
{
item_id
=
$item
.
data
(
'value'
);
// Element was placed using the mouse,
// Element was placed using the mouse,
// so use relevant properties of *item* when calculating new position below.
// so use relevant properties of *item* when calculating new position below.
$anchor
=
$item
;
$anchor
=
$item
;
}
else
{
}
else
{
item_id
=
$selectedItem
.
data
(
'value'
);
// Element was placed using the keyboard,
// Element was placed using the keyboard,
// so use relevant properties of *zone* when calculating new position below.
// so use relevant properties of *zone* when calculating new position below.
$anchor
=
$zone
;
$anchor
=
$zone
;
// Set $item so it can be used below
$item
=
$selectedItem
;
}
}
var
zone
=
String
(
$zone
.
data
(
'uid'
));
var
zone
=
String
(
$zone
.
data
(
'uid'
));
var
item_id
=
$item
.
data
(
'value'
);
var
zone_id
=
$zone
.
data
(
'zone_id'
);
var
zone_id
=
$zone
.
data
(
'zone_id'
);
var
$target_img
=
$root
.
find
(
'.target-img'
);
var
$target_img
=
$root
.
find
(
'.target-img'
);
...
...
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