gobstones-code-runner 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/htmls/gobstones-code-runner.html +34 -4
- data/lib/gobstones/code-runner/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bc71746c298f69d271810560054bbf5e7a90cb05bd87510d899f1f522a159e8
|
4
|
+
data.tar.gz: 4f15c18f8b5550edfad79567d16264eb5db2f3a35704c70ec5379db4946fe037
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8308f12d46530c17158eab639542c91335bbaee26c7ad1ca4d1baac974d46e75b1dfa72fcdf07b23505f85db5f88b544aba6d8291898c6d619d1f07bbb07445e
|
7
|
+
data.tar.gz: 18c0ce149c1fbc30b99edeb349d4b8492e0d9db9509913168bfe9b2d7bbea946e11ddb553c54902c8d75400f78bf7da1f8d8413db73d2e62b0ec15756de53725
|
@@ -19549,6 +19549,12 @@ function writeJboardToFile(filename, jboard) {
|
|
19549
19549
|
value: false,
|
19550
19550
|
notify: true,
|
19551
19551
|
observer: "_onUpdate"
|
19552
|
+
},
|
19553
|
+
isDirty: {
|
19554
|
+
type: Boolean,
|
19555
|
+
value: false,
|
19556
|
+
notify: true,
|
19557
|
+
observer: "_onUpdate"
|
19552
19558
|
}
|
19553
19559
|
},
|
19554
19560
|
|
@@ -19647,11 +19653,26 @@ function writeJboardToFile(filename, jboard) {
|
|
19647
19653
|
});
|
19648
19654
|
},
|
19649
19655
|
|
19656
|
+
/**
|
19657
|
+
* Resets the runner state.
|
19658
|
+
* @event gbs-reset-state
|
19659
|
+
*
|
19660
|
+
*/
|
19661
|
+
reset: function() {
|
19662
|
+
this.isDirty = false;
|
19663
|
+
this._clear();
|
19664
|
+
this.fire("gbs-reset-state");
|
19665
|
+
},
|
19666
|
+
|
19650
19667
|
_onButtonClick: function() {
|
19651
|
-
if (
|
19652
|
-
this.
|
19668
|
+
if (this.isDirty) {
|
19669
|
+
this.reset();
|
19653
19670
|
} else {
|
19654
|
-
this.
|
19671
|
+
if (!this.isRunning) {
|
19672
|
+
this.requestRun();
|
19673
|
+
} else {
|
19674
|
+
this.stop();
|
19675
|
+
}
|
19655
19676
|
}
|
19656
19677
|
},
|
19657
19678
|
|
@@ -19710,7 +19731,16 @@ function writeJboardToFile(filename, jboard) {
|
|
19710
19731
|
},
|
19711
19732
|
|
19712
19733
|
_onUpdate: function() {
|
19713
|
-
this.$.gbsPlayButton.icon = this.
|
19734
|
+
this.$.gbsPlayButton.icon = this._getCurrentButtonIcon();
|
19735
|
+
},
|
19736
|
+
|
19737
|
+
_getCurrentButtonIcon: function () {
|
19738
|
+
if(this.isDirty){
|
19739
|
+
return "av:replay";
|
19740
|
+
}
|
19741
|
+
else{
|
19742
|
+
return this.isRunning ? "av:stop" : "av:play-arrow"
|
19743
|
+
}
|
19714
19744
|
}
|
19715
19745
|
});
|
19716
19746
|
</script>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gobstones-code-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Alfonso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|