gobstones-blockly 0.14.0 → 0.15.0
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 +4 -4
- data/app/assets/htmls/gs-element-blockly.html +17 -0
- 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: 986ed67cc4f260e131ab6ee7f3e6f1176b8fc617d53a0f2f18e0c9e9a3f24e80
|
|
4
|
+
data.tar.gz: 863a6f37118a9f3cdc39ad90cc9f8e7f87ed1c592f5b2e58657465cd8f7b0db9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 136e366b0598ff6b824d5b68fdeba950b495abab7f91d679cf6887884d8c0efa56d1f550eca13458fc108d4463c2835eba526dd9765ac0930f78e35f17613bd1
|
|
7
|
+
data.tar.gz: 8914b19f0e1b7fcff74e30e5a356db5c2450bce3e4716c1e80248850f85816f64f2c36a6d6f94ac252a56c5369424bb54c42af94d87b22729dc2da82df57b162
|
|
@@ -6584,6 +6584,23 @@ Blockly.ErrorInforming.CssContent = [
|
|
|
6584
6584
|
this.workspace.showBlockError(blockId, errorKind);
|
|
6585
6585
|
},
|
|
6586
6586
|
|
|
6587
|
+
scrollToBlock: function(blockId) {
|
|
6588
|
+
const block = blockId
|
|
6589
|
+
? this.workspace.getBlockById(blockId)
|
|
6590
|
+
: this.workspace.getAllBlocks().find((it) => it.type === "Program");
|
|
6591
|
+
if (!block) return;
|
|
6592
|
+
|
|
6593
|
+
const position = block.getRelativeToSurfaceXY();
|
|
6594
|
+
const { viewLeft, contentLeft, viewTop, contentTop, viewWidth, viewHeight } = this.workspace.getMetrics();
|
|
6595
|
+
|
|
6596
|
+
const finalPosition = {
|
|
6597
|
+
x: position.x - viewWidth / 4 - contentLeft,
|
|
6598
|
+
y: position.y - viewHeight / 2 - contentTop
|
|
6599
|
+
};
|
|
6600
|
+
|
|
6601
|
+
this.workspace.scrollbar.set(finalPosition.x, finalPosition.y);
|
|
6602
|
+
},
|
|
6603
|
+
|
|
6587
6604
|
testColors(colors) {
|
|
6588
6605
|
Blockly.CUSTOM_COLORS = colors;
|
|
6589
6606
|
Blockly.HSV_SATURATION = colors.globalHsvSaturation;
|
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.
|
|
4
|
+
version: 0.15.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-
|
|
11
|
+
date: 2018-05-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|