app/assets/htmls/gs-element-blockly.html in gobstones-blockly-0.12.0 vs app/assets/htmls/gs-element-blockly.html in gobstones-blockly-0.13.0
- old
+ new
@@ -4040,31 +4040,11 @@
var HAND = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfiBAUBKBeKSgeBAAABTElEQVQoz22QzyvDcRjHX5/vvrMyStI2uZgftdVCSpJCyW1y00oUF+Xg4OIkx5VyUyJOsgv/gnJw4YCSSFMyB5pGbLJ99/k8LltreB2f9+v50eOigoc5FvGTJF8pugCwaKaNaE98uf9zMBXwjtNpbvmuaH2B0+HXuuyMEbOlQ4U1M5ZVcYbowg02YfZW5cnE9JIROdI7jsiOacoMPLZdEYPR1ouQkxCRG+feESlIXkQOzLR+NhvCpc3UbPcHAoRsADcAQ0Twq0ZosQgEVY0SqvGpkAUCxkIUYRP4bZRRNi9pvaD+TwXyFseHuYzy/Kt8CWfQ5Ems6C/5y7uZyDEH0Nt8vq0dUx0XzaapPyIIoIi23+47+SrlTvrTjLhKy2wmO95OqiacS+QBH9gAFDlOZnYbrimWOixSZCwUlK+vZd7bXiPldyi0yqX1OtkfCBS/9XAtDKAAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMDQtMDVUMDQ6NDQ6NDItMDM6MDD+uUN1AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTA0LTA1VDA0OjQwOjIzLTAzOjAw5hdZgAAAAABJRU5ErkJggg==";
var CLEAN = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYEAYAAACw5+G7AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0T///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brrQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMDQtMDlUMjA6MDc6MDUtMDc6MDDtLVEkAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTA0LTA5VDIwOjA3OjA1LTA3OjAwnHDpmAAAAABJRU5ErkJggg==";
/* global Blockly */
-Blockly.CUSTOM_COLORS = {
- globalHsvSaturation: Blockly.HSV_SATURATION,
- globalHsvValue: Blockly.HSV_VALUE,
- primitiveCommand: "#8DA65B",
- assignation: "#5B68A6",
- controlStructure: "#A6A65B",
- literalExpression: "#5BA6A6",
- expression: "#745BA6",
- program: "#74A65B",
- interactiveProgram: "#A6805B",
- interactiveBinding: "#A6995B",
- procedure: "#995BA6",
- function: "#774A77",
- primitiveProcedure: "#CACACA",
- primitiveFunction: "#BABABA",
- procedure_call: "#661CF6",
- function_call: "#330610",
- variable: "#FF0000",
- parameter: "#0000FF",
- complete: "#A65C5B",
-};
+Blockly.CUSTOM_COLORS = {"globalHsvSaturation":0.45,"globalHsvValue":0.65,"primitiveCommand":"#1d48cc","assignation":"#14328c","controlStructure":"#193fb3","literalExpression":"#48cc1d","primitiveExpression":"#48cc1d","operator":"#3fb319","program":"#ae25db","interactiveProgram":"#731991","interactiveBinding":"#ae25db","procedure":"#915ba3","function":"#745380","primitiveProcedure":"#2351db","primitiveFunction":"#51db23","procedure_call":"#3163f7","function_call":"#63f731","variable":"#328c14","parameter":"#328c14","complete":"#fc0303","H":{"commands":225,"expressions":105,"definitions":285},"S":{"assignation":86,"variable":86,"parameter":86,"primitiveCommand":86,"literalExpression":86,"primitiveExpression":86,"controlStructure":86,"operator":86,"procedure_call":80,"function_call":80,"primitiveProcedure":84,"primitiveFunction":84,"program":83,"interactiveProgram":83,"interactiveBinding":83,"procedure":44,"function":35,"complete":99},"V":{"assignation":55,"variable":55,"parameter":55,"primitiveCommand":80,"literalExpression":80,"primitiveExpression":80,"controlStructure":70,"operator":70,"procedure_call":97,"function_call":97,"primitiveProcedure":86,"primitiveFunction":86,"program":86,"interactiveProgram":57,"interactiveBinding":86,"procedure":64,"function":50,"complete":99}};
/**
* Create the svg representation of a block and render
* @name {!string} name of the parameter.
* @this Blockly.Block
@@ -4783,32 +4763,32 @@
Blockly.Blocks.ColorSelector = createLiteralSelectorBlock('Color',['Rojo','Verde','Negro','Azul']);
Blockly.Blocks.DireccionSelector = createLiteralSelectorBlock('Direccion',['Este','Oeste','Norte','Sur']);
Blockly.Blocks.BoolSelector = createLiteralSelectorBlock('Bool',['True','False']);
-function createSingleParameterExpressionBlock(blockText,returnType){
+function createSingleParameterExpressionBlock(blockText,returnType, colorType = "operator"){
return {
init: function () {
this.jsonInit({
message0: blockText + ' %1',
args0: [
{
type: 'input_value',
name: 'VALUE'
}
],
- colour: Blockly.CUSTOM_COLORS[this.type] || Blockly.CUSTOM_COLORS.expression,
+ colour: Blockly.CUSTOM_COLORS[this.type] || Blockly.CUSTOM_COLORS[colorType],
inputsInline: true,
output: returnType
})
}
};
}
-Blockly.Blocks.hayBolitas = createSingleParameterExpressionBlock('hay bolitas','Bool');
-Blockly.Blocks.puedeMover = createSingleParameterExpressionBlock('puede mover','Bool');
-Blockly.Blocks.nroBolitas = createSingleParameterExpressionBlock('numero de bolitas','Number');
+Blockly.Blocks.hayBolitas = createSingleParameterExpressionBlock('hay bolitas','Bool', "primitiveExpression");
+Blockly.Blocks.puedeMover = createSingleParameterExpressionBlock('puede mover','Bool', "primitiveExpression");
+Blockly.Blocks.nroBolitas = createSingleParameterExpressionBlock('numero de bolitas','Number', "primitiveExpression");
// ------------------------------------------------------
// Operaciones:
// ------------------------------------------------------
@@ -4832,11 +4812,11 @@
{
type: 'input_value',
name: 'arg2'
}
],
- colour: Blockly.CUSTOM_COLORS.OperadorDeComparacion || Blockly.CUSTOM_COLORS.expression,
+ colour: Blockly.CUSTOM_COLORS.OperadorDeComparacion || Blockly.CUSTOM_COLORS.operator,
inputsInline: false,
output: 'Bool'
});
}
};
@@ -4861,11 +4841,11 @@
{
type: 'input_value',
name: 'arg2'
}
],
- colour: Blockly.CUSTOM_COLORS.OperadorNumerico || Blockly.CUSTOM_COLORS.expression,
+ colour: Blockly.CUSTOM_COLORS.OperadorNumerico || Blockly.CUSTOM_COLORS.operator,
inputsInline: false,
output: 'Number'
});
}
};
@@ -4890,11 +4870,11 @@
{
type: 'input_value',
name: 'arg2'
}
],
- colour: Blockly.CUSTOM_COLORS.OperadorLogico || Blockly.CUSTOM_COLORS.expression,
+ colour: Blockly.CUSTOM_COLORS.OperadorLogico || Blockly.CUSTOM_COLORS.operator,
inputsInline: false,
output: 'Bool'
});
}
};
@@ -6609,10 +6589,10 @@
const xml = Blockly.Xml.domToText(xmlDom);
this.resetWorkspace();
setTimeout(() => {
this.workspaceXml = xml;
- }, 0);
+ }, 1);
}
});
</script>
</dom-module>
</body></html>
\ No newline at end of file