gobstones-blockly 0.24.0 → 0.24.1

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: d419151d788c79159a33541aaabad83c5ba6dac3983ec745b81bab7077c9210d
4
- data.tar.gz: 707a529e4d4d693c090c804b8ea70261346b6014e58b37505184452f1b6dec96
3
+ metadata.gz: d88924a989d399a728b813487e67cfd8ec26262a4023a6ad73efbcb8533edb58
4
+ data.tar.gz: ce83426445cd63e1f0d46087700b8e64e59df9d83ae4e2fccba7a2b96ccb35f1
5
5
  SHA512:
6
- metadata.gz: 9fcb41fb972763cab3349ddac30cd45a2b921dfba725343a77eeba576dfb8b74bb8a2a1f3e999de2ff4cab2d064f79984f0622ea60031a6ec8b27b1eaf7493e9
7
- data.tar.gz: aefbddac2244fb23b4ba3598aed08b2a1925b7af4c2cedc850ef89b6b02518c47f9d555064ab35bf4f57c8a6c3e49866afbef95c5958a5e488758bcc36b16e6c
6
+ metadata.gz: 787ef83b2e0cf328c1ba811ff131e851bcd4e85c6c2e8e7b691a45f70a41ff8295b819bca66c25420653645f77eadd54e2ee4a6297861172c187f365d3879839
7
+ data.tar.gz: d84c91fdc753d29ee4215cdc97b80c5e1708c852ba7e6de95bbe0d43224f39c130c49d2f1dbe14ae6ab51e7cb7d7935f8be2abc28f9f3eca82ba903120ab00a4
@@ -3419,6 +3419,7 @@ window.initProcedsBlockly = function(customStatementType) {
3419
3419
  return function() {
3420
3420
  var block = callback();
3421
3421
  block.$parent = procedureBlock.id;
3422
+ block.moveBy(procedureBlock.width, -14);
3422
3423
  };
3423
3424
  };
3424
3425
 
@@ -4067,10 +4068,14 @@ Blockly.createBlockSvg = function(workspace, name, f) {
4067
4068
  newBlock.render();
4068
4069
  };
4069
4070
 
4070
- const createVariable = (workspace, name) => {
4071
- Blockly.createBlockSvg(workspace, 'variables_get', b => {
4071
+ const createVariable = (parent, name) => {
4072
+ const workspace = parent.workspace;
4073
+ Blockly.createBlockSvg(workspace, 'variables_get', b => {
4072
4074
  b.setFieldValue(name, 'VAR');
4073
- b.moveBy(10,5);
4075
+
4076
+ const posParent = parent.getRelativeToSurfaceXY();
4077
+ const pos = b.getRelativeToSurfaceXY();
4078
+ b.moveBy(posParent.x - pos.x + parent.width + 16, posParent.y - pos.y + b.height + 6);
4074
4079
  });
4075
4080
  }
4076
4081
 
@@ -4986,7 +4991,7 @@ Blockly.Blocks.ForEach = {
4986
4991
  "Obtener variable",
4987
4992
  function() {
4988
4993
  var name = self.getFieldValue('varName');
4989
- createVariable(self.workspace, name);
4994
+ createVariable(self, name);
4990
4995
  }
4991
4996
  );
4992
4997
 
@@ -5173,7 +5178,7 @@ Blockly.Blocks.Asignacion = {
5173
5178
  },
5174
5179
 
5175
5180
  createVariableBlock: function(name) {
5176
- return createVariable(this.workspace, name);
5181
+ return createVariable(this, name);
5177
5182
  }
5178
5183
  };
5179
5184
 
@@ -1,5 +1,5 @@
1
1
  module Gobstones
2
2
  module Blockly
3
- VERSION = "0.24.0"
3
+ VERSION = "0.24.1"
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.24.0
4
+ version: 0.24.1
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-10-05 00:00:00.000000000 Z
11
+ date: 2018-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler