Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx
edx-platform
Commits
5070e5b2
Commit
5070e5b2
authored
11 years ago
by
Chris Dodge
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/alex/poll-merged' of github.com:MITx/mitx into feature/alex/poll-merged
parents
d2f21661
c54ad38f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
common/static/js/capa/drag_and_drop/draggable_logic.js
+10
-2
common/static/js/capa/drag_and_drop/draggables.js
+10
-2
No files found.
common/static/js/capa/drag_and_drop/draggable_logic.js
View file @
5070e5b2
...
...
@@ -354,7 +354,11 @@ return {
'width'
:
this
.
iconWidthSmall
,
'height'
:
this
.
iconHeightSmall
,
'left'
:
50
-
this
.
iconWidthSmall
*
0.5
,
'top'
:
((
this
.
labelEl
!==
null
)
?
5
:
50
-
this
.
iconHeightSmall
*
0.5
)
// Before:
// 'top': ((this.labelEl !== null) ? (100 - this.iconHeightSmall - 25) * 0.5 : 50 - this.iconHeightSmall * 0.5)
// After:
'top'
:
((
this
.
labelEl
!==
null
)
?
37.5
:
50.0
)
-
0.5
*
this
.
iconHeightSmall
});
this
.
iconEl
.
appendTo
(
this
.
containerEl
);
...
...
@@ -367,7 +371,11 @@ return {
'padding-right'
:
0
,
'z-index'
:
this
.
zIndex
,
'left'
:
50
-
this
.
labelWidth
*
0.5
,
'top'
:
5
+
this
.
iconHeightSmall
+
5
// Before:
// 'top': (100 - this.iconHeightSmall - 25) * 0.5 + this.iconHeightSmall + 5
// After:
'top'
:
42.5
+
0.5
*
this
.
iconHeightSmall
});
this
.
labelEl
.
appendTo
(
this
.
containerEl
);
}
...
...
This diff is collapsed.
Click to expand it.
common/static/js/capa/drag_and_drop/draggables.js
View file @
5070e5b2
...
...
@@ -214,7 +214,11 @@ define(['logme', 'draggable_events', 'draggable_logic'], function (logme, dragga
'width'
:
draggableObj
.
iconWidthSmall
,
'height'
:
draggableObj
.
iconHeightSmall
,
'left'
:
50
-
draggableObj
.
iconWidthSmall
*
0.5
,
'top'
:
((
obj
.
label
.
length
>
0
)
?
5
:
50
-
draggableObj
.
iconHeightSmall
*
0.5
)
// Before:
// 'top': ((obj.label.length > 0) ? (100 - draggableObj.iconHeightSmall - 25) * 0.5 : 50 - draggableObj.iconHeightSmall * 0.5)
// After:
'top'
:
((
obj
.
label
.
length
>
0
)
?
37.5
:
50.0
)
-
0.5
*
draggableObj
.
iconHeightSmall
});
draggableObj
.
iconImgEl
.
css
({
'position'
:
'absolute'
,
...
...
@@ -243,7 +247,11 @@ define(['logme', 'draggable_events', 'draggable_logic'], function (logme, dragga
draggableObj
.
labelWidth
=
draggableObj
.
labelEl
.
width
();
draggableObj
.
labelEl
.
css
({
'left'
:
50
-
draggableObj
.
labelWidth
*
0.5
,
'top'
:
5
+
draggableObj
.
iconHeightSmall
+
5
// Before:
// 'top': (100 - this.iconHeightSmall - 25) * 0.5 + this.iconHeightSmall + 5
// After:
'top'
:
42.5
+
0.5
*
draggableObj
.
iconHeightSmall
});
draggableObj
.
attachMouseEventsTo
(
'labelEl'
);
...
...
This diff is collapsed.
Click to expand it.
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