mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2025-07-13 14:14:27 +02:00
add start/stop buttons
This commit is contained in:
@ -223,6 +223,14 @@
|
||||
(this.find("log-clear")).set("onbtclick", function(e) {
|
||||
return me.log("clean");
|
||||
});
|
||||
(this.find("code-run")).set("onbtclick", function(e) {
|
||||
return me.run();
|
||||
});
|
||||
(this.find("code-stop")).set("onbtclick", function(e) {
|
||||
if (me.socket) {
|
||||
return me.socket.close();
|
||||
}
|
||||
});
|
||||
this.socket = null;
|
||||
return this.bindKey("CTRL-R", function() {
|
||||
return me.run();
|
||||
|
@ -5,6 +5,8 @@
|
||||
<afx-vbox>
|
||||
<afx-hbox data-height="20" data-id="bottom-vbox">
|
||||
<afx-button data-id = "log-clear" data-width="25" iconclass="fa fa-trash"></afx-button>
|
||||
<afx-button data-id = "code-run" data-width="25" iconclass="fa fa-play"></afx-button>
|
||||
<afx-button data-id = "code-stop" data-width="25" iconclass="fa fa-stop"></afx-button>
|
||||
</afx-hbox>
|
||||
<div data-id="output"></div>
|
||||
</afx-vbox>
|
||||
|
Reference in New Issue
Block a user