mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-28 18:15:37 -05:00
fix to showing/hiding logo
This commit is contained in:
parent
62a651369f
commit
64019e6fd8
2 changed files with 15 additions and 3 deletions
|
@ -383,4 +383,5 @@ div.frame {
|
||||||
.optionsList > div {
|
.optionsList > div {
|
||||||
display: block;
|
display: block;
|
||||||
padding: .25em;
|
padding: .25em;
|
||||||
|
break-inside: avoid-column; /* don't allow column to break inside item */
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,7 @@ function indexHideSplash () {
|
||||||
|
|
||||||
function indexLoadStart () {
|
function indexLoadStart () {
|
||||||
indexHideSplash();
|
indexHideSplash();
|
||||||
|
showLogo();
|
||||||
gn('gettings').className = 'gettings show';
|
gn('gettings').className = 'gettings show';
|
||||||
gn('startcode').className = 'startcode show';
|
gn('startcode').className = 'startcode show';
|
||||||
document.ontouchmove = function (e) {
|
document.ontouchmove = function (e) {
|
||||||
|
@ -111,7 +112,6 @@ function indexLoadStart () {
|
||||||
}
|
}
|
||||||
|
|
||||||
function indexAskRemainingQuestions () {
|
function indexAskRemainingQuestions () {
|
||||||
indexHideSplash();
|
|
||||||
var nextQuestionKey = InitialOptions.nextUnansweredQuestion();
|
var nextQuestionKey = InitialOptions.nextUnansweredQuestion();
|
||||||
if (nextQuestionKey) {
|
if (nextQuestionKey) {
|
||||||
indexShowQuestion(nextQuestionKey);
|
indexShowQuestion(nextQuestionKey);
|
||||||
|
@ -120,14 +120,22 @@ function indexAskRemainingQuestions () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hideLogo () {
|
||||||
|
gn('catface').className = 'catface hide';
|
||||||
|
gn('jrlogo').className = 'jrlogo hide';
|
||||||
|
}
|
||||||
|
|
||||||
|
function showLogo () {
|
||||||
|
gn('catface').className = 'catface show';
|
||||||
|
gn('jrlogo').className = 'jrlogo show';
|
||||||
|
}
|
||||||
|
|
||||||
function indexAskPlace () {
|
function indexAskPlace () {
|
||||||
gn('authors').className = 'credits show';
|
gn('authors').className = 'credits show';
|
||||||
gn('authorsText').className = 'creditsText hide';
|
gn('authorsText').className = 'creditsText hide';
|
||||||
gn('purpleguy').className = 'purple hide';
|
gn('purpleguy').className = 'purple hide';
|
||||||
gn('blueguy').className = 'blue hide';
|
gn('blueguy').className = 'blue hide';
|
||||||
gn('redguy').className = 'red hide';
|
gn('redguy').className = 'red hide';
|
||||||
gn('catface').className = 'catface hide';
|
|
||||||
gn('jrlogo').className = 'jrlogo hide';
|
|
||||||
|
|
||||||
gn('usageQuestion').textContent = Localization.localize('USAGE_QUESTION');
|
gn('usageQuestion').textContent = Localization.localize('USAGE_QUESTION');
|
||||||
gn('useSchoolText').textContent = Localization.localize('USAGE_SCHOOL');
|
gn('useSchoolText').textContent = Localization.localize('USAGE_SCHOOL');
|
||||||
|
@ -206,6 +214,8 @@ function optionTouched (elem) {
|
||||||
|
|
||||||
// show the question for a given settings option key
|
// show the question for a given settings option key
|
||||||
function indexShowQuestion (key) {
|
function indexShowQuestion (key) {
|
||||||
|
indexHideSplash();
|
||||||
|
hideLogo();
|
||||||
var optionType = InitialOptions.optionTypeForKey(key);
|
var optionType = InitialOptions.optionTypeForKey(key);
|
||||||
if (optionType === 'place') {
|
if (optionType === 'place') {
|
||||||
indexAskPlace();
|
indexAskPlace();
|
||||||
|
@ -241,6 +251,7 @@ function indexShowQuestion (key) {
|
||||||
case 'image':
|
case 'image':
|
||||||
var imgElem = document.createElement('img');
|
var imgElem = document.createElement('img');
|
||||||
imgElem.setAttribute('src', 'svglibrary/' + option);
|
imgElem.setAttribute('src', 'svglibrary/' + option);
|
||||||
|
imgElem.setAttribute('style', 'max-width: 150px; max-height: 90px');
|
||||||
optionElem.appendChild(imgElem);
|
optionElem.appendChild(imgElem);
|
||||||
break;
|
break;
|
||||||
case 'text':
|
case 'text':
|
||||||
|
|
Loading…
Reference in a new issue