gobstones-blockly 0.32.0 → 0.32.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b47ed0e304185189a1d5b7cc25dad46e9a707f19649d960f55f0452a62dbdcea
4
- data.tar.gz: 9232a10f5c19d707017564980654612b72aab401a18ef65da60db1b319fb4418
3
+ metadata.gz: 9ae5bd607073339e504fd1aef9f97937a570a2576ddeb911fcd568988c3eb178
4
+ data.tar.gz: 951874f7c958863ea8197403b877f0aed56f97725326801893def64099a769f1
5
5
  SHA512:
6
- metadata.gz: 902cd68bd2423da9b2d4ed38d5d4363199a5b972985cd8ae75ad516600340b96c5b262c79cdbf727152dde76658b505963df3d3416b28d373ff01dd63bc5dd3a
7
- data.tar.gz: f0c245a9c0a010389705cd1f1cf26ae4fe3c608fdd717658c8d16f23f00951d613c5f9d4f6796fc68239c16ae405a8b32c9ded89dcbee3e22e79cd101b13b1f0
6
+ metadata.gz: a4a0d5b6a1073ee0ef4ac2b31fbb8841ecbdd9bf5dee23a168903fbd4024e8cadc8c98af3438af54c216af9f5cd385c86d2a1212fc8fb058840fd316146618b7
7
+ data.tar.gz: 5ca5f7805fbc320d2635d1710262298c25609b902916a021fafee2520e5f7f4edfe8378ef3f821066539edd4d06a35418081b803f23d7acf9c68b00370c6b9f2
@@ -5203,9 +5203,7 @@ Blockly.Blocks.AlternativaEnExpresiones = {
5203
5203
  },
5204
5204
 
5205
5205
  _removeElement: function(n) {
5206
- const isLastBranch = this.length === 2;
5207
-
5208
- const elements = ["newline", "label1", "element", "label2", "condition"];
5206
+ const elements = ["label1", "element", "label2", "condition", "newline"];
5209
5207
  elements.forEach((element) => this.removeInput(element + n));
5210
5208
  this.length--;
5211
5209
 
@@ -5214,14 +5212,12 @@ Blockly.Blocks.AlternativaEnExpresiones = {
5214
5212
  id = 1;
5215
5213
  for (let input of this.inputList) {
5216
5214
  if (input.name.startsWith(element)) {
5217
- input.name = element + id;
5215
+ input.name = element + (id + (element === "newline" ? 1 : 0));
5218
5216
  id++;
5219
5217
  }
5220
5218
  }
5221
5219
  });
5222
5220
 
5223
- if (isLastBranch) this.removeInput("newline1");
5224
-
5225
5221
  triggerRefresh(this);
5226
5222
  },
5227
5223
 
@@ -5276,7 +5272,7 @@ Blockly.Blocks.AlternativaEnExpresiones = {
5276
5272
  getLocalMediaSize(icon),
5277
5273
  "",
5278
5274
  function() {
5279
- this._removeElement(n);
5275
+ this._removeElement(parseInt(input.name.replace(/\D/g,'')));
5280
5276
  }.bind(this)
5281
5277
  );
5282
5278
  setTimeout(() => { removeButton.setTooltip("Quitar opción"); });
@@ -1,5 +1,5 @@
1
1
  module Gobstones
2
2
  module Blockly
3
- VERSION = "0.32.0"
3
+ VERSION = "0.32.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gobstones-blockly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.0
4
+ version: 0.32.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Alfonso