gobstones-code-runner 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f7ef66628bf9b72a8a81c6a2bb22cf1fd2a219c5e3a34a1b939ae1d2cd4da3a
4
- data.tar.gz: bc604bcb3c94bcbd4aa273afd35e234c5e834159babfaf3a181a3fd26b6c3906
3
+ metadata.gz: 3bc71746c298f69d271810560054bbf5e7a90cb05bd87510d899f1f522a159e8
4
+ data.tar.gz: 4f15c18f8b5550edfad79567d16264eb5db2f3a35704c70ec5379db4946fe037
5
5
  SHA512:
6
- metadata.gz: af4ec3a49236ae4346e8279885c1786ffcbac4c96de3d3dc786a36e72034296c887761ceb34e6d923960aa7624ffbf1f4f3d7e1affc00fcd88de01d3f60964bd
7
- data.tar.gz: d38df24298a0d95e10aa94186c4b887520999a3ed9a186710c374e2654a559b9d47efd8c426dbcd4ea60b16665075a93276dcef46d007aa4d46b5077b62d6317
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 (!this.isRunning) {
19652
- this.requestRun();
19668
+ if (this.isDirty) {
19669
+ this.reset();
19653
19670
  } else {
19654
- this.stop();
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.isRunning ? "av:stop" : "av:play-arrow";
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>
@@ -1,5 +1,5 @@
1
1
  module Gobstones
2
2
  module CodeRunner
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
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.1.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-04 00:00:00.000000000 Z
11
+ date: 2018-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler