gobstones-blockly 0.19.1 → 0.19.2
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 +16 -2
- data/lib/gobstones/blockly/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ea3b4b8c8c5a9a5626424759cfb545fe3aeb06bbdba73fe7f5b41f813899ad2
|
4
|
+
data.tar.gz: 7ea186db0def9c8f28ec00d66df72090cd61989403f8f75fa83ce863b19c2522
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f580833b194e9adb2346b643e2b839bb58ddc6269a56b6c36a88b81e40419c12a7e70e77ebdd19d8397941bf88697c16a1ad42599fe1fae26af38669d52f3d11
|
7
|
+
data.tar.gz: eb8fa9c88a4a94779ba7dc13105b45ef45166269dcb605cc0d73d2711b6be8fd78933b36427ecfd6d97cfc1b2f2560c8c764536987d8a1d454239869e8ac395e
|
@@ -4039,13 +4039,18 @@ window.initProcedsBlockly = function(customStatementType) {
|
|
4039
4039
|
|
4040
4040
|
Blockly.CUSTOM_COLORS = {"globalHsvSaturation":0.45,"globalHsvValue":0.65,"primitiveCommand":"#1d3c99","assignation":"#051d66","controlStructure":"#0f2b80","literalExpression":"#1d992c","primitiveExpression":"#1d992c","operator":"#0f801c","program":"#8d1bb3","interactiveProgram":"#6e158c","interactiveBinding":"#a11fcc","procedure":"#935ba6","function":"#745380","primitiveProcedure":"#2e4fb3","primitiveFunction":"#2eb33e","procedure_call":"#355bcc","function_call":"#35cc47","variable":"#056610","parameter":"#056610","complete":"#ff0000","H":{"commands":225,"expressions":127,"definitions":285},"S":{"assignation":95,"variable":95,"parameter":95,"primitiveCommand":81,"literalExpression":81,"primitiveExpression":81,"controlStructure":88,"operator":88,"procedure_call":74,"function_call":74,"primitiveProcedure":74,"primitiveFunction":74,"program":85,"interactiveProgram":85,"interactiveBinding":85,"procedure":45,"function":35,"complete":99},"V":{"assignation":40,"variable":40,"parameter":40,"primitiveCommand":60,"literalExpression":60,"primitiveExpression":60,"controlStructure":50,"operator":50,"procedure_call":80,"function_call":80,"primitiveProcedure":70,"primitiveFunction":70,"program":70,"interactiveProgram":55,"interactiveBinding":80,"procedure":65,"function":50,"complete":99}};
|
4041
4041
|
Blockly.AVAILABLE_ICONS = ["bool-false.svg","bool-true.svg","clean.png","color-azul.svg","color-negro.svg","color-rojo.svg","color-verde.svg","direccion-este.svg","direccion-norte.svg","direccion-oeste.svg","direccion-sur.svg","hand.png","minus.png","plus.png"];
|
4042
|
+
const EMPTY_GIF = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
|
4042
4043
|
|
4043
4044
|
const getOptions = (block) => {
|
4044
4045
|
const parentWorkspace = block.workspace.options.parentWorkspace;
|
4045
4046
|
return parentWorkspace && parentWorkspace.options || block.workspace.options
|
4046
4047
|
}
|
4047
|
-
const
|
4048
|
-
const
|
4048
|
+
const hasLocalMedia = (name) => Blockly.AVAILABLE_ICONS.includes(name)
|
4049
|
+
const getLocalMediaUrl = (block, name) =>
|
4050
|
+
hasLocalMedia(name)
|
4051
|
+
? getOptions(block).localMedia + name + (getOptions(block).localMediaSuffix || "")
|
4052
|
+
: EMPTY_GIF;
|
4053
|
+
const getLocalMediaSize = (name) => hasLocalMedia(name) ? 16 : 0;
|
4049
4054
|
|
4050
4055
|
/**
|
4051
4056
|
* Create the svg representation of a block and render
|
@@ -5964,6 +5969,14 @@ Blockly.ErrorInforming.CssContent = [
|
|
5964
5969
|
value: "../media/"
|
5965
5970
|
},
|
5966
5971
|
|
5972
|
+
/*
|
5973
|
+
* URL suffix (e.g. to tell Github RAW CDN to serve the right content type)
|
5974
|
+
*/
|
5975
|
+
localMediaSuffix: {
|
5976
|
+
type: String,
|
5977
|
+
value: "?sanitize=true"
|
5978
|
+
},
|
5979
|
+
|
5967
5980
|
/*
|
5968
5981
|
* `readOnly` Use blockly in readOnly mode.
|
5969
5982
|
*/
|
@@ -6642,6 +6655,7 @@ Blockly.ErrorInforming.CssContent = [
|
|
6642
6655
|
}
|
6643
6656
|
});
|
6644
6657
|
this.workspace.options.localMedia = this.localMedia;
|
6658
|
+
this.workspace.options.localMediaSuffix = this.localMediaSuffix;
|
6645
6659
|
|
6646
6660
|
var _this = this;
|
6647
6661
|
this.workspace.addChangeListener(function (a, b, c) {
|