Merge branch 'master' into feat/blockly-gallery
This commit is contained in:
		
						commit
						bc819f224b
					
				| @ -775,5 +775,4 @@ Blockly.Msg.senseBox_telegram_send = "Sende Nachricht" | ||||
| Blockly.Msg.senseBox_scd30 = "CO2 Sensor (Sensirion SCD30)"; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| export const De = Blockly.Msg; | ||||
| @ -206,7 +206,7 @@ class Toolbox extends React.Component { | ||||
|                     <Block type="sensebox_send_to_osem" /> | ||||
|                 </Category> | ||||
|                 <Category id="catSenseBoxOutput_LoRa" name="  LoRa" colour={getColour().sensebox}> | ||||
|                     <Category id="catSenseBoxOutput_LoRa_activation" name="  Activation" colour={getColour().sensebox}> | ||||
|                     <Category id="catSenseBoxOutput_LoRa_activation" name="    Aktiviereung" colour={getColour().sensebox}> | ||||
|                         <Block type="sensebox_lora_initialize_otaa" /> | ||||
|                         <Block type="sensebox_lora_initialize_abp" /> | ||||
|                     </Category> | ||||
| @ -225,7 +225,7 @@ class Toolbox extends React.Component { | ||||
|                         <Block type="sensebox_lora_cayenne_gps" /> | ||||
|                     </Category> | ||||
|                 </Category> | ||||
|                 <Category name="Logic" colour={getColour().logic}> | ||||
|                 <Category name="Logik" colour={getColour().logic}> | ||||
|                     <Block type="controls_if" /> | ||||
|                     <Block type="controls_ifelse" /> | ||||
|                     <Block type="logic_compare" /> | ||||
| @ -234,7 +234,7 @@ class Toolbox extends React.Component { | ||||
|                     <Block type="logic_boolean" /> | ||||
|                     <Block type="switch_case" /> | ||||
|                 </Category> | ||||
|                 <Category id="loops" name="Loops" colour={getColour().loops}> | ||||
|                 <Category id="loops" name="Schleifen" colour={getColour().loops}> | ||||
|                     <Block type="controls_repeat_ext"> | ||||
|                         <Value name="TIMES"> | ||||
|                             <Block type="math_number"> | ||||
| @ -273,7 +273,7 @@ class Toolbox extends React.Component { | ||||
|                     <Block type="text_length" /> | ||||
|                     <Block type="text_isEmpty" /> | ||||
|                 </Category> | ||||
|                 <Category id="time" name="Time" colour={getColour().time}> | ||||
|                 <Category id="time" name="Zeit" colour={getColour().time}> | ||||
|                     <Block type="time_delay"> | ||||
|                         <Value name="DELAY_TIME_MILI"> | ||||
|                             <Block type="math_number"> | ||||
| @ -293,7 +293,7 @@ class Toolbox extends React.Component { | ||||
|                     <Block type="infinite_loop"></Block> | ||||
|                     <Block type="sensebox_interval_timer"></Block> | ||||
|                 </Category> | ||||
|                 <Category id="catMath" name="Math" colour={getColour().math}> | ||||
|                 <Category id="catMath" name="Mathematik" colour={getColour().math}> | ||||
|                     <Block type="math_number"></Block> | ||||
|                     <Block type="math_arithmetic"></Block> | ||||
|                     <Block type="math_single"></Block> | ||||
| @ -353,7 +353,7 @@ class Toolbox extends React.Component { | ||||
|                     <Block type="lists_length" /> | ||||
|                 </Category> | ||||
|                 <sep></sep> | ||||
|                 <Category name="Input/Output" colour={getColour().io}> | ||||
|                 <Category name="Eingang/Ausgang" colour={getColour().io}> | ||||
|                     <Block type="io_digitalwrite"></Block> | ||||
|                     <Block type="io_digitalread"></Block> | ||||
|                     <Block type="io_builtin_led"></Block> | ||||
|  | ||||
| @ -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) => { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user