gobstones-blockly 0.16.0 → 0.17.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: 5744548cd9ce6c76d9b75de1f19f31c1144df20e86517851eba5798cbc6f7751
4
- data.tar.gz: 96f57a6d3a19bd9fa5a752932aef12ae19a6c00fafd96091e432a0e6ee06ee74
3
+ metadata.gz: c2068974de8a97b4a7873a2e18fd99811d6e13e7f9a387739f02b44aba8468f2
4
+ data.tar.gz: 4616a462fa78fdf3ec572a232007e438c4a749f7c5478382c4c773d7e2f31c0a
5
5
  SHA512:
6
- metadata.gz: 734484e96e1ebd97f500ea29ee02653e1dc860fc016ba697386d8afe2153ed2ccf8a92ec7e689f8c9a58b3623c2eb2f4ba616dd580e8c9bcb21b22f539d77ac9
7
- data.tar.gz: b0ad0b0fad35cca3cb6056a137cc61b94db213505ddef4793fd9223abba7e88519a90269548e279461ca10f89905664598122b4a63f93480f8f2ba0a7e1e9c92
6
+ metadata.gz: f6eaf3699011663c610228fb139e38032bd484b352c0a842a58651f8b1574f2d7bcf2f93650f5223ba4785bca01a139cc688fd5bbfded809ab7aa95552fd4707
7
+ data.tar.gz: 15f33263b6be825c896b070f4748d5b88c3d3589e8a2d9ba247beb06169bfdefe3cfd0af61bf5f73e2a5256b1f2b00d47e2c98fac31cf43394e47d0a05b1a5ba
@@ -5998,6 +5998,8 @@ Blockly.ErrorInforming.CssContent = [
5998
5998
  const primitiveProcedures = this._getPrimitiveNames(this.primitiveProcedures);
5999
5999
  const primitiveFunctions = this._getPrimitiveNames(this.primitiveFunctions);
6000
6000
 
6001
+ this.setDefaultToolbox(this.toolbox && this.toolbox.defaultToolbox);
6002
+
6001
6003
  let tree = this._defaultToolboxTree();
6002
6004
  let toolbox = [];
6003
6005
 
@@ -6404,9 +6406,14 @@ Blockly.ErrorInforming.CssContent = [
6404
6406
  },
6405
6407
 
6406
6408
  setDefaultToolbox: function(xml) {
6407
- this.$$('#toolbox').innerHTML = xml;
6409
+ if (xml && !this._toolboxBackup)
6410
+ this._toolboxBackup = this.$$('#toolbox').innerHTML;
6411
+
6412
+ const newXml = xml || this._toolboxBackup;
6413
+ if (!newXml) return;
6408
6414
 
6409
- const toolboxXml = `<xml>${xml}</xml>`;
6415
+ this.$$('#toolbox').innerHTML = newXml;
6416
+ const toolboxXml = `<xml>${newXml}</xml>`;
6410
6417
  this.workspace.updateToolbox(toolboxXml);
6411
6418
  },
6412
6419
 
@@ -1,5 +1,5 @@
1
1
  module Gobstones
2
2
  module Blockly
3
- VERSION = "0.16.0"
3
+ VERSION = "0.17.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gobstones-blockly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.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-05-24 00:00:00.000000000 Z
11
+ date: 2018-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler