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 +4 -4
- data/app/assets/htmls/gs-element-blockly.html +10 -5
- data/lib/gobstones/blockly/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: d88924a989d399a728b813487e67cfd8ec26262a4023a6ad73efbcb8533edb58
|
4
|
+
data.tar.gz: ce83426445cd63e1f0d46087700b8e64e59df9d83ae4e2fccba7a2b96ccb35f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 = (
|
4071
|
-
|
4071
|
+
const createVariable = (parent, name) => {
|
4072
|
+
const workspace = parent.workspace;
|
4073
|
+
Blockly.createBlockSvg(workspace, 'variables_get', b => {
|
4072
4074
|
b.setFieldValue(name, 'VAR');
|
4073
|
-
|
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
|
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
|
5181
|
+
return createVariable(this, name);
|
5177
5182
|
}
|
5178
5183
|
};
|
5179
5184
|
|
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.
|
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-
|
11
|
+
date: 2018-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|