@@ -641,7 +641,7 @@ function PaletteModel(palette, palettes, name) {
641641 }
642642 }
643643
644- if ( [ 'do' , 'nameddo' , 'namedbox' , 'namedcalc' , 'doArg' , 'calcArg' , 'nameddoArg' , 'namedcalcArg' ] . indexOf ( protoBlock . name ) != - 1 && label . length > 8 ) {
644+ if ( [ 'do' , 'nameddo' , 'namedbox' , 'namedcalc' , 'doArg' , 'calcArg' , 'nameddoArg' , 'namedcalcArg' ] . indexOf ( protoBlock . name ) != - 1 && label != null && label . length > 8 ) {
645645 label = label . substr ( 0 , 7 ) + '...' ;
646646 }
647647
@@ -1711,7 +1711,7 @@ function Palette(palettes, name) {
17111711 } ;
17121712
17131713 this . _makeBlockFromPalette = function ( protoblk , blkname , callback ) {
1714- const BUILTINMACROS = [ 'setturtlename' , 'fill' , 'hollowline' , 'status' ] ;
1714+ const BUILTINMACROS = [ 'setturtlename' , 'fill' , 'hollowline' , 'status' , 'xturtle' , 'yturtle' ] ;
17151715 if ( protoblk == null ) {
17161716 console . log ( 'null protoblk?' ) ;
17171717 return ;
@@ -1831,12 +1831,16 @@ function Palette(palettes, name) {
18311831 const SETTURTLENAMEOBJ = [ [ 0 , 'setturtlename' , this . protoContainers [ blkname ] . x - paletteBlocks . stage . x , this . protoContainers [ blkname ] . y - paletteBlocks . stage . y , [ null , 1 , 2 , null ] ] , [ 1 , 'turtlename' , 0 , 0 , [ 0 ] ] , [ 2 , [ 'text' , { 'value' : 'Yertle' } ] , 0 , 0 , [ 0 ] ] ] ;
18321832 const FILLOBJ = [ [ 0 , 'fill' , this . protoContainers [ blkname ] . x - paletteBlocks . stage . x , this . protoContainers [ blkname ] . y - paletteBlocks . stage . y , [ null , null , 1 ] ] , [ 1 , 'hidden' , 0 , 0 , [ 0 , null ] ] ] ;
18331833 const HOLLOWOBJ = [ [ 0 , 'hollowline' , this . protoContainers [ blkname ] . x - paletteBlocks . stage . x , this . protoContainers [ blkname ] . y - paletteBlocks . stage . y , [ null , null , 1 ] ] , [ 1 , 'hidden' , 0 , 0 , [ 0 , null ] ] ] ;
1834+ const XTURTLEOBJ = [ [ 0 , 'xturtle' , this . protoContainers [ blkname ] . x - paletteBlocks . stage . x , this . protoContainers [ blkname ] . y - paletteBlocks . stage . y , [ null , 1 , null ] ] , [ 1 , 'turtlename' , 0 , 0 , [ 0 ] ] ] ;
1835+ const YTURTLEOBJ = [ [ 0 , 'yturtle' , this . protoContainers [ blkname ] . x - paletteBlocks . stage . x , this . protoContainers [ blkname ] . y - paletteBlocks . stage . y , [ null , 1 , null ] ] , [ 1 , 'turtlename' , 0 , 0 , [ 0 ] ] ] ;
18341836
18351837 const BUILTINMACROS = {
18361838 'status' : STATUSOBJ ,
18371839 'setturtlename' : SETTURTLENAMEOBJ ,
18381840 'fill' : FILLOBJ ,
18391841 'hollowline' : HOLLOWOBJ ,
1842+ 'xturtle' : XTURTLEOBJ ,
1843+ 'yturtle' : YTURTLEOBJ ,
18401844 } ;
18411845
18421846 function __myCallback ( newBlock ) {
0 commit comments