Commit 8fcab250 by E. Kolpakov

Fixed default image blink on load

parent dbbd3afd
...@@ -36,6 +36,7 @@ htmlcov/ ...@@ -36,6 +36,7 @@ htmlcov/
.tox/ .tox/
.coverage .coverage
.cache .cache
.noseids
nosetests.xml nosetests.xml
coverage.xml coverage.xml
...@@ -53,3 +54,7 @@ docs/_build/ ...@@ -53,3 +54,7 @@ docs/_build/
target/ target/
workbench.db workbench.db
# IDEs
.idea
.idea/*
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
} }
.xblock--drag-and-drop .target-img { .xblock--drag-and-drop .target-img {
display: none;
background: url('../img/triangle.png') no-repeat; background: url('../img/triangle.png') no-repeat;
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -74,6 +74,9 @@ function DragAndDropBlock(runtime, element) { ...@@ -74,6 +74,9 @@ function DragAndDropBlock(runtime, element) {
if (_fn.data.targetImg) if (_fn.data.targetImg)
_fn.$target.css('background', 'url(' + _fn.data.targetImg + ') no-repeat'); _fn.$target.css('background', 'url(' + _fn.data.targetImg + ') no-repeat');
// Display target image
_fn.$target.show();
// Display the zone names if required // Display the zone names if required
if (_fn.data.displayLabels) { if (_fn.data.displayLabels) {
$('p', _fn.$zones).css('visibility', 'visible'); $('p', _fn.$zones).css('visibility', 'visible');
...@@ -287,7 +290,7 @@ function DragAndDropBlock(runtime, element) { ...@@ -287,7 +290,7 @@ function DragAndDropBlock(runtime, element) {
content: _fn.$popup.find(".popup-content").text(), content: _fn.$popup.find(".popup-content").text(),
manually: false manually: false
}); });
}; }
publish_event({ publish_event({
event_type: "xblock.drag-and-drop-v2.feedback.opened", event_type: "xblock.drag-and-drop-v2.feedback.opened",
content: str content: str
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment