Skip to content

Commit

Permalink
v0.8.0
Browse files Browse the repository at this point in the history
- modify UI to add menus for less used commands
- add HackCable
- add Blockly2HTML
- add BlockFactory
- toolbox disassembled in different JSON (road to 0.9)
  • Loading branch information
SebCanet committed Nov 12, 2020
1 parent 759086e commit 859ac6c
Show file tree
Hide file tree
Showing 1,657 changed files with 873,169 additions and 1,403 deletions.
12 changes: 9 additions & 3 deletions @blockly/tests/playgrounds/screenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,19 @@ function workspaceToSvg_(workspace, callback, customCss) {
var width = bBox.width || bBox.right - x;
var height = bBox.height || bBox.bottom - y;

var svg = document.createElementNS('http://www.w3.org/2000/svg','svg');
svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');

var blockCanvas = workspace.getCanvas();
var clone = blockCanvas.cloneNode(true);
clone.removeAttribute('transform');
clone.removeAttribute('transform');
svg.appendChild(clone);

var svg = document.createElementNS('http://www.w3.org/2000/svg','svg');
svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
var commentCanvas = workspace.getBubbleCanvas();
clone = commentCanvas.cloneNode(true);
clone.removeAttribute('transform');
svg.appendChild(clone);

svg.setAttribute('viewBox',
x + ' ' + y + ' ' + width + ' ' + height);

Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
v0.8.0
- modify UI to add menus for less used commands
- add HackCable
- add Blockly2HTML
- add BlockFactory
- toolbox disassembled in different JSON (road to 0.9)

v0.7.8
- enhance URL argument to get configuration Papyrus through Arrowhead
- no refresh ! Board selection refresh workspace & toolbox without need of reload all page, and lost parameters.
- reset button enhance
- reset button enhanced

v0.7.7 2020-10-31
- upate Blockly core to v3.20200924.3
Expand Down
26 changes: 25 additions & 1 deletion S4E/blocks/matrix_block.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,28 @@ Blockly.Extensions.register("numpy_square_matrix_init",

// Mutators
Blockly.Extensions.registerMutator("numpy_square_matrix_mutator",
Blockly.Constants.Numpy.NUMPY_SQUARE_MATRIX_MUTATOR_MIXIN);
Blockly.Constants.Numpy.NUMPY_SQUARE_MATRIX_MUTATOR_MIXIN);

// PLUS-MINUS extension

Blockly.Constants.Utils.INIT_BUTTONS_ADD_AND_REMOVE = function() {
/**
* Image data URI of an LTR opening plus button
* @readonly
*/
this.ADD_IMAGE_DATAURI = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4KCjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmVyc2lvbj0iMS4xIgogICBpZD0icmVwZWF0IgogICB4PSIwcHgiCiAgIHk9IjBweCIKICAgdmlld0JveD0iMCAwIDI0IDI0IgogICBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDA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bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLWRhc2hvZmZzZXQ6MDtzdHJva2Utb3BhY2l0eTowLjA3ODQzMTM3IgogICAgIGlkPSJyZWN0NDE0My0xIgogICAgIHdpZHRoPSI0LjA1MDAwMDIiCiAgICAgaGVpZ2h0PSIxMi4zOTcxMTkiCiAgICAgeD0iOS45NzUwMDA0IgogICAgIHk9IjUuODAxNDQwNyIKICAgICByeD0iMC44MSIKICAgICByeT0iMC44MSIKICAgICB0cmFuc2Zvcm09Im1hdHJpeCgwLDEsMSwwLDAsMCkiIC8+PGNpcmNsZQogICAgIHN0eWxlPSJvcGFjaXR5OjE7ZmlsbDpub25lO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnNxdWFyZTtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6NDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLWRhc2hvZmZzZXQ6MDtzdHJva2Utb3BhY2l0eToxIgogICAgIGlkPSJwYXRoNDEzNiIKICAgICBjeD0iMTIiCiAgICAgY3k9IjEyIgogICAgIHI9IjEwLjUwMzE5MSIgLz48L3N2Zz4=';
this.buttonSize = 24;
if (this.workspace.renderer_.name == 'geras') {
this.buttonSize = 19;
} else {
this.buttonSize = 24;
}
};

Blockly.Extensions.register('block_buttons_plus_minus',
Blockly.Constants.Utils.INIT_BUTTONS_ADD_AND_REMOVE);
4 changes: 4 additions & 0 deletions S4E/css/S4E.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@
}
#barre_h{
background-color : #00abdf;
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
align-items:center;
}

/* boutons classiques */
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion S4E/js/boards.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ Code.changeBoard = function () {
profile["default"] = profile[newBoard][0];
document.getElementById("boardDescriptionSelector").selectedIndex = newBoard;
document.getElementById("boardDescriptionSelector").value = newBoard;
document.getElementById("boardSelected_span").textContent = profile["default"].description;
document.getElementById("portSelected_span").textContent = ' : ' + document.getElementById('serialMenu').options[document.getElementById('serialMenu').selectedIndex].value;
window.history.pushState({}, "S4E", window.location.host + window.location.pathname + search);
// "reboot" elements
document.getElementById('overlayForModals').style.display = "none";
Expand All @@ -83,9 +85,9 @@ Code.changeBoard = function () {
Code.setPort = function () {
var serialPortMenu = document.getElementById('serialMenu');
var newPort = encodeURIComponent(serialPortMenu.options[serialPortMenu.selectedIndex].value);
console.log(newPort);
document.getElementById('overlayForModals').style.display = "none";
document.getElementById('portListModal').classList.remove('show');
document.getElementById("portSelected_span").textContent = ' : ' + newPort;
if (newPort != 'none') {
document.getElementById('serialButton').classList.add('active');
document.getElementById('serialButton').title = newPort;
Expand Down
Binary file added S4E/media/arrowheadtools.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added S4E/media/arrowheadtools_invert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added S4E/media/arrowheadtools_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added S4E/media/arrowheadtools_text_invert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added S4E/media/blynk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions S4E/media/st-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 0 additions & 72 deletions S4E/toolbox/concat/toolbox_S4E.js

This file was deleted.

Loading

0 comments on commit 859ac6c

Please sign in to comment.