提交 664ff0c5 编写于 作者: J Jason Park

Merge branch 'gh-pages' of https://github.com/parkjs814/AlgorithmVisualizer into gh-pages

...@@ -489,4 +489,19 @@ input[type=number]::-webkit-inner-spin-button, ...@@ -489,4 +489,19 @@ input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none; -webkit-appearance: none;
margin: 0; margin: 0;
} }
\ No newline at end of file
.complexity {
margin: 10px 0px;
}
.complexity-type {
font-weight: bold;
}
.buttons button.active {
font-weight: bold;
}
.buttons button.active .fa {
color: #00e676;
}
...@@ -38,11 +38,11 @@ ...@@ -38,11 +38,11 @@
</div> </div>
</div> </div>
<button id="btn_run"> <button id="btn_run">
<i class="fa fa-play" aria-hidden="true"></i> <i class="fa fa-play" aria-hidden="true"></i>
<span class="btn-text">Run</span> <span class="btn-text">Run</span>
</button> </button>
<button id="btn_prev"> <button id="btn_prev">
<i class="fa fa-chevron-left" aria-hidden="true"></i> <i class="fa fa-chevron-left" aria-hidden="true"></i>
<span class="btn-text">Prev</span> <span class="btn-text">Prev</span>
</button> </button>
<button id="btn_pause"> <button id="btn_pause">
...@@ -147,4 +147,4 @@ ...@@ -147,4 +147,4 @@
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -24,8 +24,10 @@ module.exports = () => { ...@@ -24,8 +24,10 @@ module.exports = () => {
// control // control
$('#btn_run').click(() => { $('#btn_run').click(function() {
$('#btn_trace').click(); $('#btn_trace').click();
$('#btn_pause').removeClass('active');
$(this).addClass('active');
var err = app.getEditor().execute(); var err = app.getEditor().execute();
if (err) { if (err) {
console.error(err); console.error(err);
...@@ -33,6 +35,8 @@ module.exports = () => { ...@@ -33,6 +35,8 @@ module.exports = () => {
} }
}); });
$('#btn_pause').click(function() { $('#btn_pause').click(function() {
$('#btn_run').removeClass('active');
$(this).addClass('active');
if (app.getTracerManager().isPause()) { if (app.getTracerManager().isPause()) {
app.getTracerManager().resumeStep(); app.getTracerManager().resumeStep();
} else { } else {
...@@ -40,10 +44,14 @@ module.exports = () => { ...@@ -40,10 +44,14 @@ module.exports = () => {
} }
}); });
$('#btn_prev').click(() => { $('#btn_prev').click(() => {
$('#btn_run').removeClass('active');
$('#btn_pause').addClass('active');
app.getTracerManager().pauseStep(); app.getTracerManager().pauseStep();
app.getTracerManager().prevStep(); app.getTracerManager().prevStep();
}); });
$('#btn_next').click(() => { $('#btn_next').click(() => {
$('#btn_run').removeClass('active');
$('#btn_pause').addClass('active');
app.getTracerManager().pauseStep(); app.getTracerManager().pauseStep();
app.getTracerManager().nextStep(); app.getTracerManager().nextStep();
}); });
...@@ -64,4 +72,4 @@ module.exports = () => { ...@@ -64,4 +72,4 @@ module.exports = () => {
$(this).addClass('active'); $(this).addClass('active');
}); });
}; };
\ No newline at end of file
...@@ -36,8 +36,14 @@ module.exports = (data) => { ...@@ -36,8 +36,14 @@ module.exports = (data) => {
$container.append($ul); $container.append($ul);
each(value, (prop) => { each(value, (prop) => {
$ul.append($('<li>').append($('<strong>').html(prop)).append(` ${value[prop]}`)); const $wrapper = $('<div class="complexity">');
const $type = $('<span class="complexity-type">').html(`${prop}: `);
const $value = $('<span class="complexity-value">').html(`${value[prop]}`);
$wrapper.append($type).append($value);
$ul.append($('<li>').append($wrapper));
}); });
} }
}); });
}; };
\ No newline at end of file
...@@ -618,4 +618,19 @@ input[type=number]::-webkit-inner-spin-button, ...@@ -618,4 +618,19 @@ input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none; -webkit-appearance: none;
margin: 0; margin: 0;
} }
\ No newline at end of file
.complexity {
margin: 10px 0px;
}
.complexity-type {
font-weight: bold;
}
.buttons button.active {
font-weight: bold;
}
.buttons button.active .fa {
color: #00e676;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册