Code format & sort npm script params

This commit is contained in:
Donald 2018-09-11 14:27:15 +08:00
parent d60ea5e7cb
commit 29ebbeece6
5 changed files with 7 additions and 7 deletions

View file

@ -4,9 +4,9 @@
"description": "ScratchJr", "description": "ScratchJr",
"scripts": { "scripts": {
"lint": "eslint src/**", "lint": "eslint src/**",
"watch": "webpack --watch --progress --mode=development --hide-modules", "watch": "webpack --mode=development --progress --hide-modules --watch",
"dev": "webpack --mode=development --hide-modules", "dev": "webpack --mode=development --progress --hide-modules",
"build": "webpack --mode=production --hide-modules" "build": "webpack --mode=production --progress --hide-modules"
}, },
"author": "Massachusetts Institute of Technology", "author": "Massachusetts Institute of Technology",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",

View file

@ -379,7 +379,7 @@ export default class ScratchJr {
} }
} }
static saveAndFlip (e){ static saveAndFlip (e) {
onHold = true; onHold = true;
ScratchJr.stopStripsFromTop(e); ScratchJr.stopStripsFromTop(e);
ScratchJr.unfocus(e); ScratchJr.unfocus(e);

View file

@ -471,7 +471,7 @@ export default class Scripts {
getEncodableBlocks () { getEncodableBlocks () {
var list = []; var list = [];
var sc = this.sc; var sc = this.sc;
for (var i =0; i < sc.childElementCount; i++){ for (var i = 0; i < sc.childElementCount; i++) {
var b = sc.childNodes[i].owner; var b = sc.childNodes[i].owner;
if (!b || b.type != 'block') { if (!b || b.type != 'block') {
continue; continue;

View file

@ -20,7 +20,7 @@ export function gettingStartedMain () {
var urlvars = getUrlVars(); var urlvars = getUrlVars();
place = urlvars['place']; place = urlvars['place'];
document.ontouchmove = function (e){ document.ontouchmove = function (e) {
e.preventDefault(); e.preventDefault();
}; };
} }

View file

@ -66,7 +66,7 @@ export function preprocessAndLoadCss (baseUrl, url) {
const head = document.head; const head = document.head;
let style = document.createElement('style'); let style = document.createElement('style');
style.type = 'text/css'; style.type = 'text/css';
if (style.styleSheet){ if (style.styleSheet) {
style.styleSheet.cssText = cssData; style.styleSheet.cssText = cssData;
} else { } else {
style.appendChild(document.createTextNode(cssData)); style.appendChild(document.createTextNode(cssData));