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
ed9513f4
Commit
ed9513f4
authored
Dec 10, 2015
by
Braden MacDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work around Firefox bug 975632
parent
a1852925
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
drag_and_drop_v2/public/css/drag_and_drop.css
+8
-4
drag_and_drop_v2/public/js/view.js
+3
-1
No files found.
drag_and_drop_v2/public/css/drag_and_drop.css
View file @
ed9513f4
...
...
@@ -129,8 +129,7 @@
/*** Drop Target ***/
.xblock--drag-and-drop
.target
{
display
:
table
;
width
:
0
;
/* 'display: table' & 'width: 0' make this have the smallest size that fits the .target-img
/* 'display: table' makes this have the smallest size that fits the .target-img
while still allowing the image to use 'max-width: 100%' and scale proportionally.
The end result is that this element has the same widdth and height as the image, so we
can use it as a 'position: relative' anchor for the placed elements. */
...
...
@@ -140,11 +139,16 @@
background
:
#fff
;
}
.xblock--drag-and-drop
.target-img-wrapper
{
/* This element is required for Firefox due to https://bugzilla.mozilla.org/show_bug.cgi?id=975632 */
display
:
table-row
;
}
.xblock--drag-and-drop
.target-img
{
width
:
auto
;
display
:
table-cell
;
width
:
100%
;
max-width
:
100%
;
height
:
auto
;
max-height
:
80vh
;
/* On mobile, don't ever fill the whole screen with the image */
}
.xblock--drag-and-drop
.zone
{
...
...
drag_and_drop_v2/public/js/view.js
View file @
ed9513f4
...
...
@@ -108,7 +108,9 @@
h
(
'div.close.icon-remove-sign.fa-times-circle'
),
h
(
'p.popup-content'
,
{
innerHTML
:
ctx
.
popup_html
}),
]),
h
(
'img.target-img'
,
{
src
:
ctx
.
target_img_src
,
alt
:
"Image Description here"
}),
h
(
'div.target-img-wrapper'
,
[
h
(
'img.target-img'
,
{
src
:
ctx
.
target_img_src
,
alt
:
"Image Description here"
}),
]),
renderCollection
(
zoneTemplate
,
ctx
.
zones
,
ctx
),
renderCollection
(
itemTemplate
,
items_placed
,
ctx
),
]),
...
...
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