Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
f3864763
Commit
f3864763
authored
Sep 07, 2016
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support disabling automatic code compilation
parent
c3e71688
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
index.html
index.html
+1
-0
app.js
src/app.js
+11
-0
No files found.
index.html
View file @
f3864763
...
@@ -91,6 +91,7 @@
...
@@ -91,6 +91,7 @@
<div
class=
"crow"
>
<div
class=
"crow"
>
<label
for=
"editorWrap"
><input
id=
"editorWrap"
type=
"checkbox"
>
Text Wrap
</label>
<label
for=
"editorWrap"
><input
id=
"editorWrap"
type=
"checkbox"
>
Text Wrap
</label>
<label
for=
"optimize"
><input
id=
"optimize"
type=
"checkbox"
>
Enable Optimization
</label>
<label
for=
"optimize"
><input
id=
"optimize"
type=
"checkbox"
>
Enable Optimization
</label>
<label
for=
"autoCompile"
><input
id=
"autoCompile"
type=
"checkbox"
checked
>
Auto Compile
</label>
<button
id=
"compile"
title=
"Compile source code"
><i
class=
"fa fa-cog"
></i>
Compile
</button>
<button
id=
"compile"
title=
"Compile source code"
><i
class=
"fa fa-cog"
></i>
Compile
</button>
</div>
</div>
</div>
</div>
...
...
src/app.js
View file @
f3864763
...
@@ -436,6 +436,12 @@ var run = function () {
...
@@ -436,6 +436,12 @@ var run = function () {
var
renderer
=
new
Renderer
(
editor
,
executionContext
.
web3
(),
updateFiles
,
udapp
,
executionContext
,
formalVerification
.
event
,
compiler
.
event
);
// eslint-disable-line
var
renderer
=
new
Renderer
(
editor
,
executionContext
.
web3
(),
updateFiles
,
udapp
,
executionContext
,
formalVerification
.
event
,
compiler
.
event
);
// eslint-disable-line
var
autoCompile
=
document
.
querySelector
(
'#autoCompile'
).
checked
;
document
.
querySelector
(
'#autoCompile'
).
addEventListener
(
'change'
,
function
()
{
autoCompile
=
document
.
querySelector
(
'#autoCompile'
).
checked
;
});
var
previousInput
=
''
;
var
previousInput
=
''
;
var
compileTimeout
=
null
;
var
compileTimeout
=
null
;
...
@@ -449,6 +455,11 @@ var run = function () {
...
@@ -449,6 +455,11 @@ var run = function () {
return
;
return
;
}
}
previousInput
=
input
;
previousInput
=
input
;
if
(
!
autoCompile
)
{
return
;
}
if
(
compileTimeout
)
{
if
(
compileTimeout
)
{
window
.
clearTimeout
(
compileTimeout
);
window
.
clearTimeout
(
compileTimeout
);
}
}
...
...
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