diff --git a/src/components/Blockly/msg/de.js b/src/components/Blockly/msg/de.js index 9d019c9..85fdcdf 100644 --- a/src/components/Blockly/msg/de.js +++ b/src/components/Blockly/msg/de.js @@ -775,5 +775,4 @@ Blockly.Msg.senseBox_telegram_send = "Sende Nachricht" Blockly.Msg.senseBox_scd30 = "CO2 Sensor (Sensirion SCD30)"; - -export const De = Blockly.Msg; \ No newline at end of file +export const De = Blockly.Msg; diff --git a/src/components/Blockly/msg/en.js b/src/components/Blockly/msg/en.js index 7474b93..4ae05c3 100644 --- a/src/components/Blockly/msg/en.js +++ b/src/components/Blockly/msg/en.js @@ -757,4 +757,4 @@ Blockly.Msg.sensebox_web_readHTML_filename = "File:"; Blockly.Msg.senseBox_scd30 = "CO2 Sensor (Sensirion SCD30)"; -export const En = Blockly.Msg; \ No newline at end of file +export const En = Blockly.Msg; diff --git a/src/components/Blockly/toolbox/Toolbox.js b/src/components/Blockly/toolbox/Toolbox.js index fa9a822..3634018 100644 --- a/src/components/Blockly/toolbox/Toolbox.js +++ b/src/components/Blockly/toolbox/Toolbox.js @@ -206,7 +206,7 @@ class Toolbox extends React.Component { - + @@ -225,7 +225,7 @@ class Toolbox extends React.Component { - + @@ -234,7 +234,7 @@ class Toolbox extends React.Component { - + @@ -273,7 +273,7 @@ class Toolbox extends React.Component { - + @@ -293,7 +293,7 @@ class Toolbox extends React.Component { - + @@ -353,7 +353,7 @@ class Toolbox extends React.Component { - + diff --git a/src/helpers/compareXml.js b/src/helpers/compareXml.js index 40b6fae..74ab515 100644 --- a/src/helpers/compareXml.js +++ b/src/helpers/compareXml.js @@ -57,6 +57,16 @@ const compareParentBlock = (originalBlock, userBlock, index) => { } } } + if(userBlock.attributes['disabled']){ + // user-block is not connected + return {text: `Der Block mit dem Typen '${userBlock.attributes['type'].value}' hat keine Verbindung zu einem anderen Block.`, type: 'error'}; + } + else if(originalBlock.parentNode.parentNode && originalBlock.parentNode.parentNode.attributes && originalBlock.parentNode.parentNode.attributes['type']){ + var type = compareBlockType(originalBlock.parentNode.parentNode, userBlock.parentNode.parentNode, index); + if(type){ + return {text: `Der Block an Position ${index+1} ist falsch eingeordnet. Tipp: Block an Position ${index+1} einem vorherigen Block unterordnen.`, type: 'error'}; + } + } }; const compareXml = (originalXml, userXml) => {