mirror of
https://github.com/google/blockly.git
synced 2026-06-17 00:25:14 +02:00
Merge branch 'develop' into feature/horizontal_toolbox_port
This commit is contained in:
@@ -5,3 +5,4 @@ npm-debug.log
|
||||
.project
|
||||
*.pyc
|
||||
*.komodoproject
|
||||
/nbproject/private/
|
||||
+101
-96
@@ -864,7 +864,7 @@ Blockly.Workspace.prototype.undo=function(a){var b=a?this.redoStack_:this.undoSt
|
||||
Blockly.Workspace.prototype.addChangeListener=function(a){this.listeners_.push(a);return a};Blockly.Workspace.prototype.removeChangeListener=function(a){a=this.listeners_.indexOf(a);-1!=a&&this.listeners_.splice(a,1)};Blockly.Workspace.prototype.fireChangeListener=function(a){a.recordUndo&&(this.undoStack_.push(a),this.redoStack_.length=0,this.undoStack_.length>this.MAX_UNDO&&this.undoStack_.unshift());for(var b=0,c;c=this.listeners_[b];b++)c(a)};
|
||||
Blockly.Workspace.prototype.getBlockById=function(a){return this.blockDB_[a]||null};Blockly.Workspace.WorkspaceDB_=Object.create(null);Blockly.Workspace.getById=function(a){return Blockly.Workspace.WorkspaceDB_[a]||null};Blockly.Workspace.prototype.clear=Blockly.Workspace.prototype.clear;Blockly.Workspace.prototype.clearUndo=Blockly.Workspace.prototype.clearUndo;Blockly.Workspace.prototype.addChangeListener=Blockly.Workspace.prototype.addChangeListener;
|
||||
Blockly.Workspace.prototype.removeChangeListener=Blockly.Workspace.prototype.removeChangeListener;Blockly.Bubble=function(a,b,c,d,e,f){this.workspace_=a;this.content_=b;this.shape_=c;c=Blockly.Bubble.ARROW_ANGLE;this.workspace_.RTL&&(c=-c);this.arrow_radians_=goog.math.toRadians(c);a.getBubbleCanvas().appendChild(this.createDom_(b,!(!e||!f)));this.setAnchorLocation(d);e&&f||(b=this.content_.getBBox(),e=b.width+2*Blockly.Bubble.BORDER_WIDTH,f=b.height+2*Blockly.Bubble.BORDER_WIDTH);this.setBubbleSize(e,f);this.positionBubble_();this.renderArrow_();this.rendered_=!0;a.options.readOnly||(Blockly.bindEvent_(this.bubbleBack_,
|
||||
"mousedown",this,this.bubbleMouseDown_),this.resizeGroup_&&Blockly.bindEvent_(this.resizeGroup_,"mousedown",this,this.resizeMouseDown_))};Blockly.Bubble.BORDER_WIDTH=6;Blockly.Bubble.ARROW_THICKNESS=10;Blockly.Bubble.ARROW_ANGLE=20;Blockly.Bubble.ARROW_BEND=4;Blockly.Bubble.ANCHOR_RADIUS=8;Blockly.Bubble.onMouseUpWrapper_=null;Blockly.Bubble.onMouseMoveWrapper_=null;
|
||||
"mousedown",this,this.bubbleMouseDown_),this.resizeGroup_&&Blockly.bindEvent_(this.resizeGroup_,"mousedown",this,this.resizeMouseDown_))};Blockly.Bubble.BORDER_WIDTH=6;Blockly.Bubble.ARROW_THICKNESS=10;Blockly.Bubble.ARROW_ANGLE=20;Blockly.Bubble.ARROW_BEND=4;Blockly.Bubble.ANCHOR_RADIUS=8;Blockly.Bubble.onMouseUpWrapper_=null;Blockly.Bubble.onMouseMoveWrapper_=null;Blockly.Bubble.prototype.resizeCallback_=null;
|
||||
Blockly.Bubble.unbindDragEvents_=function(){Blockly.Bubble.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Bubble.onMouseUpWrapper_),Blockly.Bubble.onMouseUpWrapper_=null);Blockly.Bubble.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Bubble.onMouseMoveWrapper_),Blockly.Bubble.onMouseMoveWrapper_=null)};Blockly.Bubble.prototype.rendered_=!1;Blockly.Bubble.prototype.anchorXY_=null;Blockly.Bubble.prototype.relativeLeft_=0;Blockly.Bubble.prototype.relativeTop_=0;Blockly.Bubble.prototype.width_=0;
|
||||
Blockly.Bubble.prototype.height_=0;Blockly.Bubble.prototype.autoLayout_=!0;
|
||||
Blockly.Bubble.prototype.createDom_=function(a,b){this.bubbleGroup_=Blockly.createSvgElement("g",{},null);var c={filter:"url(#"+this.workspace_.options.embossFilterId+")"};-1!=goog.userAgent.getUserAgentString().indexOf("JavaFX")&&(c={});c=Blockly.createSvgElement("g",c,this.bubbleGroup_);this.bubbleArrow_=Blockly.createSvgElement("path",{},c);this.bubbleBack_=Blockly.createSvgElement("rect",{"class":"blocklyDraggable",x:0,y:0,rx:Blockly.Bubble.BORDER_WIDTH,ry:Blockly.Bubble.BORDER_WIDTH},c);b?(this.resizeGroup_=
|
||||
@@ -873,13 +873,13 @@ return this.bubbleGroup_};
|
||||
Blockly.Bubble.prototype.bubbleMouseDown_=function(a){this.promote_();Blockly.Bubble.unbindDragEvents_();Blockly.isRightButton(a)?a.stopPropagation():Blockly.isTargetInput_(a)||(Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED),this.workspace_.startDrag(a,new goog.math.Coordinate(this.workspace_.RTL?-this.relativeLeft_:this.relativeLeft_,this.relativeTop_)),Blockly.Bubble.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",this,Blockly.Bubble.unbindDragEvents_),Blockly.Bubble.onMouseMoveWrapper_=Blockly.bindEvent_(document,
|
||||
"mousemove",this,this.bubbleMouseMove_),Blockly.hideChaff(),a.stopPropagation())};Blockly.Bubble.prototype.bubbleMouseMove_=function(a){this.autoLayout_=!1;a=this.workspace_.moveDrag(a);this.relativeLeft_=this.workspace_.RTL?-a.x:a.x;this.relativeTop_=a.y;this.positionBubble_();this.renderArrow_()};
|
||||
Blockly.Bubble.prototype.resizeMouseDown_=function(a){this.promote_();Blockly.Bubble.unbindDragEvents_();Blockly.isRightButton(a)||(Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED),this.workspace_.startDrag(a,new goog.math.Coordinate(this.workspace_.RTL?-this.width_:this.width_,this.height_)),Blockly.Bubble.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",this,Blockly.Bubble.unbindDragEvents_),Blockly.Bubble.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",this,this.resizeMouseMove_),
|
||||
Blockly.hideChaff());a.stopPropagation()};Blockly.Bubble.prototype.resizeMouseMove_=function(a){this.autoLayout_=!1;a=this.workspace_.moveDrag(a);this.setBubbleSize(this.workspace_.RTL?-a.x:a.x,a.y);this.workspace_.RTL&&this.positionBubble_()};Blockly.Bubble.prototype.registerResizeEvent=function(a,b){Blockly.bindEvent_(this.bubbleGroup_,"resize",a,b)};Blockly.Bubble.prototype.promote_=function(){this.bubbleGroup_.parentNode.appendChild(this.bubbleGroup_)};
|
||||
Blockly.hideChaff());a.stopPropagation()};Blockly.Bubble.prototype.resizeMouseMove_=function(a){this.autoLayout_=!1;a=this.workspace_.moveDrag(a);this.setBubbleSize(this.workspace_.RTL?-a.x:a.x,a.y);this.workspace_.RTL&&this.positionBubble_()};Blockly.Bubble.prototype.registerResizeEvent=function(a){this.resizeCallback_=a};Blockly.Bubble.prototype.promote_=function(){this.bubbleGroup_.parentNode.appendChild(this.bubbleGroup_)};
|
||||
Blockly.Bubble.prototype.setAnchorLocation=function(a){this.anchorXY_=a;this.rendered_&&this.positionBubble_()};
|
||||
Blockly.Bubble.prototype.layoutBubble_=function(){var a=-this.width_/4,b=-this.height_-Blockly.BlockSvg.MIN_BLOCK_Y,c=this.workspace_.getMetrics();c.viewWidth/=this.workspace_.scale;c.viewLeft/=this.workspace_.scale;var d=this.anchorXY_.x;this.workspace_.RTL?d-c.viewLeft-a-this.width_<Blockly.Scrollbar.scrollbarThickness?a=d-c.viewLeft-this.width_-Blockly.Scrollbar.scrollbarThickness:d-c.viewLeft-a>c.viewWidth&&(a=d-c.viewLeft-c.viewWidth):d+a<c.viewLeft?a=c.viewLeft-d:c.viewLeft+c.viewWidth<d+a+
|
||||
this.width_+Blockly.BlockSvg.SEP_SPACE_X+Blockly.Scrollbar.scrollbarThickness&&(a=c.viewLeft+c.viewWidth-d-this.width_-Blockly.Scrollbar.scrollbarThickness);this.anchorXY_.y+b<c.viewTop&&(b=this.shape_.getBBox().height);this.relativeLeft_=a;this.relativeTop_=b};
|
||||
Blockly.Bubble.prototype.positionBubble_=function(){var a=this.anchorXY_.x,a=this.workspace_.RTL?a-(this.relativeLeft_+this.width_):a+this.relativeLeft_;this.bubbleGroup_.setAttribute("transform","translate("+a+","+(this.relativeTop_+this.anchorXY_.y)+")")};Blockly.Bubble.prototype.getBubbleSize=function(){return{width:this.width_,height:this.height_}};
|
||||
Blockly.Bubble.prototype.setBubbleSize=function(a,b){var c=2*Blockly.Bubble.BORDER_WIDTH;a=Math.max(a,c+45);b=Math.max(b,c+20);this.width_=a;this.height_=b;this.bubbleBack_.setAttribute("width",a);this.bubbleBack_.setAttribute("height",b);this.resizeGroup_&&(this.workspace_.RTL?this.resizeGroup_.setAttribute("transform","translate("+2*Blockly.Bubble.BORDER_WIDTH+","+(b-c)+") scale(-1 1)"):this.resizeGroup_.setAttribute("transform","translate("+(a-c)+","+(b-c)+")"));this.rendered_&&(this.autoLayout_&&
|
||||
this.layoutBubble_(),this.positionBubble_(),this.renderArrow_());Blockly.fireUiEvent(this.bubbleGroup_,"resize")};
|
||||
this.layoutBubble_(),this.positionBubble_(),this.renderArrow_());this.resizeCallback_&&this.resizeCallback_()};
|
||||
Blockly.Bubble.prototype.renderArrow_=function(){var a=[],b=this.width_/2,c=this.height_/2,d=-this.relativeLeft_,e=-this.relativeTop_;if(b==d&&c==e)a.push("M "+b+","+c);else{e-=c;d-=b;this.workspace_.RTL&&(d*=-1);var f=Math.sqrt(e*e+d*d),g=Math.acos(d/f);0>e&&(g=2*Math.PI-g);var h=g+Math.PI/2;h>2*Math.PI&&(h-=2*Math.PI);var k=Math.sin(h),l=Math.cos(h),q=this.getBubbleSize(),h=(q.width+q.height)/Blockly.Bubble.ARROW_THICKNESS,h=Math.min(h,q.width,q.height)/2,q=1-Blockly.Bubble.ANCHOR_RADIUS/f,d=b+
|
||||
q*d,e=c+q*e,q=b+h*l,m=c+h*k,b=b-h*l,c=c-h*k,k=g+this.arrow_radians_;k>2*Math.PI&&(k-=2*Math.PI);g=Math.sin(k)*f/Blockly.Bubble.ARROW_BEND;f=Math.cos(k)*f/Blockly.Bubble.ARROW_BEND;a.push("M"+q+","+m);a.push("C"+(q+f)+","+(m+g)+" "+d+","+e+" "+d+","+e);a.push("C"+d+","+e+" "+(b+f)+","+(c+g)+" "+b+","+c)}a.push("z");this.bubbleArrow_.setAttribute("d",a.join(" "))};Blockly.Bubble.prototype.setColour=function(a){this.bubbleBack_.setAttribute("fill",a);this.bubbleArrow_.setAttribute("fill",a)};
|
||||
Blockly.Bubble.prototype.dispose=function(){Blockly.Bubble.unbindDragEvents_();goog.dom.removeNode(this.bubbleGroup_);this.shape_=this.content_=this.workspace_=this.resizeGroup_=this.bubbleBack_=this.bubbleArrow_=this.bubbleGroup_=null};Blockly.Icon=function(a){this.block_=a};Blockly.Icon.prototype.collapseHidden=!0;Blockly.Icon.prototype.SIZE=17;Blockly.Icon.prototype.bubble_=null;Blockly.Icon.prototype.iconXY_=null;Blockly.Icon.prototype.createIcon=function(){this.iconGroup_||(this.iconGroup_=Blockly.createSvgElement("g",{"class":"blocklyIconGroup"},null),this.drawIcon_(this.iconGroup_),this.block_.getSvgRoot().appendChild(this.iconGroup_),Blockly.bindEvent_(this.iconGroup_,"mouseup",this,this.iconClick_),this.updateEditable())};
|
||||
@@ -890,38 +890,31 @@ Blockly.Icon.prototype.setIconLocation=function(a){this.iconXY_=a;this.isVisible
|
||||
// Copyright 2011 Google Inc. Apache License 2.0
|
||||
Blockly.Comment=function(a){Blockly.Comment.superClass_.constructor.call(this,a);this.createIcon()};goog.inherits(Blockly.Comment,Blockly.Icon);Blockly.Comment.prototype.text_="";Blockly.Comment.prototype.width_=160;Blockly.Comment.prototype.height_=80;
|
||||
Blockly.Comment.prototype.drawIcon_=function(a){Blockly.createSvgElement("circle",{"class":"blocklyIconShape",r:"8",cx:"8",cy:"8"},a);Blockly.createSvgElement("path",{"class":"blocklyIconSymbol",d:"m6.8,10h2c0.003,-0.617 0.271,-0.962 0.633,-1.266 2.875,-2.405 0.607,-5.534 -3.765,-3.874v1.7c3.12,-1.657 3.698,0.118 2.336,1.25 -1.201,0.998 -1.201,1.528 -1.204,2.19z"},a);Blockly.createSvgElement("rect",{"class":"blocklyIconSymbol",x:"6.8",y:"10.78",height:"2",width:"2"},a)};
|
||||
Blockly.Comment.prototype.createEditor_=function(){this.foreignObject_=Blockly.createSvgElement("foreignObject",{x:Blockly.Bubble.BORDER_WIDTH,y:Blockly.Bubble.BORDER_WIDTH},null);var a=document.createElementNS(Blockly.HTML_NS,"body");a.setAttribute("xmlns",Blockly.HTML_NS);a.className="blocklyMinimalBody";this.textarea_=document.createElementNS(Blockly.HTML_NS,"textarea");this.textarea_.className="blocklyCommentTextarea";this.textarea_.setAttribute("dir",this.block_.RTL?"RTL":"LTR");a.appendChild(this.textarea_);
|
||||
this.foreignObject_.appendChild(a);Blockly.bindEvent_(this.textarea_,"mouseup",this,this.textareaFocus_);Blockly.bindEvent_(this.textarea_,"wheel",this,function(a){a.stopPropagation()});Blockly.bindEvent_(this.textarea_,"change",this,function(a){this.text_!=this.textarea_.value&&(Blockly.Events.fire(new Blockly.Events.Change(this.block_,"comment",null,this.text_,this.textarea_.value)),this.text_=this.textarea_.value)});return this.foreignObject_};
|
||||
Blockly.Comment.prototype.updateEditable=function(){this.isVisible()&&(this.setVisible(!1),this.setVisible(!0));Blockly.Icon.prototype.updateEditable.call(this)};Blockly.Comment.prototype.resizeBubble_=function(){var a=this.bubble_.getBubbleSize(),b=2*Blockly.Bubble.BORDER_WIDTH;this.foreignObject_.setAttribute("width",a.width-b);this.foreignObject_.setAttribute("height",a.height-b);this.textarea_.style.width=a.width-b-4+"px";this.textarea_.style.height=a.height-b-4+"px"};
|
||||
Blockly.Comment.prototype.setVisible=function(a){if(a!=this.isVisible())if(Blockly.Events.fire(new Blockly.Events.Ui(this.block_,"commentOpen",!a,a)),!this.block_.isEditable()&&!this.textarea_||goog.userAgent.IE)Blockly.Warning.prototype.setVisible.call(this,a);else{var b=this.getText(),c=this.getBubbleSize();a?(this.bubble_=new Blockly.Bubble(this.block_.workspace,this.createEditor_(),this.block_.svgPath_,this.iconXY_,this.width_,this.height_),this.bubble_.registerResizeEvent(this,this.resizeBubble_),
|
||||
Blockly.Comment.prototype.createEditor_=function(){this.foreignObject_=Blockly.createSvgElement("foreignObject",{x:Blockly.Bubble.BORDER_WIDTH,y:Blockly.Bubble.BORDER_WIDTH},null);var a=document.createElementNS(Blockly.HTML_NS,"body");a.setAttribute("xmlns",Blockly.HTML_NS);a.className="blocklyMinimalBody";var b=document.createElementNS(Blockly.HTML_NS,"textarea");b.className="blocklyCommentTextarea";b.setAttribute("dir",this.block_.RTL?"RTL":"LTR");a.appendChild(b);this.textarea_=b;this.foreignObject_.appendChild(a);
|
||||
Blockly.bindEvent_(b,"mouseup",this,this.textareaFocus_);Blockly.bindEvent_(b,"wheel",this,function(a){a.stopPropagation()});Blockly.bindEvent_(b,"change",this,function(a){this.text_!=b.value&&(Blockly.Events.fire(new Blockly.Events.Change(this.block_,"comment",null,this.text_,b.value)),this.text_=b.value)});setTimeout(function(){b.focus()},0);return this.foreignObject_};Blockly.Comment.prototype.updateEditable=function(){this.isVisible()&&(this.setVisible(!1),this.setVisible(!0));Blockly.Icon.prototype.updateEditable.call(this)};
|
||||
Blockly.Comment.prototype.resizeBubble_=function(){if(this.isVisible()){var a=this.bubble_.getBubbleSize(),b=2*Blockly.Bubble.BORDER_WIDTH;this.foreignObject_.setAttribute("width",a.width-b);this.foreignObject_.setAttribute("height",a.height-b);this.textarea_.style.width=a.width-b-4+"px";this.textarea_.style.height=a.height-b-4+"px"}};
|
||||
Blockly.Comment.prototype.setVisible=function(a){if(a!=this.isVisible())if(Blockly.Events.fire(new Blockly.Events.Ui(this.block_,"commentOpen",!a,a)),!this.block_.isEditable()&&!this.textarea_||goog.userAgent.IE)Blockly.Warning.prototype.setVisible.call(this,a);else{var b=this.getText(),c=this.getBubbleSize();a?(this.bubble_=new Blockly.Bubble(this.block_.workspace,this.createEditor_(),this.block_.svgPath_,this.iconXY_,this.width_,this.height_),this.bubble_.registerResizeEvent(this.resizeBubble_.bind(this)),
|
||||
this.updateColour()):(this.bubble_.dispose(),this.foreignObject_=this.textarea_=this.bubble_=null);this.setText(b);this.setBubbleSize(c.width,c.height)}};Blockly.Comment.prototype.textareaFocus_=function(a){this.bubble_.promote_();this.textarea_.focus()};Blockly.Comment.prototype.getBubbleSize=function(){return this.isVisible()?this.bubble_.getBubbleSize():{width:this.width_,height:this.height_}};
|
||||
Blockly.Comment.prototype.setBubbleSize=function(a,b){this.textarea_?this.bubble_.setBubbleSize(a,b):(this.width_=a,this.height_=b)};Blockly.Comment.prototype.getText=function(){return this.textarea_?this.textarea_.value:this.text_};Blockly.Comment.prototype.setText=function(a){this.text_!=a&&(Blockly.Events.fire(new Blockly.Events.Change(this.block_,"comment",null,this.text_,a)),this.text_=a);this.textarea_&&(this.textarea_.value=a)};
|
||||
Blockly.Comment.prototype.dispose=function(){Blockly.Events.isEnabled()&&this.setText("");this.block_.comment=null;Blockly.Icon.prototype.dispose.call(this)};Blockly.Connection=function(a,b){this.sourceBlock_=a;this.type=b;a.workspace.connectionDBList&&(this.db_=a.workspace.connectionDBList[b],this.dbOpposite_=a.workspace.connectionDBList[Blockly.OPPOSITE_TYPE[b]],this.hidden_=!this.db_)};Blockly.Connection.CAN_CONNECT=0;Blockly.Connection.REASON_SELF_CONNECTION=1;Blockly.Connection.REASON_WRONG_TYPE=2;Blockly.Connection.REASON_TARGET_NULL=3;Blockly.Connection.REASON_CHECKS_FAILED=4;Blockly.Connection.REASON_DIFFERENT_WORKSPACES=5;
|
||||
Blockly.Connection.connect_=function(a,b){var c=a.getSourceBlock(),d=b.getSourceBlock();b.isConnected()&&b.disconnect();if(a.isConnected()){var e=a.targetBlock(),f=a.getShadowDom();a.setShadowDom(null);if(e.isShadow())f=Blockly.Xml.blockToDom(e),e.dispose(),e=null;else if(a.type==Blockly.INPUT_VALUE){if(!e.outputConnection)throw"Orphan block does not have an output connection.";var g=Blockly.Connection.lastConnectionInRow_(d,e);g&&(e.outputConnection.connect(g),e=null)}else if(a.type==Blockly.NEXT_STATEMENT){if(!e.previousConnection)throw"Orphan block does not have a previous connection.";
|
||||
for(g=d;g.nextConnection;)if(g.nextConnection.isConnected())g=g.getNextBlock();else{e.previousConnection.checkType_(g.nextConnection)&&(g.nextConnection.connect(e.previousConnection),e=null);break}}if(e&&(a.disconnect(),Blockly.Events.recordUndo)){var h=Blockly.Events.getGroup();setTimeout(function(){e.workspace&&!e.getParent()&&(Blockly.Events.setGroup(h),e.outputConnection?e.outputConnection.bumpAwayFrom_(a):e.previousConnection&&e.previousConnection.bumpAwayFrom_(a),Blockly.Events.setGroup(!1))},
|
||||
Blockly.BUMP_DELAY)}a.setShadowDom(f)}var k;Blockly.Events.isEnabled()&&(k=new Blockly.Events.Move(d));Blockly.Connection.connectReciprocally_(a,b);d.setParent(c);k&&(k.recordNew(),Blockly.Events.fire(k));c.rendered&&c.updateDisabled();d.rendered&&d.updateDisabled();c.rendered&&d.rendered&&(a.type==Blockly.NEXT_STATEMENT||a.type==Blockly.PREVIOUS_STATEMENT?d.render():c.render())};Blockly.Connection.prototype.targetConnection=null;Blockly.Connection.prototype.check_=null;
|
||||
Blockly.Connection.prototype.shadowDom_=null;Blockly.Connection.prototype.x_=0;Blockly.Connection.prototype.y_=0;Blockly.Connection.prototype.inDB_=!1;Blockly.Connection.prototype.db_=null;Blockly.Connection.prototype.dbOpposite_=null;Blockly.Connection.prototype.hidden_=null;
|
||||
Blockly.Connection.prototype.targetConnection=null;Blockly.Connection.prototype.check_=null;Blockly.Connection.prototype.shadowDom_=null;Blockly.Connection.prototype.x_=0;Blockly.Connection.prototype.y_=0;Blockly.Connection.prototype.inDB_=!1;Blockly.Connection.prototype.db_=null;Blockly.Connection.prototype.dbOpposite_=null;Blockly.Connection.prototype.hidden_=null;
|
||||
Blockly.Connection.prototype.connect_=function(a){var b=this,c=b.getSourceBlock(),d=a.getSourceBlock();a.isConnected()&&a.disconnect();if(b.isConnected()){var e=b.targetBlock(),f=b.getShadowDom();b.setShadowDom(null);if(e.isShadow())f=Blockly.Xml.blockToDom(e),e.dispose(),e=null;else if(b.type==Blockly.INPUT_VALUE){if(!e.outputConnection)throw"Orphan block does not have an output connection.";var g=Blockly.Connection.lastConnectionInRow_(d,e);g&&(e.outputConnection.connect(g),e=null)}else if(b.type==
|
||||
Blockly.NEXT_STATEMENT){if(!e.previousConnection)throw"Orphan block does not have a previous connection.";for(g=d;g.nextConnection;)if(g.nextConnection.isConnected())g=g.getNextBlock();else{e.previousConnection.checkType_(g.nextConnection)&&(g.nextConnection.connect(e.previousConnection),e=null);break}}if(e&&(b.disconnect(),Blockly.Events.recordUndo)){var h=Blockly.Events.getGroup();setTimeout(function(){e.workspace&&!e.getParent()&&(Blockly.Events.setGroup(h),e.outputConnection?e.outputConnection.bumpAwayFrom_(b):
|
||||
e.previousConnection&&e.previousConnection.bumpAwayFrom_(b),Blockly.Events.setGroup(!1))},Blockly.BUMP_DELAY)}b.setShadowDom(f)}var k;Blockly.Events.isEnabled()&&(k=new Blockly.Events.Move(d));Blockly.Connection.connectReciprocally_(b,a);d.setParent(c);k&&(k.recordNew(),Blockly.Events.fire(k))};
|
||||
Blockly.Connection.prototype.dispose=function(){if(this.isConnected())throw"Disconnect connection before disposing of it.";this.inDB_&&this.db_.removeConnection_(this);Blockly.highlightedConnection_==this&&(Blockly.highlightedConnection_=null);Blockly.localConnection_==this&&(Blockly.localConnection_=null);this.dbOpposite_=this.db_=null};Blockly.Connection.prototype.getSourceBlock=function(){return this.sourceBlock_};
|
||||
Blockly.Connection.prototype.isSuperior=function(){return this.type==Blockly.INPUT_VALUE||this.type==Blockly.NEXT_STATEMENT};Blockly.Connection.prototype.isConnected=function(){return!!this.targetConnection};Blockly.Connection.prototype.distanceFrom=function(a){var b=this.x_-a.x_;a=this.y_-a.y_;return Math.sqrt(b*b+a*a)};
|
||||
Blockly.Connection.prototype.isSuperior=function(){return this.type==Blockly.INPUT_VALUE||this.type==Blockly.NEXT_STATEMENT};Blockly.Connection.prototype.isConnected=function(){return!!this.targetConnection};
|
||||
Blockly.Connection.prototype.canConnectWithReason_=function(a){if(a){if(this.sourceBlock_&&a.getSourceBlock()==this.sourceBlock_)return Blockly.Connection.REASON_SELF_CONNECTION;if(a.type!=Blockly.OPPOSITE_TYPE[this.type])return Blockly.Connection.REASON_WRONG_TYPE;if(this.sourceBlock_&&a.getSourceBlock()&&this.sourceBlock_.workspace!==a.getSourceBlock().workspace)return Blockly.Connection.REASON_DIFFERENT_WORKSPACES;if(!this.checkType_(a))return Blockly.Connection.REASON_CHECKS_FAILED}else return Blockly.Connection.REASON_TARGET_NULL;
|
||||
return Blockly.Connection.CAN_CONNECT};
|
||||
Blockly.Connection.prototype.checkConnection_=function(a){switch(this.canConnectWithReason_(a)){case Blockly.Connection.CAN_CONNECT:break;case Blockly.Connection.REASON_SELF_CONNECTION:throw"Attempted to connect a block to itself.";case Blockly.Connection.REASON_DIFFERENT_WORKSPACES:throw"Blocks not on same workspace.";case Blockly.Connection.REASON_WRONG_TYPE:throw"Attempt to connect incompatible types.";case Blockly.Connection.REASON_TARGET_NULL:throw"Target connection is null.";case Blockly.Connection.REASON_CHECKS_FAILED:throw"Connection checks failed.";
|
||||
default:throw"Unknown connection failure: this should never happen!";}};
|
||||
Blockly.Connection.prototype.isConnectionAllowed=function(a,b){if(this.distanceFrom(a)>b)return!1;var c=this.canConnectWithReason_(a);if(c!=Blockly.Connection.CAN_CONNECT&&c!=Blockly.Connection.REASON_MUST_DISCONNECT)return!1;if(a.type==Blockly.OUTPUT_VALUE||a.type==Blockly.PREVIOUS_STATEMENT)if(a.isConnected()||this.isConnected())return!1;if(a.type==Blockly.INPUT_VALUE&&a.isConnected()&&!a.targetBlock().isMovable()&&!a.targetBlock().isShadow()||this.type==Blockly.PREVIOUS_STATEMENT&&a.isConnected()&&
|
||||
!this.sourceBlock_.nextConnection)return!1;var c=a.getSourceBlock(),d=this.sourceBlock_;if(c&&d){do{if(d==c)return!1;c=c.getParent()}while(c)}return!0};Blockly.Connection.prototype.connect=function(a){this.targetConnection!=a&&(this.checkConnection_(a),this.isSuperior()?Blockly.Connection.connect_(this,a):Blockly.Connection.connect_(a,this))};Blockly.Connection.connectReciprocally_=function(a,b){goog.asserts.assert(a&&b,"Cannot connect null connections.");a.targetConnection=b;b.targetConnection=a};
|
||||
Blockly.Connection.prototype.isConnectionAllowed=function(a){var b=this.canConnectWithReason_(a);if(b!=Blockly.Connection.CAN_CONNECT&&b!=Blockly.Connection.REASON_MUST_DISCONNECT)return!1;if(a.type==Blockly.OUTPUT_VALUE||a.type==Blockly.PREVIOUS_STATEMENT)if(a.isConnected()||this.isConnected())return!1;if(a.type==Blockly.INPUT_VALUE&&a.isConnected()&&!a.targetBlock().isMovable()&&!a.targetBlock().isShadow()||this.type==Blockly.PREVIOUS_STATEMENT&&a.isConnected()&&!this.sourceBlock_.nextConnection)return!1;
|
||||
a=a.getSourceBlock();b=this.sourceBlock_;if(a&&b){do{if(b==a)return!1;a=a.getParent()}while(a)}return!0};Blockly.Connection.prototype.connect=function(a){this.targetConnection!=a&&(this.checkConnection_(a),this.isSuperior()?this.connect_(a):a.connect_(this))};Blockly.Connection.connectReciprocally_=function(a,b){goog.asserts.assert(a&&b,"Cannot connect null connections.");a.targetConnection=b;b.targetConnection=a};
|
||||
Blockly.Connection.singleConnection_=function(a,b){for(var c=!1,d=0;d<a.inputList.length;d++){var e=a.inputList[d].connection;if(e&&e.type==Blockly.INPUT_VALUE&&b.outputConnection.checkType_(e)){if(c)return null;c=e}}return c};Blockly.Connection.lastConnectionInRow_=function(a,b){for(var c=a,d;d=Blockly.Connection.singleConnection_(c,b);)if(c=d.targetBlock(),!c||c.isShadow())return d;return null};
|
||||
Blockly.Connection.prototype.disconnect=function(){var a=this.targetConnection;goog.asserts.assert(a,"Source connection not connected.");goog.asserts.assert(a.targetConnection==this,"Target connection not connected to source connection.");var b,c,d;this.isSuperior()?(b=this.sourceBlock_,c=a.getSourceBlock(),d=this):(b=a.getSourceBlock(),c=this.sourceBlock_,d=a);var e;Blockly.Events.isEnabled()&&(e=new Blockly.Events.Move(c));this.targetConnection=a.targetConnection=null;c.setParent(null);e&&(e.recordNew(),
|
||||
Blockly.Events.fire(e));a=d.getShadowDom();if(b.workspace&&a&&Blockly.Events.recordUndo){a=Blockly.Xml.domToBlock(a,b.workspace);if(a.outputConnection)d.connect(a.outputConnection);else if(a.previousConnection)d.connect(a.previousConnection);else throw"Child block does not have output or previous statement.";a.initSvg&&a.initSvg();a.render(!1)}b.rendered&&b.render();c.rendered&&(c.updateDisabled(),c.render())};
|
||||
Blockly.Connection.prototype.targetBlock=function(){return this.isConnected()?this.targetConnection.getSourceBlock():null};
|
||||
Blockly.Connection.prototype.bumpAwayFrom_=function(a){if(Blockly.dragMode_==Blockly.DRAG_NONE){var b=this.sourceBlock_.getRootBlock();if(!b.isInFlyout){var c=!1;if(!b.isMovable()){b=a.getSourceBlock().getRootBlock();if(!b.isMovable())return;a=this;c=!0}b.getSvgRoot().parentNode.appendChild(b.getSvgRoot());var d=a.x_+Blockly.SNAP_RADIUS-this.x_;a=a.y_+Blockly.SNAP_RADIUS-this.y_;c&&(a=-a);b.RTL&&(d=-d);b.moveBy(d,a)}}};
|
||||
Blockly.Connection.prototype.moveTo=function(a,b){this.inDB_&&this.db_.removeConnection_(this);this.x_=a;this.y_=b;this.hidden_||this.db_.addConnection(this)};Blockly.Connection.prototype.moveBy=function(a,b){this.moveTo(this.x_+a,this.y_+b)};
|
||||
Blockly.Connection.prototype.tighten_=function(){var a=this.targetConnection.x_-this.x_,b=this.targetConnection.y_-this.y_;if(0!=a||0!=b){var c=this.targetBlock(),d=c.getSvgRoot();if(!d)throw"block is not rendered.";d=Blockly.getRelativeXY_(d);c.getSvgRoot().setAttribute("transform","translate("+(d.x-a)+","+(d.y-b)+")");c.moveConnections_(-a,-b)}};Blockly.Connection.prototype.closest=function(a,b){return this.dbOpposite_.searchForClosest(this,a,b)};
|
||||
Blockly.Connection.prototype.checkType_=function(a){if(!this.check_||!a.check_)return!0;for(var b=0;b<this.check_.length;b++)if(-1!=a.check_.indexOf(this.check_[b]))return!0;return!1};Blockly.Connection.prototype.setCheck=function(a){a?(goog.isArray(a)||(a=[a]),this.check_=a,this.isConnected()&&!this.checkType_(this.targetConnection)&&((this.isSuperior()?this.targetBlock():this.sourceBlock_).unplug(),this.sourceBlock_.bumpNeighbours_())):this.check_=null;return this};
|
||||
Blockly.Connection.prototype.setShadowDom=function(a){this.shadowDom_=a};Blockly.Connection.prototype.getShadowDom=function(){return this.shadowDom_};Blockly.Connection.prototype.neighbours_=function(a){return this.dbOpposite_.getNeighbours(this,a)};Blockly.Connection.prototype.setHidden=function(a){(this.hidden_=a)&&this.inDB_?this.db_.removeConnection_(this):a||this.inDB_||this.db_.addConnection(this)};
|
||||
Blockly.Connection.prototype.hideAll=function(){this.setHidden(!0);if(this.isConnected())for(var a=this.targetBlock().getDescendants(),b=0;b<a.length;b++){for(var c=a[b],d=c.getConnections_(!0),e=0;e<d.length;e++)d[e].setHidden(!0);c=c.getIcons();for(d=0;d<c.length;d++)c[d].setVisible(!1)}};
|
||||
Blockly.Connection.prototype.unhideAll=function(){this.setHidden(!1);var a=[];if(this.type!=Blockly.INPUT_VALUE&&this.type!=Blockly.NEXT_STATEMENT)return a;var b=this.targetBlock();if(b){var c;b.isCollapsed()?(c=[],b.outputConnection&&c.push(b.outputConnection),b.nextConnection&&c.push(b.nextConnection),b.previousConnection&&c.push(b.previousConnection)):c=b.getConnections_(!0);for(var d=0;d<c.length;d++)a.push.apply(a,c[d].unhideAll());a.length||(a[0]=b)}return a};
|
||||
Blockly.Connection.prototype.highlight=function(){var a;a=this.type==Blockly.INPUT_VALUE||this.type==Blockly.OUTPUT_VALUE?"m 0,0 "+Blockly.BlockSvg.TAB_PATH_DOWN+" v 5":"m -20,0 h 5 "+Blockly.BlockSvg.NOTCH_PATH_LEFT+" h 5";var b=this.sourceBlock_.getRelativeToSurfaceXY();Blockly.Connection.highlightedPath_=Blockly.createSvgElement("path",{"class":"blocklyHighlightedConnectionPath",d:a,transform:"translate("+(this.x_-b.x)+","+(this.y_-b.y)+")"+(this.sourceBlock_.RTL?" scale(-1 1)":"")},this.sourceBlock_.getSvgRoot())};
|
||||
Blockly.Connection.prototype.unhighlight=function(){goog.dom.removeNode(Blockly.Connection.highlightedPath_);delete Blockly.Connection.highlightedPath_};Blockly.Field=function(a,b){this.size_=new goog.math.Size(0,25);this.setValue(a);this.setValidator(b)};Blockly.Field.cacheWidths_=null;Blockly.Field.cacheReference_=0;Blockly.Field.prototype.name=void 0;Blockly.Field.prototype.maxDisplayLength=50;Blockly.Field.prototype.text_="";Blockly.Field.prototype.sourceBlock_=null;Blockly.Field.prototype.visible_=!0;Blockly.Field.prototype.validator_=null;Blockly.Field.NBSP="\u00a0";Blockly.Field.prototype.EDITABLE=!0;
|
||||
Blockly.Connection.prototype.disconnect=function(){var a=this.targetConnection;goog.asserts.assert(a,"Source connection not connected.");goog.asserts.assert(a.targetConnection==this,"Target connection not connected to source connection.");var b,c;this.isSuperior()?(b=this.sourceBlock_,c=a.getSourceBlock(),a=this):(b=a.getSourceBlock(),c=this.sourceBlock_);this.disconnectInternal_(b,c);a.respawnShadow_()};
|
||||
Blockly.Connection.prototype.disconnectInternal_=function(a,b){var c;Blockly.Events.isEnabled()&&(c=new Blockly.Events.Move(b));this.targetConnection=this.targetConnection.targetConnection=null;b.setParent(null);c&&(c.recordNew(),Blockly.Events.fire(c))};
|
||||
Blockly.Connection.prototype.respawnShadow_=function(){var a=this.getSourceBlock(),b=this.getShadowDom();if(a.workspace&&b&&Blockly.Events.recordUndo){a=Blockly.Xml.domToBlock(b,a.workspace);if(a.outputConnection)this.connect(a.outputConnection);else if(a.previousConnection)this.connect(a.previousConnection);else throw"Child block does not have output or previous statement.";return a}return null};
|
||||
Blockly.Connection.prototype.targetBlock=function(){return this.isConnected()?this.targetConnection.getSourceBlock():null};Blockly.Connection.prototype.checkType_=function(a){if(!this.check_||!a.check_)return!0;for(var b=0;b<this.check_.length;b++)if(-1!=a.check_.indexOf(this.check_[b]))return!0;return!1};
|
||||
Blockly.Connection.prototype.setCheck=function(a){a?(goog.isArray(a)||(a=[a]),this.check_=a,this.isConnected()&&!this.checkType_(this.targetConnection)&&((this.isSuperior()?this.targetBlock():this.sourceBlock_).unplug(),this.sourceBlock_.bumpNeighbours_())):this.check_=null;return this};Blockly.Connection.prototype.setShadowDom=function(a){this.shadowDom_=a};Blockly.Connection.prototype.getShadowDom=function(){return this.shadowDom_};Blockly.Field=function(a,b){this.size_=new goog.math.Size(0,25);this.setValue(a);this.setValidator(b)};Blockly.Field.cacheWidths_=null;Blockly.Field.cacheReference_=0;Blockly.Field.prototype.name=void 0;Blockly.Field.prototype.maxDisplayLength=50;Blockly.Field.prototype.text_="";Blockly.Field.prototype.sourceBlock_=null;Blockly.Field.prototype.visible_=!0;Blockly.Field.prototype.validator_=null;Blockly.Field.NBSP="\u00a0";Blockly.Field.prototype.EDITABLE=!0;
|
||||
Blockly.Field.prototype.setSourceBlock=function(a){goog.asserts.assert(!this.sourceBlock_,"Field already bound to a block.");this.sourceBlock_=a};
|
||||
Blockly.Field.prototype.init=function(){this.fieldGroup_||(this.fieldGroup_=Blockly.createSvgElement("g",{},null),this.visible_||(this.fieldGroup_.style.display="none"),this.borderRect_=Blockly.createSvgElement("rect",{rx:4,ry:4,x:-Blockly.BlockSvg.SEP_SPACE_X/2,y:0,height:16},this.fieldGroup_,this.sourceBlock_.workspace),this.textElement_=Blockly.createSvgElement("text",{"class":"blocklyText",y:this.size_.height-12.5},this.fieldGroup_),this.updateEditable(),this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_),
|
||||
this.mouseUpWrapper_=Blockly.bindEvent_(this.fieldGroup_,"mouseup",this,this.onMouseUp_),this.updateTextNode_(),Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.Change(this.sourceBlock_,"field",this.name,"",this.getValue())))};
|
||||
@@ -952,7 +945,7 @@ Blockly.Input.prototype.setVisible=function(a){var b=[];if(this.visible_==a)retu
|
||||
Blockly.Input.prototype.setAlign=function(a){this.align=a;this.sourceBlock_.rendered&&this.sourceBlock_.render();return this};Blockly.Input.prototype.init=function(){if(this.sourceBlock_.workspace.rendered)for(var a=0;a<this.fieldRow.length;a++)this.fieldRow[a].init(this.sourceBlock_)};Blockly.Input.prototype.dispose=function(){for(var a=0,b;b=this.fieldRow[a];a++)b.dispose();this.connection&&this.connection.dispose();this.sourceBlock_=null};Blockly.ConnectionDB=function(){};Blockly.ConnectionDB.prototype=[];Blockly.ConnectionDB.constructor=Blockly.ConnectionDB;Blockly.ConnectionDB.prototype.addConnection=function(a){if(a.inDB_)throw"Connection already in database.";if(!a.getSourceBlock().isInFlyout){var b=this.findPositionForConnection_(a);this.splice(b,0,a);a.inDB_=!0}};
|
||||
Blockly.ConnectionDB.prototype.findConnection=function(a){if(!this.length)return-1;var b=this.findPositionForConnection_(a);if(b>=this.length)return-1;for(var c=a.y_,d=b;0<=d&&this[d].y_==c;){if(this[d]==a)return d;d--}for(;b<this.length&&this[b].y_==c;){if(this[b]==a)return b;b++}return-1};
|
||||
Blockly.ConnectionDB.prototype.findPositionForConnection_=function(a){if(!this.length)return 0;for(var b=0,c=this.length;b<c;){var d=Math.floor((b+c)/2);if(this[d].y_<a.y_)b=d+1;else if(this[d].y_>a.y_)c=d;else{b=d;break}}return b};Blockly.ConnectionDB.prototype.removeConnection_=function(a){if(!a.inDB_)throw"Connection not in database.";var b=this.findConnection(a);if(-1==b)throw"Unable to find connection in connectionDB.";a.inDB_=!1;this.splice(b,1)};
|
||||
Blockly.ConnectionDB.prototype.getNeighbours=function(a,b){function c(a){var c=e-d[a].x_,g=f-d[a].y_;Math.sqrt(c*c+g*g)<=b&&l.push(d[a]);return g<b}for(var d=this,e=a.x_,f=a.y_,g=0,h=d.length-2,k=h;g<k;)d[k].y_<f?g=k:h=k,k=Math.floor((g+h)/2);var h=g=k,l=[];a.getSourceBlock();if(d.length){for(;0<=g&&c(g);)g--;do h++;while(h<d.length&&c(h))}return l};Blockly.ConnectionDB.prototype.isInYRange_=function(a,b,c){return Math.abs(this[a].y_-b)<=c};
|
||||
Blockly.ConnectionDB.prototype.getNeighbours=function(a,b){function c(a){var c=e-d[a].x_,g=f-d[a].y_;Math.sqrt(c*c+g*g)<=b&&l.push(d[a]);return g<b}for(var d=this,e=a.x_,f=a.y_,g=0,h=d.length-2,k=h;g<k;)d[k].y_<f?g=k:h=k,k=Math.floor((g+h)/2);var l=[],h=g=k;if(d.length){for(;0<=g&&c(g);)g--;do h++;while(h<d.length&&c(h))}return l};Blockly.ConnectionDB.prototype.isInYRange_=function(a,b,c){return Math.abs(this[a].y_-b)<=c};
|
||||
Blockly.ConnectionDB.prototype.searchForClosest=function(a,b,c){if(!this.length)return{connection:null,radius:b};var d=a.y_,e=a.x_;a.x_=e+c.x;a.y_=d+c.y;var f=this.findPositionForConnection_(a);c=null;for(var g=b,h,k=f-1;0<=k&&this.isInYRange_(k,a.y_,b);)h=this[k],a.isConnectionAllowed(h,g)&&(c=h,g=h.distanceFrom(a)),k--;for(;f<this.length&&this.isInYRange_(f,a.y_,b);)h=this[f],a.isConnectionAllowed(h,g)&&(c=h,g=h.distanceFrom(a)),f++;a.x_=e;a.y_=d;return{connection:c,radius:g}};
|
||||
Blockly.ConnectionDB.init=function(a){var b=[];b[Blockly.INPUT_VALUE]=new Blockly.ConnectionDB;b[Blockly.OUTPUT_VALUE]=new Blockly.ConnectionDB;b[Blockly.NEXT_STATEMENT]=new Blockly.ConnectionDB;b[Blockly.PREVIOUS_STATEMENT]=new Blockly.ConnectionDB;a.connectionDBList=b};
|
||||
// Copyright 2016 Google Inc. Apache License 2.0
|
||||
@@ -975,11 +968,11 @@ Blockly.Scrollbar.prototype.resizeVertical_=function(a){var b=a.viewHeight-1;thi
|
||||
1);this.yCoordinate=a.absoluteTop+.5;this.svgGroup_.setAttribute("transform","translate("+this.xCoordinate+","+this.yCoordinate+")");this.svgBackground_.setAttribute("height",Math.max(0,b));this.svgKnob_.setAttribute("y",this.constrainKnob_(c))};
|
||||
Blockly.Scrollbar.prototype.createDom_=function(){this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyScrollbar"+(this.horizontal_?"Horizontal":"Vertical")},null);this.svgBackground_=Blockly.createSvgElement("rect",{"class":"blocklyScrollbarBackground"},this.svgGroup_);var a=Math.floor((Blockly.Scrollbar.scrollbarThickness-5)/2);this.svgKnob_=Blockly.createSvgElement("rect",{"class":"blocklyScrollbarKnob",rx:a,ry:a},this.svgGroup_);Blockly.Scrollbar.insertAfter_(this.svgGroup_,this.workspace_.getBubbleCanvas())};
|
||||
Blockly.Scrollbar.prototype.isVisible=function(){return"none"!=this.svgGroup_.getAttribute("display")};Blockly.Scrollbar.prototype.setVisible=function(a){if(a!=this.isVisible()){if(this.pair_)throw"Unable to toggle visibility of paired scrollbars.";a?this.svgGroup_.setAttribute("display","block"):(this.workspace_.setMetrics({x:0,y:0}),this.svgGroup_.setAttribute("display","none"))}};
|
||||
Blockly.Scrollbar.prototype.onMouseDownBar_=function(a){this.onMouseUpKnob_();if(!Blockly.isRightButton(a)){var b=Blockly.mouseToSvg(a,this.workspace_.getParentSvg()),b=this.horizontal_?b.x:b.y,c=Blockly.getSvgXY_(this.svgKnob_,this.workspace_),c=this.horizontal_?c.x:c.y,d=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"width":"height")),e=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"x":"y")),f=.95*d;b<=c?e-=f:b>=c+d&&(e+=f);this.svgKnob_.setAttribute(this.horizontal_?"x":"y",this.constrainKnob_(e));
|
||||
this.onScroll_()}a.stopPropagation()};
|
||||
Blockly.Scrollbar.prototype.onMouseDownKnob_=function(a){this.onMouseUpKnob_();Blockly.isRightButton(a)||(Blockly.setPageSelectable(!1),this.startDragKnob=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"x":"y")),this.startDragMouse=this.horizontal_?a.clientX:a.clientY,Blockly.Scrollbar.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",this,this.onMouseUpKnob_),Blockly.Scrollbar.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",this,this.onMouseMoveKnob_));a.stopPropagation()};
|
||||
Blockly.Scrollbar.prototype.onMouseDownBar_=function(a){this.onMouseUpKnob_();if(Blockly.isRightButton(a))a.stopPropagation();else{var b=Blockly.mouseToSvg(a,this.workspace_.getParentSvg()),b=this.horizontal_?b.x:b.y,c=Blockly.getSvgXY_(this.svgKnob_,this.workspace_),c=this.horizontal_?c.x:c.y,d=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"width":"height")),e=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"x":"y")),f=.95*d;b<=c?e-=f:b>=c+d&&(e+=f);this.svgKnob_.setAttribute(this.horizontal_?
|
||||
"x":"y",this.constrainKnob_(e));this.onScroll_();a.stopPropagation();a.preventDefault()}};
|
||||
Blockly.Scrollbar.prototype.onMouseDownKnob_=function(a){this.onMouseUpKnob_();Blockly.isRightButton(a)?a.stopPropagation():(this.startDragKnob=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"x":"y")),this.startDragMouse=this.horizontal_?a.clientX:a.clientY,Blockly.Scrollbar.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",this,this.onMouseUpKnob_),Blockly.Scrollbar.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",this,this.onMouseMoveKnob_),a.stopPropagation(),a.preventDefault())};
|
||||
Blockly.Scrollbar.prototype.onMouseMoveKnob_=function(a){this.svgKnob_.setAttribute(this.horizontal_?"x":"y",this.constrainKnob_(this.startDragKnob+((this.horizontal_?a.clientX:a.clientY)-this.startDragMouse)));this.onScroll_()};
|
||||
Blockly.Scrollbar.prototype.onMouseUpKnob_=function(){Blockly.setPageSelectable(!0);Blockly.hideChaff(!0);Blockly.Scrollbar.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseUpWrapper_),Blockly.Scrollbar.onMouseUpWrapper_=null);Blockly.Scrollbar.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseMoveWrapper_),Blockly.Scrollbar.onMouseMoveWrapper_=null)};
|
||||
Blockly.Scrollbar.prototype.onMouseUpKnob_=function(){Blockly.hideChaff(!0);Blockly.Scrollbar.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseUpWrapper_),Blockly.Scrollbar.onMouseUpWrapper_=null);Blockly.Scrollbar.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseMoveWrapper_),Blockly.Scrollbar.onMouseMoveWrapper_=null)};
|
||||
Blockly.Scrollbar.prototype.constrainKnob_=function(a){if(0>=a||isNaN(a))a=0;else{var b=this.horizontal_?"width":"height",c=parseFloat(this.svgBackground_.getAttribute(b)),b=parseFloat(this.svgKnob_.getAttribute(b));a=Math.min(a,c-b)}return a};
|
||||
Blockly.Scrollbar.prototype.onScroll_=function(){var a=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"x":"y")),b=parseFloat(this.svgBackground_.getAttribute(this.horizontal_?"width":"height")),a=a/b;if(isNaN(a)||!b)a=0;b={};this.horizontal_?b.x=a:b.y=a;this.workspace_.setMetrics(b)};Blockly.Scrollbar.prototype.set=function(a){a=this.constrainKnob_(a*this.ratio_);this.svgKnob_.setAttribute(this.horizontal_?"x":"y",a);this.onScroll_()};
|
||||
Blockly.Scrollbar.insertAfter_=function(a,b){var c=b.nextSibling,d=b.parentNode;if(!d)throw"Reference node has no parent.";c?d.insertBefore(a,c):d.appendChild(a)};Blockly.Trashcan=function(a){this.workspace_=a};Blockly.Trashcan.prototype.WIDTH_=47;Blockly.Trashcan.prototype.BODY_HEIGHT_=44;Blockly.Trashcan.prototype.LID_HEIGHT_=16;Blockly.Trashcan.prototype.MARGIN_BOTTOM_=20;Blockly.Trashcan.prototype.MARGIN_SIDE_=20;Blockly.Trashcan.prototype.MARGIN_HOTSPOT_=10;Blockly.Trashcan.prototype.isOpen=!1;Blockly.Trashcan.prototype.svgGroup_=null;Blockly.Trashcan.prototype.svgLid_=null;Blockly.Trashcan.prototype.lidTask_=0;Blockly.Trashcan.prototype.lidOpen_=0;
|
||||
@@ -1000,7 +993,7 @@ Blockly.Xml.domToPrettyText=function(a){a=Blockly.Xml.domToText(a).split("<");fo
|
||||
Blockly.Xml.textToDom=function(a){a=(new DOMParser).parseFromString(a,"text/xml");if(!a||!a.firstChild||"xml"!=a.firstChild.nodeName.toLowerCase()||a.firstChild!==a.lastChild)throw"Blockly.Xml.textToDom did not obtain a valid XML tree.";return a.firstChild};
|
||||
Blockly.Xml.domToWorkspace=function(a,b){if(a instanceof Blockly.Workspace){var c=a;a=b;b=c;console.warn("Deprecated call to Blockly.Xml.domToWorkspace, swap the arguments.")}var d;b.RTL&&(d=b.getWidth());Blockly.Field.startCache();var c=a.childNodes.length,e=Blockly.Events.getGroup();e||Blockly.Events.setGroup(!0);for(var f=0;f<c;f++){var g=a.childNodes[f],h=g.nodeName.toLowerCase();if("block"==h||"shadow"==h){var h=Blockly.Xml.domToBlock(g,b),k=parseInt(g.getAttribute("x"),10),g=parseInt(g.getAttribute("y"),
|
||||
10);isNaN(k)||isNaN(g)||h.moveBy(b.RTL?d-k:k,g)}}e||Blockly.Events.setGroup(!1);Blockly.Field.stopCache()};
|
||||
Blockly.Xml.domToBlock=function(a,b){if(a instanceof Blockly.Workspace){var c=a;a=b;b=c;console.warn("Deprecated call to Blockly.Xml.domToBlock, swap the arguments.")}Blockly.Events.disable();var d=Blockly.Xml.domToBlockHeadless_(a,b);if(b.rendered){d.setConnectionsHidden(!0);for(var c=d.getDescendants(),e=c.length-1;0<=e;e--)c[e].initSvg();for(e=c.length-1;0<=e;e--)c[e].render(!1);setTimeout(function(){d.workspace&&d.setConnectionsHidden(!1)},1);d.updateDisabled();Blockly.fireUiEvent(window,"resize")}Blockly.Events.enable();
|
||||
Blockly.Xml.domToBlock=function(a,b){if(a instanceof Blockly.Workspace){var c=a;a=b;b=c;console.warn("Deprecated call to Blockly.Xml.domToBlock, swap the arguments.")}Blockly.Events.disable();var d=Blockly.Xml.domToBlockHeadless_(a,b);if(b.rendered){d.setConnectionsHidden(!0);for(var c=d.getDescendants(),e=c.length-1;0<=e;e--)c[e].initSvg();for(e=c.length-1;0<=e;e--)c[e].render(!1);setTimeout(function(){d.workspace&&d.setConnectionsHidden(!1)},1);d.updateDisabled();Blockly.asyncSvgResize(b)}Blockly.Events.enable();
|
||||
Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.Create(d));return d};
|
||||
Blockly.Xml.domToBlockHeadless_=function(a,b){var c=null,d=a.getAttribute("type");if(!d)throw"Block type unspecified: \n"+a.outerHTML;for(var e=a.getAttribute("id"),c=b.newBlock(d,e),f=null,e=0,g;g=a.childNodes[e];e++)if(3!=g.nodeType){for(var h=f=null,k=0,l;l=g.childNodes[k];k++)1==l.nodeType&&("block"==l.nodeName.toLowerCase()?f=l:"shadow"==l.nodeName.toLowerCase()&&(h=l));!f&&h&&(f=h);k=g.getAttribute("name");switch(g.nodeName.toLowerCase()){case "mutation":c.domToMutation&&(c.domToMutation(g),
|
||||
c.initSvg&&c.initSvg());break;case "comment":c.setCommentText(g.textContent);var q=g.getAttribute("pinned");q&&!c.isInFlyout&&setTimeout(function(){c.comment&&c.comment.setVisible&&c.comment.setVisible("true"==q)},1);f=parseInt(g.getAttribute("w"),10);g=parseInt(g.getAttribute("h"),10);!isNaN(f)&&!isNaN(g)&&c.comment&&c.comment.setVisible&&c.comment.setBubbleSize(f,g);break;case "data":c.data=g.textContent;break;case "title":case "field":f=c.getField(k);if(!f){console.warn("Ignoring non-existent field "+
|
||||
@@ -1034,12 +1027,12 @@ Blockly.WorkspaceSvg.prototype.paste=function(a){if(this.rendered&&!(a.getElemen
|
||||
f=0;g=e[f];f++)if(g.closest(Blockly.SNAP_RADIUS,new goog.math.Coordinate(c,a)).connection){d=!0;break}d&&(c=this.RTL?c-Blockly.SNAP_RADIUS:c+Blockly.SNAP_RADIUS,a+=2*Blockly.SNAP_RADIUS)}while(d);b.moveBy(c,a)}Blockly.Events.enable();Blockly.Events.isEnabled()&&!b.isShadow()&&Blockly.Events.fire(new Blockly.Events.Create(b));b.select()}};
|
||||
Blockly.WorkspaceSvg.prototype.recordDeleteAreas=function(){this.deleteAreaTrash_=this.trashcan?this.trashcan.getClientRect():null;this.deleteAreaToolbox_=this.flyout_?this.flyout_.getClientRect():this.toolbox_?this.toolbox_.getClientRect():null};
|
||||
Blockly.WorkspaceSvg.prototype.isDeleteArea=function(a){a=new goog.math.Coordinate(a.clientX,a.clientY);if(this.deleteAreaTrash_){if(this.deleteAreaTrash_.contains(a))return this.trashcan.setOpen_(!0),Blockly.Css.setCursor(Blockly.Css.Cursor.DELETE),!0;this.trashcan.setOpen_(!1)}if(this.deleteAreaToolbox_&&this.deleteAreaToolbox_.contains(a))return Blockly.Css.setCursor(Blockly.Css.Cursor.DELETE),!0;Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED);return!1};
|
||||
Blockly.WorkspaceSvg.prototype.onMouseDown_=function(a){this.markFocused();Blockly.setPageSelectable(!1);Blockly.isTargetInput_(a)||(Blockly.svgResize(this),Blockly.terminateDrag_(),Blockly.hideChaff(),a.target&&a.target.nodeName&&("svg"==a.target.nodeName.toLowerCase()||a.target==this.svgBackground_)&&Blockly.selected&&!this.options.readOnly&&Blockly.selected.unselect(),Blockly.isRightButton(a)?this.showContextMenu_(a):this.scrollbar&&(this.isScrolling=!0,this.startDragMouseX=a.clientX,this.startDragMouseY=
|
||||
a.clientY,this.startDragMetrics=this.getMetrics(),this.startScrollX=this.scrollX,this.startScrollY=this.scrollY,"mouseup"in Blockly.bindEvent_.TOUCH_MAP&&(Blockly.onTouchUpWrapper_=Blockly.onTouchUpWrapper_||[],Blockly.onTouchUpWrapper_=Blockly.onTouchUpWrapper_.concat(Blockly.bindEvent_(document,"mouseup",null,Blockly.onMouseUp_))),Blockly.onMouseMoveWrapper_=Blockly.onMouseMoveWrapper_||[],Blockly.onMouseMoveWrapper_=Blockly.onMouseMoveWrapper_.concat(Blockly.bindEvent_(document,"mousemove",null,
|
||||
Blockly.onMouseMove_))),a.stopPropagation())};Blockly.WorkspaceSvg.prototype.startDrag=function(a,b){var c=Blockly.mouseToSvg(a,this.getParentSvg());c.x/=this.scale;c.y/=this.scale;this.dragDeltaXY_=goog.math.Coordinate.difference(b,c)};Blockly.WorkspaceSvg.prototype.moveDrag=function(a){a=Blockly.mouseToSvg(a,this.getParentSvg());a.x/=this.scale;a.y/=this.scale;return goog.math.Coordinate.sum(this.dragDeltaXY_,a)};
|
||||
Blockly.WorkspaceSvg.prototype.onMouseDown_=function(a){this.markFocused();Blockly.isTargetInput_(a)||(Blockly.svgResize(this),Blockly.terminateDrag_(),Blockly.hideChaff(),a.target&&a.target.nodeName&&("svg"==a.target.nodeName.toLowerCase()||a.target==this.svgBackground_)&&Blockly.selected&&!this.options.readOnly&&Blockly.selected.unselect(),Blockly.isRightButton(a)?this.showContextMenu_(a):this.scrollbar&&(this.isScrolling=!0,this.startDragMouseX=a.clientX,this.startDragMouseY=a.clientY,this.startDragMetrics=
|
||||
this.getMetrics(),this.startScrollX=this.scrollX,this.startScrollY=this.scrollY,"mouseup"in Blockly.bindEvent_.TOUCH_MAP&&(Blockly.onTouchUpWrapper_=Blockly.onTouchUpWrapper_||[],Blockly.onTouchUpWrapper_=Blockly.onTouchUpWrapper_.concat(Blockly.bindEvent_(document,"mouseup",null,Blockly.onMouseUp_))),Blockly.onMouseMoveWrapper_=Blockly.onMouseMoveWrapper_||[],Blockly.onMouseMoveWrapper_=Blockly.onMouseMoveWrapper_.concat(Blockly.bindEvent_(document,"mousemove",null,Blockly.onMouseMove_))),a.stopPropagation(),
|
||||
a.preventDefault())};Blockly.WorkspaceSvg.prototype.startDrag=function(a,b){var c=Blockly.mouseToSvg(a,this.getParentSvg());c.x/=this.scale;c.y/=this.scale;this.dragDeltaXY_=goog.math.Coordinate.difference(b,c)};Blockly.WorkspaceSvg.prototype.moveDrag=function(a){a=Blockly.mouseToSvg(a,this.getParentSvg());a.x/=this.scale;a.y/=this.scale;return goog.math.Coordinate.sum(this.dragDeltaXY_,a)};
|
||||
Blockly.WorkspaceSvg.prototype.onMouseWheel_=function(a){Blockly.terminateDrag_();var b=0<a.deltaY?-1:1,c=Blockly.mouseToSvg(a,this.getParentSvg());this.zoom(c.x,c.y,b);a.preventDefault()};
|
||||
Blockly.WorkspaceSvg.prototype.getBlocksBoundingBox=function(){var a=this.getTopBlocks();if(!a.length)return{x:0,y:0,width:0,height:0};for(var b=a[0].getBoundingRectangle(),c=1;c<a.length;c++){var d=a[c].getBoundingRectangle();d.topLeft.x<b.topLeft.x&&(b.topLeft.x=d.topLeft.x);d.bottomRight.x>b.bottomRight.x&&(b.bottomRight.x=d.bottomRight.x);d.topLeft.y<b.topLeft.y&&(b.topLeft.y=d.topLeft.y);d.bottomRight.y>b.bottomRight.y&&(b.bottomRight.y=d.bottomRight.y)}return{x:b.topLeft.x,y:b.topLeft.y,width:b.bottomRight.x-
|
||||
b.topLeft.x,height:b.bottomRight.y-b.topLeft.y}};Blockly.WorkspaceSvg.prototype.cleanUp_=function(){Blockly.Events.setGroup(!0);for(var a=this.getTopBlocks(!0),b=0,c=0,d;d=a[c];c++){var e=d.getRelativeToSurfaceXY();d.moveBy(-e.x,b-e.y);d.snapToGrid();b=d.getRelativeToSurfaceXY().y+d.getHeightWidth().height+Blockly.BlockSvg.MIN_BLOCK_Y}Blockly.Events.setGroup(!1);Blockly.fireUiEvent(window,"resize")};
|
||||
b.topLeft.x,height:b.bottomRight.y-b.topLeft.y}};Blockly.WorkspaceSvg.prototype.cleanUp_=function(){Blockly.Events.setGroup(!0);for(var a=this.getTopBlocks(!0),b=0,c=0,d;d=a[c];c++){var e=d.getRelativeToSurfaceXY();d.moveBy(-e.x,b-e.y);d.snapToGrid();b=d.getRelativeToSurfaceXY().y+d.getHeightWidth().height+Blockly.BlockSvg.MIN_BLOCK_Y}Blockly.Events.setGroup(!1);Blockly.asyncSvgResize(this)};
|
||||
Blockly.WorkspaceSvg.prototype.showContextMenu_=function(a){function b(a){if(a.isDeletable())m=m.concat(a.getDescendants());else{a=a.getChildren();for(var c=0;c<a.length;c++)b(a[c])}}function c(){Blockly.Events.setGroup(f);var a=m.shift();a&&(a.workspace?(a.dispose(!1,!0),setTimeout(c,10)):c());Blockly.Events.setGroup(!1)}if(!this.options.readOnly&&!this.isFlyout){var d=[],e=this.getTopBlocks(!0),f=Blockly.genUid(),g={};g.text=Blockly.Msg.UNDO;g.enabled=0<this.undoStack_.length;g.callback=this.undo.bind(this,
|
||||
!1);d.push(g);g={};g.text=Blockly.Msg.REDO;g.enabled=0<this.redoStack_.length;g.callback=this.undo.bind(this,!0);d.push(g);this.scrollbar&&(g={},g.text=Blockly.Msg.CLEAN_UP,g.enabled=1<e.length,g.callback=this.cleanUp_.bind(this),d.push(g));if(this.options.collapse){for(var h=g=!1,k=0;k<e.length;k++)for(var l=e[k];l;)l.isCollapsed()?g=!0:h=!0,l=l.getNextBlock();var q=function(a){for(var b=0,c=0;c<e.length;c++)for(var d=e[c];d;)setTimeout(d.setCollapsed.bind(d,a),b),d=d.getNextBlock(),b+=10},h={enabled:h};
|
||||
h.text=Blockly.Msg.COLLAPSE_ALL;h.callback=function(){q(!0)};d.push(h);g={enabled:g};g.text=Blockly.Msg.EXPAND_ALL;g.callback=function(){q(!1)};d.push(g)}for(var m=[],k=0;k<e.length;k++)b(e[k]);g={text:1==m.length?Blockly.Msg.DELETE_BLOCK:Blockly.Msg.DELETE_X_BLOCKS.replace("%1",String(m.length)),enabled:0<m.length,callback:function(){(2>m.length||window.confirm(Blockly.Msg.DELETE_ALL_BLOCKS.replace("%1",String(m.length))))&&c()}};d.push(g);Blockly.ContextMenu.show(a,d,this.RTL)}};
|
||||
@@ -1088,9 +1081,9 @@ Blockly.Block.prototype.setHelpUrl=function(a){this.helpUrl=a};Blockly.Block.pro
|
||||
Blockly.Block.prototype.getField=function(a){for(var b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)if(e.name===a)return e;return null};Blockly.Block.prototype.getVars=function(){for(var a=[],b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)e instanceof Blockly.FieldVariable&&a.push(e.getValue());return a};
|
||||
Blockly.Block.prototype.renameVar=function(a,b){for(var c=0,d;d=this.inputList[c];c++)for(var e=0,f;f=d.fieldRow[e];e++)f instanceof Blockly.FieldVariable&&Blockly.Names.equals(a,f.getValue())&&f.setValue(b)};Blockly.Block.prototype.getFieldValue=function(a){return(a=this.getField(a))?a.getValue():null};Blockly.Block.prototype.getTitleValue=function(a){console.warn("Deprecated call to getTitleValue, use getFieldValue instead.");return this.getFieldValue(a)};
|
||||
Blockly.Block.prototype.setFieldValue=function(a,b){var c=this.getField(b);goog.asserts.assertObject(c,'Field "%s" not found.',b);c.setValue(a)};Blockly.Block.prototype.setTitleValue=function(a,b){console.warn("Deprecated call to setTitleValue, use setFieldValue instead.");this.setFieldValue(a,b)};
|
||||
Blockly.Block.prototype.setPreviousStatement=function(a,b){a?(void 0===b&&(b=null),this.previousConnection||(goog.asserts.assert(!this.outputConnection,"Remove output connection prior to adding previous connection."),this.previousConnection=new Blockly.Connection(this,Blockly.PREVIOUS_STATEMENT)),this.previousConnection.setCheck(b)):this.previousConnection&&(goog.asserts.assert(!this.previousConnection.isConnected(),"Must disconnect previous statement before removing connection."),this.previousConnection.dispose(),
|
||||
this.previousConnection=null)};Blockly.Block.prototype.setNextStatement=function(a,b){a?(void 0===b&&(b=null),this.nextConnection||(this.nextConnection=new Blockly.Connection(this,Blockly.NEXT_STATEMENT)),this.nextConnection.setCheck(b)):this.nextConnection&&(goog.asserts.assert(!this.nextConnection.isConnected(),"Must disconnect next statement before removing connection."),this.nextConnection.dispose(),this.nextConnection=null)};
|
||||
Blockly.Block.prototype.setOutput=function(a,b){a?(void 0===b&&(b=null),this.outputConnection||(goog.asserts.assert(!this.previousConnection,"Remove previous connection prior to adding output connection."),this.outputConnection=new Blockly.Connection(this,Blockly.OUTPUT_VALUE)),this.outputConnection.setCheck(b)):this.outputConnection&&(goog.asserts.assert(!this.outputConnection.isConnected(),"Must disconnect output value before removing connection."),this.outputConnection.dispose(),this.outputConnection=
|
||||
Blockly.Block.prototype.setPreviousStatement=function(a,b){a?(void 0===b&&(b=null),this.previousConnection||(goog.asserts.assert(!this.outputConnection,"Remove output connection prior to adding previous connection."),this.previousConnection=this.makeConnection_(Blockly.PREVIOUS_STATEMENT)),this.previousConnection.setCheck(b)):this.previousConnection&&(goog.asserts.assert(!this.previousConnection.isConnected(),"Must disconnect previous statement before removing connection."),this.previousConnection.dispose(),
|
||||
this.previousConnection=null)};Blockly.Block.prototype.setNextStatement=function(a,b){a?(void 0===b&&(b=null),this.nextConnection||(this.nextConnection=this.makeConnection_(Blockly.NEXT_STATEMENT)),this.nextConnection.setCheck(b)):this.nextConnection&&(goog.asserts.assert(!this.nextConnection.isConnected(),"Must disconnect next statement before removing connection."),this.nextConnection.dispose(),this.nextConnection=null)};
|
||||
Blockly.Block.prototype.setOutput=function(a,b){a?(void 0===b&&(b=null),this.outputConnection||(goog.asserts.assert(!this.previousConnection,"Remove previous connection prior to adding output connection."),this.outputConnection=this.makeConnection_(Blockly.OUTPUT_VALUE)),this.outputConnection.setCheck(b)):this.outputConnection&&(goog.asserts.assert(!this.outputConnection.isConnected(),"Must disconnect output value before removing connection."),this.outputConnection.dispose(),this.outputConnection=
|
||||
null)};Blockly.Block.prototype.setInputsInline=function(a){this.inputsInline!=a&&(Blockly.Events.fire(new Blockly.Events.Change(this,"inline",null,this.inputsInline,a)),this.inputsInline=a)};
|
||||
Blockly.Block.prototype.getInputsInline=function(){if(void 0!=this.inputsInline)return this.inputsInline;for(var a=1;a<this.inputList.length;a++)if(this.inputList[a-1].type==Blockly.DUMMY_INPUT&&this.inputList[a].type==Blockly.DUMMY_INPUT)return!1;for(a=1;a<this.inputList.length;a++)if(this.inputList[a-1].type==Blockly.INPUT_VALUE&&this.inputList[a].type==Blockly.DUMMY_INPUT)return!0;return!1};
|
||||
Blockly.Block.prototype.setDisabled=function(a){this.disabled!=a&&(Blockly.Events.fire(new Blockly.Events.Change(this,"disabled",null,this.disabled,a)),this.disabled=a)};Blockly.Block.prototype.getInheritedDisabled=function(){for(var a=this;;){a=a.getSurroundParent();if(!a)return!1;if(a.disabled)return!0}};Blockly.Block.prototype.isCollapsed=function(){return this.collapsed_};
|
||||
@@ -1100,27 +1093,37 @@ Blockly.Block.prototype.appendStatementInput=function(a){return this.appendInput
|
||||
Blockly.Block.prototype.jsonInit=function(a){goog.asserts.assert(void 0==a.output||void 0==a.previousStatement,"Must not have both an output and a previousStatement.");void 0!==a.colour&&this.setColour(a.colour);for(var b=0;void 0!==a["message"+b];)this.interpolate_(a["message"+b],a["args"+b]||[],a["lastDummyAlign"+b]),b++;void 0!==a.inputsInline&&this.setInputsInline(a.inputsInline);void 0!==a.output&&this.setOutput(!0,a.output);void 0!==a.previousStatement&&this.setPreviousStatement(!0,a.previousStatement);
|
||||
void 0!==a.nextStatement&&this.setNextStatement(!0,a.nextStatement);void 0!==a.tooltip&&this.setTooltip(a.tooltip);void 0!==a.helpUrl&&this.setHelpUrl(a.helpUrl)};
|
||||
Blockly.Block.prototype.interpolate_=function(a,b,c){var d=Blockly.tokenizeInterpolation(a),e=[],f=0;a=[];for(var g=0;g<d.length;g++){var h=d[g];"number"==typeof h?(goog.asserts.assert(0<h&&h<=b.length,'Message index "%s" out of range.',h),goog.asserts.assert(!e[h],'Message index "%s" duplicated.',h),e[h]=!0,f++,a.push(b[h-1])):(h=h.trim())&&a.push(h)}goog.asserts.assert(f==b.length,"Message does not reference all %s arg(s).",b.length);!a.length||"string"!=typeof a[a.length-1]&&0!=a[a.length-1].type.indexOf("field_")||
|
||||
(b={type:"input_dummy"},c&&(b.align=c),a.push(b));c={LEFT:Blockly.ALIGN_LEFT,RIGHT:Blockly.ALIGN_RIGHT,CENTRE:Blockly.ALIGN_CENTRE};d=[];for(g=0;g<a.length;g++)if(e=a[g],"string"==typeof e)d.push([e,void 0]);else{b=f=null;do switch(h=!1,e.type){case "input_value":b=this.appendValueInput(e.name);break;case "input_statement":b=this.appendStatementInput(e.name);break;case "input_dummy":b=this.appendDummyInput(e.name);break;case "field_label":f=new Blockly.FieldLabel(e.text,e["class"]);break;case "field_input":f=
|
||||
(g={type:"input_dummy"},c&&(g.align=c),a.push(g));c={LEFT:Blockly.ALIGN_LEFT,RIGHT:Blockly.ALIGN_RIGHT,CENTRE:Blockly.ALIGN_CENTRE};b=[];for(g=0;g<a.length;g++)if(e=a[g],"string"==typeof e)b.push([e,void 0]);else{d=f=null;do switch(h=!1,e.type){case "input_value":d=this.appendValueInput(e.name);break;case "input_statement":d=this.appendStatementInput(e.name);break;case "input_dummy":d=this.appendDummyInput(e.name);break;case "field_label":f=new Blockly.FieldLabel(e.text,e["class"]);break;case "field_input":f=
|
||||
new Blockly.FieldTextInput(e.text);"boolean"==typeof e.spellcheck&&f.setSpellcheck(e.spellcheck);break;case "field_angle":f=new Blockly.FieldAngle(e.angle);break;case "field_checkbox":f=new Blockly.FieldCheckbox(e.checked?"TRUE":"FALSE");break;case "field_colour":f=new Blockly.FieldColour(e.colour);break;case "field_variable":f=new Blockly.FieldVariable(e.variable);break;case "field_dropdown":f=new Blockly.FieldDropdown(e.options);break;case "field_image":f=new Blockly.FieldImage(e.src,e.width,e.height,
|
||||
e.alt);break;case "field_date":if(Blockly.FieldDate){f=new Blockly.FieldDate(e.date);break}default:e.alt&&(e=e.alt,h=!0)}while(h);if(f)d.push([f,e.name]);else if(b){e.check&&b.setCheck(e.check);e.align&&b.setAlign(c[e.align]);for(e=0;e<d.length;e++)b.appendField(d[e][0],d[e][1]);d.length=0}}};Blockly.Block.prototype.appendInput_=function(a,b){var c=null;if(a==Blockly.INPUT_VALUE||a==Blockly.NEXT_STATEMENT)c=new Blockly.Connection(this,a);c=new Blockly.Input(a,b,this,c);this.inputList.push(c);return c};
|
||||
e.alt);break;case "field_number":f=new Blockly.FieldNumber(e.text);break;case "field_date":if(Blockly.FieldDate){f=new Blockly.FieldDate(e.date);break}default:e.alt&&(e=e.alt,h=!0)}while(h);if(f)b.push([f,e.name]);else if(d){e.check&&d.setCheck(e.check);e.align&&d.setAlign(c[e.align]);for(e=0;e<b.length;e++)d.appendField(b[e][0],b[e][1]);b.length=0}}};
|
||||
Blockly.Block.prototype.appendInput_=function(a,b){var c=null;if(a==Blockly.INPUT_VALUE||a==Blockly.NEXT_STATEMENT)c=this.makeConnection_(a);c=new Blockly.Input(a,b,this,c);this.inputList.push(c);return c};
|
||||
Blockly.Block.prototype.moveInputBefore=function(a,b){if(a!=b){for(var c=-1,d=b?-1:this.inputList.length,e=0,f;f=this.inputList[e];e++)if(f.name==a){if(c=e,-1!=d)break}else if(b&&f.name==b&&(d=e,-1!=c))break;goog.asserts.assert(-1!=c,'Named input "%s" not found.',a);goog.asserts.assert(-1!=d,'Reference input "%s" not found.',b);this.moveNumberedInputBefore(c,d)}};
|
||||
Blockly.Block.prototype.moveNumberedInputBefore=function(a,b){goog.asserts.assert(a!=b,"Can't move input to itself.");goog.asserts.assert(a<this.inputList.length,"Input index "+a+" out of bounds.");goog.asserts.assert(b<=this.inputList.length,"Reference input "+b+" out of bounds.");var c=this.inputList[a];this.inputList.splice(a,1);a<b&&b--;this.inputList.splice(b,0,c)};
|
||||
Blockly.Block.prototype.removeInput=function(a,b){for(var c=0,d;d=this.inputList[c];c++)if(d.name==a){if(d.connection&&d.connection.isConnected()){d.connection.setShadowDom(null);var e=d.connection.targetBlock();e.isShadow()?e.dispose():e.unplug()}d.dispose();this.inputList.splice(c,1);return}b||goog.asserts.fail('Input "%s" not found.',a)};Blockly.Block.prototype.getInput=function(a){for(var b=0,c;c=this.inputList[b];b++)if(c.name==a)return c;return null};
|
||||
Blockly.Block.prototype.getInputTargetBlock=function(a){return(a=this.getInput(a))&&a.connection&&a.connection.targetBlock()};Blockly.Block.prototype.getCommentText=function(){return this.comment||""};Blockly.Block.prototype.setCommentText=function(a){this.comment!=a&&(Blockly.Events.fire(new Blockly.Events.Change(this,"comment",null,this.comment,a||"")),this.comment=a)};Blockly.Block.prototype.setWarningText=function(a){};Blockly.Block.prototype.setMutator=function(a){};
|
||||
Blockly.Block.prototype.getRelativeToSurfaceXY=function(){return this.xy_};Blockly.Block.prototype.moveBy=function(a,b){goog.asserts.assert(!this.parentBlock_,"Block has parent.");var c=new Blockly.Events.Move(this);this.xy_.translate(a,b);c.recordNew();Blockly.Events.fire(c)};Blockly.ContextMenu={};Blockly.ContextMenu.currentBlock=null;
|
||||
Blockly.ContextMenu.show=function(a,b,c){Blockly.WidgetDiv.show(Blockly.ContextMenu,c,null);if(b.length){var d=new goog.ui.Menu;d.setRightToLeft(c);for(var e=0,f;f=b[e];e++){var g=new goog.ui.MenuItem(f.text);g.setRightToLeft(c);d.addChild(g,!0);g.setEnabled(f.enabled);f.enabled&&goog.events.listen(g,goog.ui.Component.EventType.ACTION,f.callback)}goog.events.listen(d,goog.ui.Component.EventType.ACTION,Blockly.ContextMenu.hide);b=goog.dom.getViewportSize();f=goog.style.getViewportPageOffset(document);
|
||||
d.render(Blockly.WidgetDiv.DIV);var h=d.getElement();Blockly.addClass_(h,"blocklyContextMenu");var g=goog.style.getSize(h),e=a.clientX+f.x,k=a.clientY+f.y;a.clientY+g.height>=b.height&&(k-=g.height);c?g.width>=a.clientX&&(e+=g.width):a.clientX+g.width>=b.width&&(e-=g.width);Blockly.WidgetDiv.position(e,k,b,f,c);d.setAllowAutoFocus(!0);setTimeout(function(){h.focus()},1);Blockly.ContextMenu.currentBlock=null}else Blockly.ContextMenu.hide()};
|
||||
Blockly.Block.prototype.getRelativeToSurfaceXY=function(){return this.xy_};Blockly.Block.prototype.moveBy=function(a,b){goog.asserts.assert(!this.parentBlock_,"Block has parent.");var c=new Blockly.Events.Move(this);this.xy_.translate(a,b);c.recordNew();Blockly.Events.fire(c)};Blockly.Block.prototype.makeConnection_=function(a){return new Blockly.Connection(this,a)};Blockly.ContextMenu={};Blockly.ContextMenu.currentBlock=null;
|
||||
Blockly.ContextMenu.show=function(a,b,c){Blockly.WidgetDiv.show(Blockly.ContextMenu,c,null);if(b.length){var d=new goog.ui.Menu;d.setRightToLeft(c);for(var e=0,f;f=b[e];e++){var g=new goog.ui.MenuItem(f.text);g.setRightToLeft(c);d.addChild(g,!0);g.setEnabled(f.enabled);f.enabled&&goog.events.listen(g,goog.ui.Component.EventType.ACTION,f.callback)}goog.events.listen(d,goog.ui.Component.EventType.ACTION,Blockly.ContextMenu.hide);b=goog.dom.getViewportSize();e=goog.style.getViewportPageOffset(document);
|
||||
d.render(Blockly.WidgetDiv.DIV);var h=d.getElement();Blockly.addClass_(h,"blocklyContextMenu");f=goog.style.getSize(h);var g=a.clientX+e.x,k=a.clientY+e.y;a.clientY+f.height>=b.height&&(k-=f.height);c?f.width>=a.clientX&&(g+=f.width):a.clientX+f.width>=b.width&&(g-=f.width);Blockly.WidgetDiv.position(g,k,b,e,c);d.setAllowAutoFocus(!0);setTimeout(function(){h.focus()},1);Blockly.ContextMenu.currentBlock=null}else Blockly.ContextMenu.hide()};
|
||||
Blockly.ContextMenu.hide=function(){Blockly.WidgetDiv.hideIfOwner(Blockly.ContextMenu);Blockly.ContextMenu.currentBlock=null};
|
||||
Blockly.ContextMenu.callbackFactory=function(a,b){return function(){Blockly.Events.disable();var c=Blockly.Xml.domToBlock(b,a.workspace),d=a.getRelativeToSurfaceXY();d.x=a.RTL?d.x-Blockly.SNAP_RADIUS:d.x+Blockly.SNAP_RADIUS;d.y+=2*Blockly.SNAP_RADIUS;c.moveBy(d.x,d.y);Blockly.Events.enable();Blockly.Events.isEnabled()&&!c.isShadow()&&Blockly.Events.fire(new Blockly.Events.Create(c));c.select()}};Blockly.BlockSvg=function(a,b,c){this.svgGroup_=Blockly.createSvgElement("g",{},null);this.svgPathDark_=Blockly.createSvgElement("path",{"class":"blocklyPathDark",transform:"translate(1,1)"},this.svgGroup_);this.svgPath_=Blockly.createSvgElement("path",{"class":"blocklyPath"},this.svgGroup_);this.svgPathLight_=Blockly.createSvgElement("path",{"class":"blocklyPathLight"},this.svgGroup_);this.svgPath_.tooltip=this;this.rendered=!1;Blockly.Tooltip.bindMouseEvents(this.svgPath_);Blockly.BlockSvg.superClass_.constructor.call(this,
|
||||
Blockly.ContextMenu.callbackFactory=function(a,b){return function(){Blockly.Events.disable();var c=Blockly.Xml.domToBlock(b,a.workspace),d=a.getRelativeToSurfaceXY();d.x=a.RTL?d.x-Blockly.SNAP_RADIUS:d.x+Blockly.SNAP_RADIUS;d.y+=2*Blockly.SNAP_RADIUS;c.moveBy(d.x,d.y);Blockly.Events.enable();Blockly.Events.isEnabled()&&!c.isShadow()&&Blockly.Events.fire(new Blockly.Events.Create(c));c.select()}};Blockly.RenderedConnection=function(a,b){Blockly.RenderedConnection.superClass_.constructor.call(this,a,b)};goog.inherits(Blockly.RenderedConnection,Blockly.Connection);Blockly.RenderedConnection.prototype.distanceFrom=function(a){var b=this.x_-a.x_;a=this.y_-a.y_;return Math.sqrt(b*b+a*a)};
|
||||
Blockly.RenderedConnection.prototype.bumpAwayFrom_=function(a){if(Blockly.dragMode_==Blockly.DRAG_NONE){var b=this.sourceBlock_.getRootBlock();if(!b.isInFlyout){var c=!1;if(!b.isMovable()){b=a.getSourceBlock().getRootBlock();if(!b.isMovable())return;a=this;c=!0}b.getSvgRoot().parentNode.appendChild(b.getSvgRoot());var d=a.x_+Blockly.SNAP_RADIUS-this.x_;a=a.y_+Blockly.SNAP_RADIUS-this.y_;c&&(a=-a);b.RTL&&(d=-d);b.moveBy(d,a)}}};
|
||||
Blockly.RenderedConnection.prototype.moveTo=function(a,b){this.inDB_&&this.db_.removeConnection_(this);this.x_=a;this.y_=b;this.hidden_||this.db_.addConnection(this)};Blockly.RenderedConnection.prototype.moveBy=function(a,b){this.moveTo(this.x_+a,this.y_+b)};
|
||||
Blockly.RenderedConnection.prototype.tighten_=function(){var a=this.targetConnection.x_-this.x_,b=this.targetConnection.y_-this.y_;if(0!=a||0!=b){var c=this.targetBlock(),d=c.getSvgRoot();if(!d)throw"block is not rendered.";d=Blockly.getRelativeXY_(d);c.getSvgRoot().setAttribute("transform","translate("+(d.x-a)+","+(d.y-b)+")");c.moveConnections_(-a,-b)}};Blockly.RenderedConnection.prototype.closest=function(a,b,c){return this.dbOpposite_.searchForClosest(this,a,b,c)};
|
||||
Blockly.RenderedConnection.prototype.highlight=function(){var a;a=this.type==Blockly.INPUT_VALUE||this.type==Blockly.OUTPUT_VALUE?"m 0,0 "+Blockly.BlockSvg.TAB_PATH_DOWN+" v 5":"m -20,0 h 5 "+Blockly.BlockSvg.NOTCH_PATH_LEFT+" h 5";var b=this.sourceBlock_.getRelativeToSurfaceXY();Blockly.Connection.highlightedPath_=Blockly.createSvgElement("path",{"class":"blocklyHighlightedConnectionPath",d:a,transform:"translate("+(this.x_-b.x)+","+(this.y_-b.y)+")"+(this.sourceBlock_.RTL?" scale(-1 1)":"")},this.sourceBlock_.getSvgRoot())};
|
||||
Blockly.RenderedConnection.prototype.unhideAll=function(){this.setHidden(!1);var a=[];if(this.type!=Blockly.INPUT_VALUE&&this.type!=Blockly.NEXT_STATEMENT)return a;var b=this.targetBlock();if(b){var c;b.isCollapsed()?(c=[],b.outputConnection&&c.push(b.outputConnection),b.nextConnection&&c.push(b.nextConnection),b.previousConnection&&c.push(b.previousConnection)):c=b.getConnections_(!0);for(var d=0;d<c.length;d++)a.push.apply(a,c[d].unhideAll());a.length||(a[0]=b)}return a};
|
||||
Blockly.RenderedConnection.prototype.unhighlight=function(){goog.dom.removeNode(Blockly.Connection.highlightedPath_);delete Blockly.Connection.highlightedPath_};Blockly.RenderedConnection.prototype.setHidden=function(a){(this.hidden_=a)&&this.inDB_?this.db_.removeConnection_(this):a||this.inDB_||this.db_.addConnection(this)};
|
||||
Blockly.RenderedConnection.prototype.hideAll=function(){this.setHidden(!0);if(this.targetConnection)for(var a=this.targetBlock().getDescendants(),b=0;b<a.length;b++){for(var c=a[b],d=c.getConnections_(!0),e=0;e<d.length;e++)d[e].setHidden(!0);c=c.getIcons();for(d=0;d<c.length;d++)c[d].setVisible(!1)}};Blockly.RenderedConnection.prototype.isConnectionAllowed=function(a,b){return this.distanceFrom(a)>b?!1:Blockly.RenderedConnection.superClass_.isConnectionAllowed.call(this,a)};
|
||||
Blockly.RenderedConnection.prototype.disconnectInternal_=function(a,b){Blockly.RenderedConnection.superClass_.disconnectInternal_.call(this,a,b);a.rendered&&a.render();b.rendered&&(b.updateDisabled(),b.render())};
|
||||
Blockly.RenderedConnection.prototype.respawnShadow_=function(){var a=this.getSourceBlock(),b=this.getShadowDom();if(a.workspace&&b&&Blockly.Events.recordUndo){b=Blockly.RenderedConnection.superClass_.respawnShadow_.call(this);if(!b)throw"Couldn't respawn the shadow block that should exist here.";b.initSvg();b.render(!1);a.rendered&&a.render()}};Blockly.RenderedConnection.prototype.neighbours_=function(a){return this.dbOpposite_.getNeighbours(this,a)};
|
||||
Blockly.RenderedConnection.prototype.connect_=function(a){Blockly.RenderedConnection.superClass_.connect_.call(this,a);var b=this.getSourceBlock();a=a.getSourceBlock();b.rendered&&b.updateDisabled();a.rendered&&a.updateDisabled();b.rendered&&a.rendered&&(this.type==Blockly.NEXT_STATEMENT||this.type==Blockly.PREVIOUS_STATEMENT?a.render():b.render())};Blockly.BlockSvg=function(a,b,c){this.svgGroup_=Blockly.createSvgElement("g",{},null);this.svgPathDark_=Blockly.createSvgElement("path",{"class":"blocklyPathDark",transform:"translate(1,1)"},this.svgGroup_);this.svgPath_=Blockly.createSvgElement("path",{"class":"blocklyPath"},this.svgGroup_);this.svgPathLight_=Blockly.createSvgElement("path",{"class":"blocklyPathLight"},this.svgGroup_);this.svgPath_.tooltip=this;this.rendered=!1;Blockly.Tooltip.bindMouseEvents(this.svgPath_);Blockly.BlockSvg.superClass_.constructor.call(this,
|
||||
a,b,c)};goog.inherits(Blockly.BlockSvg,Blockly.Block);Blockly.BlockSvg.prototype.height=0;Blockly.BlockSvg.prototype.width=0;Blockly.BlockSvg.prototype.dragStartXY_=null;Blockly.BlockSvg.INLINE=-1;
|
||||
Blockly.BlockSvg.prototype.initSvg=function(){goog.asserts.assert(this.workspace.rendered,"Workspace is headless.");for(var a=0,b;b=this.inputList[a];a++)b.init();b=this.getIcons();for(a=0;a<b.length;a++)b[a].createIcon();this.updateColour();this.updateMovable();if(!this.workspace.options.readOnly&&!this.eventsInit_){Blockly.bindEvent_(this.getSvgRoot(),"mousedown",this,this.onMouseDown_);var c=this;Blockly.bindEvent_(this.getSvgRoot(),"touchstart",null,function(a){Blockly.longStart_(a,c)})}this.eventsInit_=
|
||||
!0;this.getSvgRoot().parentNode||this.workspace.getCanvas().appendChild(this.getSvgRoot())};
|
||||
Blockly.BlockSvg.prototype.select=function(){if(this.isShadow()&&this.getParent())this.getParent().select();else if(Blockly.selected!=this){var a=null;Blockly.selected&&(a=Blockly.selected.id,Blockly.Events.disable(),Blockly.selected.unselect(),Blockly.Events.enable());a=new Blockly.Events.Ui(null,"selected",a,this.id);a.workspaceId=this.workspace.id;Blockly.Events.fire(a);Blockly.selected=this;this.addSelect();Blockly.fireUiEvent(this.workspace.getCanvas(),"blocklySelectChange")}};
|
||||
Blockly.BlockSvg.prototype.unselect=function(){if(Blockly.selected==this){var a=new Blockly.Events.Ui(null,"selected",this.id,null);a.workspaceId=this.workspace.id;Blockly.Events.fire(a);Blockly.selected=null;this.removeSelect();Blockly.fireUiEvent(this.workspace.getCanvas(),"blocklySelectChange")}};Blockly.BlockSvg.prototype.mutator=null;Blockly.BlockSvg.prototype.comment=null;Blockly.BlockSvg.prototype.warning=null;
|
||||
!0;this.getSvgRoot().parentNode||this.workspace.getCanvas().appendChild(this.getSvgRoot())};Blockly.BlockSvg.prototype.select=function(){if(this.isShadow()&&this.getParent())this.getParent().select();else if(Blockly.selected!=this){var a=null;Blockly.selected&&(a=Blockly.selected.id,Blockly.Events.disable(),Blockly.selected.unselect(),Blockly.Events.enable());a=new Blockly.Events.Ui(null,"selected",a,this.id);a.workspaceId=this.workspace.id;Blockly.Events.fire(a);Blockly.selected=this;this.addSelect()}};
|
||||
Blockly.BlockSvg.prototype.unselect=function(){if(Blockly.selected==this){var a=new Blockly.Events.Ui(null,"selected",this.id,null);a.workspaceId=this.workspace.id;Blockly.Events.fire(a);Blockly.selected=null;this.removeSelect()}};Blockly.BlockSvg.prototype.mutator=null;Blockly.BlockSvg.prototype.comment=null;Blockly.BlockSvg.prototype.warning=null;
|
||||
Blockly.BlockSvg.prototype.getIcons=function(){var a=[];this.mutator&&a.push(this.mutator);this.comment&&a.push(this.comment);this.warning&&a.push(this.warning);return a};Blockly.BlockSvg.onMouseUpWrapper_=null;Blockly.BlockSvg.onMouseMoveWrapper_=null;
|
||||
Blockly.BlockSvg.terminateDrag_=function(){Blockly.BlockSvg.disconnectUiStop_();Blockly.BlockSvg.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.BlockSvg.onMouseUpWrapper_),Blockly.BlockSvg.onMouseUpWrapper_=null);Blockly.BlockSvg.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.BlockSvg.onMouseMoveWrapper_),Blockly.BlockSvg.onMouseMoveWrapper_=null);var a=Blockly.selected;if(Blockly.dragMode_==Blockly.DRAG_FREE&&a){var b=a.getRelativeToSurfaceXY(),b=goog.math.Coordinate.difference(b,a.dragStartXY_),
|
||||
c=new Blockly.Events.Move(a);c.oldCoordinate=a.dragStartXY_;c.recordNew();Blockly.Events.fire(c);a.moveConnections_(b.x,b.y);delete a.draggedBubbles_;a.setDragging_(!1);a.render();var d=Blockly.Events.getGroup();setTimeout(function(){Blockly.Events.setGroup(d);a.snapToGrid();Blockly.Events.setGroup(!1)},Blockly.BUMP_DELAY/2);setTimeout(function(){Blockly.Events.setGroup(d);a.bumpNeighbours_();Blockly.Events.setGroup(!1)},Blockly.BUMP_DELAY);Blockly.fireUiEvent(window,"resize")}Blockly.dragMode_=Blockly.DRAG_NONE;
|
||||
Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)};
|
||||
c=new Blockly.Events.Move(a);c.oldCoordinate=a.dragStartXY_;c.recordNew();Blockly.Events.fire(c);a.moveConnections_(b.x,b.y);delete a.draggedBubbles_;a.setDragging_(!1);a.render();var d=Blockly.Events.getGroup();setTimeout(function(){Blockly.Events.setGroup(d);a.snapToGrid();Blockly.Events.setGroup(!1)},Blockly.BUMP_DELAY/2);setTimeout(function(){Blockly.Events.setGroup(d);a.bumpNeighbours_();Blockly.Events.setGroup(!1)},Blockly.BUMP_DELAY);Blockly.asyncSvgResize(this.workspace)}Blockly.dragMode_=
|
||||
Blockly.DRAG_NONE;Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)};
|
||||
Blockly.BlockSvg.prototype.setParent=function(a){if(a!=this.parentBlock_){var b=this.getSvgRoot();if(this.parentBlock_&&b){var c=this.getRelativeToSurfaceXY();this.workspace.getCanvas().appendChild(b);b.setAttribute("transform","translate("+c.x+","+c.y+")")}Blockly.Field.startCache();Blockly.BlockSvg.superClass_.setParent.call(this,a);Blockly.Field.stopCache();a&&(c=this.getRelativeToSurfaceXY(),a.getSvgRoot().appendChild(b),a=this.getRelativeToSurfaceXY(),this.moveConnections_(a.x-c.x,a.y-c.y))}};
|
||||
Blockly.BlockSvg.prototype.getRelativeToSurfaceXY=function(){var a=0,b=0,c=this.getSvgRoot();if(c){do var d=Blockly.getRelativeXY_(c),a=a+d.x,b=b+d.y,c=c.parentNode;while(c&&c!=this.workspace.getCanvas())}return new goog.math.Coordinate(a,b)};
|
||||
Blockly.BlockSvg.prototype.moveBy=function(a,b){goog.asserts.assert(!this.parentBlock_,"Block has parent.");var c=new Blockly.Events.Move(this),d=this.getRelativeToSurfaceXY();this.getSvgRoot().setAttribute("transform","translate("+(d.x+a)+","+(d.y+b)+")");this.moveConnections_(a,b);c.recordNew();Blockly.Events.fire(c)};
|
||||
@@ -1129,20 +1132,22 @@ Blockly.BlockSvg.prototype.getHeightWidth=function(){var a=this.height,b=this.wi
|
||||
Blockly.BlockSvg.prototype.getBoundingRectangle=function(){var a=this.getRelativeToSurfaceXY(this),b=this.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0,c=this.getHeightWidth(),d;this.RTL?(d=new goog.math.Coordinate(a.x-(c.width-b),a.y),a=new goog.math.Coordinate(a.x+b,a.y+c.height)):(d=new goog.math.Coordinate(a.x-b,a.y),a=new goog.math.Coordinate(a.x+c.width-b,a.y+c.height));return{topLeft:d,bottomRight:a}};
|
||||
Blockly.BlockSvg.prototype.setCollapsed=function(a){if(this.collapsed_!=a){for(var b=[],c=0,d;d=this.inputList[c];c++)b.push.apply(b,d.setVisible(!a));if(a){d=this.getIcons();for(c=0;c<d.length;c++)d[c].setVisible(!1);c=this.toString(Blockly.COLLAPSE_CHARS);this.appendDummyInput("_TEMP_COLLAPSED_INPUT").appendField(c).init()}else this.removeInput("_TEMP_COLLAPSED_INPUT"),this.setWarningText(null);Blockly.BlockSvg.superClass_.setCollapsed.call(this,a);b.length||(b[0]=this);if(this.rendered)for(c=0;a=
|
||||
b[c];c++)a.render()}};Blockly.BlockSvg.prototype.tab=function(a,b){for(var c=[],d=0,e;e=this.inputList[d];d++){for(var f=0,g;g=e.fieldRow[f];f++)g instanceof Blockly.FieldTextInput&&c.push(g);e.connection&&(e=e.connection.targetBlock())&&c.push(e)}d=c.indexOf(a);-1==d&&(d=b?-1:c.length);(c=c[b?d+1:d-1])?c instanceof Blockly.Field?c.showEditor_():c.tab(null,b):(c=this.getParent())&&c.tab(this,b)};
|
||||
Blockly.BlockSvg.prototype.onMouseDown_=function(a){if(!this.workspace.options.readOnly){if(!this.isInFlyout)if(Blockly.setPageSelectable(!1),this.workspace.markFocused(),Blockly.svgResize(this.workspace),Blockly.terminateDrag_(),this.select(),Blockly.hideChaff(),this.workspace.recordDeleteAreas(),Blockly.isRightButton(a))this.showContextMenu_(a);else if(this.isMovable()){Blockly.Events.getGroup()||Blockly.Events.setGroup(!0);Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED);this.dragStartXY_=this.getRelativeToSurfaceXY();
|
||||
this.workspace.startDrag(a,this.dragStartXY_);Blockly.dragMode_=Blockly.DRAG_STICKY;Blockly.BlockSvg.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",this,this.onMouseUp_);Blockly.BlockSvg.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",this,this.onMouseMove_);this.draggedBubbles_=[];for(var b=this.getDescendants(),c=0,d;d=b[c];c++){d=d.getIcons();for(var e=0;e<d.length;e++){var f=d[e].getIconLocation();f.bubble=d[e];this.draggedBubbles_.push(f)}}}else return;a.stopPropagation()}};
|
||||
Blockly.BlockSvg.prototype.onMouseUp_=function(a){Blockly.dragMode_==Blockly.DRAG_FREE||Blockly.WidgetDiv.isVisible()||Blockly.Events.fire(new Blockly.Events.Ui(this,"click",void 0,void 0));Blockly.setPageSelectable(!0);Blockly.terminateDrag_();Blockly.selected&&Blockly.highlightedConnection_?(Blockly.localConnection_.connect(Blockly.highlightedConnection_),this.rendered&&(Blockly.localConnection_.isSuperior()?Blockly.highlightedConnection_:Blockly.localConnection_).getSourceBlock().connectionUiEffect(),
|
||||
this.workspace.trashcan&&this.workspace.trashcan.close()):!this.getParent()&&Blockly.selected.isDeletable()&&this.workspace.isDeleteArea(a)&&((a=this.workspace.trashcan)&&goog.Timer.callOnce(a.close,100,a),Blockly.selected.dispose(!1,!0),Blockly.fireUiEvent(window,"resize"));Blockly.highlightedConnection_&&(Blockly.highlightedConnection_.unhighlight(),Blockly.highlightedConnection_=null);Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN);Blockly.WidgetDiv.isVisible()||Blockly.Events.setGroup(!1)};
|
||||
Blockly.BlockSvg.prototype.onMouseDown_=function(a){if(!this.workspace.options.readOnly)if(this.isInFlyout)a.stopPropagation();else{this.workspace.markFocused();Blockly.svgResize(this.workspace);Blockly.terminateDrag_();this.select();Blockly.hideChaff();this.workspace.recordDeleteAreas();if(Blockly.isRightButton(a))this.showContextMenu_(a);else if(this.isMovable()){Blockly.Events.getGroup()||Blockly.Events.setGroup(!0);Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED);this.dragStartXY_=this.getRelativeToSurfaceXY();
|
||||
this.workspace.startDrag(a,this.dragStartXY_);Blockly.dragMode_=Blockly.DRAG_STICKY;Blockly.BlockSvg.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",this,this.onMouseUp_);Blockly.BlockSvg.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",this,this.onMouseMove_);this.draggedBubbles_=[];for(var b=this.getDescendants(),c=0,d;d=b[c];c++){d=d.getIcons();for(var e=0;e<d.length;e++){var f=d[e].getIconLocation();f.bubble=d[e];this.draggedBubbles_.push(f)}}}else return;a.stopPropagation();
|
||||
a.preventDefault()}};
|
||||
Blockly.BlockSvg.prototype.onMouseUp_=function(a){Blockly.dragMode_==Blockly.DRAG_FREE||Blockly.WidgetDiv.isVisible()||Blockly.Events.fire(new Blockly.Events.Ui(this,"click",void 0,void 0));Blockly.terminateDrag_();Blockly.selected&&Blockly.highlightedConnection_?(Blockly.localConnection_.connect(Blockly.highlightedConnection_),this.rendered&&(Blockly.localConnection_.isSuperior()?Blockly.highlightedConnection_:Blockly.localConnection_).getSourceBlock().connectionUiEffect(),this.workspace.trashcan&&this.workspace.trashcan.close()):
|
||||
!this.getParent()&&Blockly.selected.isDeletable()&&this.workspace.isDeleteArea(a)&&((a=this.workspace.trashcan)&&goog.Timer.callOnce(a.close,100,a),Blockly.selected.dispose(!1,!0),Blockly.asyncSvgResize(this.workspace));Blockly.highlightedConnection_&&(Blockly.highlightedConnection_.unhighlight(),Blockly.highlightedConnection_=null);Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN);Blockly.WidgetDiv.isVisible()||Blockly.Events.setGroup(!1)};
|
||||
Blockly.BlockSvg.prototype.showHelp_=function(){var a=goog.isFunction(this.helpUrl)?this.helpUrl():this.helpUrl;a&&window.open(a)};
|
||||
Blockly.BlockSvg.prototype.showContextMenu_=function(a){if(!this.workspace.options.readOnly&&this.contextMenu){var b=this,c=[];if(this.isDeletable()&&this.isMovable()&&!b.isInFlyout){var d={text:Blockly.Msg.DUPLICATE_BLOCK,enabled:!0,callback:function(){Blockly.duplicate_(b)}};this.getDescendants().length>this.workspace.remainingCapacity()&&(d.enabled=!1);c.push(d);this.isEditable()&&!this.collapsed_&&this.workspace.options.comments&&(d={enabled:!goog.userAgent.IE},this.comment?(d.text=Blockly.Msg.REMOVE_COMMENT,
|
||||
d.callback=function(){b.setCommentText(null)}):(d.text=Blockly.Msg.ADD_COMMENT,d.callback=function(){b.setCommentText("")}),c.push(d));if(!this.collapsed_)for(d=1;d<this.inputList.length;d++)if(this.inputList[d-1].type!=Blockly.NEXT_STATEMENT&&this.inputList[d].type!=Blockly.NEXT_STATEMENT){var d={enabled:!0},e=this.getInputsInline();d.text=e?Blockly.Msg.EXTERNAL_INPUTS:Blockly.Msg.INLINE_INPUTS;d.callback=function(){b.setInputsInline(!e)};c.push(d);break}this.workspace.options.collapse&&(this.collapsed_?
|
||||
(d={enabled:!0},d.text=Blockly.Msg.EXPAND_BLOCK,d.callback=function(){b.setCollapsed(!1)}):(d={enabled:!0},d.text=Blockly.Msg.COLLAPSE_BLOCK,d.callback=function(){b.setCollapsed(!0)}),c.push(d));this.workspace.options.disable&&(d={text:this.disabled?Blockly.Msg.ENABLE_BLOCK:Blockly.Msg.DISABLE_BLOCK,enabled:!this.getInheritedDisabled(),callback:function(){b.setDisabled(!b.disabled)}},c.push(d));var d=this.getDescendants().length,f=this.getNextBlock();f&&(d-=f.getDescendants().length);d={text:1==d?
|
||||
Blockly.Msg.DELETE_BLOCK:Blockly.Msg.DELETE_X_BLOCKS.replace("%1",String(d)),enabled:!0,callback:function(){Blockly.Events.setGroup(!0);b.dispose(!0,!0);Blockly.Events.setGroup(!1)}};c.push(d)}d={enabled:!(goog.isFunction(this.helpUrl)?!this.helpUrl():!this.helpUrl)};d.text=Blockly.Msg.HELP;d.callback=function(){b.showHelp_()};c.push(d);this.customContextMenu&&!b.isInFlyout&&this.customContextMenu(c);Blockly.ContextMenu.show(a,c,this.RTL);Blockly.ContextMenu.currentBlock=this}};
|
||||
Blockly.BlockSvg.prototype.moveConnections_=function(a,b){if(this.rendered){for(var c=this.getConnections_(!1),d=0;d<c.length;d++)c[d].moveBy(a,b);c=this.getIcons();for(d=0;d<c.length;d++)c[d].computeIconLocation();for(d=0;d<this.childBlocks_.length;d++)this.childBlocks_[d].moveConnections_(a,b)}};Blockly.BlockSvg.prototype.setDragging_=function(a){if(a){var b=this.getSvgRoot();b.translate_="";b.skew_="";this.addDragging()}else this.removeDragging();for(b=0;b<this.childBlocks_.length;b++)this.childBlocks_[b].setDragging_(a)};
|
||||
Blockly.BlockSvg.prototype.onMouseMove_=function(a){if(!("mousemove"==a.type&&1>=a.clientX&&0==a.clientY&&0==a.button)){var b=this.getRelativeToSurfaceXY(),c=this.workspace.moveDrag(a);if(Blockly.dragMode_==Blockly.DRAG_STICKY&&goog.math.Coordinate.distance(b,c)*this.workspace.scale>Blockly.DRAG_RADIUS){Blockly.dragMode_=Blockly.DRAG_FREE;Blockly.longStop_();if(this.parentBlock_){this.unplug();var d=this.getSvgRoot();d.translate_="translate("+c.x+","+c.y+")";this.disconnectUiEffect()}this.setDragging_(!0)}if(Blockly.dragMode_==
|
||||
Blockly.BlockSvg.prototype.onMouseMove_=function(a){if("mousemove"==a.type&&1>=a.clientX&&0==a.clientY&&0==a.button)a.stopPropagation();else{var b=this.getRelativeToSurfaceXY(),c=this.workspace.moveDrag(a);if(Blockly.dragMode_==Blockly.DRAG_STICKY&&goog.math.Coordinate.distance(b,c)*this.workspace.scale>Blockly.DRAG_RADIUS){Blockly.dragMode_=Blockly.DRAG_FREE;Blockly.longStop_();if(this.parentBlock_){this.unplug();var d=this.getSvgRoot();d.translate_="translate("+c.x+","+c.y+")";this.disconnectUiEffect()}this.setDragging_(!0)}if(Blockly.dragMode_==
|
||||
Blockly.DRAG_FREE){b=goog.math.Coordinate.difference(b,this.dragStartXY_);d=this.getSvgRoot();d.translate_="translate("+c.x+","+c.y+")";d.setAttribute("transform",d.translate_+d.skew_);for(c=0;c<this.draggedBubbles_.length;c++)d=this.draggedBubbles_[c],d.bubble.setIconLocation(goog.math.Coordinate.sum(d,b));for(var d=this.getConnections_(!1),e=null,f=null,g=Blockly.SNAP_RADIUS,c=0;c<d.length;c++){var h=d[c],k=h.closest(g,b);k.connection&&(e=k.connection,f=h,g=k.radius)}Blockly.highlightedConnection_&&
|
||||
Blockly.highlightedConnection_!=e&&(Blockly.highlightedConnection_.unhighlight(),Blockly.highlightedConnection_=null,Blockly.localConnection_=null);e&&e!=Blockly.highlightedConnection_&&(e.highlight(),Blockly.highlightedConnection_=e,Blockly.localConnection_=f);this.isDeletable()&&this.workspace.isDeleteArea(a)}}a.stopPropagation()};Blockly.BlockSvg.prototype.updateMovable=function(){this.isMovable()?Blockly.addClass_(this.svgGroup_,"blocklyDraggable"):Blockly.removeClass_(this.svgGroup_,"blocklyDraggable")};
|
||||
Blockly.BlockSvg.prototype.setMovable=function(a){Blockly.BlockSvg.superClass_.setMovable.call(this,a);this.updateMovable()};Blockly.BlockSvg.prototype.setEditable=function(a){Blockly.BlockSvg.superClass_.setEditable.call(this,a);if(this.rendered){a=this.getIcons();for(var b=0;b<a.length;b++)a[b].updateEditable()}};Blockly.BlockSvg.prototype.setShadow=function(a){Blockly.BlockSvg.superClass_.setShadow.call(this,a);this.updateColour()};Blockly.BlockSvg.prototype.getSvgRoot=function(){return this.svgGroup_};
|
||||
Blockly.highlightedConnection_!=e&&(Blockly.highlightedConnection_.unhighlight(),Blockly.highlightedConnection_=null,Blockly.localConnection_=null);e&&e!=Blockly.highlightedConnection_&&(e.highlight(),Blockly.highlightedConnection_=e,Blockly.localConnection_=f);this.isDeletable()&&this.workspace.isDeleteArea(a)}a.stopPropagation();a.preventDefault()}};
|
||||
Blockly.BlockSvg.prototype.updateMovable=function(){this.isMovable()?Blockly.addClass_(this.svgGroup_,"blocklyDraggable"):Blockly.removeClass_(this.svgGroup_,"blocklyDraggable")};Blockly.BlockSvg.prototype.setMovable=function(a){Blockly.BlockSvg.superClass_.setMovable.call(this,a);this.updateMovable()};Blockly.BlockSvg.prototype.setEditable=function(a){Blockly.BlockSvg.superClass_.setEditable.call(this,a);if(this.rendered){a=this.getIcons();for(var b=0;b<a.length;b++)a[b].updateEditable()}};
|
||||
Blockly.BlockSvg.prototype.setShadow=function(a){Blockly.BlockSvg.superClass_.setShadow.call(this,a);this.updateColour()};Blockly.BlockSvg.prototype.getSvgRoot=function(){return this.svgGroup_};
|
||||
Blockly.BlockSvg.prototype.dispose=function(a,b){Blockly.Field.startCache();Blockly.selected==this&&(this.unselect(),Blockly.terminateDrag_());Blockly.ContextMenu.currentBlock==this&&Blockly.ContextMenu.hide();b&&this.rendered&&(this.unplug(a),this.disposeUiEffect());this.rendered=!1;Blockly.Events.disable();for(var c=this.getIcons(),d=0;d<c.length;d++)c[d].dispose();Blockly.Events.enable();Blockly.BlockSvg.superClass_.dispose.call(this,a);goog.dom.removeNode(this.svgGroup_);this.svgPathDark_=this.svgPathLight_=
|
||||
this.svgPath_=this.svgGroup_=null;Blockly.Field.stopCache()};Blockly.BlockSvg.prototype.disposeUiEffect=function(){this.workspace.playAudio("delete");var a=Blockly.getSvgXY_(this.svgGroup_,this.workspace),b=this.svgGroup_.cloneNode(!0);b.translateX_=a.x;b.translateY_=a.y;b.setAttribute("transform","translate("+b.translateX_+","+b.translateY_+")");this.workspace.getParentSvg().appendChild(b);b.bBox_=b.getBBox();Blockly.BlockSvg.disposeUiStep_(b,this.RTL,new Date,this.workspace.scale)};
|
||||
Blockly.BlockSvg.disposeUiStep_=function(a,b,c,d){var e=(new Date-c)/150;1<e?goog.dom.removeNode(a):(a.setAttribute("transform","translate("+(a.translateX_+(b?-1:1)*a.bBox_.width*d/2*e)+","+(a.translateY_+a.bBox_.height*d*e)+") scale("+(1-e)*d+")"),setTimeout(function(){Blockly.BlockSvg.disposeUiStep_(a,b,c,d)},10))};
|
||||
@@ -1161,7 +1166,8 @@ e.setWarningText(a,c))},100)}else{this.isInFlyout&&(a=null);d=this.getSurroundPa
|
||||
Blockly.BlockSvg.prototype.removeSelect=function(){Blockly.removeClass_(this.svgGroup_,"blocklySelected")};Blockly.BlockSvg.prototype.addDragging=function(){Blockly.addClass_(this.svgGroup_,"blocklyDragging")};Blockly.BlockSvg.prototype.removeDragging=function(){Blockly.removeClass_(this.svgGroup_,"blocklyDragging")};Blockly.BlockSvg.prototype.setColour=function(a){Blockly.BlockSvg.superClass_.setColour.call(this,a);this.rendered&&this.updateColour()};
|
||||
Blockly.BlockSvg.prototype.setPreviousStatement=function(a,b){Blockly.BlockSvg.superClass_.setPreviousStatement.call(this,a,b);this.rendered&&(this.render(),this.bumpNeighbours_())};Blockly.BlockSvg.prototype.setNextStatement=function(a,b){Blockly.BlockSvg.superClass_.setNextStatement.call(this,a,b);this.rendered&&(this.render(),this.bumpNeighbours_())};Blockly.BlockSvg.prototype.setOutput=function(a,b){Blockly.BlockSvg.superClass_.setOutput.call(this,a,b);this.rendered&&(this.render(),this.bumpNeighbours_())};
|
||||
Blockly.BlockSvg.prototype.setInputsInline=function(a){Blockly.BlockSvg.superClass_.setInputsInline.call(this,a);this.rendered&&(this.render(),this.bumpNeighbours_())};Blockly.BlockSvg.prototype.removeInput=function(a,b){Blockly.BlockSvg.superClass_.removeInput.call(this,a,b);this.rendered&&(this.render(),this.bumpNeighbours_())};Blockly.BlockSvg.prototype.moveNumberedInputBefore=function(a,b){Blockly.BlockSvg.superClass_.moveNumberedInputBefore.call(this,a,b);this.rendered&&(this.render(),this.bumpNeighbours_())};
|
||||
Blockly.BlockSvg.prototype.appendInput_=function(a,b){var c=Blockly.BlockSvg.superClass_.appendInput_.call(this,a,b);this.rendered&&(this.render(),this.bumpNeighbours_());return c};Blockly.BlockSvg.prototype.getConnections_=function(a){var b=[];if(a||this.rendered)if(this.outputConnection&&b.push(this.outputConnection),this.previousConnection&&b.push(this.previousConnection),this.nextConnection&&b.push(this.nextConnection),a||!this.collapsed_){a=0;for(var c;c=this.inputList[a];a++)c.connection&&b.push(c.connection)}return b};Blockly.BlockSvg.render={};Blockly.BlockSvg.SEP_SPACE_X=10;Blockly.BlockSvg.SEP_SPACE_Y=10;Blockly.BlockSvg.INLINE_PADDING_Y=5;Blockly.BlockSvg.MIN_BLOCK_Y=25;Blockly.BlockSvg.TAB_HEIGHT=20;Blockly.BlockSvg.TAB_WIDTH=8;Blockly.BlockSvg.NOTCH_WIDTH=30;Blockly.BlockSvg.CORNER_RADIUS=8;Blockly.BlockSvg.START_HAT=!1;Blockly.BlockSvg.START_HAT_HEIGHT=15;Blockly.BlockSvg.START_HAT_PATH="c 30,-"+Blockly.BlockSvg.START_HAT_HEIGHT+" 70,-"+Blockly.BlockSvg.START_HAT_HEIGHT+" 100,0";
|
||||
Blockly.BlockSvg.prototype.appendInput_=function(a,b){var c=Blockly.BlockSvg.superClass_.appendInput_.call(this,a,b);this.rendered&&(this.render(),this.bumpNeighbours_());return c};Blockly.BlockSvg.prototype.getConnections_=function(a){var b=[];if(a||this.rendered)if(this.outputConnection&&b.push(this.outputConnection),this.previousConnection&&b.push(this.previousConnection),this.nextConnection&&b.push(this.nextConnection),a||!this.collapsed_){a=0;for(var c;c=this.inputList[a];a++)c.connection&&b.push(c.connection)}return b};
|
||||
Blockly.BlockSvg.prototype.makeConnection_=function(a){return new Blockly.RenderedConnection(this,a)};Blockly.BlockSvg.render={};Blockly.BlockSvg.SEP_SPACE_X=10;Blockly.BlockSvg.SEP_SPACE_Y=10;Blockly.BlockSvg.INLINE_PADDING_Y=5;Blockly.BlockSvg.MIN_BLOCK_Y=25;Blockly.BlockSvg.TAB_HEIGHT=20;Blockly.BlockSvg.TAB_WIDTH=8;Blockly.BlockSvg.NOTCH_WIDTH=30;Blockly.BlockSvg.CORNER_RADIUS=8;Blockly.BlockSvg.START_HAT=!1;Blockly.BlockSvg.START_HAT_HEIGHT=15;Blockly.BlockSvg.START_HAT_PATH="c 30,-"+Blockly.BlockSvg.START_HAT_HEIGHT+" 70,-"+Blockly.BlockSvg.START_HAT_HEIGHT+" 100,0";
|
||||
Blockly.BlockSvg.START_HAT_HIGHLIGHT_LTR="c 17.8,-9.2 45.3,-14.9 75,-8.7 M 100.5,0.5";Blockly.BlockSvg.START_HAT_HIGHLIGHT_RTL="m 25,-8.7 c 29.7,-6.2 57.2,-0.5 75,8.7";Blockly.BlockSvg.DISTANCE_45_INSIDE=(1-Math.SQRT1_2)*(Blockly.BlockSvg.CORNER_RADIUS-.5)+.5;Blockly.BlockSvg.DISTANCE_45_OUTSIDE=(1-Math.SQRT1_2)*(Blockly.BlockSvg.CORNER_RADIUS+.5)-.5;Blockly.BlockSvg.NOTCH_PATH_LEFT="l 6,4 3,0 6,-4";Blockly.BlockSvg.NOTCH_PATH_LEFT_HIGHLIGHT="l 6,4 3,0 6,-4";Blockly.BlockSvg.NOTCH_PATH_RIGHT="l -6,4 -3,0 -6,-4";
|
||||
Blockly.BlockSvg.JAGGED_TEETH="l 8,0 0,4 8,4 -16,8 8,4";Blockly.BlockSvg.JAGGED_TEETH_HEIGHT=20;Blockly.BlockSvg.JAGGED_TEETH_WIDTH=15;Blockly.BlockSvg.TAB_PATH_DOWN="v 5 c 0,10 -"+Blockly.BlockSvg.TAB_WIDTH+",-8 -"+Blockly.BlockSvg.TAB_WIDTH+",7.5 s "+Blockly.BlockSvg.TAB_WIDTH+",-2.5 "+Blockly.BlockSvg.TAB_WIDTH+",7.5";
|
||||
Blockly.BlockSvg.TAB_PATH_DOWN_HIGHLIGHT_RTL="v 6.5 m -"+.97*Blockly.BlockSvg.TAB_WIDTH+",3 q -"+.05*Blockly.BlockSvg.TAB_WIDTH+",10 "+.3*Blockly.BlockSvg.TAB_WIDTH+",9.5 m "+.67*Blockly.BlockSvg.TAB_WIDTH+",-1.9 v 1.4";Blockly.BlockSvg.TOP_LEFT_CORNER_START="m 0,"+Blockly.BlockSvg.CORNER_RADIUS;Blockly.BlockSvg.TOP_LEFT_CORNER_START_HIGHLIGHT_RTL="m "+Blockly.BlockSvg.DISTANCE_45_INSIDE+","+Blockly.BlockSvg.DISTANCE_45_INSIDE;
|
||||
@@ -1169,7 +1175,7 @@ Blockly.BlockSvg.TOP_LEFT_CORNER_START_HIGHLIGHT_LTR="m 0.5,"+(Blockly.BlockSvg.
|
||||
Blockly.BlockSvg.INNER_TOP_LEFT_CORNER=Blockly.BlockSvg.NOTCH_PATH_RIGHT+" h -"+(Blockly.BlockSvg.NOTCH_WIDTH-15-Blockly.BlockSvg.CORNER_RADIUS)+" a "+Blockly.BlockSvg.CORNER_RADIUS+","+Blockly.BlockSvg.CORNER_RADIUS+" 0 0,0 -"+Blockly.BlockSvg.CORNER_RADIUS+","+Blockly.BlockSvg.CORNER_RADIUS;Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER="a "+Blockly.BlockSvg.CORNER_RADIUS+","+Blockly.BlockSvg.CORNER_RADIUS+" 0 0,0 "+Blockly.BlockSvg.CORNER_RADIUS+","+Blockly.BlockSvg.CORNER_RADIUS;
|
||||
Blockly.BlockSvg.INNER_TOP_LEFT_CORNER_HIGHLIGHT_RTL="a "+Blockly.BlockSvg.CORNER_RADIUS+","+Blockly.BlockSvg.CORNER_RADIUS+" 0 0,0 "+(-Blockly.BlockSvg.DISTANCE_45_OUTSIDE-.5)+","+(Blockly.BlockSvg.CORNER_RADIUS-Blockly.BlockSvg.DISTANCE_45_OUTSIDE);Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_RTL="a "+(Blockly.BlockSvg.CORNER_RADIUS+.5)+","+(Blockly.BlockSvg.CORNER_RADIUS+.5)+" 0 0,0 "+(Blockly.BlockSvg.CORNER_RADIUS+.5)+","+(Blockly.BlockSvg.CORNER_RADIUS+.5);
|
||||
Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_LTR="a "+(Blockly.BlockSvg.CORNER_RADIUS+.5)+","+(Blockly.BlockSvg.CORNER_RADIUS+.5)+" 0 0,0 "+(Blockly.BlockSvg.CORNER_RADIUS-Blockly.BlockSvg.DISTANCE_45_OUTSIDE)+","+(Blockly.BlockSvg.DISTANCE_45_OUTSIDE+.5);
|
||||
Blockly.BlockSvg.prototype.render=function(a){Blockly.Field.startCache();this.rendered=!0;var b=Blockly.BlockSvg.SEP_SPACE_X;this.RTL&&(b=-b);for(var c=this.getIcons(),d=0;d<c.length;d++)b=c[d].renderIcon(b);b+=this.RTL?Blockly.BlockSvg.SEP_SPACE_X:-Blockly.BlockSvg.SEP_SPACE_X;c=this.renderCompute_(b);this.renderDraw_(b,c);!1!==a&&((a=this.getParent())?a.render(!0):Blockly.fireUiEvent(window,"resize"));Blockly.Field.stopCache()};
|
||||
Blockly.BlockSvg.prototype.render=function(a){Blockly.Field.startCache();this.rendered=!0;var b=Blockly.BlockSvg.SEP_SPACE_X;this.RTL&&(b=-b);for(var c=this.getIcons(),d=0;d<c.length;d++)b=c[d].renderIcon(b);b+=this.RTL?Blockly.BlockSvg.SEP_SPACE_X:-Blockly.BlockSvg.SEP_SPACE_X;c=this.renderCompute_(b);this.renderDraw_(b,c);!1!==a&&((a=this.getParent())?a.render(!0):Blockly.asyncSvgResize(this.workspace));Blockly.Field.stopCache()};
|
||||
Blockly.BlockSvg.prototype.renderFields_=function(a,b,c){c+=Blockly.BlockSvg.INLINE_PADDING_Y;this.RTL&&(b=-b);for(var d=0,e;e=a[d];d++){var f=e.getSvgRoot();f&&(this.RTL?(b-=e.renderSep+e.renderWidth,f.setAttribute("transform","translate("+b+","+c+")"),e.renderWidth&&(b-=Blockly.BlockSvg.SEP_SPACE_X)):(f.setAttribute("transform","translate("+(b+e.renderSep)+","+c+")"),e.renderWidth&&(b+=e.renderSep+e.renderWidth+Blockly.BlockSvg.SEP_SPACE_X)))}return this.RTL?-b:b};
|
||||
Blockly.BlockSvg.prototype.renderCompute_=function(a){var b=this.inputList,c=[];c.rightEdge=a+2*Blockly.BlockSvg.SEP_SPACE_X;if(this.previousConnection||this.nextConnection)c.rightEdge=Math.max(c.rightEdge,Blockly.BlockSvg.NOTCH_WIDTH+Blockly.BlockSvg.SEP_SPACE_X);for(var d=0,e=0,f=!1,g=!1,h=!1,k=void 0,l=this.getInputsInline()&&!this.isCollapsed(),q=0,m;m=b[q];q++)if(m.isVisible()){var p;l&&k&&k!=Blockly.NEXT_STATEMENT&&m.type!=Blockly.NEXT_STATEMENT?p=c[c.length-1]:(k=m.type,p=[],p.type=l&&m.type!=
|
||||
Blockly.NEXT_STATEMENT?Blockly.BlockSvg.INLINE:m.type,p.height=0,c.push(p));p.push(m);m.renderHeight=Blockly.BlockSvg.MIN_BLOCK_Y;m.renderWidth=l&&m.type==Blockly.INPUT_VALUE?Blockly.BlockSvg.TAB_WIDTH+1.25*Blockly.BlockSvg.SEP_SPACE_X:0;if(m.connection&&m.connection.isConnected()){var n=m.connection.targetBlock().getHeightWidth();m.renderHeight=Math.max(m.renderHeight,n.height);m.renderWidth=Math.max(m.renderWidth,n.width)}l||q!=b.length-1?!l&&m.type==Blockly.INPUT_VALUE&&b[q+1]&&b[q+1].type==Blockly.NEXT_STATEMENT&&
|
||||
@@ -1256,7 +1262,7 @@ Blockly.FieldDropdown.prototype.setText=function(a){this.sourceBlock_&&this.arro
|
||||
Blockly.FieldDropdown.prototype.dispose=function(){Blockly.WidgetDiv.hideIfOwner(this);Blockly.FieldDropdown.superClass_.dispose.call(this)};Blockly.FieldImage=function(a,b,c,d){this.sourceBlock_=null;this.height_=Number(c);this.width_=Number(b);this.size_=new goog.math.Size(this.width_,this.height_+2*Blockly.BlockSvg.INLINE_PADDING_Y);this.text_=d||"";this.setValue(a)};goog.inherits(Blockly.FieldImage,Blockly.Field);Blockly.FieldImage.prototype.rectElement_=null;Blockly.FieldImage.prototype.EDITABLE=!1;
|
||||
Blockly.FieldImage.prototype.init=function(){if(!this.fieldGroup_){this.fieldGroup_=Blockly.createSvgElement("g",{},null);this.visible_||(this.fieldGroup_.style.display="none");this.imageElement_=Blockly.createSvgElement("image",{height:this.height_+"px",width:this.width_+"px"},this.fieldGroup_);this.setValue(this.src_);goog.userAgent.GECKO&&(this.rectElement_=Blockly.createSvgElement("rect",{height:this.height_+"px",width:this.width_+"px","fill-opacity":0},this.fieldGroup_));this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_);
|
||||
var a=this.rectElement_||this.imageElement_;a.tooltip=this.sourceBlock_;Blockly.Tooltip.bindMouseEvents(a)}};Blockly.FieldImage.prototype.dispose=function(){goog.dom.removeNode(this.fieldGroup_);this.rectElement_=this.imageElement_=this.fieldGroup_=null};Blockly.FieldImage.prototype.setTooltip=function(a){(this.rectElement_||this.imageElement_).tooltip=a};Blockly.FieldImage.prototype.getValue=function(){return this.src_};
|
||||
Blockly.FieldImage.prototype.setValue=function(a){null!==a&&(this.src_=a,this.imageElement_&&this.imageElement_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",goog.isString(a)?a:""))};Blockly.FieldImage.prototype.setText=function(a){null!==a&&(this.text_=a)};Blockly.FieldImage.prototype.render_=function(){};Blockly.Variables={};Blockly.Variables.NAME_TYPE="VARIABLE";Blockly.Variables.allVariables=function(a){var b;if(a.getDescendants)b=a.getDescendants();else if(a.getAllBlocks)b=a.getAllBlocks();else throw"Not Block or Workspace: "+a;a=Object.create(null);for(var c=0;c<b.length;c++)for(var d=b[c].getVars(),e=0;e<d.length;e++){var f=d[e];f&&(a[f.toLowerCase()]=f)}b=[];for(var g in a)b.push(a[g]);return b};
|
||||
Blockly.FieldImage.prototype.setValue=function(a){null!==a&&(this.src_=a,this.imageElement_&&this.imageElement_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",goog.isString(a)?a:""))};Blockly.FieldImage.prototype.setText=function(a){null!==a&&(this.text_=a)};Blockly.FieldImage.prototype.render_=function(){};Blockly.FieldNumber=function(a,b){Blockly.FieldNumber.superClass_.constructor.call(this,a,b)};goog.inherits(Blockly.FieldNumber,Blockly.FieldTextInput);Blockly.Variables={};Blockly.Variables.NAME_TYPE="VARIABLE";Blockly.Variables.allVariables=function(a){var b;if(a.getDescendants)b=a.getDescendants();else if(a.getAllBlocks)b=a.getAllBlocks();else throw"Not Block or Workspace: "+a;a=Object.create(null);for(var c=0;c<b.length;c++)for(var d=b[c].getVars(),e=0;e<d.length;e++){var f=d[e];f&&(a[f.toLowerCase()]=f)}b=[];for(var g in a)b.push(a[g]);return b};
|
||||
Blockly.Variables.renameVariable=function(a,b,c){Blockly.Events.setGroup(!0);c=c.getAllBlocks();for(var d=0;d<c.length;d++)c[d].renameVar(a,b);Blockly.Events.setGroup(!1)};
|
||||
Blockly.Variables.flyoutCategory=function(a){a=Blockly.Variables.allVariables(a);a.sort(goog.string.caseInsensitiveCompare);goog.array.remove(a,Blockly.Msg.VARIABLES_DEFAULT_NAME);a.unshift(Blockly.Msg.VARIABLES_DEFAULT_NAME);for(var b=[],c=0;c<a.length;c++){if(Blockly.Blocks.variables_set){var d=goog.dom.createDom("block");d.setAttribute("type","variables_set");Blockly.Blocks.variables_get&&d.setAttribute("gap",8);var e=goog.dom.createDom("field",null,a[c]);e.setAttribute("name","VAR");d.appendChild(e);
|
||||
b.push(d)}Blockly.Blocks.variables_get&&(d=goog.dom.createDom("block"),d.setAttribute("type","variables_get"),Blockly.Blocks.variables_set&&d.setAttribute("gap",24),e=goog.dom.createDom("field",null,a[c]),e.setAttribute("name","VAR"),d.appendChild(e),b.push(d))}return b};
|
||||
@@ -1294,13 +1300,13 @@ Blockly.Flyout.prototype.setBackgroundPath_=function(a,b){var c=["M "+(this.RTL?
|
||||
Blockly.Flyout.prototype.scrollToStart=function(){this.scrollbar_.set(0)};Blockly.Flyout.prototype.wheel_=function(a){var b=a.deltaY;if(b){goog.userAgent.GECKO&&(b*=10);var c=this.getMetrics_(),b=c.viewTop+b,b=Math.min(b,c.contentHeight-c.viewHeight),b=Math.max(b,0);this.scrollbar_.set(b);a.preventDefault();a.stopPropagation()}};Blockly.Flyout.prototype.isVisible=function(){return this.svgGroup_&&"block"==this.svgGroup_.style.display};
|
||||
Blockly.Flyout.prototype.hide=function(){if(this.isVisible()){this.svgGroup_.style.display="none";for(var a=0,b;b=this.listeners_[a];a++)Blockly.unbindEvent_(b);this.listeners_.length=0;this.reflowWrapper_&&(this.workspace_.removeChangeListener(this.reflowWrapper_),this.reflowWrapper_=null)}};
|
||||
Blockly.Flyout.prototype.show=function(a){this.hide();this.clearOldBlocks_();a==Blockly.Variables.NAME_TYPE?a=Blockly.Variables.flyoutCategory(this.workspace_.targetWorkspace):a==Blockly.Procedures.NAME_TYPE&&(a=Blockly.Procedures.flyoutCategory(this.workspace_.targetWorkspace));var b=this.CORNER_RADIUS;this.svgGroup_.style.display="block";for(var c=[],d=[],e=this.permanentlyDisabled_.length=0,f;f=a[e];e++)if(f.tagName&&"BLOCK"==f.tagName.toUpperCase()){var g=Blockly.Xml.domToBlock(f,this.workspace_);
|
||||
g.disabled&&this.permanentlyDisabled_.push(g);c.push(g);f=parseInt(f.getAttribute("gap"),10);d.push(isNaN(f)?3*b:f)}this.layoutBlocks_(c,d,b);this.listeners_.push(Blockly.bindEvent_(this.svgBackground_,"mouseover",this,function(a){a=this.workspace_.getTopBlocks(!1);for(var b=0,c;c=a[b];b++)c.removeSelect()}));this.width_=0;this.reflow();this.filterForCapacity_();Blockly.fireUiEventNow(window,"resize");this.reflowWrapper_=this.reflow.bind(this);this.workspace_.addChangeListener(this.reflowWrapper_)};
|
||||
g.disabled&&this.permanentlyDisabled_.push(g);c.push(g);f=parseInt(f.getAttribute("gap"),10);d.push(isNaN(f)?3*b:f)}this.layoutBlocks_(c,d,b);this.listeners_.push(Blockly.bindEvent_(this.svgBackground_,"mouseover",this,function(a){a=this.workspace_.getTopBlocks(!1);for(var b=0,c;c=a[b];b++)c.removeSelect()}));this.width_=0;this.reflow();this.filterForCapacity_();Blockly.svgResize(this.workspace_);this.reflowWrapper_=this.reflow.bind(this);this.workspace_.addChangeListener(this.reflowWrapper_)};
|
||||
Blockly.Flyout.prototype.layoutBlocks_=function(a,b,c){for(var d=c,e=0,f;f=a[e];e++){for(var g=f.getDescendants(),h=0,k;k=g[h];h++)k.isInFlyout=!0;f.render();g=f.getSvgRoot();h=f.getHeightWidth();f.moveBy(this.RTL?0:c/this.workspace_.scale+Blockly.BlockSvg.TAB_WIDTH,d);d+=h.height+b[e];h=Blockly.createSvgElement("rect",{"fill-opacity":0},null);h.tooltip=f;Blockly.Tooltip.bindMouseEvents(h);this.workspace_.getCanvas().insertBefore(h,f.getSvgRoot());f.flyoutRect_=h;this.buttons_[e]=h;this.addBlockListeners_(g,
|
||||
f,h)}};Blockly.Flyout.prototype.clearOldBlocks_=function(){for(var a=this.workspace_.getTopBlocks(!1),b=0,c;c=a[b];b++)c.workspace==this.workspace_&&c.dispose(!1,!1);for(a=0;b=this.buttons_[a];a++)goog.dom.removeNode(b);this.buttons_.length=0};
|
||||
Blockly.Flyout.prototype.addBlockListeners_=function(a,b,c){this.autoClose?(this.listeners_.push(Blockly.bindEvent_(a,"mousedown",null,this.createBlockFunc_(b))),this.listeners_.push(Blockly.bindEvent_(c,"mousedown",null,this.createBlockFunc_(b)))):(this.listeners_.push(Blockly.bindEvent_(a,"mousedown",null,this.blockMouseDown_(b))),this.listeners_.push(Blockly.bindEvent_(c,"mousedown",null,this.blockMouseDown_(b))));this.listeners_.push(Blockly.bindEvent_(a,"mouseover",b,b.addSelect));this.listeners_.push(Blockly.bindEvent_(a,
|
||||
"mouseout",b,b.removeSelect));this.listeners_.push(Blockly.bindEvent_(c,"mouseover",b,b.addSelect));this.listeners_.push(Blockly.bindEvent_(c,"mouseout",b,b.removeSelect))};
|
||||
Blockly.Flyout.prototype.reflow=function(){this.workspace_.scale=this.targetWorkspace_.scale;for(var a=0,b=this.CORNER_RADIUS,c=this.workspace_.getTopBlocks(!1),d=0,e;e=c[d];d++){var f=e.getHeightWidth().width;e.outputConnection&&(f-=Blockly.BlockSvg.TAB_WIDTH);a=Math.max(a,f)}a+=Blockly.BlockSvg.TAB_WIDTH;a*=this.workspace_.scale;a+=1.5*b+Blockly.Scrollbar.scrollbarThickness;if(this.width_!=a){for(d=0;e=c[d];d++){f=e.getHeightWidth();if(this.RTL){var g=e.getRelativeToSurfaceXY().x,h=a-b,h=h/this.workspace_.scale,
|
||||
h=h-Blockly.BlockSvg.TAB_WIDTH;e.moveBy(h-g,0)}e.flyoutRect_&&(e.flyoutRect_.setAttribute("width",f.width),e.flyoutRect_.setAttribute("height",f.height),h=e.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0,g=e.getRelativeToSurfaceXY(),e.flyoutRect_.setAttribute("x",this.RTL?g.x-f.width+h:g.x-h),(f=e.startHat_?Blockly.BlockSvg.START_HAT_HEIGHT:0)&&e.moveBy(0,f),e.flyoutRect_.setAttribute("y",g.y))}this.width_=a;Blockly.fireUiEvent(window,"resize")}};
|
||||
h=h-Blockly.BlockSvg.TAB_WIDTH;e.moveBy(h-g,0)}e.flyoutRect_&&(e.flyoutRect_.setAttribute("width",f.width),e.flyoutRect_.setAttribute("height",f.height),h=e.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0,g=e.getRelativeToSurfaceXY(),e.flyoutRect_.setAttribute("x",this.RTL?g.x-f.width+h:g.x-h),(f=e.startHat_?Blockly.BlockSvg.START_HAT_HEIGHT:0)&&e.moveBy(0,f),e.flyoutRect_.setAttribute("y",g.y))}this.width_=a;Blockly.asyncSvgResize(this.workspace_)}};
|
||||
Blockly.Flyout.prototype.blockMouseDown_=function(a){var b=this;return function(c){Blockly.terminateDrag_();Blockly.hideChaff();Blockly.isRightButton(c)?a.showContextMenu_(c):(Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED),Blockly.Flyout.startDownEvent_=c,Blockly.Flyout.startBlock_=a,Blockly.Flyout.startFlyout_=b,Blockly.Flyout.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",this,b.onMouseUp_),Blockly.Flyout.onMouseMoveBlockWrapper_=Blockly.bindEvent_(document,"mousemove",this,b.onMouseMoveBlock_));
|
||||
c.stopPropagation()}};Blockly.Flyout.prototype.onMouseDown_=function(a){Blockly.isRightButton(a)||(Blockly.hideChaff(!0),Blockly.Flyout.terminateDrag_(),this.startDragMouseY_=a.clientY,Blockly.Flyout.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",this,this.onMouseMove_),Blockly.Flyout.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",this,Blockly.Flyout.terminateDrag_),a.preventDefault(),a.stopPropagation())};
|
||||
Blockly.Flyout.prototype.onMouseUp_=function(a){Blockly.dragMode_==Blockly.DRAG_FREE||Blockly.WidgetDiv.isVisible()||Blockly.Events.fire(new Blockly.Events.Ui(Blockly.Flyout.startBlock_,"click",void 0,void 0));Blockly.terminateDrag_()};Blockly.Flyout.prototype.onMouseMove_=function(a){var b=a.clientY-this.startDragMouseY_;this.startDragMouseY_=a.clientY;a=this.getMetrics_();b=a.viewTop-b;b=Math.min(b,a.contentHeight-a.viewHeight);b=Math.max(b,0);this.scrollbar_.set(b)};
|
||||
@@ -1316,35 +1322,35 @@ a.svgGroup_);this.flyout_.init(a);this.CONFIG_.cleardotPath=a.options.pathToMedi
|
||||
Blockly.Toolbox.prototype.dispose=function(){this.flyout_.dispose();this.tree_.dispose();goog.dom.removeNode(this.HtmlDiv);this.lastCategory_=this.workspace_=null};
|
||||
Blockly.Toolbox.prototype.position=function(){var a=this.HtmlDiv;if(a){var b=this.workspace_.getParentSvg(),c=goog.style.getPageOffset(b),b=Blockly.svgSize(b);a.style.left=this.workspace_.RTL?c.x+b.width-a.offsetWidth+"px":c.x+"px";a.style.height=b.height+"px";a.style.top=c.y+"px";this.width=a.offsetWidth;this.workspace_.RTL||--this.width;this.flyout_.position()}};
|
||||
Blockly.Toolbox.prototype.populate_=function(a){function b(a,f){for(var g=null,h=0,k;k=a.childNodes[h];h++)if(k.tagName)switch(k.tagName.toUpperCase()){case "CATEGORY":g=c.createNode(k.getAttribute("name"));g.blocks=[];f.add(g);var l=k.getAttribute("custom");l?g.blocks=l:b(k,g);l=k.getAttribute("colour");goog.isString(l)?(l.match(/^#[0-9a-fA-F]{6}$/)?g.hexColour=l:g.hexColour=Blockly.hueToRgb(l),d=!0):g.hexColour="";"true"==k.getAttribute("expanded")?(g.blocks.length&&c.setSelectedItem(g),g.setExpanded(!0)):
|
||||
g.setExpanded(!1);g=k;break;case "SEP":g&&("CATEGORY"==g.tagName.toUpperCase()?f.add(new Blockly.Toolbox.TreeSeparator):(k=parseFloat(k.getAttribute("gap")),isNaN(k)||(l=parseFloat(g.getAttribute("gap")),k=isNaN(l)?k:l+k,g.setAttribute("gap",k))));break;case "BLOCK":case "SHADOW":f.blocks.push(k),g=k}}var c=this.tree_;c.removeChildren();c.blocks=[];var d=!1;b(a,this.tree_);this.hasColours_=d;if(c.blocks.length)throw"Toolbox cannot have both blocks and categories in the root level.";Blockly.fireUiEvent(window,
|
||||
"resize")};Blockly.Toolbox.prototype.addColour_=function(a){a=(a||this.tree_).getChildren();for(var b=0,c;c=a[b];b++){var d=c.getRowElement();if(d){var e=this.hasColours_?"8px solid "+(c.hexColour||"#ddd"):"none";this.workspace_.RTL?d.style.borderRight=e:d.style.borderLeft=e}this.addColour_(c)}};Blockly.Toolbox.prototype.clearSelection=function(){this.tree_.setSelectedItem(null)};
|
||||
g.setExpanded(!1);g=k;break;case "SEP":g&&("CATEGORY"==g.tagName.toUpperCase()?f.add(new Blockly.Toolbox.TreeSeparator):(k=parseFloat(k.getAttribute("gap")),isNaN(k)||(l=parseFloat(g.getAttribute("gap")),k=isNaN(l)?k:l+k,g.setAttribute("gap",k))));break;case "BLOCK":case "SHADOW":f.blocks.push(k),g=k}}var c=this.tree_;c.removeChildren();c.blocks=[];var d=!1;b(a,this.tree_);this.hasColours_=d;if(c.blocks.length)throw"Toolbox cannot have both blocks and categories in the root level.";Blockly.asyncSvgResize(this.workspace_)};
|
||||
Blockly.Toolbox.prototype.addColour_=function(a){a=(a||this.tree_).getChildren();for(var b=0,c;c=a[b];b++){var d=c.getRowElement();if(d){var e=this.hasColours_?"8px solid "+(c.hexColour||"#ddd"):"none";this.workspace_.RTL?d.style.borderRight=e:d.style.borderLeft=e}this.addColour_(c)}};Blockly.Toolbox.prototype.clearSelection=function(){this.tree_.setSelectedItem(null)};
|
||||
Blockly.Toolbox.prototype.getClientRect=function(){var a=this.HtmlDiv.getBoundingClientRect();if(this.workspace_.RTL){var b=a.left+a.width+1E7;return new goog.math.Rect(a.left,-1E7,b,2E7)}b=1E7+a.width+a.left;return new goog.math.Rect(-1E7,-1E7,b,2E7)};Blockly.Toolbox.TreeControl=function(a,b){this.toolbox_=a;goog.ui.tree.TreeControl.call(this,goog.html.SafeHtml.EMPTY,b)};goog.inherits(Blockly.Toolbox.TreeControl,goog.ui.tree.TreeControl);
|
||||
Blockly.Toolbox.TreeControl.prototype.enterDocument=function(){Blockly.Toolbox.TreeControl.superClass_.enterDocument.call(this);if(goog.events.BrowserFeature.TOUCH_ENABLED){var a=this.getElement();Blockly.bindEvent_(a,goog.events.EventType.TOUCHSTART,this,this.handleTouchEvent_)}};Blockly.Toolbox.TreeControl.prototype.handleTouchEvent_=function(a){a.preventDefault();var b=this.getNodeFromEvent_(a);b&&a.type===goog.events.EventType.TOUCHSTART&&setTimeout(function(){b.onMouseDown(a)},1)};
|
||||
Blockly.Toolbox.TreeControl.prototype.createNode=function(a){return new Blockly.Toolbox.TreeNode(this.toolbox_,a?goog.html.SafeHtml.htmlEscape(a):goog.html.SafeHtml.EMPTY,this.getConfig(),this.getDomHelper())};
|
||||
Blockly.Toolbox.TreeControl.prototype.setSelectedItem=function(a){var b=this.toolbox_;if(a!=this.selectedItem_&&a!=b.tree_){b.lastCategory_&&(b.lastCategory_.getRowElement().style.backgroundColor="");if(a){var c=a.hexColour||"#57e";a.getRowElement().style.backgroundColor=c;b.addColour_(a)}c=this.getSelectedItem();goog.ui.tree.TreeControl.prototype.setSelectedItem.call(this,a);a&&a.blocks&&a.blocks.length?(b.flyout_.show(a.blocks),b.lastCategory_!=a&&b.flyout_.scrollToStart()):b.flyout_.hide();c!=
|
||||
a&&c!=this&&(c=new Blockly.Events.Ui(null,"category",c&&c.getHtml(),a&&a.getHtml()),c.workspaceId=b.workspace_.id,Blockly.Events.fire(c));a&&(b.lastCategory_=a)}};Blockly.Toolbox.TreeNode=function(a,b,c,d){goog.ui.tree.TreeNode.call(this,b,c,d);a&&(b=function(){Blockly.fireUiEvent(window,"resize")},goog.events.listen(a.tree_,goog.ui.tree.BaseNode.EventType.EXPAND,b),goog.events.listen(a.tree_,goog.ui.tree.BaseNode.EventType.COLLAPSE,b))};goog.inherits(Blockly.Toolbox.TreeNode,goog.ui.tree.TreeNode);
|
||||
a&&c!=this&&(c=new Blockly.Events.Ui(null,"category",c&&c.getHtml(),a&&a.getHtml()),c.workspaceId=b.workspace_.id,Blockly.Events.fire(c));a&&(b.lastCategory_=a)}};Blockly.Toolbox.TreeNode=function(a,b,c,d){goog.ui.tree.TreeNode.call(this,b,c,d);a&&(b=function(){Blockly.asyncSvgResize(a.workspace_)},goog.events.listen(a.tree_,goog.ui.tree.BaseNode.EventType.EXPAND,b),goog.events.listen(a.tree_,goog.ui.tree.BaseNode.EventType.COLLAPSE,b))};goog.inherits(Blockly.Toolbox.TreeNode,goog.ui.tree.TreeNode);
|
||||
Blockly.Toolbox.TreeNode.prototype.getExpandIconSafeHtml=function(){return goog.html.SafeHtml.create("span")};Blockly.Toolbox.TreeNode.prototype.onMouseDown=function(a){this.hasChildren()&&this.isUserCollapsible_?(this.toggle(),this.select()):this.isSelected()?this.getTree().setSelectedItem(null):this.select();this.updateRow()};Blockly.Toolbox.TreeNode.prototype.onDoubleClick_=function(a){};Blockly.Toolbox.TreeSeparator=function(){Blockly.Toolbox.TreeNode.call(this,null,"",Blockly.Toolbox.TreeSeparator.CONFIG_)};
|
||||
goog.inherits(Blockly.Toolbox.TreeSeparator,Blockly.Toolbox.TreeNode);Blockly.Toolbox.TreeSeparator.CONFIG_={cssTreeRow:"blocklyTreeSeparator"};Blockly.Css={};Blockly.Css.Cursor={OPEN:"handopen",CLOSED:"handclosed",DELETE:"handdelete"};Blockly.Css.currentCursor_="";Blockly.Css.styleSheet_=null;Blockly.Css.mediaPath_="";
|
||||
Blockly.Css.inject=function(a,b){if(!Blockly.Css.styleSheet_){var c=".blocklyDraggable {}\n";a&&(c+=Blockly.Css.CONTENT.join("\n"),Blockly.FieldDate&&(c+=Blockly.FieldDate.CSS.join("\n")));Blockly.Css.mediaPath_=b.replace(/[\\\/]$/,"");var c=c.replace(/<<<PATH>>>/g,Blockly.Css.mediaPath_),d=document.createElement("style");document.head.appendChild(d);c=document.createTextNode(c);d.appendChild(c);Blockly.Css.styleSheet_=d.sheet;Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)}};
|
||||
Blockly.Css.setCursor=function(a){if(Blockly.Css.currentCursor_!=a){Blockly.Css.currentCursor_=a;var b="url("+Blockly.Css.mediaPath_+"/"+a+".cur), auto",c=".blocklyDraggable {\n cursor: "+b+";\n}\n";Blockly.Css.styleSheet_.deleteRule(0);Blockly.Css.styleSheet_.insertRule(c,0);for(var c=document.getElementsByClassName("blocklyToolboxDiv"),d=0,e;e=c[d];d++)e.style.cursor=a==Blockly.Css.Cursor.DELETE?b:"";document.body.parentNode.style.cursor=a==Blockly.Css.Cursor.OPEN?"":b}};
|
||||
Blockly.Css.CONTENT=[".blocklySvg {","background-color: #fff;","outline: none;","overflow: hidden;","}",".blocklyWidgetDiv {","display: none;","position: absolute;","z-index: 999;","}",".blocklyNonSelectable {","user-select: none;","-moz-user-select: none;","-webkit-user-select: none;","-ms-user-select: none;","}",".blocklyTooltipDiv {","background-color: #ffffc7;","border: 1px solid #ddc;","box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);","color: #000;","display: none;","font-family: sans-serif;",
|
||||
"font-size: 9pt;","opacity: 0.9;","padding: 2px;","position: absolute;","z-index: 1000;","}",".blocklyResizeSE {","cursor: se-resize;","fill: #aaa;","}",".blocklyResizeSW {","cursor: sw-resize;","fill: #aaa;","}",".blocklyResizeLine {","stroke: #888;","stroke-width: 1;","}",".blocklyHighlightedConnectionPath {","fill: none;","stroke: #fc3;","stroke-width: 4px;","}",".blocklyPathLight {","fill: none;","stroke-linecap: round;","stroke-width: 1;","}",".blocklySelected>.blocklyPath {","stroke: #fc3;",
|
||||
"stroke-width: 3px;","}",".blocklySelected>.blocklyPathLight {","display: none;","}",".blocklyDragging>.blocklyPath,",".blocklyDragging>.blocklyPathLight {","fill-opacity: .8;","stroke-opacity: .8;","}",".blocklyDragging>.blocklyPathDark {","display: none;","}",".blocklyDisabled>.blocklyPath {","fill-opacity: .5;","stroke-opacity: .5;","}",".blocklyDisabled>.blocklyPathLight,",".blocklyDisabled>.blocklyPathDark {","display: none;","}",".blocklyText {","cursor: default;","fill: #fff;","font-family: sans-serif;",
|
||||
"font-size: 11pt;","}",".blocklyNonEditableText>text {","pointer-events: none;","}",".blocklyNonEditableText>rect,",".blocklyEditableText>rect {","fill: #fff;","fill-opacity: .6;","}",".blocklyNonEditableText>text,",".blocklyEditableText>text {","fill: #000;","}",".blocklyEditableText:hover>rect {","stroke: #fff;","stroke-width: 2;","}",".blocklyBubbleText {","fill: #000;","}",".blocklySvg text {","user-select: none;","-moz-user-select: none;","-webkit-user-select: none;","cursor: inherit;","}",".blocklyHidden {",
|
||||
"display: none;","}",".blocklyFieldDropdown:not(.blocklyHidden) {","display: block;","}",".blocklyIconGroup {","cursor: default;","}",".blocklyIconGroup:not(:hover),",".blocklyIconGroupReadonly {","opacity: .6;","}",".blocklyIconShape {","fill: #00f;","stroke: #fff;","stroke-width: 1px;","}",".blocklyIconSymbol {","fill: #fff;","}",".blocklyMinimalBody {","margin: 0;","padding: 0;","}",".blocklyCommentTextarea {","background-color: #ffc;","border: 0;","margin: 0;","padding: 2px;","resize: none;",
|
||||
"}",".blocklyHtmlInput {","border: none;","border-radius: 4px;","font-family: sans-serif;","height: 100%;","margin: 0;","outline: none;","padding: 0 1px;","width: 100%","}",".blocklyMainBackground {","stroke-width: 1;","stroke: #c6c6c6;","}",".blocklyMutatorBackground {","fill: #fff;","stroke: #ddd;","stroke-width: 1;","}",".blocklyFlyoutBackground {","fill: #ddd;","fill-opacity: .8;","}",".blocklyScrollbarBackground {","opacity: 0;","}",".blocklyScrollbarKnob {","fill: #ccc;","}",".blocklyScrollbarBackground:hover+.blocklyScrollbarKnob,",
|
||||
".blocklyScrollbarKnob:hover {","fill: #bbb;","}",".blocklyZoom>image {","opacity: .4;","}",".blocklyZoom>image:hover {","opacity: .6;","}",".blocklyZoom>image:active {","opacity: .8;","}",".blocklyFlyout .blocklyScrollbarKnob {","fill: #bbb;","}",".blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarKnob,",".blocklyFlyout .blocklyScrollbarKnob:hover {","fill: #aaa;","}",".blocklyInvalidInput {","background: #faa;","}",".blocklyAngleCircle {","stroke: #444;","stroke-width: 1;","fill: #ddd;",
|
||||
"fill-opacity: .8;","}",".blocklyAngleMarks {","stroke: #444;","stroke-width: 1;","}",".blocklyAngleGauge {","fill: #f88;","fill-opacity: .8;","}",".blocklyAngleLine {","stroke: #f00;","stroke-width: 2;","stroke-linecap: round;","}",".blocklyContextMenu {","border-radius: 4px;","}",".blocklyDropdownMenu {","padding: 0 !important;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {","background: url(<<<PATH>>>/sprites.png) no-repeat -48px -16px !important;",
|
||||
"}",".blocklyToolboxDiv {","background-color: #ddd;","overflow-x: visible;","overflow-y: auto;","position: absolute;","}",".blocklyTreeRoot {","padding: 4px 0;","}",".blocklyTreeRoot:focus {","outline: none;","}",".blocklyTreeRow {","height: 22px;","line-height: 22px;","margin-bottom: 3px;","padding-right: 8px;","white-space: nowrap;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {',"margin-left: 8px;","}",".blocklyTreeRow:not(.blocklyTreeSelected):hover {","background-color: #e4e4e4;","}",".blocklyTreeSeparator {",
|
||||
"border-bottom: solid #e5e5e5 1px;","height: 0px;","margin: 5px 0;","}",".blocklyTreeIcon {","background-image: url(<<<PATH>>>/sprites.png);","height: 16px;","vertical-align: middle;","width: 16px;","}",".blocklyTreeIconClosedLtr {","background-position: -32px -1px;","}",".blocklyTreeIconClosedRtl {","background-position: 0px -1px;","}",".blocklyTreeIconOpen {","background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedLtr {","background-position: -32px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedRtl {",
|
||||
"background-position: 0px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconOpen {","background-position: -16px -17px;","}",".blocklyTreeIconNone,",".blocklyTreeSelected>.blocklyTreeIconNone {","background-position: -48px -1px;","}",".blocklyTreeLabel {","cursor: default;","font-family: sans-serif;","font-size: 16px;","padding: 0 3px;","vertical-align: middle;","}",".blocklyTreeSelected .blocklyTreeLabel {","color: #fff;","}",".blocklyWidgetDiv .goog-palette {","outline: none;","cursor: default;",
|
||||
"}",".blocklyWidgetDiv .goog-palette-table {","border: 1px solid #666;","border-collapse: collapse;","}",".blocklyWidgetDiv .goog-palette-cell {","height: 13px;","width: 15px;","margin: 0;","border: 0;","text-align: center;","vertical-align: middle;","border-right: 1px solid #666;","font-size: 1px;","}",".blocklyWidgetDiv .goog-palette-colorswatch {","position: relative;","height: 13px;","width: 15px;","border: 1px solid #666;","}",".blocklyWidgetDiv .goog-palette-cell-hover .goog-palette-colorswatch {",
|
||||
"border: 1px solid #FFF;","}",".blocklyWidgetDiv .goog-palette-cell-selected .goog-palette-colorswatch {","border: 1px solid #000;","color: #fff;","}",".blocklyWidgetDiv .goog-menu {","background: #fff;","border-color: #ccc #666 #666 #ccc;","border-style: solid;","border-width: 1px;","cursor: default;","font: normal 13px Arial, sans-serif;","margin: 0;","outline: none;","padding: 4px 0;","position: absolute;","overflow-y: auto;","overflow-x: hidden;","max-height: 100%;","z-index: 20000;","}",".blocklyWidgetDiv .goog-menuitem {",
|
||||
"color: #000;","font: normal 13px Arial, sans-serif;","list-style: none;","margin: 0;","padding: 4px 7em 4px 28px;","white-space: nowrap;","}",".blocklyWidgetDiv .goog-menuitem.goog-menuitem-rtl {","padding-left: 7em;","padding-right: 28px;","}",".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem {","padding-left: 12px;","}",".blocklyWidgetDiv .goog-menu-noaccel .goog-menuitem {","padding-right: 20px;","}",".blocklyWidgetDiv .goog-menuitem-content {",
|
||||
"color: #000;","font: normal 13px Arial, sans-serif;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content {","color: #ccc !important;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon {","opacity: 0.3;","-moz-opacity: 0.3;","filter: alpha(opacity=30);","}",".blocklyWidgetDiv .goog-menuitem-highlight,",".blocklyWidgetDiv .goog-menuitem-hover {","background-color: #d6e9f8;","border-color: #d6e9f8;",
|
||||
"border-style: dotted;","border-width: 1px 0;","padding-bottom: 3px;","padding-top: 3px;","}",".blocklyWidgetDiv .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-icon {","background-repeat: no-repeat;","height: 16px;","left: 6px;","position: absolute;","right: auto;","vertical-align: middle;","width: 16px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon {","left: auto;","right: 6px;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",
|
||||
".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {","background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -512px 0;","}",".blocklyWidgetDiv .goog-menuitem-accel {","color: #999;","direction: ltr;","left: auto;","padding: 0 6px;","position: absolute;","right: 0;","text-align: right;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel {","left: 0;","right: auto;","text-align: left;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-hint {","text-decoration: underline;",
|
||||
"}",".blocklyWidgetDiv .goog-menuitem-mnemonic-separator {","color: #999;","font-size: 12px;","padding-left: 4px;","}",".blocklyWidgetDiv .goog-menuseparator {","border-top: 1px solid #ccc;","margin: 4px 0;","padding: 0;","}",""];Blockly.WidgetDiv={};Blockly.WidgetDiv.DIV=null;Blockly.WidgetDiv.owner_=null;Blockly.WidgetDiv.dispose_=null;Blockly.WidgetDiv.createDom=function(){Blockly.WidgetDiv.DIV||(Blockly.WidgetDiv.DIV=goog.dom.createDom("div","blocklyWidgetDiv"),document.body.appendChild(Blockly.WidgetDiv.DIV))};
|
||||
Blockly.Css.CONTENT=[".blocklySvg {","background-color: #fff;","outline: none;","overflow: hidden;","}",".blocklyWidgetDiv {","display: none;","position: absolute;","z-index: 999;","}",".blocklyTooltipDiv {","background-color: #ffffc7;","border: 1px solid #ddc;","box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);","color: #000;","display: none;","font-family: sans-serif;","font-size: 9pt;","opacity: 0.9;","padding: 2px;","position: absolute;","z-index: 1000;","}",".blocklyResizeSE {","cursor: se-resize;",
|
||||
"fill: #aaa;","}",".blocklyResizeSW {","cursor: sw-resize;","fill: #aaa;","}",".blocklyResizeLine {","stroke: #888;","stroke-width: 1;","}",".blocklyHighlightedConnectionPath {","fill: none;","stroke: #fc3;","stroke-width: 4px;","}",".blocklyPathLight {","fill: none;","stroke-linecap: round;","stroke-width: 1;","}",".blocklySelected>.blocklyPath {","stroke: #fc3;","stroke-width: 3px;","}",".blocklySelected>.blocklyPathLight {","display: none;","}",".blocklyDragging>.blocklyPath,",".blocklyDragging>.blocklyPathLight {",
|
||||
"fill-opacity: .8;","stroke-opacity: .8;","}",".blocklyDragging>.blocklyPathDark {","display: none;","}",".blocklyDisabled>.blocklyPath {","fill-opacity: .5;","stroke-opacity: .5;","}",".blocklyDisabled>.blocklyPathLight,",".blocklyDisabled>.blocklyPathDark {","display: none;","}",".blocklyText {","cursor: default;","fill: #fff;","font-family: sans-serif;","font-size: 11pt;","}",".blocklyNonEditableText>text {","pointer-events: none;","}",".blocklyNonEditableText>rect,",".blocklyEditableText>rect {",
|
||||
"fill: #fff;","fill-opacity: .6;","}",".blocklyNonEditableText>text,",".blocklyEditableText>text {","fill: #000;","}",".blocklyEditableText:hover>rect {","stroke: #fff;","stroke-width: 2;","}",".blocklyBubbleText {","fill: #000;","}",".blocklySvg text {","user-select: none;","-moz-user-select: none;","-webkit-user-select: none;","cursor: inherit;","}",".blocklyHidden {","display: none;","}",".blocklyFieldDropdown:not(.blocklyHidden) {","display: block;","}",".blocklyIconGroup {","cursor: default;",
|
||||
"}",".blocklyIconGroup:not(:hover),",".blocklyIconGroupReadonly {","opacity: .6;","}",".blocklyIconShape {","fill: #00f;","stroke: #fff;","stroke-width: 1px;","}",".blocklyIconSymbol {","fill: #fff;","}",".blocklyMinimalBody {","margin: 0;","padding: 0;","}",".blocklyCommentTextarea {","background-color: #ffc;","border: 0;","margin: 0;","padding: 2px;","resize: none;","}",".blocklyHtmlInput {","border: none;","border-radius: 4px;","font-family: sans-serif;","height: 100%;","margin: 0;","outline: none;",
|
||||
"padding: 0 1px;","width: 100%","}",".blocklyMainBackground {","stroke-width: 1;","stroke: #c6c6c6;","}",".blocklyMutatorBackground {","fill: #fff;","stroke: #ddd;","stroke-width: 1;","}",".blocklyFlyoutBackground {","fill: #ddd;","fill-opacity: .8;","}",".blocklyScrollbarBackground {","opacity: 0;","}",".blocklyScrollbarKnob {","fill: #ccc;","}",".blocklyScrollbarBackground:hover+.blocklyScrollbarKnob,",".blocklyScrollbarKnob:hover {","fill: #bbb;","}",".blocklyZoom>image {","opacity: .4;","}",".blocklyZoom>image:hover {",
|
||||
"opacity: .6;","}",".blocklyZoom>image:active {","opacity: .8;","}",".blocklyFlyout .blocklyScrollbarKnob {","fill: #bbb;","}",".blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarKnob,",".blocklyFlyout .blocklyScrollbarKnob:hover {","fill: #aaa;","}",".blocklyInvalidInput {","background: #faa;","}",".blocklyAngleCircle {","stroke: #444;","stroke-width: 1;","fill: #ddd;","fill-opacity: .8;","}",".blocklyAngleMarks {","stroke: #444;","stroke-width: 1;","}",".blocklyAngleGauge {","fill: #f88;",
|
||||
"fill-opacity: .8;","}",".blocklyAngleLine {","stroke: #f00;","stroke-width: 2;","stroke-linecap: round;","}",".blocklyContextMenu {","border-radius: 4px;","}",".blocklyDropdownMenu {","padding: 0 !important;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {","background: url(<<<PATH>>>/sprites.png) no-repeat -48px -16px !important;","}",".blocklyToolboxDiv {","background-color: #ddd;","overflow-x: visible;","overflow-y: auto;",
|
||||
"position: absolute;","}",".blocklyTreeRoot {","padding: 4px 0;","}",".blocklyTreeRoot:focus {","outline: none;","}",".blocklyTreeRow {","height: 22px;","line-height: 22px;","margin-bottom: 3px;","padding-right: 8px;","white-space: nowrap;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {',"margin-left: 8px;","}",".blocklyTreeRow:not(.blocklyTreeSelected):hover {","background-color: #e4e4e4;","}",".blocklyTreeSeparator {","border-bottom: solid #e5e5e5 1px;","height: 0px;","margin: 5px 0;","}",
|
||||
".blocklyTreeIcon {","background-image: url(<<<PATH>>>/sprites.png);","height: 16px;","vertical-align: middle;","width: 16px;","}",".blocklyTreeIconClosedLtr {","background-position: -32px -1px;","}",".blocklyTreeIconClosedRtl {","background-position: 0px -1px;","}",".blocklyTreeIconOpen {","background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedLtr {","background-position: -32px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedRtl {","background-position: 0px -17px;",
|
||||
"}",".blocklyTreeSelected>.blocklyTreeIconOpen {","background-position: -16px -17px;","}",".blocklyTreeIconNone,",".blocklyTreeSelected>.blocklyTreeIconNone {","background-position: -48px -1px;","}",".blocklyTreeLabel {","cursor: default;","font-family: sans-serif;","font-size: 16px;","padding: 0 3px;","vertical-align: middle;","}",".blocklyTreeSelected .blocklyTreeLabel {","color: #fff;","}",".blocklyWidgetDiv .goog-palette {","outline: none;","cursor: default;","}",".blocklyWidgetDiv .goog-palette-table {",
|
||||
"border: 1px solid #666;","border-collapse: collapse;","}",".blocklyWidgetDiv .goog-palette-cell {","height: 13px;","width: 15px;","margin: 0;","border: 0;","text-align: center;","vertical-align: middle;","border-right: 1px solid #666;","font-size: 1px;","}",".blocklyWidgetDiv .goog-palette-colorswatch {","position: relative;","height: 13px;","width: 15px;","border: 1px solid #666;","}",".blocklyWidgetDiv .goog-palette-cell-hover .goog-palette-colorswatch {","border: 1px solid #FFF;","}",".blocklyWidgetDiv .goog-palette-cell-selected .goog-palette-colorswatch {",
|
||||
"border: 1px solid #000;","color: #fff;","}",".blocklyWidgetDiv .goog-menu {","background: #fff;","border-color: #ccc #666 #666 #ccc;","border-style: solid;","border-width: 1px;","cursor: default;","font: normal 13px Arial, sans-serif;","margin: 0;","outline: none;","padding: 4px 0;","position: absolute;","overflow-y: auto;","overflow-x: hidden;","max-height: 100%;","z-index: 20000;","}",".blocklyWidgetDiv .goog-menuitem {","color: #000;","font: normal 13px Arial, sans-serif;","list-style: none;",
|
||||
"margin: 0;","padding: 4px 7em 4px 28px;","white-space: nowrap;","}",".blocklyWidgetDiv .goog-menuitem.goog-menuitem-rtl {","padding-left: 7em;","padding-right: 28px;","}",".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem {","padding-left: 12px;","}",".blocklyWidgetDiv .goog-menu-noaccel .goog-menuitem {","padding-right: 20px;","}",".blocklyWidgetDiv .goog-menuitem-content {","color: #000;","font: normal 13px Arial, sans-serif;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,",
|
||||
".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content {","color: #ccc !important;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon {","opacity: 0.3;","-moz-opacity: 0.3;","filter: alpha(opacity=30);","}",".blocklyWidgetDiv .goog-menuitem-highlight,",".blocklyWidgetDiv .goog-menuitem-hover {","background-color: #d6e9f8;","border-color: #d6e9f8;","border-style: dotted;","border-width: 1px 0;","padding-bottom: 3px;","padding-top: 3px;","}",".blocklyWidgetDiv .goog-menuitem-checkbox,",
|
||||
".blocklyWidgetDiv .goog-menuitem-icon {","background-repeat: no-repeat;","height: 16px;","left: 6px;","position: absolute;","right: auto;","vertical-align: middle;","width: 16px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon {","left: auto;","right: 6px;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {","background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -512px 0;",
|
||||
"}",".blocklyWidgetDiv .goog-menuitem-accel {","color: #999;","direction: ltr;","left: auto;","padding: 0 6px;","position: absolute;","right: 0;","text-align: right;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel {","left: 0;","right: auto;","text-align: left;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-hint {","text-decoration: underline;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-separator {","color: #999;","font-size: 12px;","padding-left: 4px;","}",".blocklyWidgetDiv .goog-menuseparator {",
|
||||
"border-top: 1px solid #ccc;","margin: 4px 0;","padding: 0;","}",""];Blockly.WidgetDiv={};Blockly.WidgetDiv.DIV=null;Blockly.WidgetDiv.owner_=null;Blockly.WidgetDiv.dispose_=null;Blockly.WidgetDiv.createDom=function(){Blockly.WidgetDiv.DIV||(Blockly.WidgetDiv.DIV=goog.dom.createDom("div","blocklyWidgetDiv"),document.body.appendChild(Blockly.WidgetDiv.DIV))};
|
||||
Blockly.WidgetDiv.show=function(a,b,c){Blockly.WidgetDiv.hide();Blockly.WidgetDiv.owner_=a;Blockly.WidgetDiv.dispose_=c;a=goog.style.getViewportPageOffset(document);Blockly.WidgetDiv.DIV.style.top=a.y+"px";Blockly.WidgetDiv.DIV.style.direction=b?"rtl":"ltr";Blockly.WidgetDiv.DIV.style.display="block"};
|
||||
Blockly.WidgetDiv.hide=function(){Blockly.WidgetDiv.owner_&&(Blockly.WidgetDiv.owner_=null,Blockly.WidgetDiv.DIV.style.display="none",Blockly.WidgetDiv.DIV.style.left="",Blockly.WidgetDiv.DIV.style.top="",Blockly.WidgetDiv.DIV.style.height="",Blockly.WidgetDiv.dispose_&&Blockly.WidgetDiv.dispose_(),Blockly.WidgetDiv.dispose_=null,goog.dom.removeChildren(Blockly.WidgetDiv.DIV))};Blockly.WidgetDiv.isVisible=function(){return!!Blockly.WidgetDiv.owner_};
|
||||
Blockly.WidgetDiv.hideIfOwner=function(a){Blockly.WidgetDiv.owner_==a&&Blockly.WidgetDiv.hide()};Blockly.WidgetDiv.position=function(a,b,c,d,e){b<d.y&&(b=d.y);e?a>c.width+d.x&&(a=c.width+d.x):a<d.x&&(a=d.x);Blockly.WidgetDiv.DIV.style.left=a+"px";Blockly.WidgetDiv.DIV.style.top=b+"px";Blockly.WidgetDiv.DIV.style.height=c.height-b+d.y+"px"};Blockly.constants={};Blockly.DRAG_RADIUS=5;Blockly.SNAP_RADIUS=20;Blockly.BUMP_DELAY=250;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750;Blockly.HSV_SATURATION=.45;Blockly.HSV_VALUE=.65;Blockly.SPRITE={width:96,height:124,url:"sprites.png"};Blockly.SVG_NS="http://www.w3.org/2000/svg";Blockly.HTML_NS="http://www.w3.org/1999/xhtml";Blockly.INPUT_VALUE=1;Blockly.OUTPUT_VALUE=2;Blockly.NEXT_STATEMENT=3;Blockly.PREVIOUS_STATEMENT=4;Blockly.DUMMY_INPUT=5;Blockly.ALIGN_LEFT=-1;Blockly.ALIGN_CENTRE=0;
|
||||
@@ -1354,29 +1360,28 @@ Blockly.createDom_=function(a,b){a.setAttribute("dir","LTR");goog.ui.Component.s
|
||||
k4:0},f);b.embossFilterId=f.id;f=Blockly.createSvgElement("pattern",{id:"blocklyDisabledPattern"+e,patternUnits:"userSpaceOnUse",width:10,height:10},d);Blockly.createSvgElement("rect",{width:10,height:10,fill:"#aaa"},f);Blockly.createSvgElement("path",{d:"M 0 0 L 10 10 M 10 0 L 0 10",stroke:"#cc0"},f);b.disabledPatternId=f.id;d=Blockly.createSvgElement("pattern",{id:"blocklyGridPattern"+e,patternUnits:"userSpaceOnUse"},d);0<b.gridOptions.length&&0<b.gridOptions.spacing&&(Blockly.createSvgElement("line",
|
||||
{stroke:b.gridOptions.colour},d),1<b.gridOptions.length&&Blockly.createSvgElement("line",{stroke:b.gridOptions.colour},d));b.gridPattern=d;return c};
|
||||
Blockly.createMainWorkspace_=function(a,b){b.parentWorkspace=null;b.getMetrics=Blockly.getMainWorkspaceMetrics_;b.setMetrics=Blockly.setMainWorkspaceMetrics_;var c=new Blockly.WorkspaceSvg(b);c.scale=b.zoomOptions.startScale;a.appendChild(c.createDom("blocklyMainBackground"));c.translate(0,0);c.markFocused();b.readOnly||b.hasScrollbars||c.addChangeListener(function(){if(Blockly.dragMode_==Blockly.DRAG_NONE){var a=c.getMetrics(),e=a.viewLeft+a.absoluteLeft,f=a.viewTop+a.absoluteTop;if(a.contentTop<
|
||||
f||a.contentTop+a.contentHeight>a.viewHeight+f||a.contentLeft<(b.RTL?a.viewLeft:e)||a.contentLeft+a.contentWidth>(b.RTL?a.viewWidth:a.viewWidth+e))for(var g=c.getTopBlocks(!1),h=0,k;k=g[h];h++){var l=k.getRelativeToSurfaceXY(),q=k.getHeightWidth(),m=f+25-q.height-l.y;0<m&&k.moveBy(0,m);m=f+a.viewHeight-25-l.y;0>m&&k.moveBy(0,m);m=25+e-l.x-(b.RTL?0:q.width);0<m&&k.moveBy(m,0);m=e+a.viewWidth-25-l.x+(b.RTL?q.width:0);0>m&&k.moveBy(m,0)}}});Blockly.svgResize(c);Blockly.WidgetDiv.createDom();Blockly.Tooltip.createDom();
|
||||
f||a.contentTop+a.contentHeight>a.viewHeight+f||a.contentLeft<(b.RTL?a.viewLeft:e)||a.contentLeft+a.contentWidth>(b.RTL?a.viewWidth:a.viewWidth+e))for(var g=c.getTopBlocks(!1),h=0,k;k=g[h];h++){var l=k.getRelativeToSurfaceXY(),q=k.getHeightWidth(),m=f+25-q.height-l.y;0<m&&k.moveBy(0,m);m=f+a.viewHeight-25-l.y;0>m&&k.moveBy(0,m);m=25+e-l.x-(b.RTL?0:q.width);0<m&&k.moveBy(m,0);l=e+a.viewWidth-25-l.x+(b.RTL?q.width:0);0>l&&k.moveBy(l,0)}}});Blockly.svgResize(c);Blockly.WidgetDiv.createDom();Blockly.Tooltip.createDom();
|
||||
return c};
|
||||
Blockly.init_=function(a){var b=a.options,c=a.getParentSvg();Blockly.bindEvent_(c,"contextmenu",null,function(a){Blockly.isTargetInput_(a)||a.preventDefault()});Blockly.bindEvent_(window,"resize",null,function(){Blockly.svgResize(a)});Blockly.inject.bindDocumentEvents_();b.languageTree&&(a.toolbox_?a.toolbox_.init(a):a.flyout_&&(a.flyout_.init(a),a.flyout_.show(b.languageTree.childNodes),a.scrollX=a.flyout_.width_,b.RTL&&(a.scrollX*=-1),a.translate(a.scrollX,0)));b.hasScrollbars&&(a.scrollbar=new Blockly.ScrollbarPair(a),
|
||||
a.scrollbar.resize());b.hasSounds&&Blockly.inject.loadSounds_(b.pathToMedia,a)};
|
||||
Blockly.inject.bindDocumentEvents_=function(){Blockly.documentEventsBound_||(Blockly.bindEvent_(document,"keydown",null,Blockly.onKeyDown_),Blockly.bindEvent_(document,"touchend",null,Blockly.longStop_),Blockly.bindEvent_(document,"touchcancel",null,Blockly.longStop_),document.addEventListener("mouseup",Blockly.onMouseUp_,!1),goog.userAgent.IPAD&&Blockly.bindEvent_(window,"orientationchange",document,function(){Blockly.fireUiEvent(window,"resize")}));Blockly.documentEventsBound_=!0};
|
||||
Blockly.init_=function(a){var b=a.options,c=a.getParentSvg();Blockly.bindEvent_(c,"contextmenu",null,function(a){Blockly.isTargetInput_(a)||a.preventDefault()});Blockly.bindEvent_(window,"resize",null,function(){Blockly.hideChaff(!0);Blockly.asyncSvgResize(a)});Blockly.inject.bindDocumentEvents_();b.languageTree&&(a.toolbox_?a.toolbox_.init(a):a.flyout_&&(a.flyout_.init(a),a.flyout_.show(b.languageTree.childNodes),a.scrollX=a.flyout_.width_,b.RTL&&(a.scrollX*=-1),a.translate(a.scrollX,0)));b.hasScrollbars&&
|
||||
(a.scrollbar=new Blockly.ScrollbarPair(a),a.scrollbar.resize());b.hasSounds&&Blockly.inject.loadSounds_(b.pathToMedia,a)};
|
||||
Blockly.inject.bindDocumentEvents_=function(){Blockly.documentEventsBound_||(Blockly.bindEvent_(document,"keydown",null,Blockly.onKeyDown_),Blockly.bindEvent_(document,"touchend",null,Blockly.longStop_),Blockly.bindEvent_(document,"touchcancel",null,Blockly.longStop_),document.addEventListener("mouseup",Blockly.onMouseUp_,!1),goog.userAgent.IPAD&&Blockly.bindEvent_(window,"orientationchange",document,function(){Blockly.asyncSvgResize()}));Blockly.documentEventsBound_=!0};
|
||||
Blockly.inject.loadSounds_=function(a,b){b.loadAudio_([a+"click.mp3",a+"click.wav",a+"click.ogg"],"click");b.loadAudio_([a+"disconnect.wav",a+"disconnect.mp3",a+"disconnect.ogg"],"disconnect");b.loadAudio_([a+"delete.mp3",a+"delete.ogg",a+"delete.wav"],"delete");var c=[],d=function(){for(;c.length;)Blockly.unbindEvent_(c.pop());b.preloadAudio_()};c.push(Blockly.bindEvent_(document,"mousemove",null,d));c.push(Blockly.bindEvent_(document,"touchstart",null,d))};
|
||||
Blockly.updateToolbox=function(a){console.warn("Deprecated call to Blockly.updateToolbox, use workspace.updateToolbox instead.");Blockly.getMainWorkspace().updateToolbox(a)};Blockly.utils={};Blockly.addClass_=function(a,b){var c=a.getAttribute("class")||"";-1==(" "+c+" ").indexOf(" "+b+" ")&&(c&&(c+=" "),a.setAttribute("class",c+b))};Blockly.removeClass_=function(a,b){var c=a.getAttribute("class");if(-1!=(" "+c+" ").indexOf(" "+b+" ")){for(var c=c.split(/\s+/),d=0;d<c.length;d++)c[d]&&c[d]!=b||(c.splice(d,1),d--);c.length?a.setAttribute("class",c.join(" ")):a.removeAttribute("class")}};
|
||||
Blockly.hasClass_=function(a,b){return-1!=(" "+a.getAttribute("class")+" ").indexOf(" "+b+" ")};Blockly.bindEvent_=function(a,b,c,d){var e=c?function(a){d.call(c,a)}:d;a.addEventListener(b,e,!1);var f=[[a,b,e]];if(b in Blockly.bindEvent_.TOUCH_MAP)for(var e=function(a){if(1==a.changedTouches.length){var b=a.changedTouches[0];a.clientX=b.clientX;a.clientY=b.clientY}d.call(c,a);a.preventDefault()},g=0,h;h=Blockly.bindEvent_.TOUCH_MAP[b][g];g++)a.addEventListener(h,e,!1),f.push([a,h,e]);return f};
|
||||
Blockly.bindEvent_.TOUCH_MAP={};goog.events.BrowserFeature.TOUCH_ENABLED&&(Blockly.bindEvent_.TOUCH_MAP={mousedown:["touchstart"],mousemove:["touchmove"],mouseup:["touchend","touchcancel"]});Blockly.unbindEvent_=function(a){for(;a.length;){var b=a.pop(),c=b[2];b[0].removeEventListener(b[1],c,!1)}return c};
|
||||
Blockly.fireUiEventNow=function(a,b){var c=Blockly.fireUiEvent.DB_[b];if(c){var d=c.indexOf(a);-1!=d&&c.splice(d,1)}"function"==typeof UIEvent?c=new UIEvent(b,{}):(c=document.createEvent("UIEvent"),c.initUIEvent(b,!1,!1,window,0));a.dispatchEvent(c)};Blockly.fireUiEvent=function(a,b){var c=Blockly.fireUiEvent.DB_[b];if(c){if(-1!=c.indexOf(a))return;c.push(a)}else Blockly.fireUiEvent.DB_[b]=[a];setTimeout(function(){Blockly.fireUiEventNow(a,b)},0)};Blockly.fireUiEvent.DB_={};
|
||||
Blockly.noEvent=function(a){a.preventDefault();a.stopPropagation()};Blockly.isTargetInput_=function(a){return"textarea"==a.target.type||"text"==a.target.type||"number"==a.target.type||"email"==a.target.type||"password"==a.target.type||"search"==a.target.type||"tel"==a.target.type||"url"==a.target.type||a.target.isContentEditable};
|
||||
Blockly.bindEvent_.TOUCH_MAP={};goog.events.BrowserFeature.TOUCH_ENABLED&&(Blockly.bindEvent_.TOUCH_MAP={mousedown:["touchstart"],mousemove:["touchmove"],mouseup:["touchend","touchcancel"]});Blockly.unbindEvent_=function(a){for(;a.length;){var b=a.pop(),c=b[2];b[0].removeEventListener(b[1],c,!1)}return c};Blockly.noEvent=function(a){a.preventDefault();a.stopPropagation()};
|
||||
Blockly.isTargetInput_=function(a){return"textarea"==a.target.type||"text"==a.target.type||"number"==a.target.type||"email"==a.target.type||"password"==a.target.type||"search"==a.target.type||"tel"==a.target.type||"url"==a.target.type||a.target.isContentEditable};
|
||||
Blockly.getRelativeXY_=function(a){var b=new goog.math.Coordinate(0,0),c=a.getAttribute("x");c&&(b.x=parseInt(c,10));if(c=a.getAttribute("y"))b.y=parseInt(c,10);if(a=(a=a.getAttribute("transform"))&&a.match(Blockly.getRelativeXY_.XY_REGEXP_))b.x+=parseFloat(a[1]),a[3]&&(b.y+=parseFloat(a[3]));return b};Blockly.getRelativeXY_.XY_REGEXP_=/translate\(\s*([-+\d.e]+)([ ,]\s*([-+\d.e]+)\s*\))?/;
|
||||
Blockly.getSvgXY_=function(a,b){var c=0,d=0,e=1;if(goog.dom.contains(b.getCanvas(),a)||goog.dom.contains(b.getBubbleCanvas(),a))e=b.scale;do{var f=Blockly.getRelativeXY_(a);if(a==b.getCanvas()||a==b.getBubbleCanvas())e=1;c+=f.x*e;d+=f.y*e;a=a.parentNode}while(a&&a!=b.getParentSvg());return new goog.math.Coordinate(c,d)};
|
||||
Blockly.createSvgElement=function(a,b,c,d){a=document.createElementNS(Blockly.SVG_NS,a);for(var e in b)a.setAttribute(e,b[e]);document.body.runtimeStyle&&(a.runtimeStyle=a.currentStyle=a.style);c&&c.appendChild(a);return a};Blockly.setPageSelectable=function(a){a?Blockly.removeClass_(document.body,"blocklyNonSelectable"):Blockly.addClass_(document.body,"blocklyNonSelectable")};Blockly.isRightButton=function(a){return a.ctrlKey&&goog.userAgent.MAC?!0:2==a.button};
|
||||
Blockly.mouseToSvg=function(a,b){var c=b.createSVGPoint();c.x=a.clientX;c.y=a.clientY;var d=b.getScreenCTM(),d=d.inverse();return c.matrixTransform(d)};Blockly.shortestStringLength=function(a){if(!a.length)return 0;for(var b=a[0].length,c=1;c<a.length;c++)b=Math.min(b,a[c].length);return b};
|
||||
Blockly.commonWordPrefix=function(a,b){if(!a.length)return 0;if(1==a.length)return a[0].length;for(var c=0,d=b||Blockly.shortestStringLength(a),e=0;e<d;e++){for(var f=a[0][e],g=1;g<a.length;g++)if(f!=a[g][e])return c;" "==f&&(c=e+1)}for(g=1;g<a.length;g++)if((f=a[g][e])&&" "!=f)return c;return d};
|
||||
Blockly.createSvgElement=function(a,b,c,d){a=document.createElementNS(Blockly.SVG_NS,a);for(var e in b)a.setAttribute(e,b[e]);document.body.runtimeStyle&&(a.runtimeStyle=a.currentStyle=a.style);c&&c.appendChild(a);return a};Blockly.isRightButton=function(a){return a.ctrlKey&&goog.userAgent.MAC?!0:2==a.button};Blockly.mouseToSvg=function(a,b){var c=b.createSVGPoint();c.x=a.clientX;c.y=a.clientY;var d=b.getScreenCTM(),d=d.inverse();return c.matrixTransform(d)};
|
||||
Blockly.shortestStringLength=function(a){if(!a.length)return 0;for(var b=a[0].length,c=1;c<a.length;c++)b=Math.min(b,a[c].length);return b};Blockly.commonWordPrefix=function(a,b){if(!a.length)return 0;if(1==a.length)return a[0].length;for(var c=0,d=b||Blockly.shortestStringLength(a),e=0;e<d;e++){for(var f=a[0][e],g=1;g<a.length;g++)if(f!=a[g][e])return c;" "==f&&(c=e+1)}for(g=1;g<a.length;g++)if((f=a[g][e])&&" "!=f)return c;return d};
|
||||
Blockly.commonWordSuffix=function(a,b){if(!a.length)return 0;if(1==a.length)return a[0].length;for(var c=0,d=b||Blockly.shortestStringLength(a),e=0;e<d;e++){for(var f=a[0].substr(-e-1,1),g=1;g<a.length;g++)if(f!=a[g].substr(-e-1,1))return c;" "==f&&(c=e+1)}for(g=1;g<a.length;g++)if((f=a[g].charAt(a[g].length-e-1))&&" "!=f)return c;return d};Blockly.isNumber=function(a){return!!a.match(/^\s*-?\d+(\.\d+)?\s*$/)};
|
||||
Blockly.tokenizeInterpolation=function(a){var b=[];a=a.split("");a.push("");for(var c=0,d=[],e=null,f=0;f<a.length;f++){var g=a[f];0==c?"%"==g?c=1:d.push(g):1==c?"%"==g?(d.push(g),c=0):"0"<=g&&"9">=g?(c=2,e=g,(g=d.join(""))&&b.push(g),d.length=0):(d.push("%",g),c=0):2==c&&("0"<=g&&"9">=g?e+=g:(b.push(parseInt(e,10)),f--,c=0))}(g=d.join(""))&&b.push(g);return b};Blockly.genUid=function(){for(var a=Blockly.genUid.soup_.length,b=[],c=0;20>c;c++)b[c]=Blockly.genUid.soup_.charAt(Math.random()*a);return b.join("")};
|
||||
Blockly.genUid.soup_="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";var CLOSURE_DEFINES={"goog.DEBUG":!1};Blockly.mainWorkspace=null;Blockly.selected=null;Blockly.highlightedConnection_=null;Blockly.localConnection_=null;Blockly.clipboardXml_=null;Blockly.clipboardSource_=null;Blockly.dragMode_=Blockly.DRAG_NONE;Blockly.onTouchUpWrapper_=null;Blockly.hueToRgb=function(a){return goog.color.hsvToHex(a,Blockly.HSV_SATURATION,255*Blockly.HSV_VALUE)};Blockly.svgSize=function(a){return{width:a.cachedWidth_,height:a.cachedHeight_}};
|
||||
Blockly.svgResize=function(a){for(;a.options.parentWorkspace;)a=a.options.parentWorkspace;var b=a.getParentSvg(),c=b.parentNode;if(c){var d=c.offsetWidth,c=c.offsetHeight;b.cachedWidth_!=d&&(b.setAttribute("width",d+"px"),b.cachedWidth_=d);b.cachedHeight_!=c&&(b.setAttribute("height",c+"px"),b.cachedHeight_=c);a.resize()}};
|
||||
Blockly.onMouseUp_=function(a){a=Blockly.getMainWorkspace();Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN);a.isScrolling=!1;Blockly.setPageSelectable(!0);Blockly.onTouchUpWrapper_&&(Blockly.unbindEvent_(Blockly.onTouchUpWrapper_),Blockly.onTouchUpWrapper_=null);Blockly.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.onMouseMoveWrapper_),Blockly.onMouseMoveWrapper_=null)};
|
||||
Blockly.asyncSvgResize=function(a){Blockly.svgResizePending_||(a||(a=Blockly.getMainWorkspace()),Blockly.svgResizePending_=!0,setTimeout(function(){Blockly.svgResize(a)},0))};Blockly.svgResizePending_=!1;
|
||||
Blockly.svgResize=function(a){for(Blockly.svgResizePending_=!1;a.options.parentWorkspace;)a=a.options.parentWorkspace;var b=a.getParentSvg(),c=b.parentNode;if(c){var d=c.offsetWidth,c=c.offsetHeight;b.cachedWidth_!=d&&(b.setAttribute("width",d+"px"),b.cachedWidth_=d);b.cachedHeight_!=c&&(b.setAttribute("height",c+"px"),b.cachedHeight_=c);a.resize()}};
|
||||
Blockly.onMouseUp_=function(a){a=Blockly.getMainWorkspace();Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN);a.isScrolling=!1;Blockly.onTouchUpWrapper_&&(Blockly.unbindEvent_(Blockly.onTouchUpWrapper_),Blockly.onTouchUpWrapper_=null);Blockly.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.onMouseMoveWrapper_),Blockly.onMouseMoveWrapper_=null)};
|
||||
Blockly.onMouseMove_=function(a){if(!(a.touches&&2<=a.touches.length)){var b=Blockly.getMainWorkspace();if(b.isScrolling){var c=a.clientX-b.startDragMouseX,d=a.clientY-b.startDragMouseY,e=b.startDragMetrics,f=b.startScrollX+c,g=b.startScrollY+d,f=Math.min(f,-e.contentLeft),g=Math.min(g,-e.contentTop),f=Math.max(f,e.viewWidth-e.contentLeft-e.contentWidth),g=Math.max(g,e.viewHeight-e.contentTop-e.contentHeight);b.scrollbar.set(-f-e.contentLeft,-g-e.contentTop);Math.sqrt(c*c+d*d)>Blockly.DRAG_RADIUS&&
|
||||
Blockly.longStop_();a.stopPropagation()}}};
|
||||
Blockly.longStop_();a.stopPropagation();a.preventDefault()}}};
|
||||
Blockly.onKeyDown_=function(a){if(!Blockly.mainWorkspace.options.readOnly&&!Blockly.isTargetInput_(a)){var b=!1;if(27==a.keyCode)Blockly.hideChaff();else if(8==a.keyCode||46==a.keyCode)a.preventDefault(),Blockly.selected&&Blockly.selected.isDeletable()&&(b=!0);else if(a.altKey||a.ctrlKey||a.metaKey)Blockly.selected&&Blockly.selected.isDeletable()&&Blockly.selected.isMovable()&&(67==a.keyCode?(Blockly.hideChaff(),Blockly.copy_(Blockly.selected)):88==a.keyCode&&(Blockly.copy_(Blockly.selected),b=!0)),
|
||||
86==a.keyCode?Blockly.clipboardXml_&&Blockly.clipboardSource_.paste(Blockly.clipboardXml_):90==a.keyCode&&(Blockly.hideChaff(),Blockly.mainWorkspace.undo(a.shiftKey));b&&(Blockly.Events.setGroup(!0),Blockly.hideChaff(),Blockly.selected.dispose(Blockly.dragMode_!=Blockly.DRAG_FREE,!0),Blockly.highlightedConnection_&&(Blockly.highlightedConnection_.unhighlight(),Blockly.highlightedConnection_=null),Blockly.Events.setGroup(!1))}};Blockly.terminateDrag_=function(){Blockly.BlockSvg.terminateDrag_();Blockly.Flyout.terminateDrag_()};
|
||||
Blockly.longPid_=0;Blockly.longStart_=function(a,b){Blockly.longStop_();Blockly.longPid_=setTimeout(function(){a.button=2;b.onMouseDown_(a)},Blockly.LONGPRESS)};Blockly.longStop_=function(){Blockly.longPid_&&(clearTimeout(Blockly.longPid_),Blockly.longPid_=0)};
|
||||
|
||||
+11
-5
@@ -40,8 +40,8 @@ window.BLOCKLY_BOOT = function() {
|
||||
}
|
||||
goog.addDependency("../../../" + dir + "/core/block.js", ['Blockly.Block'], ['Blockly.Blocks', 'Blockly.Comment', 'Blockly.Connection', 'Blockly.Input', 'Blockly.Mutator', 'Blockly.Warning', 'Blockly.Workspace', 'Blockly.Xml', 'goog.array', 'goog.asserts', 'goog.math.Coordinate', 'goog.string']);
|
||||
goog.addDependency("../../../" + dir + "/core/block_render_svg.js", ['Blockly.BlockSvg.render'], ['Blockly.BlockSvg']);
|
||||
goog.addDependency("../../../" + dir + "/core/block_svg.js", ['Blockly.BlockSvg'], ['Blockly.Block', 'Blockly.ContextMenu', 'goog.Timer', 'goog.asserts', 'goog.dom', 'goog.math.Coordinate', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/blockly.js", ['Blockly'], ['Blockly.BlockSvg.render', 'Blockly.Events', 'Blockly.FieldAngle', 'Blockly.FieldCheckbox', 'Blockly.FieldColour', 'Blockly.FieldDropdown', 'Blockly.FieldImage', 'Blockly.FieldTextInput', 'Blockly.FieldVariable', 'Blockly.Generator', 'Blockly.Msg', 'Blockly.Procedures', 'Blockly.Toolbox', 'Blockly.WidgetDiv', 'Blockly.WorkspaceSvg', 'Blockly.constants', 'Blockly.inject', 'Blockly.utils', 'goog.color', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/block_svg.js", ['Blockly.BlockSvg'], ['Blockly.Block', 'Blockly.ContextMenu', 'Blockly.RenderedConnection', 'goog.Timer', 'goog.asserts', 'goog.dom', 'goog.math.Coordinate', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/blockly.js", ['Blockly'], ['Blockly.BlockSvg.render', 'Blockly.Events', 'Blockly.FieldAngle', 'Blockly.FieldCheckbox', 'Blockly.FieldColour', 'Blockly.FieldDropdown', 'Blockly.FieldImage', 'Blockly.FieldTextInput', 'Blockly.FieldNumber', 'Blockly.FieldVariable', 'Blockly.Generator', 'Blockly.Msg', 'Blockly.Procedures', 'Blockly.Toolbox', 'Blockly.WidgetDiv', 'Blockly.WorkspaceSvg', 'Blockly.constants', 'Blockly.inject', 'Blockly.utils', 'goog.color', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/blocks.js", ['Blockly.Blocks'], []);
|
||||
goog.addDependency("../../../" + dir + "/core/bubble.js", ['Blockly.Bubble'], ['Blockly.Workspace', 'goog.dom', 'goog.math', 'goog.math.Coordinate', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/comment.js", ['Blockly.Comment'], ['Blockly.Bubble', 'Blockly.Icon', 'goog.userAgent']);
|
||||
@@ -59,6 +59,7 @@ goog.addDependency("../../../" + dir + "/core/field_date.js", ['Blockly.FieldDat
|
||||
goog.addDependency("../../../" + dir + "/core/field_dropdown.js", ['Blockly.FieldDropdown'], ['Blockly.Field', 'goog.dom', 'goog.events', 'goog.style', 'goog.ui.Menu', 'goog.ui.MenuItem', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/field_image.js", ['Blockly.FieldImage'], ['Blockly.Field', 'goog.dom', 'goog.math.Size', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/field_label.js", ['Blockly.FieldLabel'], ['Blockly.Field', 'Blockly.Tooltip', 'goog.dom', 'goog.math.Size']);
|
||||
goog.addDependency("../../../" + dir + "/core/field_number.js", ['Blockly.FieldNumber'], ['Blockly.FieldTextInput']);
|
||||
goog.addDependency("../../../" + dir + "/core/field_textinput.js", ['Blockly.FieldTextInput'], ['Blockly.Field', 'Blockly.Msg', 'goog.asserts', 'goog.dom', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/field_variable.js", ['Blockly.FieldVariable'], ['Blockly.FieldDropdown', 'Blockly.Msg', 'Blockly.Variables', 'goog.string']);
|
||||
goog.addDependency("../../../" + dir + "/core/flyout.js", ['Blockly.Flyout'], ['Blockly.Block', 'Blockly.Comment', 'Blockly.Events', 'Blockly.WorkspaceSvg', 'goog.dom', 'goog.events', 'goog.math.Rect', 'goog.userAgent']);
|
||||
@@ -71,6 +72,7 @@ goog.addDependency("../../../" + dir + "/core/mutator.js", ['Blockly.Mutator'],
|
||||
goog.addDependency("../../../" + dir + "/core/names.js", ['Blockly.Names'], []);
|
||||
goog.addDependency("../../../" + dir + "/core/options.js", ['Blockly.Options'], []);
|
||||
goog.addDependency("../../../" + dir + "/core/procedures.js", ['Blockly.Procedures'], ['Blockly.Field', 'Blockly.Names', 'Blockly.Workspace']);
|
||||
goog.addDependency("../../../" + dir + "/core/rendered_connection.js", ['Blockly.RenderedConnection'], ['Blockly.Connection']);
|
||||
goog.addDependency("../../../" + dir + "/core/scrollbar.js", ['Blockly.Scrollbar', 'Blockly.ScrollbarPair'], ['goog.dom', 'goog.events']);
|
||||
goog.addDependency("../../../" + dir + "/core/toolbox.js", ['Blockly.Toolbox'], ['Blockly.Flyout', 'goog.dom', 'goog.events', 'goog.events.BrowserFeature', 'goog.html.SafeHtml', 'goog.math.Rect', 'goog.style', 'goog.ui.tree.TreeControl', 'goog.ui.tree.TreeNode']);
|
||||
goog.addDependency("../../../" + dir + "/core/tooltip.js", ['Blockly.Tooltip'], ['goog.dom']);
|
||||
@@ -214,7 +216,7 @@ goog.addDependency("debug/debug.js", ['goog.debug'], ['goog.array', 'goog.html.S
|
||||
goog.addDependency("debug/debug_test.js", ['goog.debugTest'], ['goog.debug', 'goog.html.SafeHtml', 'goog.structs.Set', 'goog.testing.jsunit']);
|
||||
goog.addDependency("debug/debugwindow.js", ['goog.debug.DebugWindow'], ['goog.debug.HtmlFormatter', 'goog.debug.LogManager', 'goog.debug.Logger', 'goog.dom.safe', 'goog.html.SafeHtml', 'goog.html.SafeStyleSheet', 'goog.string.Const', 'goog.structs.CircularBuffer', 'goog.userAgent']);
|
||||
goog.addDependency("debug/debugwindow_test.js", ['goog.debug.DebugWindowTest'], ['goog.debug.DebugWindow', 'goog.testing.jsunit']);
|
||||
goog.addDependency("debug/divconsole.js", ['goog.debug.DivConsole'], ['goog.debug.HtmlFormatter', 'goog.debug.LogManager', 'goog.dom.TagName', 'goog.dom.safe', 'goog.html.SafeHtml', 'goog.style']);
|
||||
goog.addDependency("debug/divconsole.js", ['goog.debug.DivConsole'], ['goog.debug.HtmlFormatter', 'goog.debug.LogManager', 'goog.dom.TagName', 'goog.dom.safe', 'goog.html.SafeHtml', 'goog.html.SafeStyleSheet', 'goog.string.Const', 'goog.style']);
|
||||
goog.addDependency("debug/enhanceerror_test.js", ['goog.debugEnhanceErrorTest'], ['goog.debug', 'goog.testing.jsunit']);
|
||||
goog.addDependency("debug/entrypointregistry.js", ['goog.debug.EntryPointMonitor', 'goog.debug.entryPointRegistry'], ['goog.asserts']);
|
||||
goog.addDependency("debug/entrypointregistry_test.js", ['goog.debug.entryPointRegistryTest'], ['goog.debug.ErrorHandler', 'goog.debug.entryPointRegistry', 'goog.testing.jsunit']);
|
||||
@@ -742,6 +744,8 @@ goog.addDependency("labs/useragent/platform_test.js", ['goog.labs.userAgent.plat
|
||||
goog.addDependency("labs/useragent/test_agents.js", ['goog.labs.userAgent.testAgents'], []);
|
||||
goog.addDependency("labs/useragent/util.js", ['goog.labs.userAgent.util'], ['goog.string']);
|
||||
goog.addDependency("labs/useragent/util_test.js", ['goog.labs.userAgent.utilTest'], ['goog.functions', 'goog.labs.userAgent.testAgents', 'goog.labs.userAgent.util', 'goog.testing.PropertyReplacer', 'goog.testing.jsunit']);
|
||||
goog.addDependency("labs/useragent/verifier.js", ['goog.labs.useragent.verifier'], []);
|
||||
goog.addDependency("labs/useragent/verifier_test.js", [], []);
|
||||
goog.addDependency("locale/countries.js", ['goog.locale.countries'], []);
|
||||
goog.addDependency("locale/countrylanguagenames_test.js", ['goog.locale.countryLanguageNamesTest'], ['goog.locale', 'goog.testing.jsunit']);
|
||||
goog.addDependency("locale/defaultlocalenameconstants.js", ['goog.locale.defaultLocaleNameConstants'], []);
|
||||
@@ -912,7 +916,7 @@ goog.addDependency("net/streams/streamfactory.js", ['goog.net.streams.createXhrN
|
||||
goog.addDependency("net/streams/streamparser.js", ['goog.net.streams.StreamParser'], []);
|
||||
goog.addDependency("net/streams/xhrnodereadablestream.js", ['goog.net.streams.XhrNodeReadableStream'], ['goog.array', 'goog.log', 'goog.net.streams.NodeReadableStream', 'goog.net.streams.XhrStreamReader']);
|
||||
goog.addDependency("net/streams/xhrnodereadablestream_test.js", ['goog.net.streams.XhrNodeReadableStreamTest'], ['goog.net.streams.NodeReadableStream', 'goog.net.streams.XhrNodeReadableStream', 'goog.net.streams.XhrStreamReader', 'goog.testing.PropertyReplacer', 'goog.testing.asserts', 'goog.testing.jsunit']);
|
||||
goog.addDependency("net/streams/xhrstreamreader.js", ['goog.net.streams.XhrStreamReader'], ['goog.events.EventHandler', 'goog.log', 'goog.net.ErrorCode', 'goog.net.EventType', 'goog.net.HttpStatus', 'goog.net.XhrIo', 'goog.net.XmlHttp', 'goog.net.streams.JsonStreamParser', 'goog.userAgent']);
|
||||
goog.addDependency("net/streams/xhrstreamreader.js", ['goog.net.streams.XhrStreamReader'], ['goog.events.EventHandler', 'goog.log', 'goog.net.ErrorCode', 'goog.net.EventType', 'goog.net.HttpStatus', 'goog.net.XhrIo', 'goog.net.XmlHttp', 'goog.net.streams.JsonStreamParser', 'goog.net.streams.PbStreamParser', 'goog.userAgent']);
|
||||
goog.addDependency("net/streams/xhrstreamreader_test.js", ['goog.net.streams.XhrStreamReaderTest'], ['goog.net.ErrorCode', 'goog.net.XmlHttp', 'goog.net.streams.XhrStreamReader', 'goog.testing.asserts', 'goog.testing.jsunit', 'goog.testing.net.XhrIo']);
|
||||
goog.addDependency("net/testdata/jsloader_test1.js", ['goog.net.testdata.jsloader_test1'], []);
|
||||
goog.addDependency("net/testdata/jsloader_test2.js", ['goog.net.testdata.jsloader_test2'], []);
|
||||
@@ -1128,7 +1132,7 @@ goog.addDependency("testing/mock_test.js", ['goog.testing.MockTest'], ['goog.arr
|
||||
goog.addDependency("testing/mockclassfactory.js", ['goog.testing.MockClassFactory', 'goog.testing.MockClassRecord'], ['goog.array', 'goog.object', 'goog.testing.LooseMock', 'goog.testing.StrictMock', 'goog.testing.TestCase', 'goog.testing.mockmatchers']);
|
||||
goog.addDependency("testing/mockclassfactory_test.js", ['fake.BaseClass', 'fake.ChildClass', 'goog.testing.MockClassFactoryTest'], ['goog.testing', 'goog.testing.MockClassFactory', 'goog.testing.jsunit']);
|
||||
goog.addDependency("testing/mockclock.js", ['goog.testing.MockClock'], ['goog.Disposable', 'goog.async.run', 'goog.testing.PropertyReplacer', 'goog.testing.events', 'goog.testing.events.Event']);
|
||||
goog.addDependency("testing/mockclock_test.js", ['goog.testing.MockClockTest'], ['goog.Promise', 'goog.Timer', 'goog.async.run', 'goog.events', 'goog.functions', 'goog.testing.MockClock', 'goog.testing.PropertyReplacer', 'goog.testing.jsunit', 'goog.testing.recordFunction']);
|
||||
goog.addDependency("testing/mockclock_test.js", ['goog.testing.MockClockTest'], ['goog.Promise', 'goog.Timer', 'goog.events', 'goog.functions', 'goog.testing.MockClock', 'goog.testing.PropertyReplacer', 'goog.testing.jsunit', 'goog.testing.recordFunction']);
|
||||
goog.addDependency("testing/mockcontrol.js", ['goog.testing.MockControl'], ['goog.array', 'goog.testing', 'goog.testing.LooseMock', 'goog.testing.StrictMock']);
|
||||
goog.addDependency("testing/mockcontrol_test.js", ['goog.testing.MockControlTest'], ['goog.testing.Mock', 'goog.testing.MockControl', 'goog.testing.jsunit']);
|
||||
goog.addDependency("testing/mockinterface.js", ['goog.testing.MockInterface'], []);
|
||||
@@ -1610,6 +1614,7 @@ goog.require('Blockly.FieldDate');
|
||||
goog.require('Blockly.FieldDropdown');
|
||||
goog.require('Blockly.FieldImage');
|
||||
goog.require('Blockly.FieldLabel');
|
||||
goog.require('Blockly.FieldNumber');
|
||||
goog.require('Blockly.FieldTextInput');
|
||||
goog.require('Blockly.FieldVariable');
|
||||
goog.require('Blockly.Flyout');
|
||||
@@ -1621,6 +1626,7 @@ goog.require('Blockly.Mutator');
|
||||
goog.require('Blockly.Names');
|
||||
goog.require('Blockly.Options');
|
||||
goog.require('Blockly.Procedures');
|
||||
goog.require('Blockly.RenderedConnection');
|
||||
goog.require('Blockly.Scrollbar');
|
||||
goog.require('Blockly.ScrollbarPair');
|
||||
goog.require('Blockly.Toolbox');
|
||||
|
||||
+2
-1
@@ -58,7 +58,8 @@ Blockly.Blocks['colour_picker'] = {
|
||||
// Colour block is trivial. Use tooltip of parent block if it exists.
|
||||
this.setTooltip(function() {
|
||||
var parent = thisBlock.getParent();
|
||||
return (parent && parent.tooltip) || Blockly.Msg.COLOUR_PICKER_TOOLTIP;
|
||||
return (parent && parent.getInputsInline() && parent.tooltip) ||
|
||||
Blockly.Msg.COLOUR_PICKER_TOOLTIP;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -643,6 +643,46 @@ Blockly.Blocks['lists_getSublist'] = {
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Blocks['lists_sort'] = {
|
||||
/**
|
||||
* Block for sorting a list.
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
init: function() {
|
||||
this.jsonInit({
|
||||
"message0": Blockly.Msg.LISTS_SORT_TITLE,
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "TYPE",
|
||||
"options": [
|
||||
[Blockly.Msg.LISTS_SORT_TYPE_NUMERIC, "NUMERIC"],
|
||||
[Blockly.Msg.LISTS_SORT_TYPE_TEXT, "TEXT"],
|
||||
[Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE, "IGNORE_CASE"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "DIRECTION",
|
||||
"options": [
|
||||
[Blockly.Msg.LISTS_SORT_ORDER_ASCENDING, "1"],
|
||||
[Blockly.Msg.LISTS_SORT_ORDER_DESCENDING, "-1"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "LIST",
|
||||
"check": "Array"
|
||||
}
|
||||
],
|
||||
"output": "Array",
|
||||
"colour": Blockly.Blocks.lists.HUE,
|
||||
"tooltip": Blockly.Msg.LISTS_SORT_TOOLTIP,
|
||||
"helpUrl": Blockly.Msg.LISTS_SORT_HELPURL
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Blocks['lists_split'] = {
|
||||
/**
|
||||
* Block for splitting text into a list, or joining a list into text.
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ Blockly.Blocks['controls_repeat'] = {
|
||||
"message0": Blockly.Msg.CONTROLS_REPEAT_TITLE,
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_input",
|
||||
"type": "field_number",
|
||||
"name": "TIMES",
|
||||
"text": "10"
|
||||
}
|
||||
|
||||
+3
-2
@@ -43,7 +43,7 @@ Blockly.Blocks['math_number'] = {
|
||||
this.setHelpUrl(Blockly.Msg.MATH_NUMBER_HELPURL);
|
||||
this.setColour(Blockly.Blocks.math.HUE);
|
||||
this.appendDummyInput()
|
||||
.appendField(new Blockly.FieldTextInput('0',
|
||||
.appendField(new Blockly.FieldNumber('0',
|
||||
Blockly.FieldTextInput.numberValidator), 'NUM');
|
||||
this.setOutput(true, 'Number');
|
||||
// Assign 'this' to a variable for use in the tooltip closure below.
|
||||
@@ -51,7 +51,8 @@ Blockly.Blocks['math_number'] = {
|
||||
// Number block is trivial. Use tooltip of parent block if it exists.
|
||||
this.setTooltip(function() {
|
||||
var parent = thisBlock.getParent();
|
||||
return (parent && parent.tooltip) || Blockly.Msg.MATH_NUMBER_TOOLTIP;
|
||||
return (parent && parent.getInputsInline() && parent.tooltip) ||
|
||||
Blockly.Msg.MATH_NUMBER_TOOLTIP;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
+2
-1
@@ -52,7 +52,8 @@ Blockly.Blocks['text'] = {
|
||||
// Text block is trivial. Use tooltip of parent block if it exists.
|
||||
this.setTooltip(function() {
|
||||
var parent = thisBlock.getParent();
|
||||
return (parent && parent.tooltip) || Blockly.Msg.TEXT_TEXT_TOOLTIP;
|
||||
return (parent && parent.getInputsInline() && parent.tooltip) ||
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP;
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
// Copyright 2012 Google Inc. Apache License 2.0
|
||||
Blockly.Blocks.colour={};Blockly.Blocks.colour.HUE=20;Blockly.Blocks.colour_picker={init:function(){this.jsonInit({message0:"%1",args0:[{type:"field_colour",name:"COLOUR",colour:"#ff0000"}],output:"Colour",colour:Blockly.Blocks.colour.HUE,helpUrl:Blockly.Msg.COLOUR_PICKER_HELPURL});var a=this;this.setTooltip(function(){var b=a.getParent();return b&&b.tooltip||Blockly.Msg.COLOUR_PICKER_TOOLTIP})}};
|
||||
Blockly.Blocks.colour={};Blockly.Blocks.colour.HUE=20;Blockly.Blocks.colour_picker={init:function(){this.jsonInit({message0:"%1",args0:[{type:"field_colour",name:"COLOUR",colour:"#ff0000"}],output:"Colour",colour:Blockly.Blocks.colour.HUE,helpUrl:Blockly.Msg.COLOUR_PICKER_HELPURL});var a=this;this.setTooltip(function(){var b=a.getParent();return b&&b.getInputsInline()&&b.tooltip||Blockly.Msg.COLOUR_PICKER_TOOLTIP})}};
|
||||
Blockly.Blocks.colour_random={init:function(){this.jsonInit({message0:Blockly.Msg.COLOUR_RANDOM_TITLE,output:"Colour",colour:Blockly.Blocks.colour.HUE,tooltip:Blockly.Msg.COLOUR_RANDOM_TOOLTIP,helpUrl:Blockly.Msg.COLOUR_RANDOM_HELPURL})}};
|
||||
Blockly.Blocks.colour_rgb={init:function(){this.setHelpUrl(Blockly.Msg.COLOUR_RGB_HELPURL);this.setColour(Blockly.Blocks.colour.HUE);this.appendValueInput("RED").setCheck("Number").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.COLOUR_RGB_TITLE).appendField(Blockly.Msg.COLOUR_RGB_RED);this.appendValueInput("GREEN").setCheck("Number").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.COLOUR_RGB_GREEN);this.appendValueInput("BLUE").setCheck("Number").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.COLOUR_RGB_BLUE);
|
||||
this.setOutput(!0,"Colour");this.setTooltip(Blockly.Msg.COLOUR_RGB_TOOLTIP)}};
|
||||
@@ -32,6 +32,8 @@ Blockly.Blocks.lists_getSublist={init:function(){this.WHERE_OPTIONS_1=[[Blockly.
|
||||
this.appendValueInput("LIST").setCheck("Array").appendField(Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST);this.appendDummyInput("AT1");this.appendDummyInput("AT2");Blockly.Msg.LISTS_GET_SUBLIST_TAIL&&this.appendDummyInput("TAIL").appendField(Blockly.Msg.LISTS_GET_SUBLIST_TAIL);this.setInputsInline(!0);this.setOutput(!0,"Array");this.updateAt_(1,!0);this.updateAt_(2,!0);this.setTooltip(Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP)},mutationToDom:function(){var a=document.createElement("mutation"),b=this.getInput("AT1").type==
|
||||
Blockly.INPUT_VALUE;a.setAttribute("at1",b);b=this.getInput("AT2").type==Blockly.INPUT_VALUE;a.setAttribute("at2",b);return a},domToMutation:function(a){var b="true"==a.getAttribute("at1");a="true"==a.getAttribute("at2");this.updateAt_(1,b);this.updateAt_(2,a)},updateAt_:function(a,b){this.removeInput("AT"+a);this.removeInput("ORDINAL"+a,!0);b?(this.appendValueInput("AT"+a).setCheck("Number"),Blockly.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL"+a).appendField(Blockly.Msg.ORDINAL_NUMBER_SUFFIX)):
|
||||
this.appendDummyInput("AT"+a);var c=new Blockly.FieldDropdown(this["WHERE_OPTIONS_"+a],function(c){var e="FROM_START"==c||"FROM_END"==c;if(e!=b){var f=this.sourceBlock_;f.updateAt_(a,e);f.setFieldValue(c,"WHERE"+a);return null}});this.getInput("AT"+a).appendField(c,"WHERE"+a);1==a&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"));Blockly.Msg.LISTS_GET_SUBLIST_TAIL&&this.moveInputBefore("TAIL",null)}};
|
||||
Blockly.Blocks.lists_sort={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_SORT_TITLE,args0:[{type:"field_dropdown",name:"TYPE",options:[[Blockly.Msg.LISTS_SORT_TYPE_NUMERIC,"NUMERIC"],[Blockly.Msg.LISTS_SORT_TYPE_TEXT,"TEXT"],[Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE,"IGNORE_CASE"]]},{type:"field_dropdown",name:"DIRECTION",options:[[Blockly.Msg.LISTS_SORT_ORDER_ASCENDING,"1"],[Blockly.Msg.LISTS_SORT_ORDER_DESCENDING,"-1"]]},{type:"input_value",name:"LIST",check:"Array"}],output:"Array",colour:Blockly.Blocks.lists.HUE,
|
||||
tooltip:Blockly.Msg.LISTS_SORT_TOOLTIP,helpUrl:Blockly.Msg.LISTS_SORT_HELPURL})}};
|
||||
Blockly.Blocks.lists_split={init:function(){var a=this,b=new Blockly.FieldDropdown([[Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT,"SPLIT"],[Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST,"JOIN"]],function(b){a.updateType_(b)});this.setHelpUrl(Blockly.Msg.LISTS_SPLIT_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendValueInput("INPUT").setCheck("String").appendField(b,"MODE");this.appendValueInput("DELIM").setCheck("String").appendField(Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER);this.setInputsInline(!0);
|
||||
this.setOutput(!0,"Array");this.setTooltip(function(){var b=a.getFieldValue("MODE");if("SPLIT"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT;if("JOIN"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN;throw"Unknown mode: "+b;})},updateType_:function(a){"SPLIT"==a?(this.outputConnection.setCheck("Array"),this.getInput("INPUT").setCheck("String")):(this.outputConnection.setCheck("String"),this.getInput("INPUT").setCheck("Array"))},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("mode",
|
||||
this.getFieldValue("MODE"));return a},domToMutation:function(a){this.updateType_(a.getAttribute("mode"))}};Blockly.Blocks.logic={};Blockly.Blocks.logic.HUE=210;
|
||||
@@ -53,7 +55,7 @@ Blockly.Blocks.logic_boolean={init:function(){this.jsonInit({message0:"%1",args0
|
||||
Blockly.Blocks.logic_null={init:function(){this.jsonInit({message0:Blockly.Msg.LOGIC_NULL,output:null,colour:Blockly.Blocks.logic.HUE,tooltip:Blockly.Msg.LOGIC_NULL_TOOLTIP,helpUrl:Blockly.Msg.LOGIC_NULL_HELPURL})}};
|
||||
Blockly.Blocks.logic_ternary={init:function(){this.setHelpUrl(Blockly.Msg.LOGIC_TERNARY_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);this.appendValueInput("IF").setCheck("Boolean").appendField(Blockly.Msg.LOGIC_TERNARY_CONDITION);this.appendValueInput("THEN").appendField(Blockly.Msg.LOGIC_TERNARY_IF_TRUE);this.appendValueInput("ELSE").appendField(Blockly.Msg.LOGIC_TERNARY_IF_FALSE);this.setOutput(!0);this.setTooltip(Blockly.Msg.LOGIC_TERNARY_TOOLTIP);this.prevParentConnection_=null},onchange:function(a){var b=
|
||||
this.getInputTargetBlock("THEN"),c=this.getInputTargetBlock("ELSE"),d=this.outputConnection.targetConnection;if((b||c)&&d)for(var e=0;2>e;e++){var f=1==e?b:c;f&&!f.outputConnection.checkType_(d)&&(Blockly.Events.setGroup(a.group),d===this.prevParentConnection_?(this.unplug(),d.getSourceBlock().bumpNeighbours_()):(f.unplug(),f.bumpNeighbours_()),Blockly.Events.setGroup(!1))}this.prevParentConnection_=d}};Blockly.Blocks.loops={};Blockly.Blocks.loops.HUE=120;Blockly.Blocks.controls_repeat_ext={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES",check:"Number"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO)}};
|
||||
Blockly.Blocks.controls_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"field_input",name:"TIMES",text:"10"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);this.getField("TIMES").setValidator(Blockly.FieldTextInput.nonnegativeIntegerValidator)}};
|
||||
Blockly.Blocks.controls_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"field_number",name:"TIMES",text:"10"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);this.getField("TIMES").setValidator(Blockly.FieldTextInput.nonnegativeIntegerValidator)}};
|
||||
Blockly.Blocks.controls_whileUntil={init:function(){var a=[[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]];this.setHelpUrl(Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL);this.setColour(Blockly.Blocks.loops.HUE);this.appendValueInput("BOOL").setCheck("Boolean").appendField(new Blockly.FieldDropdown(a),"MODE");this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO);this.setPreviousStatement(!0);this.setNextStatement(!0);
|
||||
var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE");return{WHILE:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[a]})}};
|
||||
Blockly.Blocks.controls_for={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_FOR_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"FROM",check:"Number",align:"RIGHT"},{type:"input_value",name:"TO",check:"Number",align:"RIGHT"},{type:"input_value",name:"BY",check:"Number",align:"RIGHT"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,helpUrl:Blockly.Msg.CONTROLS_FOR_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOR_INPUT_DO);
|
||||
@@ -61,7 +63,7 @@ var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOR_TOOLTIP.re
|
||||
Blockly.Blocks.controls_forEach={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_FOREACH_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"LIST",check:"Array"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,helpUrl:Blockly.Msg.CONTROLS_FOREACH_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOREACH_INPUT_DO);var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOREACH_TOOLTIP.replace("%1",
|
||||
a.getFieldValue("VAR"))})},customContextMenu:Blockly.Blocks.controls_for.customContextMenu};
|
||||
Blockly.Blocks.controls_flow_statements={init:function(){var a=[[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];this.setHelpUrl(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL);this.setColour(Blockly.Blocks.loops.HUE);this.appendDummyInput().appendField(new Blockly.FieldDropdown(a),"FLOW");this.setPreviousStatement(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("FLOW");return{BREAK:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,
|
||||
CONTINUE:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[a]})},onchange:function(a){a=!1;var b=this;do{if(-1!=this.LOOP_TYPES.indexOf(b.type)){a=!0;break}b=b.getSurroundParent()}while(b);a?this.setWarningText(null):this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING)},LOOP_TYPES:["controls_repeat","controls_repeat_ext","controls_forEach","controls_for","controls_whileUntil"]};Blockly.Blocks.math={};Blockly.Blocks.math.HUE=230;Blockly.Blocks.math_number={init:function(){this.setHelpUrl(Blockly.Msg.MATH_NUMBER_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.appendDummyInput().appendField(new Blockly.FieldTextInput("0",Blockly.FieldTextInput.numberValidator),"NUM");this.setOutput(!0,"Number");var a=this;this.setTooltip(function(){var b=a.getParent();return b&&b.tooltip||Blockly.Msg.MATH_NUMBER_TOOLTIP})}};
|
||||
CONTINUE:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[a]})},onchange:function(a){a=!1;var b=this;do{if(-1!=this.LOOP_TYPES.indexOf(b.type)){a=!0;break}b=b.getSurroundParent()}while(b);a?this.setWarningText(null):this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING)},LOOP_TYPES:["controls_repeat","controls_repeat_ext","controls_forEach","controls_for","controls_whileUntil"]};Blockly.Blocks.math={};Blockly.Blocks.math.HUE=230;Blockly.Blocks.math_number={init:function(){this.setHelpUrl(Blockly.Msg.MATH_NUMBER_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.appendDummyInput().appendField(new Blockly.FieldNumber("0",Blockly.FieldTextInput.numberValidator),"NUM");this.setOutput(!0,"Number");var a=this;this.setTooltip(function(){var b=a.getParent();return b&&b.getInputsInline()&&b.tooltip||Blockly.Msg.MATH_NUMBER_TOOLTIP})}};
|
||||
Blockly.Blocks.math_arithmetic={init:function(){this.jsonInit({message0:"%1 %2 %3",args0:[{type:"input_value",name:"A",check:"Number"},{type:"field_dropdown",name:"OP",options:[[Blockly.Msg.MATH_ADDITION_SYMBOL,"ADD"],[Blockly.Msg.MATH_SUBTRACTION_SYMBOL,"MINUS"],[Blockly.Msg.MATH_MULTIPLICATION_SYMBOL,"MULTIPLY"],[Blockly.Msg.MATH_DIVISION_SYMBOL,"DIVIDE"],[Blockly.Msg.MATH_POWER_SYMBOL,"POWER"]]},{type:"input_value",name:"B",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,
|
||||
helpUrl:Blockly.Msg.MATH_ARITHMETIC_HELPURL});var a=this;this.setTooltip(function(){var b=a.getFieldValue("OP");return{ADD:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[b]})}};
|
||||
Blockly.Blocks.math_single={init:function(){this.jsonInit({message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[[Blockly.Msg.MATH_SINGLE_OP_ROOT,"ROOT"],[Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE,"ABS"],["-","NEG"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",colour:Blockly.Blocks.math.HUE,helpUrl:Blockly.Msg.MATH_SINGLE_HELPURL});var a=this;this.setTooltip(function(){var b=a.getFieldValue("OP");return{ROOT:Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT,
|
||||
@@ -107,7 +109,7 @@ updateShape_:Blockly.Blocks.procedures_callnoreturn.updateShape_,mutationToDom:B
|
||||
Blockly.Blocks.procedures_ifreturn={init:function(){this.appendValueInput("CONDITION").setCheck("Boolean").appendField(Blockly.Msg.CONTROLS_IF_MSG_IF);this.appendValueInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0);this.setColour(Blockly.Blocks.procedures.HUE);this.setTooltip(Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP);this.setHelpUrl(Blockly.Msg.PROCEDURES_IFRETURN_HELPURL);this.hasReturnValue_=!0},
|
||||
mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("value",Number(this.hasReturnValue_));return a},domToMutation:function(a){this.hasReturnValue_=1==a.getAttribute("value");this.hasReturnValue_||(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN))},onchange:function(a){a=!1;var b=this;do{if(-1!=this.FUNCTION_TYPES.indexOf(b.type)){a=!0;break}b=b.getSurroundParent()}while(b);a?("procedures_defnoreturn"==b.type&&
|
||||
this.hasReturnValue_?(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!1):"procedures_defreturn"!=b.type||this.hasReturnValue_||(this.removeInput("VALUE"),this.appendValueInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!0),this.setWarningText(null)):this.setWarningText(Blockly.Msg.PROCEDURES_IFRETURN_WARNING)},FUNCTION_TYPES:["procedures_defnoreturn","procedures_defreturn"]};Blockly.Blocks.texts={};Blockly.Blocks.texts.HUE=160;
|
||||
Blockly.Blocks.text={init:function(){this.setHelpUrl(Blockly.Msg.TEXT_TEXT_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Blockly.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1));this.setOutput(!0,"String");var a=this;this.setTooltip(function(){var b=a.getParent();return b&&b.tooltip||Blockly.Msg.TEXT_TEXT_TOOLTIP})},newQuote_:function(a){return new Blockly.FieldImage(a==this.RTL?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAqUlEQVQI1z3KvUpCcRiA8ef9E4JNHhI0aFEacm1o0BsI0Slx8wa8gLauoDnoBhq7DcfWhggONDmJJgqCPA7neJ7p934EOOKOnM8Q7PDElo/4x4lFb2DmuUjcUzS3URnGib9qaPNbuXvBO3sGPHJDRG6fGVdMSeWDP2q99FQdFrz26Gu5Tq7dFMzUvbXy8KXeAj57cOklgA+u1B5AoslLtGIHQMaCVnwDnADZIFIrXsoXrgAAAABJRU5ErkJggg==":
|
||||
Blockly.Blocks.text={init:function(){this.setHelpUrl(Blockly.Msg.TEXT_TEXT_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Blockly.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1));this.setOutput(!0,"String");var a=this;this.setTooltip(function(){var b=a.getParent();return b&&b.getInputsInline()&&b.tooltip||Blockly.Msg.TEXT_TEXT_TOOLTIP})},newQuote_:function(a){return new Blockly.FieldImage(a==this.RTL?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAqUlEQVQI1z3KvUpCcRiA8ef9E4JNHhI0aFEacm1o0BsI0Slx8wa8gLauoDnoBhq7DcfWhggONDmJJgqCPA7neJ7p934EOOKOnM8Q7PDElo/4x4lFb2DmuUjcUzS3URnGib9qaPNbuXvBO3sGPHJDRG6fGVdMSeWDP2q99FQdFrz26Gu5Tq7dFMzUvbXy8KXeAj57cOklgA+u1B5AoslLtGIHQMaCVnwDnADZIFIrXsoXrgAAAABJRU5ErkJggg==":
|
||||
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAn0lEQVQI1z3OMa5BURSF4f/cQhAKjUQhuQmFNwGJEUi0RKN5rU7FHKhpjEH3TEMtkdBSCY1EIv8r7nFX9e29V7EBAOvu7RPjwmWGH/VuF8CyN9/OAdvqIXYLvtRaNjx9mMTDyo+NjAN1HNcl9ZQ5oQMM3dgDUqDo1l8DzvwmtZN7mnD+PkmLa+4mhrxVA9fRowBWmVBhFy5gYEjKMfz9AylsaRRgGzvZAAAAAElFTkSuQmCC",12,12,'"')}};
|
||||
Blockly.Blocks.text_join={init:function(){this.setHelpUrl(Blockly.Msg.TEXT_JOIN_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.itemCount_=2;this.updateShape_();this.setOutput(!0,"String");this.setMutator(new Blockly.Mutator(["text_create_join_item"]));this.setTooltip(Blockly.Msg.TEXT_JOIN_TOOLTIP)},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("items",this.itemCount_);return a},domToMutation:function(a){this.itemCount_=parseInt(a.getAttribute("items"),10);
|
||||
this.updateShape_()},decompose:function(a){var b=a.newBlock("text_create_join_container");b.initSvg();for(var c=b.getInput("STACK").connection,d=0;d<this.itemCount_;d++){var e=a.newBlock("text_create_join_item");e.initSvg();c.connect(e.previousConnection);c=e.nextConnection}return b},compose:function(a){var b=a.getInputTargetBlock("STACK");for(a=[];b;)a.push(b.valueConnection_),b=b.nextConnection&&b.nextConnection.targetBlock();for(b=0;b<this.itemCount_;b++){var c=this.getInput("ADD"+b).connection.targetConnection;
|
||||
|
||||
+58
-17
@@ -72,25 +72,55 @@ Blockly.Block = function(workspace, prototypeName, opt_id) {
|
||||
/** @type {boolean} */
|
||||
this.contextMenu = true;
|
||||
|
||||
/** @type {Blockly.Block} */
|
||||
/**
|
||||
* @type {Blockly.Block}
|
||||
* @private
|
||||
*/
|
||||
this.parentBlock_ = null;
|
||||
/** @type {!Array.<!Blockly.Block>} */
|
||||
|
||||
/**
|
||||
* @type {!Array.<!Blockly.Block>}
|
||||
* @private
|
||||
*/
|
||||
this.childBlocks_ = [];
|
||||
/** @type {boolean} */
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.deletable_ = true;
|
||||
/** @type {boolean} */
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.movable_ = true;
|
||||
/** @type {boolean} */
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.editable_ = true;
|
||||
/** @type {boolean} */
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.isShadow_ = false;
|
||||
/** @type {boolean} */
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.collapsed_ = false;
|
||||
|
||||
/** @type {string|Blockly.Comment} */
|
||||
this.comment = null;
|
||||
|
||||
/** @type {!goog.math.Coordinate} */
|
||||
/**
|
||||
* @type {!goog.math.Coordinate}
|
||||
* @private
|
||||
*/
|
||||
this.xy_ = new goog.math.Coordinate(0, 0);
|
||||
|
||||
/** @type {!Blockly.Workspace} */
|
||||
@@ -717,7 +747,7 @@ Blockly.Block.prototype.setPreviousStatement = function(newBoolean, opt_check) {
|
||||
goog.asserts.assert(!this.outputConnection,
|
||||
'Remove output connection prior to adding previous connection.');
|
||||
this.previousConnection =
|
||||
new Blockly.Connection(this, Blockly.PREVIOUS_STATEMENT);
|
||||
this.makeConnection_(Blockly.PREVIOUS_STATEMENT);
|
||||
}
|
||||
this.previousConnection.setCheck(opt_check);
|
||||
} else {
|
||||
@@ -742,8 +772,7 @@ Blockly.Block.prototype.setNextStatement = function(newBoolean, opt_check) {
|
||||
opt_check = null;
|
||||
}
|
||||
if (!this.nextConnection) {
|
||||
this.nextConnection =
|
||||
new Blockly.Connection(this, Blockly.NEXT_STATEMENT);
|
||||
this.nextConnection = this.makeConnection_(Blockly.NEXT_STATEMENT);
|
||||
}
|
||||
this.nextConnection.setCheck(opt_check);
|
||||
} else {
|
||||
@@ -771,8 +800,7 @@ Blockly.Block.prototype.setOutput = function(newBoolean, opt_check) {
|
||||
if (!this.outputConnection) {
|
||||
goog.asserts.assert(!this.previousConnection,
|
||||
'Remove previous connection prior to adding output connection.');
|
||||
this.outputConnection =
|
||||
new Blockly.Connection(this, Blockly.OUTPUT_VALUE);
|
||||
this.outputConnection = this.makeConnection_(Blockly.OUTPUT_VALUE);
|
||||
}
|
||||
this.outputConnection.setCheck(opt_check);
|
||||
} else {
|
||||
@@ -1020,11 +1048,11 @@ Blockly.Block.prototype.interpolate_ = function(message, args, lastDummyAlign) {
|
||||
// Add last dummy input if needed.
|
||||
if (elements.length && (typeof elements[elements.length - 1] == 'string' ||
|
||||
elements[elements.length - 1]['type'].indexOf('field_') == 0)) {
|
||||
var input = {type: 'input_dummy'};
|
||||
var dummyInput = {type: 'input_dummy'};
|
||||
if (lastDummyAlign) {
|
||||
input['align'] = lastDummyAlign;
|
||||
dummyInput['align'] = lastDummyAlign;
|
||||
}
|
||||
elements.push(input);
|
||||
elements.push(dummyInput);
|
||||
}
|
||||
// Lookup of alignment constants.
|
||||
var alignmentLookup = {
|
||||
@@ -1082,6 +1110,9 @@ Blockly.Block.prototype.interpolate_ = function(message, args, lastDummyAlign) {
|
||||
field = new Blockly.FieldImage(element['src'],
|
||||
element['width'], element['height'], element['alt']);
|
||||
break;
|
||||
case 'field_number':
|
||||
field = new Blockly.FieldNumber(element['text']);
|
||||
break;
|
||||
case 'field_date':
|
||||
if (Blockly.FieldDate) {
|
||||
field = new Blockly.FieldDate(element['date']);
|
||||
@@ -1126,7 +1157,7 @@ Blockly.Block.prototype.interpolate_ = function(message, args, lastDummyAlign) {
|
||||
Blockly.Block.prototype.appendInput_ = function(type, name) {
|
||||
var connection = null;
|
||||
if (type == Blockly.INPUT_VALUE || type == Blockly.NEXT_STATEMENT) {
|
||||
connection = new Blockly.Connection(this, type);
|
||||
connection = this.makeConnection_(type);
|
||||
}
|
||||
var input = new Blockly.Input(type, name, this, connection);
|
||||
// Append input to list.
|
||||
@@ -1303,3 +1334,13 @@ Blockly.Block.prototype.moveBy = function(dx, dy) {
|
||||
event.recordNew();
|
||||
Blockly.Events.fire(event);
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a connection of the specified type.
|
||||
* @param {number} type The type of the connection to create.
|
||||
* @return {!Blockly.Connection} A new connection of the specified type.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Block.prototype.makeConnection_ = function(type) {
|
||||
return new Blockly.Connection(this, type);
|
||||
};
|
||||
|
||||
@@ -287,7 +287,7 @@ Blockly.BlockSvg.prototype.render = function(opt_bubble) {
|
||||
parentBlock.render(true);
|
||||
} else {
|
||||
// Top-most block. Fire an event to allow scrollbars to resize.
|
||||
Blockly.fireUiEvent(window, 'resize');
|
||||
Blockly.asyncSvgResize(this.workspace);
|
||||
}
|
||||
}
|
||||
Blockly.Field.stopCache();
|
||||
|
||||
+43
-16
@@ -28,6 +28,7 @@ goog.provide('Blockly.BlockSvg');
|
||||
|
||||
goog.require('Blockly.Block');
|
||||
goog.require('Blockly.ContextMenu');
|
||||
goog.require('Blockly.RenderedConnection');
|
||||
goog.require('goog.Timer');
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.dom');
|
||||
@@ -48,16 +49,31 @@ goog.require('goog.userAgent');
|
||||
*/
|
||||
Blockly.BlockSvg = function(workspace, prototypeName, opt_id) {
|
||||
// Create core elements for the block.
|
||||
/** @type {SVGElement} */
|
||||
/**
|
||||
* @type {SVGElement}
|
||||
* @private
|
||||
*/
|
||||
this.svgGroup_ = Blockly.createSvgElement('g', {}, null);
|
||||
/** @type {SVGElement} */
|
||||
|
||||
/**
|
||||
* @type {SVGElement}
|
||||
* @private
|
||||
*/
|
||||
this.svgPathDark_ = Blockly.createSvgElement('path',
|
||||
{'class': 'blocklyPathDark', 'transform': 'translate(1,1)'},
|
||||
this.svgGroup_);
|
||||
/** @type {SVGElement} */
|
||||
|
||||
/**
|
||||
* @type {SVGElement}
|
||||
* @private
|
||||
*/
|
||||
this.svgPath_ = Blockly.createSvgElement('path', {'class': 'blocklyPath'},
|
||||
this.svgGroup_);
|
||||
/** @type {SVGElement} */
|
||||
|
||||
/**
|
||||
* @type {SVGElement}
|
||||
* @private
|
||||
*/
|
||||
this.svgPathLight_ = Blockly.createSvgElement('path',
|
||||
{'class': 'blocklyPathLight'}, this.svgGroup_);
|
||||
this.svgPath_.tooltip = this;
|
||||
@@ -148,7 +164,6 @@ Blockly.BlockSvg.prototype.select = function() {
|
||||
Blockly.Events.fire(event);
|
||||
Blockly.selected = this;
|
||||
this.addSelect();
|
||||
Blockly.fireUiEvent(this.workspace.getCanvas(), 'blocklySelectChange');
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -163,7 +178,6 @@ Blockly.BlockSvg.prototype.unselect = function() {
|
||||
Blockly.Events.fire(event);
|
||||
Blockly.selected = null;
|
||||
this.removeSelect();
|
||||
Blockly.fireUiEvent(this.workspace.getCanvas(), 'blocklySelectChange');
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -259,7 +273,7 @@ Blockly.BlockSvg.terminateDrag_ = function() {
|
||||
Blockly.Events.setGroup(false);
|
||||
}, Blockly.BUMP_DELAY);
|
||||
// Fire an event to allow scrollbars to resize.
|
||||
Blockly.fireUiEvent(window, 'resize');
|
||||
Blockly.asyncSvgResize(this.workspace);
|
||||
}
|
||||
}
|
||||
Blockly.dragMode_ = Blockly.DRAG_NONE;
|
||||
@@ -367,7 +381,8 @@ Blockly.BlockSvg.prototype.snapToGrid = function() {
|
||||
/**
|
||||
* Returns a bounding box describing the dimensions of this block
|
||||
* and any blocks stacked below it.
|
||||
* @return {!{height: number, width: number}} Object with height and width properties.
|
||||
* @return {!{height: number, width: number}} Object with height and width
|
||||
* properties.
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.getHeightWidth = function() {
|
||||
var height = this.height;
|
||||
@@ -386,10 +401,10 @@ Blockly.BlockSvg.prototype.getHeightWidth = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the coordinates of a bounding box describing the dimensions of this block
|
||||
* and any blocks stacked below it.
|
||||
* Returns the coordinates of a bounding box describing the dimensions of this
|
||||
* block and any blocks stacked below it.
|
||||
* @return {!{topLeft: goog.math.Coordinate, bottomRight: goog.math.Coordinate}}
|
||||
* Object with top left and bottom right coordinates of the bounding box.
|
||||
* Object with top left and bottom right coordinates of the bounding box.
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.getBoundingRectangle = function() {
|
||||
var blockXY = this.getRelativeToSurfaceXY(this);
|
||||
@@ -399,10 +414,12 @@ Blockly.BlockSvg.prototype.getBoundingRectangle = function() {
|
||||
var bottomRight;
|
||||
if (this.RTL) {
|
||||
// Width has the tab built into it already so subtract it here.
|
||||
topLeft = new goog.math.Coordinate(blockXY.x - (blockBounds.width - tab), blockXY.y);
|
||||
topLeft = new goog.math.Coordinate(blockXY.x - (blockBounds.width - tab),
|
||||
blockXY.y);
|
||||
// Add the width of the tab/puzzle piece knob to the x coordinate
|
||||
// since X is the corner of the rectangle, not the whole puzzle piece.
|
||||
bottomRight = new goog.math.Coordinate(blockXY.x + tab, blockXY.y + blockBounds.height);
|
||||
bottomRight = new goog.math.Coordinate(blockXY.x + tab,
|
||||
blockXY.y + blockBounds.height);
|
||||
} else {
|
||||
// Subtract the width of the tab/puzzle piece knob to the x coordinate
|
||||
// since X is the corner of the rectangle, not the whole puzzle piece.
|
||||
@@ -513,7 +530,6 @@ Blockly.BlockSvg.prototype.onMouseDown_ = function(e) {
|
||||
e.stopPropagation();
|
||||
return;
|
||||
}
|
||||
Blockly.setPageSelectable(false);
|
||||
this.workspace.markFocused();
|
||||
// Update Blockly's knowledge of its own location.
|
||||
Blockly.svgResize(this.workspace);
|
||||
@@ -558,6 +574,7 @@ Blockly.BlockSvg.prototype.onMouseDown_ = function(e) {
|
||||
}
|
||||
// This event has been handled. No need to bubble up to the document.
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -573,7 +590,6 @@ Blockly.BlockSvg.prototype.onMouseUp_ = function(e) {
|
||||
Blockly.Events.fire(
|
||||
new Blockly.Events.Ui(this, 'click', undefined, undefined));
|
||||
}
|
||||
Blockly.setPageSelectable(true);
|
||||
Blockly.terminateDrag_();
|
||||
if (Blockly.selected && Blockly.highlightedConnection_) {
|
||||
// Connect two blocks together.
|
||||
@@ -599,7 +615,7 @@ Blockly.BlockSvg.prototype.onMouseUp_ = function(e) {
|
||||
// Dropping a block on the trash can will usually cause the workspace to
|
||||
// resize to contain the newly positioned block. Force a second resize
|
||||
// now that the block has been deleted.
|
||||
Blockly.fireUiEvent(window, 'resize');
|
||||
Blockly.asyncSvgResize(this.workspace);
|
||||
}
|
||||
if (Blockly.highlightedConnection_) {
|
||||
Blockly.highlightedConnection_.unhighlight();
|
||||
@@ -894,6 +910,7 @@ Blockly.BlockSvg.prototype.onMouseMove_ = function(e) {
|
||||
}
|
||||
// This event has been handled. No need to bubble up to the document.
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1573,3 +1590,13 @@ Blockly.BlockSvg.prototype.getConnections_ = function(all) {
|
||||
}
|
||||
return myConnections;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a connection of the specified type.
|
||||
* @param {number} type The type of the connection to create.
|
||||
* @return {!Blockly.RenderedConnection} A new connection of the specified type.
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.makeConnection_ = function(type) {
|
||||
return new Blockly.RenderedConnection(this, type);
|
||||
};
|
||||
|
||||
+28
-2
@@ -38,6 +38,7 @@ goog.require('Blockly.FieldColour');
|
||||
goog.require('Blockly.FieldDropdown');
|
||||
goog.require('Blockly.FieldImage');
|
||||
goog.require('Blockly.FieldTextInput');
|
||||
goog.require('Blockly.FieldNumber');
|
||||
goog.require('Blockly.FieldVariable');
|
||||
goog.require('Blockly.Generator');
|
||||
goog.require('Blockly.Msg');
|
||||
@@ -132,12 +133,37 @@ Blockly.svgSize = function(svg) {
|
||||
height: svg.cachedHeight_};
|
||||
};
|
||||
|
||||
/**
|
||||
* Schedule a call to the resize handler. Groups of simultaneous events (e.g.
|
||||
* a tree of blocks being deleted) are merged into one call.
|
||||
* @param {Blockly.WorkspaceSvg} workspace Any workspace in the SVG.
|
||||
*/
|
||||
Blockly.asyncSvgResize = function(workspace) {
|
||||
if (Blockly.svgResizePending_) {
|
||||
return;
|
||||
}
|
||||
if (!workspace) {
|
||||
workspace = Blockly.getMainWorkspace();
|
||||
}
|
||||
Blockly.svgResizePending_ = true;
|
||||
setTimeout(function() {Blockly.svgResize(workspace);}, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* Flag indicating a resize event is scheduled.
|
||||
* Used to fire only one resize after multiple changes.
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
Blockly.svgResizePending_ = false;
|
||||
|
||||
/**
|
||||
* Size the SVG image to completely fill its container.
|
||||
* Record the height/width of the SVG image.
|
||||
* @param {!Blockly.WorkspaceSvg} workspace Any workspace in the SVG.
|
||||
*/
|
||||
Blockly.svgResize = function(workspace) {
|
||||
Blockly.svgResizePending_ = false;
|
||||
var mainWorkspace = workspace;
|
||||
while (mainWorkspace.options.parentWorkspace) {
|
||||
mainWorkspace = mainWorkspace.options.parentWorkspace;
|
||||
@@ -145,7 +171,7 @@ Blockly.svgResize = function(workspace) {
|
||||
var svg = mainWorkspace.getParentSvg();
|
||||
var div = svg.parentNode;
|
||||
if (!div) {
|
||||
// Workspace deteted, or something.
|
||||
// Workspace deleted, or something.
|
||||
return;
|
||||
}
|
||||
var width = div.offsetWidth;
|
||||
@@ -170,7 +196,6 @@ Blockly.onMouseUp_ = function(e) {
|
||||
var workspace = Blockly.getMainWorkspace();
|
||||
Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN);
|
||||
workspace.isScrolling = false;
|
||||
Blockly.setPageSelectable(true);
|
||||
// Unbind the touch event if it exists.
|
||||
if (Blockly.onTouchUpWrapper_) {
|
||||
Blockly.unbindEvent_(Blockly.onTouchUpWrapper_);
|
||||
@@ -213,6 +238,7 @@ Blockly.onMouseMove_ = function(e) {
|
||||
Blockly.longStop_();
|
||||
}
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+12
-5
@@ -123,6 +123,12 @@ Blockly.Bubble.onMouseUpWrapper_ = null;
|
||||
*/
|
||||
Blockly.Bubble.onMouseMoveWrapper_ = null;
|
||||
|
||||
/**
|
||||
* Function to call on resize of bubble.
|
||||
* @type {Function}
|
||||
*/
|
||||
Blockly.Bubble.prototype.resizeCallback_ = null;
|
||||
|
||||
/**
|
||||
* Stop binding to the global mouseup and mousemove events.
|
||||
* @private
|
||||
@@ -336,11 +342,10 @@ Blockly.Bubble.prototype.resizeMouseMove_ = function(e) {
|
||||
|
||||
/**
|
||||
* Register a function as a callback event for when the bubble is resized.
|
||||
* @param {Object} thisObject The value of 'this' in the callback.
|
||||
* @param {!Function} callback The function to call on resize.
|
||||
*/
|
||||
Blockly.Bubble.prototype.registerResizeEvent = function(thisObject, callback) {
|
||||
Blockly.bindEvent_(this.bubbleGroup_, 'resize', thisObject, callback);
|
||||
Blockly.Bubble.prototype.registerResizeEvent = function(callback) {
|
||||
this.resizeCallback_ = callback;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -467,8 +472,10 @@ Blockly.Bubble.prototype.setBubbleSize = function(width, height) {
|
||||
this.positionBubble_();
|
||||
this.renderArrow_();
|
||||
}
|
||||
// Fire an event to allow the contents to resize.
|
||||
Blockly.fireUiEvent(this.bubbleGroup_, 'resize');
|
||||
// Allow the contents to resize.
|
||||
if (this.resizeCallback_) {
|
||||
this.resizeCallback_();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+23
-18
@@ -106,24 +106,27 @@ Blockly.Comment.prototype.createEditor_ = function() {
|
||||
var body = document.createElementNS(Blockly.HTML_NS, 'body');
|
||||
body.setAttribute('xmlns', Blockly.HTML_NS);
|
||||
body.className = 'blocklyMinimalBody';
|
||||
this.textarea_ = document.createElementNS(Blockly.HTML_NS, 'textarea');
|
||||
this.textarea_.className = 'blocklyCommentTextarea';
|
||||
this.textarea_.setAttribute('dir', this.block_.RTL ? 'RTL' : 'LTR');
|
||||
body.appendChild(this.textarea_);
|
||||
var textarea = document.createElementNS(Blockly.HTML_NS, 'textarea');
|
||||
textarea.className = 'blocklyCommentTextarea';
|
||||
textarea.setAttribute('dir', this.block_.RTL ? 'RTL' : 'LTR');
|
||||
body.appendChild(textarea);
|
||||
this.textarea_ = textarea;
|
||||
this.foreignObject_.appendChild(body);
|
||||
Blockly.bindEvent_(this.textarea_, 'mouseup', this, this.textareaFocus_);
|
||||
Blockly.bindEvent_(textarea, 'mouseup', this, this.textareaFocus_);
|
||||
// Don't zoom with mousewheel.
|
||||
Blockly.bindEvent_(this.textarea_, 'wheel', this, function(e) {
|
||||
Blockly.bindEvent_(textarea, 'wheel', this, function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
Blockly.bindEvent_(this.textarea_, 'change', this, function(e) {
|
||||
if (this.text_ != this.textarea_.value) {
|
||||
Blockly.bindEvent_(textarea, 'change', this, function(e) {
|
||||
if (this.text_ != textarea.value) {
|
||||
Blockly.Events.fire(new Blockly.Events.Change(
|
||||
this.block_, 'comment', null, this.text_, this.textarea_.value));
|
||||
this.text_ = this.textarea_.value;
|
||||
this.block_, 'comment', null, this.text_, textarea.value));
|
||||
this.text_ = textarea.value;
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
textarea.focus();
|
||||
}, 0);
|
||||
return this.foreignObject_;
|
||||
};
|
||||
|
||||
@@ -147,12 +150,14 @@ Blockly.Comment.prototype.updateEditable = function() {
|
||||
* @private
|
||||
*/
|
||||
Blockly.Comment.prototype.resizeBubble_ = function() {
|
||||
var size = this.bubble_.getBubbleSize();
|
||||
var doubleBorderWidth = 2 * Blockly.Bubble.BORDER_WIDTH;
|
||||
this.foreignObject_.setAttribute('width', size.width - doubleBorderWidth);
|
||||
this.foreignObject_.setAttribute('height', size.height - doubleBorderWidth);
|
||||
this.textarea_.style.width = (size.width - doubleBorderWidth - 4) + 'px';
|
||||
this.textarea_.style.height = (size.height - doubleBorderWidth - 4) + 'px';
|
||||
if (this.isVisible()) {
|
||||
var size = this.bubble_.getBubbleSize();
|
||||
var doubleBorderWidth = 2 * Blockly.Bubble.BORDER_WIDTH;
|
||||
this.foreignObject_.setAttribute('width', size.width - doubleBorderWidth);
|
||||
this.foreignObject_.setAttribute('height', size.height - doubleBorderWidth);
|
||||
this.textarea_.style.width = (size.width - doubleBorderWidth - 4) + 'px';
|
||||
this.textarea_.style.height = (size.height - doubleBorderWidth - 4) + 'px';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -183,7 +188,7 @@ Blockly.Comment.prototype.setVisible = function(visible) {
|
||||
/** @type {!Blockly.WorkspaceSvg} */ (this.block_.workspace),
|
||||
this.createEditor_(), this.block_.svgPath_,
|
||||
this.iconXY_, this.width_, this.height_);
|
||||
this.bubble_.registerResizeEvent(this, this.resizeBubble_);
|
||||
this.bubble_.registerResizeEvent(this.resizeBubble_.bind(this));
|
||||
this.updateColour();
|
||||
} else {
|
||||
// Dispose of the bubble.
|
||||
|
||||
+100
-353
@@ -37,7 +37,10 @@ goog.require('goog.dom');
|
||||
* @constructor
|
||||
*/
|
||||
Blockly.Connection = function(source, type) {
|
||||
/** @type {!Blockly.Block} */
|
||||
/**
|
||||
* @type {!Blockly.Block}
|
||||
* @private
|
||||
*/
|
||||
this.sourceBlock_ = source;
|
||||
/** @type {number} */
|
||||
this.type = type;
|
||||
@@ -61,12 +64,76 @@ Blockly.Connection.REASON_CHECKS_FAILED = 4;
|
||||
Blockly.Connection.REASON_DIFFERENT_WORKSPACES = 5;
|
||||
|
||||
/**
|
||||
* Connect two connections together.
|
||||
* @param {!Blockly.Connection} parentConnection Connection on superior block.
|
||||
* Connection this connection connects to. Null if not connected.
|
||||
* @type {Blockly.Connection}
|
||||
*/
|
||||
Blockly.Connection.prototype.targetConnection = null;
|
||||
|
||||
/**
|
||||
* List of compatible value types. Null if all types are compatible.
|
||||
* @type {Array}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.check_ = null;
|
||||
|
||||
/**
|
||||
* DOM representation of a shadow block, or null if none.
|
||||
* @type {Element}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.shadowDom_ = null;
|
||||
|
||||
/**
|
||||
* Horizontal location of this connection.
|
||||
* @type {number}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.x_ = 0;
|
||||
|
||||
/**
|
||||
* Vertical location of this connection.
|
||||
* @type {number}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.y_ = 0;
|
||||
|
||||
/**
|
||||
* Has this connection been added to the connection database?
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.inDB_ = false;
|
||||
|
||||
/**
|
||||
* Connection database for connections of this type on the current workspace.
|
||||
* @type {Blockly.ConnectionDB}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.db_ = null;
|
||||
|
||||
/**
|
||||
* Connection database for connections compatible with this type on the
|
||||
* current workspace.
|
||||
* @type {Blockly.ConnectionDB}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.dbOpposite_ = null;
|
||||
|
||||
/**
|
||||
* Whether this connections is hidden (not tracked in a database) or not.
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.hidden_ = null;
|
||||
|
||||
/**
|
||||
* Connect two connections together. This is the connection on the superior
|
||||
* block.
|
||||
* @param {!Blockly.Connection} childConnection Connection on inferior block.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.connect_ = function(parentConnection, childConnection) {
|
||||
Blockly.Connection.prototype.connect_ = function(childConnection) {
|
||||
var parentConnection = this;
|
||||
var parentBlock = parentConnection.getSourceBlock();
|
||||
var childBlock = childConnection.getSourceBlock();
|
||||
// Disconnect any existing parent on the child connection.
|
||||
@@ -160,90 +227,8 @@ Blockly.Connection.connect_ = function(parentConnection, childConnection) {
|
||||
event.recordNew();
|
||||
Blockly.Events.fire(event);
|
||||
}
|
||||
|
||||
if (parentBlock.rendered) {
|
||||
parentBlock.updateDisabled();
|
||||
}
|
||||
if (childBlock.rendered) {
|
||||
childBlock.updateDisabled();
|
||||
}
|
||||
if (parentBlock.rendered && childBlock.rendered) {
|
||||
if (parentConnection.type == Blockly.NEXT_STATEMENT ||
|
||||
parentConnection.type == Blockly.PREVIOUS_STATEMENT) {
|
||||
// Child block may need to square off its corners if it is in a stack.
|
||||
// Rendering a child will render its parent.
|
||||
childBlock.render();
|
||||
} else {
|
||||
// Child block does not change shape. Rendering the parent node will
|
||||
// move its connected children into position.
|
||||
parentBlock.render();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Connection this connection connects to. Null if not connected.
|
||||
* @type {Blockly.Connection}
|
||||
*/
|
||||
Blockly.Connection.prototype.targetConnection = null;
|
||||
|
||||
/**
|
||||
* List of compatible value types. Null if all types are compatible.
|
||||
* @type {Array}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.check_ = null;
|
||||
|
||||
/**
|
||||
* DOM representation of a shadow block, or null if none.
|
||||
* @type {Element}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.shadowDom_ = null;
|
||||
|
||||
/**
|
||||
* Horizontal location of this connection.
|
||||
* @type {number}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.x_ = 0;
|
||||
|
||||
/**
|
||||
* Vertical location of this connection.
|
||||
* @type {number}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.y_ = 0;
|
||||
|
||||
/**
|
||||
* Has this connection been added to the connection database?
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.inDB_ = false;
|
||||
|
||||
/**
|
||||
* Connection database for connections of this type on the current workspace.
|
||||
* @type {Blockly.ConnectionDB}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.db_ = null;
|
||||
|
||||
/**
|
||||
* Connection database for connections compatible with this type on the
|
||||
* current workspace.
|
||||
* @type {Blockly.ConnectionDB}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.dbOpposite_ = null;
|
||||
|
||||
/**
|
||||
* Whether this connections is hidden (not tracked in a database) or not.
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.hidden_ = null;
|
||||
|
||||
/**
|
||||
* Sever all links to this connection (not including from the source object).
|
||||
*/
|
||||
@@ -289,18 +274,6 @@ Blockly.Connection.prototype.isConnected = function() {
|
||||
return !!this.targetConnection;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the distance between this connection and another connection.
|
||||
* @param {!Blockly.Connection} otherConnection The other connection to measure
|
||||
* the distance to.
|
||||
* @return {number} The distance between connections.
|
||||
*/
|
||||
Blockly.Connection.prototype.distanceFrom = function(otherConnection) {
|
||||
var xDiff = this.x_ - otherConnection.x_;
|
||||
var yDiff = this.y_ - otherConnection.y_;
|
||||
return Math.sqrt(xDiff * xDiff + yDiff * yDiff);
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks whether the current connection can connect with the target
|
||||
* connection.
|
||||
@@ -356,15 +329,9 @@ Blockly.Connection.prototype.checkConnection_ = function(target) {
|
||||
/**
|
||||
* Check if the two connections can be dragged to connect to each other.
|
||||
* @param {!Blockly.Connection} candidate A nearby connection to check.
|
||||
* @param {number} maxRadius The maximum radius allowed for connections.
|
||||
* @return {boolean} True if the connection is allowed, false otherwise.
|
||||
*/
|
||||
Blockly.Connection.prototype.isConnectionAllowed = function(candidate,
|
||||
maxRadius) {
|
||||
if (this.distanceFrom(candidate) > maxRadius) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Blockly.Connection.prototype.isConnectionAllowed = function(candidate) {
|
||||
// Type checking.
|
||||
var canConnect = this.canConnectWithReason_(candidate);
|
||||
if (canConnect != Blockly.Connection.CAN_CONNECT &&
|
||||
@@ -425,13 +392,12 @@ Blockly.Connection.prototype.connect = function(otherConnection) {
|
||||
}
|
||||
this.checkConnection_(otherConnection);
|
||||
// Determine which block is superior (higher in the source stack).
|
||||
var parentBlock, childBlock;
|
||||
if (this.isSuperior()) {
|
||||
// Superior block.
|
||||
Blockly.Connection.connect_(this, otherConnection);
|
||||
this.connect_(otherConnection);
|
||||
} else {
|
||||
// Inferior block.
|
||||
Blockly.Connection.connect_(otherConnection, this);
|
||||
otherConnection.connect_(this);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -518,11 +484,23 @@ Blockly.Connection.prototype.disconnect = function() {
|
||||
childBlock = this.sourceBlock_;
|
||||
parentConnection = otherConnection;
|
||||
}
|
||||
this.disconnectInternal_(parentBlock, childBlock);
|
||||
parentConnection.respawnShadow_();
|
||||
};
|
||||
|
||||
/**
|
||||
* Disconnect two blocks that are connected by this connection.
|
||||
* @param {!Blockly.Block} parentBlock The superior block.
|
||||
* @param {!Blockly.Block} childBlock The inferior block.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.disconnectInternal_ = function(parentBlock,
|
||||
childBlock) {
|
||||
var event;
|
||||
if (Blockly.Events.isEnabled()) {
|
||||
event = new Blockly.Events.Move(childBlock);
|
||||
}
|
||||
var otherConnection = this.targetConnection;
|
||||
otherConnection.targetConnection = null;
|
||||
this.targetConnection = null;
|
||||
childBlock.setParent(null);
|
||||
@@ -530,33 +508,30 @@ Blockly.Connection.prototype.disconnect = function() {
|
||||
event.recordNew();
|
||||
Blockly.Events.fire(event);
|
||||
}
|
||||
};
|
||||
|
||||
// Respawn the shadow block if there is one.
|
||||
var shadow = parentConnection.getShadowDom();
|
||||
/**
|
||||
* Respawn the shadow block if there was one connected to the this connection.
|
||||
* @return {Blockly.Block} The newly spawned shadow block, or null if none was
|
||||
* spawned.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.respawnShadow_ = function() {
|
||||
var parentBlock = this.getSourceBlock();
|
||||
var shadow = this.getShadowDom();
|
||||
if (parentBlock.workspace && shadow && Blockly.Events.recordUndo) {
|
||||
var blockShadow =
|
||||
Blockly.Xml.domToBlock(shadow, parentBlock.workspace);
|
||||
if (blockShadow.outputConnection) {
|
||||
parentConnection.connect(blockShadow.outputConnection);
|
||||
this.connect(blockShadow.outputConnection);
|
||||
} else if (blockShadow.previousConnection) {
|
||||
parentConnection.connect(blockShadow.previousConnection);
|
||||
this.connect(blockShadow.previousConnection);
|
||||
} else {
|
||||
throw 'Child block does not have output or previous statement.';
|
||||
}
|
||||
if (blockShadow.initSvg) {
|
||||
blockShadow.initSvg();
|
||||
}
|
||||
blockShadow.render(false);
|
||||
}
|
||||
|
||||
// Rerender the parent so that it may reflow.
|
||||
if (parentBlock.rendered) {
|
||||
parentBlock.render();
|
||||
}
|
||||
if (childBlock.rendered) {
|
||||
childBlock.updateDisabled();
|
||||
childBlock.render();
|
||||
return blockShadow;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -570,110 +545,6 @@ Blockly.Connection.prototype.targetBlock = function() {
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Move the block(s) belonging to the connection to a point where they don't
|
||||
* visually interfere with the specified connection.
|
||||
* @param {!Blockly.Connection} staticConnection The connection to move away
|
||||
* from.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.bumpAwayFrom_ = function(staticConnection) {
|
||||
if (Blockly.dragMode_ != Blockly.DRAG_NONE) {
|
||||
// Don't move blocks around while the user is doing the same.
|
||||
return;
|
||||
}
|
||||
// Move the root block.
|
||||
var rootBlock = this.sourceBlock_.getRootBlock();
|
||||
if (rootBlock.isInFlyout) {
|
||||
// Don't move blocks around in a flyout.
|
||||
return;
|
||||
}
|
||||
var reverse = false;
|
||||
if (!rootBlock.isMovable()) {
|
||||
// Can't bump an uneditable block away.
|
||||
// Check to see if the other block is movable.
|
||||
rootBlock = staticConnection.getSourceBlock().getRootBlock();
|
||||
if (!rootBlock.isMovable()) {
|
||||
return;
|
||||
}
|
||||
// Swap the connections and move the 'static' connection instead.
|
||||
staticConnection = this;
|
||||
reverse = true;
|
||||
}
|
||||
// Raise it to the top for extra visibility.
|
||||
rootBlock.getSvgRoot().parentNode.appendChild(rootBlock.getSvgRoot());
|
||||
var dx = (staticConnection.x_ + Blockly.SNAP_RADIUS) - this.x_;
|
||||
var dy = (staticConnection.y_ + Blockly.SNAP_RADIUS) - this.y_;
|
||||
if (reverse) {
|
||||
// When reversing a bump due to an uneditable block, bump up.
|
||||
dy = -dy;
|
||||
}
|
||||
if (rootBlock.RTL) {
|
||||
dx = -dx;
|
||||
}
|
||||
rootBlock.moveBy(dx, dy);
|
||||
};
|
||||
|
||||
/**
|
||||
* Change the connection's coordinates.
|
||||
* @param {number} x New absolute x coordinate.
|
||||
* @param {number} y New absolute y coordinate.
|
||||
*/
|
||||
Blockly.Connection.prototype.moveTo = function(x, y) {
|
||||
// Remove it from its old location in the database (if already present)
|
||||
if (this.inDB_) {
|
||||
this.db_.removeConnection_(this);
|
||||
}
|
||||
this.x_ = x;
|
||||
this.y_ = y;
|
||||
// Insert it into its new location in the database.
|
||||
if (!this.hidden_) {
|
||||
this.db_.addConnection(this);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Change the connection's coordinates.
|
||||
* @param {number} dx Change to x coordinate.
|
||||
* @param {number} dy Change to y coordinate.
|
||||
*/
|
||||
Blockly.Connection.prototype.moveBy = function(dx, dy) {
|
||||
this.moveTo(this.x_ + dx, this.y_ + dy);
|
||||
};
|
||||
|
||||
/**
|
||||
* Move the blocks on either side of this connection right next to each other.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.tighten_ = function() {
|
||||
var dx = this.targetConnection.x_ - this.x_;
|
||||
var dy = this.targetConnection.y_ - this.y_;
|
||||
if (dx != 0 || dy != 0) {
|
||||
var block = this.targetBlock();
|
||||
var svgRoot = block.getSvgRoot();
|
||||
if (!svgRoot) {
|
||||
throw 'block is not rendered.';
|
||||
}
|
||||
var xy = Blockly.getRelativeXY_(svgRoot);
|
||||
block.getSvgRoot().setAttribute('transform',
|
||||
'translate(' + (xy.x - dx) + ',' + (xy.y - dy) + ')');
|
||||
block.moveConnections_(-dx, -dy);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Find the closest compatible connection to this connection.
|
||||
* @param {number} maxLimit The maximum radius to another connection.
|
||||
* @param {!goog.math.Coordinate} dxy Offset between this connection's location
|
||||
* in the database and the current location (as a result of dragging).
|
||||
* @return {!{connection: ?Blockly.Connection, radius: number}} Contains two
|
||||
* properties:' connection' which is either another connection or null,
|
||||
* and 'radius' which is the distance.
|
||||
*/
|
||||
Blockly.Connection.prototype.closest = function(maxLimit, dxy) {
|
||||
return this.dbOpposite_.searchForClosest(this, maxLimit, dxy);
|
||||
};
|
||||
|
||||
/**
|
||||
* Is this connection compatible with another connection with respect to the
|
||||
* value type system. E.g. square_root("Hello") is not compatible.
|
||||
@@ -738,127 +609,3 @@ Blockly.Connection.prototype.setShadowDom = function(shadow) {
|
||||
Blockly.Connection.prototype.getShadowDom = function() {
|
||||
return this.shadowDom_;
|
||||
};
|
||||
|
||||
/**
|
||||
* Find all nearby compatible connections to this connection.
|
||||
* Type checking does not apply, since this function is used for bumping.
|
||||
* @param {number} maxLimit The maximum radius to another connection.
|
||||
* @return {!Array.<Blockly.Connection>} List of connections.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.neighbours_ = function(maxLimit) {
|
||||
return this.dbOpposite_.getNeighbours(this, maxLimit);
|
||||
};
|
||||
|
||||
// Appearance or lack thereof.
|
||||
|
||||
/**
|
||||
* Set whether this connections is hidden (not tracked in a database) or not.
|
||||
* @param {boolean} hidden True if connection is hidden.
|
||||
*/
|
||||
Blockly.Connection.prototype.setHidden = function(hidden) {
|
||||
this.hidden_ = hidden;
|
||||
if (hidden && this.inDB_) {
|
||||
this.db_.removeConnection_(this);
|
||||
} else if (!hidden && !this.inDB_) {
|
||||
this.db_.addConnection(this);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Hide this connection, as well as all down-stream connections on any block
|
||||
* attached to this connection. This happens when a block is collapsed.
|
||||
* Also hides down-stream comments.
|
||||
*/
|
||||
Blockly.Connection.prototype.hideAll = function() {
|
||||
this.setHidden(true);
|
||||
if (this.isConnected()) {
|
||||
var blocks = this.targetBlock().getDescendants();
|
||||
for (var b = 0; b < blocks.length; b++) {
|
||||
var block = blocks[b];
|
||||
// Hide all connections of all children.
|
||||
var connections = block.getConnections_(true);
|
||||
for (var c = 0; c < connections.length; c++) {
|
||||
connections[c].setHidden(true);
|
||||
}
|
||||
// Close all bubbles of all children.
|
||||
var icons = block.getIcons();
|
||||
for (var i = 0; i < icons.length; i++) {
|
||||
icons[i].setVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Unhide this connection, as well as all down-stream connections on any block
|
||||
* attached to this connection. This happens when a block is expanded.
|
||||
* Also unhides down-stream comments.
|
||||
* @return {!Array.<!Blockly.Block>} List of blocks to render.
|
||||
*/
|
||||
Blockly.Connection.prototype.unhideAll = function() {
|
||||
this.setHidden(false);
|
||||
// All blocks that need unhiding must be unhidden before any rendering takes
|
||||
// place, since rendering requires knowing the dimensions of lower blocks.
|
||||
// Also, since rendering a block renders all its parents, we only need to
|
||||
// render the leaf nodes.
|
||||
var renderList = [];
|
||||
if (this.type != Blockly.INPUT_VALUE && this.type != Blockly.NEXT_STATEMENT) {
|
||||
// Only spider down.
|
||||
return renderList;
|
||||
}
|
||||
var block = this.targetBlock();
|
||||
if (block) {
|
||||
var connections;
|
||||
if (block.isCollapsed()) {
|
||||
// This block should only be partially revealed since it is collapsed.
|
||||
connections = [];
|
||||
block.outputConnection && connections.push(block.outputConnection);
|
||||
block.nextConnection && connections.push(block.nextConnection);
|
||||
block.previousConnection && connections.push(block.previousConnection);
|
||||
} else {
|
||||
// Show all connections of this block.
|
||||
connections = block.getConnections_(true);
|
||||
}
|
||||
for (var c = 0; c < connections.length; c++) {
|
||||
renderList.push.apply(renderList, connections[c].unhideAll());
|
||||
}
|
||||
if (!renderList.length) {
|
||||
// Leaf block.
|
||||
renderList[0] = block;
|
||||
}
|
||||
}
|
||||
return renderList;
|
||||
};
|
||||
|
||||
/**
|
||||
* Add highlighting around this connection.
|
||||
*/
|
||||
Blockly.Connection.prototype.highlight = function() {
|
||||
var steps;
|
||||
if (this.type == Blockly.INPUT_VALUE || this.type == Blockly.OUTPUT_VALUE) {
|
||||
var tabWidth = this.sourceBlock_.RTL ? -Blockly.BlockSvg.TAB_WIDTH :
|
||||
Blockly.BlockSvg.TAB_WIDTH;
|
||||
steps = 'm 0,0 ' + Blockly.BlockSvg.TAB_PATH_DOWN + ' v 5';
|
||||
|
||||
} else {
|
||||
steps = 'm -20,0 h 5 ' + Blockly.BlockSvg.NOTCH_PATH_LEFT + ' h 5';
|
||||
}
|
||||
var xy = this.sourceBlock_.getRelativeToSurfaceXY();
|
||||
var x = this.x_ - xy.x;
|
||||
var y = this.y_ - xy.y;
|
||||
Blockly.Connection.highlightedPath_ = Blockly.createSvgElement('path',
|
||||
{'class': 'blocklyHighlightedConnectionPath',
|
||||
'd': steps,
|
||||
transform: 'translate(' + x + ',' + y + ')' +
|
||||
(this.sourceBlock_.RTL ? ' scale(-1 1)' : '')},
|
||||
this.sourceBlock_.getSvgRoot());
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove the highlighting around this connection.
|
||||
*/
|
||||
Blockly.Connection.prototype.unhighlight = function() {
|
||||
goog.dom.removeNode(Blockly.Connection.highlightedPath_);
|
||||
delete Blockly.Connection.highlightedPath_;
|
||||
};
|
||||
|
||||
+17
-17
@@ -173,20 +173,7 @@ Blockly.ConnectionDB.prototype.getNeighbours = function(connection, maxRadius) {
|
||||
pointerMid = Math.floor((pointerMin + pointerMax) / 2);
|
||||
}
|
||||
|
||||
// Walk forward and back on the y axis looking for the closest x,y point.
|
||||
pointerMin = pointerMid;
|
||||
pointerMax = pointerMid;
|
||||
var neighbours = [];
|
||||
var sourceBlock = connection.getSourceBlock();
|
||||
if (db.length) {
|
||||
while (pointerMin >= 0 && checkConnection_(pointerMin)) {
|
||||
pointerMin--;
|
||||
}
|
||||
do {
|
||||
pointerMax++;
|
||||
} while (pointerMax < db.length && checkConnection_(pointerMax));
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes if the current connection is within the allowed radius of another
|
||||
* connection.
|
||||
@@ -204,6 +191,19 @@ Blockly.ConnectionDB.prototype.getNeighbours = function(connection, maxRadius) {
|
||||
}
|
||||
return dy < maxRadius;
|
||||
}
|
||||
|
||||
// Walk forward and back on the y axis looking for the closest x,y point.
|
||||
pointerMin = pointerMid;
|
||||
pointerMax = pointerMid;
|
||||
if (db.length) {
|
||||
while (pointerMin >= 0 && checkConnection_(pointerMin)) {
|
||||
pointerMin--;
|
||||
}
|
||||
do {
|
||||
pointerMax++;
|
||||
} while (pointerMax < db.length && checkConnection_(pointerMax));
|
||||
}
|
||||
|
||||
return neighbours;
|
||||
};
|
||||
|
||||
@@ -260,8 +260,8 @@ Blockly.ConnectionDB.prototype.searchForClosest = function(conn, maxRadius,
|
||||
while (pointerMin >= 0 && this.isInYRange_(pointerMin, conn.y_, maxRadius)) {
|
||||
temp = this[pointerMin];
|
||||
if (conn.isConnectionAllowed(temp, bestRadius)) {
|
||||
bestConnection = temp;
|
||||
bestRadius = temp.distanceFrom(conn);
|
||||
bestConnection = temp;
|
||||
bestRadius = temp.distanceFrom(conn);
|
||||
}
|
||||
pointerMin--;
|
||||
}
|
||||
@@ -271,8 +271,8 @@ Blockly.ConnectionDB.prototype.searchForClosest = function(conn, maxRadius,
|
||||
maxRadius)) {
|
||||
temp = this[pointerMax];
|
||||
if (conn.isConnectionAllowed(temp, bestRadius)) {
|
||||
bestConnection = temp;
|
||||
bestRadius = temp.distanceFrom(conn);
|
||||
bestConnection = temp;
|
||||
bestRadius = temp.distanceFrom(conn);
|
||||
}
|
||||
pointerMax++;
|
||||
}
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ Blockly.ContextMenu.show = function(e, options, rtl) {
|
||||
*/
|
||||
var menu = new goog.ui.Menu();
|
||||
menu.setRightToLeft(rtl);
|
||||
for (var x = 0, option; option = options[x]; x++) {
|
||||
for (var i = 0, option; option = options[i]; i++) {
|
||||
var menuItem = new goog.ui.MenuItem(option.text);
|
||||
menuItem.setRightToLeft(rtl);
|
||||
menu.addChild(menuItem, true);
|
||||
|
||||
@@ -143,13 +143,6 @@ Blockly.Css.CONTENT = [
|
||||
'z-index: 999;',
|
||||
'}',
|
||||
|
||||
'.blocklyNonSelectable {',
|
||||
'user-select: none;',
|
||||
'-moz-user-select: none;',
|
||||
'-webkit-user-select: none;',
|
||||
'-ms-user-select: none;',
|
||||
'}',
|
||||
|
||||
'.blocklyTooltipDiv {',
|
||||
'background-color: #ffffc7;',
|
||||
'border: 1px solid #ddc;',
|
||||
|
||||
+2
-1
@@ -254,6 +254,7 @@ Blockly.Events.getDescendantIds_ = function(block) {
|
||||
* Decode the JSON into an event.
|
||||
* @param {!Object} json JSON representation.
|
||||
* @param {!Blockly.Workspace} workspace Target workspace for event.
|
||||
* @return {!Blockly.Events.Abstract} The event represented by the JSON.
|
||||
*/
|
||||
Blockly.Events.fromJson = function(json, workspace) {
|
||||
var event;
|
||||
@@ -274,7 +275,7 @@ Blockly.Events.fromJson = function(json, workspace) {
|
||||
event = new Blockly.Events.Ui(null);
|
||||
break;
|
||||
default:
|
||||
throw 'Unknown event type.'
|
||||
throw 'Unknown event type.';
|
||||
}
|
||||
event.fromJson(json);
|
||||
event.workspaceId = workspace.id;
|
||||
|
||||
+1
-1
@@ -450,7 +450,7 @@ Blockly.Field.prototype.setTooltip = function(newTip) {
|
||||
/**
|
||||
* Return the absolute coordinates of the top-left corner of this field.
|
||||
* The origin (0,0) is the top-left corner of the page body.
|
||||
* @return {{!goog.math.Coordinate}} Object with .x and .y properties.
|
||||
* @return {!goog.math.Coordinate} Object with .x and .y properties.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Field.prototype.getAbsoluteXY_ = function() {
|
||||
|
||||
+1
-1
@@ -315,6 +315,6 @@ Blockly.FieldAngle.angleValidator = function(text) {
|
||||
n -= 360;
|
||||
}
|
||||
n = String(n);
|
||||
}
|
||||
}
|
||||
return n;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* @license
|
||||
* Visual Blocks Editor
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Number input field
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.FieldNumber');
|
||||
|
||||
goog.require('Blockly.FieldTextInput');
|
||||
|
||||
/**
|
||||
* Class for an editable number field.
|
||||
* @param {string} text The initial content of the field.
|
||||
* @param {Function=} opt_validator An optional function that is called
|
||||
* to validate any constraints on what the user entered. Takes the new
|
||||
* text as an argument and returns either the accepted text, a replacement
|
||||
* text, or null to abort the change.
|
||||
* @extends {Blockly.FieldTextInput}
|
||||
* @constructor
|
||||
*/
|
||||
Blockly.FieldNumber = function(text, opt_validator) {
|
||||
Blockly.FieldNumber.superClass_.constructor.call(this, text,
|
||||
opt_validator);
|
||||
};
|
||||
goog.inherits(Blockly.FieldNumber, Blockly.FieldTextInput);
|
||||
+1
-1
@@ -592,7 +592,7 @@ Blockly.Flyout.prototype.show = function(xmlList) {
|
||||
this.filterForCapacity_();
|
||||
|
||||
// Fire a resize event to update the flyout's scrollbar.
|
||||
Blockly.fireUiEventNow(window, 'resize');
|
||||
Blockly.svgResize(this.workspace_);
|
||||
this.reflowWrapper_ = this.reflow.bind(this);
|
||||
this.workspace_.addChangeListener(this.reflowWrapper_);
|
||||
};
|
||||
|
||||
+18
-14
@@ -211,26 +211,27 @@ Blockly.createMainWorkspace_ = function(svg, options) {
|
||||
var blockXY = block.getRelativeToSurfaceXY();
|
||||
var blockHW = block.getHeightWidth();
|
||||
// Bump any block that's above the top back inside.
|
||||
var overflow = edgeTop + MARGIN - blockHW.height - blockXY.y;
|
||||
if (overflow > 0) {
|
||||
block.moveBy(0, overflow);
|
||||
var overflowTop = edgeTop + MARGIN - blockHW.height - blockXY.y;
|
||||
if (overflowTop > 0) {
|
||||
block.moveBy(0, overflowTop);
|
||||
}
|
||||
// Bump any block that's below the bottom back inside.
|
||||
var overflow = edgeTop + metrics.viewHeight - MARGIN - blockXY.y;
|
||||
if (overflow < 0) {
|
||||
block.moveBy(0, overflow);
|
||||
var overflowBottom =
|
||||
edgeTop + metrics.viewHeight - MARGIN - blockXY.y;
|
||||
if (overflowBottom < 0) {
|
||||
block.moveBy(0, overflowBottom);
|
||||
}
|
||||
// Bump any block that's off the left back inside.
|
||||
var overflow = MARGIN + edgeLeft -
|
||||
var overflowLeft = MARGIN + edgeLeft -
|
||||
blockXY.x - (options.RTL ? 0 : blockHW.width);
|
||||
if (overflow > 0) {
|
||||
block.moveBy(overflow, 0);
|
||||
if (overflowLeft > 0) {
|
||||
block.moveBy(overflowLeft, 0);
|
||||
}
|
||||
// Bump any block that's off the right back inside.
|
||||
var overflow = edgeLeft + metrics.viewWidth - MARGIN -
|
||||
var overflowRight = edgeLeft + metrics.viewWidth - MARGIN -
|
||||
blockXY.x + (options.RTL ? blockHW.width : 0);
|
||||
if (overflow < 0) {
|
||||
block.moveBy(overflow, 0);
|
||||
if (overflowRight < 0) {
|
||||
block.moveBy(overflowRight, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -263,7 +264,10 @@ Blockly.init_ = function(mainWorkspace) {
|
||||
});
|
||||
|
||||
Blockly.bindEvent_(window, 'resize', null,
|
||||
function() {Blockly.svgResize(mainWorkspace);});
|
||||
function() {
|
||||
Blockly.hideChaff(true);
|
||||
Blockly.asyncSvgResize(mainWorkspace);
|
||||
});
|
||||
|
||||
Blockly.inject.bindDocumentEvents_();
|
||||
|
||||
@@ -317,7 +321,7 @@ Blockly.inject.bindDocumentEvents_ = function() {
|
||||
// Some iPad versions don't fire resize after portrait to landscape change.
|
||||
if (goog.userAgent.IPAD) {
|
||||
Blockly.bindEvent_(window, 'orientationchange', document, function() {
|
||||
Blockly.fireUiEvent(window, 'resize');
|
||||
Blockly.asyncSvgResize();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -47,7 +47,10 @@ Blockly.Input = function(type, name, block, connection) {
|
||||
this.type = type;
|
||||
/** @type {string} */
|
||||
this.name = name;
|
||||
/** @type {!Blockly.Block} */
|
||||
/**
|
||||
* @type {!Blockly.Block}
|
||||
* @private
|
||||
*/
|
||||
this.sourceBlock_ = block;
|
||||
/** @type {Blockly.Connection} */
|
||||
this.connection = connection;
|
||||
|
||||
@@ -0,0 +1,373 @@
|
||||
/**
|
||||
* @license
|
||||
* Visual Blocks Editor
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Components for creating connections between blocks.
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.RenderedConnection');
|
||||
|
||||
goog.require('Blockly.Connection');
|
||||
|
||||
|
||||
/**
|
||||
* Class for a connection between blocks that may be rendered on screen.
|
||||
* @param {!Blockly.Block} source The block establishing this connection.
|
||||
* @param {number} type The type of the connection.
|
||||
* @constructor
|
||||
*/
|
||||
Blockly.RenderedConnection = function(source, type) {
|
||||
Blockly.RenderedConnection.superClass_.constructor.call(this, source, type);
|
||||
};
|
||||
goog.inherits(Blockly.RenderedConnection, Blockly.Connection);
|
||||
|
||||
/**
|
||||
* Returns the distance between this connection and another connection.
|
||||
* @param {!Blockly.Connection} otherConnection The other connection to measure
|
||||
* the distance to.
|
||||
* @return {number} The distance between connections.
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.distanceFrom = function(otherConnection) {
|
||||
var xDiff = this.x_ - otherConnection.x_;
|
||||
var yDiff = this.y_ - otherConnection.y_;
|
||||
return Math.sqrt(xDiff * xDiff + yDiff * yDiff);
|
||||
};
|
||||
|
||||
/**
|
||||
* Move the block(s) belonging to the connection to a point where they don't
|
||||
* visually interfere with the specified connection.
|
||||
* @param {!Blockly.Connection} staticConnection The connection to move away
|
||||
* from.
|
||||
* @private
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.bumpAwayFrom_ = function(staticConnection) {
|
||||
if (Blockly.dragMode_ != Blockly.DRAG_NONE) {
|
||||
// Don't move blocks around while the user is doing the same.
|
||||
return;
|
||||
}
|
||||
// Move the root block.
|
||||
var rootBlock = this.sourceBlock_.getRootBlock();
|
||||
if (rootBlock.isInFlyout) {
|
||||
// Don't move blocks around in a flyout.
|
||||
return;
|
||||
}
|
||||
var reverse = false;
|
||||
if (!rootBlock.isMovable()) {
|
||||
// Can't bump an uneditable block away.
|
||||
// Check to see if the other block is movable.
|
||||
rootBlock = staticConnection.getSourceBlock().getRootBlock();
|
||||
if (!rootBlock.isMovable()) {
|
||||
return;
|
||||
}
|
||||
// Swap the connections and move the 'static' connection instead.
|
||||
staticConnection = this;
|
||||
reverse = true;
|
||||
}
|
||||
// Raise it to the top for extra visibility.
|
||||
rootBlock.getSvgRoot().parentNode.appendChild(rootBlock.getSvgRoot());
|
||||
var dx = (staticConnection.x_ + Blockly.SNAP_RADIUS) - this.x_;
|
||||
var dy = (staticConnection.y_ + Blockly.SNAP_RADIUS) - this.y_;
|
||||
if (reverse) {
|
||||
// When reversing a bump due to an uneditable block, bump up.
|
||||
dy = -dy;
|
||||
}
|
||||
if (rootBlock.RTL) {
|
||||
dx = -dx;
|
||||
}
|
||||
rootBlock.moveBy(dx, dy);
|
||||
};
|
||||
|
||||
/**
|
||||
* Change the connection's coordinates.
|
||||
* @param {number} x New absolute x coordinate.
|
||||
* @param {number} y New absolute y coordinate.
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.moveTo = function(x, y) {
|
||||
// Remove it from its old location in the database (if already present)
|
||||
if (this.inDB_) {
|
||||
this.db_.removeConnection_(this);
|
||||
}
|
||||
this.x_ = x;
|
||||
this.y_ = y;
|
||||
// Insert it into its new location in the database.
|
||||
if (!this.hidden_) {
|
||||
this.db_.addConnection(this);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Change the connection's coordinates.
|
||||
* @param {number} dx Change to x coordinate.
|
||||
* @param {number} dy Change to y coordinate.
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.moveBy = function(dx, dy) {
|
||||
this.moveTo(this.x_ + dx, this.y_ + dy);
|
||||
};
|
||||
|
||||
/**
|
||||
* Move the blocks on either side of this connection right next to each other.
|
||||
* @private
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.tighten_ = function() {
|
||||
var dx = this.targetConnection.x_ - this.x_;
|
||||
var dy = this.targetConnection.y_ - this.y_;
|
||||
if (dx != 0 || dy != 0) {
|
||||
var block = this.targetBlock();
|
||||
var svgRoot = block.getSvgRoot();
|
||||
if (!svgRoot) {
|
||||
throw 'block is not rendered.';
|
||||
}
|
||||
var xy = Blockly.getRelativeXY_(svgRoot);
|
||||
block.getSvgRoot().setAttribute('transform',
|
||||
'translate(' + (xy.x - dx) + ',' + (xy.y - dy) + ')');
|
||||
block.moveConnections_(-dx, -dy);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Find the closest compatible connection to this connection.
|
||||
* @param {number} maxLimit The maximum radius to another connection.
|
||||
* @param {number} dx Horizontal offset between this connection's location
|
||||
* in the database and the current location (as a result of dragging).
|
||||
* @param {number} dy Vertical offset between this connection's location
|
||||
* in the database and the current location (as a result of dragging).
|
||||
* @return {!{connection: ?Blockly.Connection, radius: number}} Contains two
|
||||
* properties: 'connection' which is either another connection or null,
|
||||
* and 'radius' which is the distance.
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.closest = function(maxLimit, dx, dy) {
|
||||
return this.dbOpposite_.searchForClosest(this, maxLimit, dx, dy);
|
||||
};
|
||||
|
||||
/**
|
||||
* Add highlighting around this connection.
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.highlight = function() {
|
||||
var steps;
|
||||
if (this.type == Blockly.INPUT_VALUE || this.type == Blockly.OUTPUT_VALUE) {
|
||||
var tabWidth = this.sourceBlock_.RTL ? -Blockly.BlockSvg.TAB_WIDTH :
|
||||
Blockly.BlockSvg.TAB_WIDTH;
|
||||
steps = 'm 0,0 ' + Blockly.BlockSvg.TAB_PATH_DOWN + ' v 5';
|
||||
|
||||
} else {
|
||||
steps = 'm -20,0 h 5 ' + Blockly.BlockSvg.NOTCH_PATH_LEFT + ' h 5';
|
||||
}
|
||||
var xy = this.sourceBlock_.getRelativeToSurfaceXY();
|
||||
var x = this.x_ - xy.x;
|
||||
var y = this.y_ - xy.y;
|
||||
Blockly.Connection.highlightedPath_ = Blockly.createSvgElement('path',
|
||||
{'class': 'blocklyHighlightedConnectionPath',
|
||||
'd': steps,
|
||||
transform: 'translate(' + x + ',' + y + ')' +
|
||||
(this.sourceBlock_.RTL ? ' scale(-1 1)' : '')},
|
||||
this.sourceBlock_.getSvgRoot());
|
||||
};
|
||||
|
||||
/**
|
||||
* Unhide this connection, as well as all down-stream connections on any block
|
||||
* attached to this connection. This happens when a block is expanded.
|
||||
* Also unhides down-stream comments.
|
||||
* @return {!Array.<!Blockly.Block>} List of blocks to render.
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.unhideAll = function() {
|
||||
this.setHidden(false);
|
||||
// All blocks that need unhiding must be unhidden before any rendering takes
|
||||
// place, since rendering requires knowing the dimensions of lower blocks.
|
||||
// Also, since rendering a block renders all its parents, we only need to
|
||||
// render the leaf nodes.
|
||||
var renderList = [];
|
||||
if (this.type != Blockly.INPUT_VALUE && this.type != Blockly.NEXT_STATEMENT) {
|
||||
// Only spider down.
|
||||
return renderList;
|
||||
}
|
||||
var block = this.targetBlock();
|
||||
if (block) {
|
||||
var connections;
|
||||
if (block.isCollapsed()) {
|
||||
// This block should only be partially revealed since it is collapsed.
|
||||
connections = [];
|
||||
block.outputConnection && connections.push(block.outputConnection);
|
||||
block.nextConnection && connections.push(block.nextConnection);
|
||||
block.previousConnection && connections.push(block.previousConnection);
|
||||
} else {
|
||||
// Show all connections of this block.
|
||||
connections = block.getConnections_(true);
|
||||
}
|
||||
for (var c = 0; c < connections.length; c++) {
|
||||
renderList.push.apply(renderList, connections[c].unhideAll());
|
||||
}
|
||||
if (!renderList.length) {
|
||||
// Leaf block.
|
||||
renderList[0] = block;
|
||||
}
|
||||
}
|
||||
return renderList;
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove the highlighting around this connection.
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.unhighlight = function() {
|
||||
goog.dom.removeNode(Blockly.Connection.highlightedPath_);
|
||||
delete Blockly.Connection.highlightedPath_;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set whether this connections is hidden (not tracked in a database) or not.
|
||||
* @param {boolean} hidden True if connection is hidden.
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.setHidden = function(hidden) {
|
||||
this.hidden_ = hidden;
|
||||
if (hidden && this.inDB_) {
|
||||
this.db_.removeConnection_(this);
|
||||
} else if (!hidden && !this.inDB_) {
|
||||
this.db_.addConnection(this);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Hide this connection, as well as all down-stream connections on any block
|
||||
* attached to this connection. This happens when a block is collapsed.
|
||||
* Also hides down-stream comments.
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.hideAll = function() {
|
||||
this.setHidden(true);
|
||||
if (this.targetConnection) {
|
||||
var blocks = this.targetBlock().getDescendants();
|
||||
for (var b = 0; b < blocks.length; b++) {
|
||||
var block = blocks[b];
|
||||
// Hide all connections of all children.
|
||||
var connections = block.getConnections_(true);
|
||||
for (var c = 0; c < connections.length; c++) {
|
||||
connections[c].setHidden(true);
|
||||
}
|
||||
// Close all bubbles of all children.
|
||||
var icons = block.getIcons();
|
||||
for (var i = 0; i < icons.length; i++) {
|
||||
icons[i].setVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if the two connections can be dragged to connect to each other.
|
||||
* @param {!Blockly.Connection} candidate A nearby connection to check.
|
||||
* @param {number} maxRadius The maximum radius allowed for connections.
|
||||
* @return {boolean} True if the connection is allowed, false otherwise.
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.isConnectionAllowed = function(candidate,
|
||||
maxRadius) {
|
||||
if (this.distanceFrom(candidate) > maxRadius) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return Blockly.RenderedConnection.superClass_.isConnectionAllowed.call(this,
|
||||
candidate);
|
||||
};
|
||||
|
||||
/**
|
||||
* Disconnect two blocks that are connected by this connection.
|
||||
* @param {!Blockly.Block} parentBlock The superior block.
|
||||
* @param {!Blockly.Block} childBlock The inferior block.
|
||||
* @private
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.disconnectInternal_ = function(parentBlock,
|
||||
childBlock) {
|
||||
Blockly.RenderedConnection.superClass_.disconnectInternal_.call(this,
|
||||
parentBlock, childBlock);
|
||||
// Rerender the parent so that it may reflow.
|
||||
if (parentBlock.rendered) {
|
||||
parentBlock.render();
|
||||
}
|
||||
if (childBlock.rendered) {
|
||||
childBlock.updateDisabled();
|
||||
childBlock.render();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Respawn the shadow block if there was one connected to the this connection.
|
||||
* Render/rerender blocks as needed.
|
||||
* @private
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.respawnShadow_ = function() {
|
||||
var parentBlock = this.getSourceBlock();
|
||||
// Respawn the shadow block if there is one.
|
||||
var shadow = this.getShadowDom();
|
||||
if (parentBlock.workspace && shadow && Blockly.Events.recordUndo) {
|
||||
var blockShadow =
|
||||
Blockly.RenderedConnection.superClass_.respawnShadow_.call(this);
|
||||
if (!blockShadow) {
|
||||
throw 'Couldn\'t respawn the shadow block that should exist here.';
|
||||
}
|
||||
blockShadow.initSvg();
|
||||
blockShadow.render(false);
|
||||
if (parentBlock.rendered) {
|
||||
parentBlock.render();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Find all nearby compatible connections to this connection.
|
||||
* Type checking does not apply, since this function is used for bumping.
|
||||
* @param {number} maxLimit The maximum radius to another connection.
|
||||
* @return {!Array.<!Blockly.Connection>} List of connections.
|
||||
* @private
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.neighbours_ = function(maxLimit) {
|
||||
return this.dbOpposite_.getNeighbours(this, maxLimit);
|
||||
};
|
||||
|
||||
/**
|
||||
* Connect two connections together. This is the connection on the superior
|
||||
* block. Rerender blocks as needed.
|
||||
* @param {!Blockly.Connection} childConnection Connection on inferior block.
|
||||
* @private
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.connect_ = function(childConnection) {
|
||||
Blockly.RenderedConnection.superClass_.connect_.call(this, childConnection);
|
||||
|
||||
var parentConnection = this;
|
||||
var parentBlock = parentConnection.getSourceBlock();
|
||||
var childBlock = childConnection.getSourceBlock();
|
||||
|
||||
if (parentBlock.rendered) {
|
||||
parentBlock.updateDisabled();
|
||||
}
|
||||
if (childBlock.rendered) {
|
||||
childBlock.updateDisabled();
|
||||
}
|
||||
if (parentBlock.rendered && childBlock.rendered) {
|
||||
if (parentConnection.type == Blockly.NEXT_STATEMENT ||
|
||||
parentConnection.type == Blockly.PREVIOUS_STATEMENT) {
|
||||
// Child block may need to square off its corners if it is in a stack.
|
||||
// Rendering a child will render its parent.
|
||||
childBlock.render();
|
||||
} else {
|
||||
// Child block does not change shape. Rendering the parent node will
|
||||
// move its connected children into position.
|
||||
parentBlock.render();
|
||||
}
|
||||
}
|
||||
};
|
||||
+2
-2
@@ -446,6 +446,7 @@ Blockly.Scrollbar.prototype.onMouseDownBar_ = function(e) {
|
||||
this.constrainKnob_(knobValue));
|
||||
this.onScroll_();
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -462,7 +463,6 @@ Blockly.Scrollbar.prototype.onMouseDownKnob_ = function(e) {
|
||||
e.stopPropagation();
|
||||
return;
|
||||
}
|
||||
Blockly.setPageSelectable(false);
|
||||
// Look up the current translation and record it.
|
||||
this.startDragKnob = parseFloat(
|
||||
this.svgKnob_.getAttribute(this.horizontal_ ? 'x' : 'y'));
|
||||
@@ -473,6 +473,7 @@ Blockly.Scrollbar.prototype.onMouseDownKnob_ = function(e) {
|
||||
Blockly.Scrollbar.onMouseMoveWrapper_ = Blockly.bindEvent_(document,
|
||||
'mousemove', this, this.onMouseMoveKnob_);
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -495,7 +496,6 @@ Blockly.Scrollbar.prototype.onMouseMoveKnob_ = function(e) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.Scrollbar.prototype.onMouseUpKnob_ = function() {
|
||||
Blockly.setPageSelectable(true);
|
||||
Blockly.hideChaff(true);
|
||||
if (Blockly.Scrollbar.onMouseUpWrapper_) {
|
||||
Blockly.unbindEvent_(Blockly.Scrollbar.onMouseUpWrapper_);
|
||||
|
||||
+4
-4
@@ -150,7 +150,7 @@ Blockly.Toolbox.prototype.init = function() {
|
||||
this.HtmlDiv.setAttribute('dir', workspace.RTL ? 'RTL' : 'LTR');
|
||||
document.body.appendChild(this.HtmlDiv);
|
||||
|
||||
// Clicking on toolbar closes popups.
|
||||
// Clicking on toolbox closes popups.
|
||||
Blockly.bindEvent_(this.HtmlDiv, 'mousedown', this,
|
||||
function(e) {
|
||||
if (Blockly.isRightButton(e) || e.target == this.HtmlDiv) {
|
||||
@@ -348,7 +348,7 @@ Blockly.Toolbox.prototype.populate_ = function(newTree) {
|
||||
}
|
||||
|
||||
// Fire a resize event since the toolbox may have changed width and height.
|
||||
Blockly.fireUiEvent(window, 'resize');
|
||||
Blockly.asyncSvgResize(this.workspace_);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -386,7 +386,7 @@ Blockly.Toolbox.prototype.clearSelection = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the deletion rectangle for this toolbar.
|
||||
* Return the deletion rectangle for this toolbox.
|
||||
* @return {goog.math.Rect} Rectangle in which to delete.
|
||||
*/
|
||||
Blockly.Toolbox.prototype.getClientRect = function() {
|
||||
@@ -533,7 +533,7 @@ Blockly.Toolbox.TreeNode = function(toolbox, html, opt_config, opt_domHelper) {
|
||||
goog.ui.tree.TreeNode.call(this, html, opt_config, opt_domHelper);
|
||||
if (toolbox) {
|
||||
var resize = function() {
|
||||
Blockly.fireUiEvent(window, 'resize');
|
||||
Blockly.asyncSvgResize(toolbox.workspace_);
|
||||
};
|
||||
// Fire a resize event since the toolbox may have changed width.
|
||||
goog.events.listen(toolbox.tree_,
|
||||
|
||||
+1
-71
@@ -163,63 +163,6 @@ Blockly.unbindEvent_ = function(bindData) {
|
||||
return func;
|
||||
};
|
||||
|
||||
/**
|
||||
* Fire a synthetic event synchronously.
|
||||
* @param {!EventTarget} node The event's target node.
|
||||
* @param {string} eventName Name of event (e.g. 'click').
|
||||
*/
|
||||
Blockly.fireUiEventNow = function(node, eventName) {
|
||||
// Remove the event from the anti-duplicate database.
|
||||
var list = Blockly.fireUiEvent.DB_[eventName];
|
||||
if (list) {
|
||||
var i = list.indexOf(node);
|
||||
if (i != -1) {
|
||||
list.splice(i, 1);
|
||||
}
|
||||
}
|
||||
// Create a UI event in a browser-compatible way.
|
||||
if (typeof UIEvent == 'function') {
|
||||
// W3
|
||||
var evt = new UIEvent(eventName, {});
|
||||
} else {
|
||||
// MSIE
|
||||
var evt = document.createEvent('UIEvent');
|
||||
evt.initUIEvent(eventName, false, false, window, 0);
|
||||
}
|
||||
node.dispatchEvent(evt);
|
||||
};
|
||||
|
||||
/**
|
||||
* Fire a synthetic event asynchronously. Groups of simultaneous events (e.g.
|
||||
* a tree of blocks being deleted) are merged into one event.
|
||||
* @param {!EventTarget} node The event's target node.
|
||||
* @param {string} eventName Name of event (e.g. 'click').
|
||||
*/
|
||||
Blockly.fireUiEvent = function(node, eventName) {
|
||||
var list = Blockly.fireUiEvent.DB_[eventName];
|
||||
if (list) {
|
||||
if (list.indexOf(node) != -1) {
|
||||
// This event is already scheduled to fire.
|
||||
return;
|
||||
}
|
||||
list.push(node);
|
||||
} else {
|
||||
Blockly.fireUiEvent.DB_[eventName] = [node];
|
||||
}
|
||||
var fire = function() {
|
||||
Blockly.fireUiEventNow(node, eventName);
|
||||
};
|
||||
setTimeout(fire, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* Database of upcoming firing event types.
|
||||
* Used to fire only one event after multiple changes.
|
||||
* @type {!Object}
|
||||
* @private
|
||||
*/
|
||||
Blockly.fireUiEvent.DB_ = {};
|
||||
|
||||
/**
|
||||
* Don't do anything for this event, just halt propagation.
|
||||
* @param {!Event} e An event.
|
||||
@@ -346,19 +289,6 @@ Blockly.createSvgElement = function(name, attrs, parent, opt_workspace) {
|
||||
return e;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set css classes to allow/disallow the browser from selecting/highlighting
|
||||
* text, etc. on the page.
|
||||
* @param {boolean} selectable Whether elements on the page can be selected.
|
||||
*/
|
||||
Blockly.setPageSelectable = function(selectable) {
|
||||
if (selectable) {
|
||||
Blockly.removeClass_(document.body, 'blocklyNonSelectable');
|
||||
} else {
|
||||
Blockly.addClass_(document.body, 'blocklyNonSelectable');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Is this event a right-click?
|
||||
* @param {!Event} e Mouse event.
|
||||
@@ -545,7 +475,7 @@ Blockly.tokenizeInterpolation = function(message) {
|
||||
/**
|
||||
* Generate a unique ID. This should be globally unique.
|
||||
* 87 characters ^ 20 length > 128 bits (better than a UUID).
|
||||
* @return {string}
|
||||
* @return {string} A globally unique ID string.
|
||||
*/
|
||||
Blockly.genUid = function() {
|
||||
var length = 20;
|
||||
|
||||
+27
-10
@@ -45,16 +45,33 @@ Blockly.Workspace = function(opt_options) {
|
||||
this.RTL = !!this.options.RTL;
|
||||
/** @type {boolean} */
|
||||
this.horizontalLayout = !!this.options.horizontalLayout;
|
||||
/** @type {number} */
|
||||
this.toolboxPosition = this.options.toolboxPosition;
|
||||
/** @type {!Array.<!Blockly.Block>} */
|
||||
|
||||
/**
|
||||
* @type {!Array.<!Blockly.Block>}
|
||||
* @private
|
||||
*/
|
||||
this.topBlocks_ = [];
|
||||
/** @type {!Array.<!Function>} */
|
||||
/**
|
||||
* @type {!Array.<!Function>}
|
||||
* @private
|
||||
*/
|
||||
this.listeners_ = [];
|
||||
/** @type {!Array.<!Blockly.Events.Abstract>} */
|
||||
/**
|
||||
* @type {!Array.<!Blockly.Events.Abstract>}
|
||||
* @private
|
||||
*/
|
||||
this.undoStack_ = [];
|
||||
/** @type {!Array.<!Blockly.Events.Abstract>} */
|
||||
/**
|
||||
* @type {!Array.<!Blockly.Events.Abstract>}
|
||||
* @private
|
||||
*/
|
||||
this.redoStack_ = [];
|
||||
/** @type {!Object} */
|
||||
/**
|
||||
* @type {!Object}
|
||||
* @private
|
||||
*/
|
||||
this.blockDB_ = Object.create(null);
|
||||
};
|
||||
|
||||
@@ -207,14 +224,14 @@ Blockly.Workspace.prototype.remainingCapacity = function() {
|
||||
Blockly.Workspace.prototype.undo = function(redo) {
|
||||
var inputStack = redo ? this.redoStack_ : this.undoStack_;
|
||||
var outputStack = redo ? this.undoStack_ : this.redoStack_;
|
||||
var event = inputStack.pop();
|
||||
if (!event) {
|
||||
var inputEvent = inputStack.pop();
|
||||
if (!inputEvent) {
|
||||
return;
|
||||
}
|
||||
var events = [event];
|
||||
var events = [inputEvent];
|
||||
// Do another undo/redo if the next one is of the same group.
|
||||
while (inputStack.length && event.group &&
|
||||
event.group == inputStack[inputStack.length - 1].group) {
|
||||
while (inputStack.length && inputEvent.group &&
|
||||
inputEvent.group == inputStack[inputStack.length - 1].group) {
|
||||
events.push(inputStack.pop());
|
||||
}
|
||||
// Push these popped events on the opposite stack.
|
||||
|
||||
@@ -415,7 +415,7 @@ Blockly.WorkspaceSvg.prototype.traceOn = function(armed) {
|
||||
}
|
||||
if (armed) {
|
||||
this.traceWrapper_ = Blockly.bindEvent_(this.svgBlockCanvas_,
|
||||
'blocklySelectChange', this, function() {this.traceOn_ = false});
|
||||
'blocklySelectChange', this, function() {this.traceOn_ = false;});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -534,13 +534,12 @@ Blockly.WorkspaceSvg.prototype.recordDeleteAreas = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Is the mouse event over a delete area (toolbar or non-closing flyout)?
|
||||
* Is the mouse event over a delete area (toolbox or non-closing flyout)?
|
||||
* Opens or closes the trashcan and sets the cursor as a side effect.
|
||||
* @param {!Event} e Mouse move event.
|
||||
* @return {boolean} True if event is in a delete area.
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.isDeleteArea = function(e) {
|
||||
var isDelete = false;
|
||||
var xy = new goog.math.Coordinate(e.clientX, e.clientY);
|
||||
if (this.deleteAreaTrash_) {
|
||||
if (this.deleteAreaTrash_.contains(xy)) {
|
||||
@@ -567,7 +566,6 @@ Blockly.WorkspaceSvg.prototype.isDeleteArea = function(e) {
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.onMouseDown_ = function(e) {
|
||||
this.markFocused();
|
||||
Blockly.setPageSelectable(false);
|
||||
if (Blockly.isTargetInput_(e)) {
|
||||
return;
|
||||
}
|
||||
@@ -610,6 +608,7 @@ Blockly.WorkspaceSvg.prototype.onMouseDown_ = function(e) {
|
||||
}
|
||||
// This event has been handled. No need to bubble up to the document.
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -710,7 +709,7 @@ Blockly.WorkspaceSvg.prototype.cleanUp_ = function() {
|
||||
}
|
||||
Blockly.Events.setGroup(false);
|
||||
// Fire an event to allow scrollbars to resize.
|
||||
Blockly.fireUiEvent(window, 'resize');
|
||||
Blockly.asyncSvgResize(this);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+1
-3
@@ -349,7 +349,7 @@ Blockly.Xml.domToBlock = function(xmlBlock, workspace) {
|
||||
}, 1);
|
||||
topBlock.updateDisabled();
|
||||
// Fire an event to allow scrollbars to resize.
|
||||
Blockly.fireUiEvent(window, 'resize');
|
||||
Blockly.asyncSvgResize(workspace);
|
||||
}
|
||||
Blockly.Events.enable();
|
||||
if (Blockly.Events.isEnabled()) {
|
||||
@@ -386,7 +386,6 @@ Blockly.Xml.domToBlockHeadless_ = function(xmlBlock, workspace) {
|
||||
// Find any enclosed blocks or shadows in this tag.
|
||||
var childBlockNode = null;
|
||||
var childShadowNode = null;
|
||||
var shadowActive = false;
|
||||
for (var j = 0, grandchildNode; grandchildNode = xmlChild.childNodes[j];
|
||||
j++) {
|
||||
if (grandchildNode.nodeType == 1) {
|
||||
@@ -400,7 +399,6 @@ Blockly.Xml.domToBlockHeadless_ = function(xmlBlock, workspace) {
|
||||
// Use the shadow block if there is no child block.
|
||||
if (!childBlockNode && childShadowNode) {
|
||||
childBlockNode = childShadowNode;
|
||||
shadowActive = true;
|
||||
}
|
||||
|
||||
var name = xmlChild.getAttribute('name');
|
||||
|
||||
@@ -29,6 +29,8 @@ c+".insert("+c+".length - "+f+", "+a+");\n"}else if("RANDOM"==e){Blockly.Dart.de
|
||||
Blockly.Dart.lists_getSublist=function(a){var b=Blockly.Dart.valueToCode(a,"LIST",Blockly.Dart.ORDER_UNARY_POSTFIX)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.Dart.valueToCode(a,"AT1",Blockly.Dart.ORDER_NONE)||"1";a=Blockly.Dart.valueToCode(a,"AT2",Blockly.Dart.ORDER_NONE)||"1";("FIRST"==c||"FROM_START"==c&&Blockly.isNumber(e))&&("LAST"==d||"FROM_START"==d&&Blockly.isNumber(a))?(e="FIRST"==c?0:parseInt(e,10)-1,"LAST"==d?b=b+".sublist("+e+")":(a=parseInt(a,10),b=b+".sublist("+
|
||||
e+", "+a+")")):b=Blockly.Dart.provideFunction_("lists_get_sublist",["List "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(list, where1, at1, where2, at2) {"," int getAt(where, at) {"," if (where == 'FROM_START') {"," at--;"," } else if (where == 'FROM_END') {"," at = list.length - at;"," } else if (where == 'FIRST') {"," at = 0;"," } else if (where == 'LAST') {"," at = list.length - 1;"," } else {"," throw 'Unhandled option (lists_getSublist).';"," }"," return at;",
|
||||
" }"," at1 = getAt(where1, at1);"," at2 = getAt(where2, at2) + 1;"," return list.sublist(at1, at2);","}"])+"("+b+", '"+c+"', "+e+", '"+d+"', "+a+")";return[b,Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.lists_sort=function(a){var b=Blockly.Dart.valueToCode(a,"LIST",Blockly.Dart.ORDER_UNARY_POSTFIX)||"[]",c="1"===a.getFieldValue("DIRECTION")?1:-1;a=a.getFieldValue("TYPE");return[Blockly.Dart.provideFunction_("lists_sort",["List "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(list, type, direction) {"," var compareFuncs = {",' "NUMERIC": (a, b) => direction * a.compareTo(b),',' "TEXT": (a, b) => direction * a.toString().compareTo(b.toString()),',' "IGNORE_CASE": '," (a, b) => direction * ",
|
||||
" a.toString().toLowerCase().compareTo(b.toString().toLowerCase())"," };"," list = new List.from(list);"," var compare = compareFuncs[type];"," list.sort(compare);"," return list;","}"])+"("+b+', "'+a+'", '+c+")",Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.lists_split=function(a){var b=Blockly.Dart.valueToCode(a,"INPUT",Blockly.Dart.ORDER_UNARY_POSTFIX),c=Blockly.Dart.valueToCode(a,"DELIM",Blockly.Dart.ORDER_NONE)||"''";a=a.getFieldValue("MODE");if("SPLIT"==a)b||(b="''"),a="split";else if("JOIN"==a)b||(b="[]"),a="join";else throw"Unknown mode: "+a;return[b+"."+a+"("+c+")",Blockly.Dart.ORDER_UNARY_POSTFIX]};Blockly.Dart.logic={};Blockly.Dart.controls_if=function(a){for(var b=0,c=Blockly.Dart.valueToCode(a,"IF"+b,Blockly.Dart.ORDER_NONE)||"false",d=Blockly.Dart.statementToCode(a,"DO"+b),e="if ("+c+") {\n"+d+"}",b=1;b<=a.elseifCount_;b++)c=Blockly.Dart.valueToCode(a,"IF"+b,Blockly.Dart.ORDER_NONE)||"false",d=Blockly.Dart.statementToCode(a,"DO"+b),e+=" else if ("+c+") {\n"+d+"}";a.elseCount_&&(d=Blockly.Dart.statementToCode(a,"ELSE"),e+=" else {\n"+d+"}");return e+"\n"};
|
||||
Blockly.Dart.logic_compare=function(a){var b={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],c="=="==b||"!="==b?Blockly.Dart.ORDER_EQUALITY:Blockly.Dart.ORDER_RELATIONAL,d=Blockly.Dart.valueToCode(a,"A",c)||"0";a=Blockly.Dart.valueToCode(a,"B",c)||"0";return[d+" "+b+" "+a,c]};
|
||||
Blockly.Dart.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?"&&":"||",c="&&"==b?Blockly.Dart.ORDER_LOGICAL_AND:Blockly.Dart.ORDER_LOGICAL_OR,d=Blockly.Dart.valueToCode(a,"A",c);a=Blockly.Dart.valueToCode(a,"B",c);if(d||a){var e="&&"==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+" "+b+" "+a,c]};Blockly.Dart.logic_negate=function(a){var b=Blockly.Dart.ORDER_UNARY_PREFIX;return["!"+(Blockly.Dart.valueToCode(a,"BOOL",b)||"true"),b]};
|
||||
|
||||
@@ -332,6 +332,7 @@
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="lists_sort"></block>
|
||||
</category>
|
||||
<category id="catColour" colour="20">
|
||||
<block type="colour_picker"></block>
|
||||
|
||||
Executable → Regular
+104
-81
File diff suppressed because one or more lines are too long
@@ -310,6 +310,33 @@ Blockly.Dart['lists_getSublist'] = function(block) {
|
||||
return [code, Blockly.Dart.ORDER_UNARY_POSTFIX];
|
||||
};
|
||||
|
||||
Blockly.Dart['lists_sort'] = function(block) {
|
||||
// Block for sorting a list.
|
||||
var listCode = Blockly.Dart.valueToCode(block, 'LIST',
|
||||
Blockly.Dart.ORDER_UNARY_POSTFIX) || '[]';
|
||||
var direction = block.getFieldValue('DIRECTION') === '1' ? 1 : -1;
|
||||
var type = block.getFieldValue('TYPE');
|
||||
var sortFunctionName = Blockly.Dart.provideFunction_(
|
||||
'lists_sort',
|
||||
['List ' + Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_ +
|
||||
'(list, type, direction) {',
|
||||
' var compareFuncs = {',
|
||||
' "NUMERIC": (a, b) => direction * a.compareTo(b),',
|
||||
' "TEXT": (a, b) => direction * a.toString().compareTo(b.toString()),',
|
||||
' "IGNORE_CASE": ',
|
||||
' (a, b) => direction * ',
|
||||
' a.toString().toLowerCase().compareTo(b.toString().toLowerCase())',
|
||||
' };',
|
||||
' list = new List.from(list);', // Clone the list.
|
||||
' var compare = compareFuncs[type];',
|
||||
' list.sort(compare);',
|
||||
' return list;',
|
||||
'}']);
|
||||
return [sortFunctionName + '(' + listCode + ', ' +
|
||||
'"' + type + '", ' + direction + ')',
|
||||
Blockly.Dart.ORDER_UNARY_POSTFIX];
|
||||
};
|
||||
|
||||
Blockly.Dart['lists_split'] = function(block) {
|
||||
// Block for splitting text into a list, or joining a list into text.
|
||||
var value_input = Blockly.Dart.valueToCode(block, 'INPUT',
|
||||
|
||||
@@ -299,6 +299,34 @@ Blockly.JavaScript['lists_getSublist'] = function(block) {
|
||||
return [code, Blockly.JavaScript.ORDER_FUNCTION_CALL];
|
||||
};
|
||||
|
||||
Blockly.JavaScript['lists_sort'] = function(block) {
|
||||
// Block for sorting a list.
|
||||
var listCode = Blockly.JavaScript.valueToCode(
|
||||
block, 'LIST',
|
||||
Blockly.JavaScript.ORDER_FUNCTION_CALL) || '[]';
|
||||
var direction = block.getFieldValue('DIRECTION') === '1' ? 1 : -1;
|
||||
var type = block.getFieldValue('TYPE');
|
||||
var getCompareFunctionName = Blockly.JavaScript.provideFunction_(
|
||||
'lists_get_sort_compare',
|
||||
['function ' + Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_ +
|
||||
'(type, direction) {',
|
||||
' var compareFuncs = {',
|
||||
' "NUMERIC": function(a, b) {',
|
||||
' return parseFloat(a) - parseFloat(b); },',
|
||||
' "TEXT": function(a, b) {',
|
||||
' return a.toString().localeCompare(b.toString(), "en"); },',
|
||||
' "IGNORE_CASE": function(a, b) {',
|
||||
' return a.toString().localeCompare(b.toString(), "en",',
|
||||
' {"sensitivity": "base"}); },',
|
||||
' };',
|
||||
' var compare = compareFuncs[type];',
|
||||
' return function(a, b) { return compare(a, b) * direction; }',
|
||||
'}']);
|
||||
return ['(' + listCode + ').slice().sort(' +
|
||||
getCompareFunctionName + '("' + type + '", ' + direction + '))',
|
||||
Blockly.JavaScript.ORDER_FUNCTION_CALL];
|
||||
};
|
||||
|
||||
Blockly.JavaScript['lists_split'] = function(block) {
|
||||
// Block for splitting text into a list, or joining a list into text.
|
||||
var value_input = Blockly.JavaScript.valueToCode(block, 'INPUT',
|
||||
|
||||
@@ -320,6 +320,42 @@ Blockly.Lua['lists_getSublist'] = function(block) {
|
||||
return [code, Blockly.Lua.ORDER_HIGH];
|
||||
};
|
||||
|
||||
Blockly.Lua['lists_sort'] = function(block) {
|
||||
// Block for sorting a list.
|
||||
var listCode = Blockly.Lua.valueToCode(
|
||||
block, 'LIST', Blockly.Lua.ORDER_HIGH) || '({})';
|
||||
var direction = block.getFieldValue('DIRECTION') === '1' ? 1 : -1;
|
||||
var type = block.getFieldValue('TYPE');
|
||||
|
||||
var functionName = Blockly.Lua.provideFunction_(
|
||||
'list_sort',
|
||||
['function ' + Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_ +
|
||||
'(list, typev, direction)',
|
||||
' local t = {}',
|
||||
' for n,v in pairs(list) do table.insert(t, v) end', // Shallow-copy.
|
||||
' local compareFuncs = {',
|
||||
' NUMERIC = function(a, b)',
|
||||
' return (tonumber(tostring(a)) or 0)',
|
||||
' < (tonumber(tostring(b)) or 0) end,',
|
||||
' TEXT = function(a, b)',
|
||||
' return tostring(a) < tostring(b) end,',
|
||||
' IGNORE_CASE = function(a, b)',
|
||||
' return string.lower(tostring(a)) < string.lower(tostring(b)) end',
|
||||
' }',
|
||||
' local compareTemp = compareFuncs[typev]',
|
||||
' local compare = compareTemp',
|
||||
' if direction == -1',
|
||||
' then compare = function(a, b) return compareTemp(b, a) end',
|
||||
' end',
|
||||
' table.sort(t, compare)',
|
||||
' return t',
|
||||
'end']);
|
||||
|
||||
var code = functionName +
|
||||
'(' + listCode + ',"' + type + '", ' + direction + ')';
|
||||
return [code, Blockly.Lua.ORDER_HIGH];
|
||||
};
|
||||
|
||||
Blockly.Lua['lists_split'] = function(block) {
|
||||
// Block for splitting text into a list, or joining a list into text.
|
||||
var value_input = Blockly.Lua.valueToCode(block, 'INPUT',
|
||||
|
||||
@@ -356,6 +356,34 @@ Blockly.PHP['lists_getSublist'] = function(block) {
|
||||
return [code, Blockly.PHP.ORDER_FUNCTION_CALL];
|
||||
};
|
||||
|
||||
Blockly.PHP['lists_sort'] = function(block) {
|
||||
// Block for sorting a list.
|
||||
var listCode = Blockly.PHP.valueToCode(block, 'LIST',
|
||||
Blockly.PHP.ORDER_FUNCTION_CALL) || 'array()';
|
||||
var direction = block.getFieldValue('DIRECTION') === '1' ? 1 : -1;
|
||||
var type = block.getFieldValue('TYPE');
|
||||
var functionName = Blockly.PHP.provideFunction_(
|
||||
'lists_sort', [
|
||||
'function ' + Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_ +
|
||||
'($list, $type, $direction) {',
|
||||
' $sortCmpFuncs = array(',
|
||||
' "NUMERIC" => "strnatcasecmp",',
|
||||
' "TEXT" => "strcmp",',
|
||||
' "IGNORE_CASE" => "strcasecmp"',
|
||||
' );',
|
||||
' $sortCmp = $sortCmpFuncs[$type];',
|
||||
' $list2 = $list;', // Clone list.
|
||||
' usort($list2, $sortCmp);',
|
||||
' if ($direction == -1) {',
|
||||
' $list2 = array_reverse($list2);',
|
||||
' }',
|
||||
' return $list2;',
|
||||
'}']);
|
||||
var sortCode = functionName +
|
||||
'(' + listCode + ', "' + type + '", ' + direction + ')';
|
||||
return [sortCode, Blockly.PHP.ORDER_FUNCTION_CALL];
|
||||
};
|
||||
|
||||
Blockly.PHP['lists_split'] = function(block) {
|
||||
// Block for splitting text into a list, or joining a list into text.
|
||||
var value_input = Blockly.PHP.valueToCode(block, 'INPUT',
|
||||
|
||||
@@ -312,6 +312,35 @@ Blockly.Python['lists_getSublist'] = function(block) {
|
||||
return [code, Blockly.Python.ORDER_MEMBER];
|
||||
};
|
||||
|
||||
Blockly.Python['lists_sort'] = function(block) {
|
||||
// Block for sorting a list.
|
||||
var listCode = (Blockly.Python.valueToCode(block, 'LIST',
|
||||
Blockly.Python.ORDER_MEMBER) || '[]');
|
||||
var type = block.getFieldValue('TYPE');
|
||||
var reverse = block.getFieldValue('DIRECTION') === '1' ? 'False' : 'True';
|
||||
var sortFunctionName = Blockly.Python.provideFunction_('lists_sort',
|
||||
['def ' + Blockly.Python.FUNCTION_NAME_PLACEHOLDER_ +
|
||||
'(listv, type, reversev):',
|
||||
' def tryfloat(s):',
|
||||
' try:',
|
||||
' return float(s)',
|
||||
' except:',
|
||||
' return 0',
|
||||
' keyFuncts = {',
|
||||
' "NUMERIC": tryfloat,',
|
||||
' "TEXT": str,',
|
||||
' "IGNORE_CASE": lambda s: str(s).lower()',
|
||||
' }',
|
||||
' keyv = keyFuncts[type]',
|
||||
' tmp_list = list(listv)', // Clone the list.
|
||||
' return sorted(tmp_list, key=keyv, reverse=reversev)'
|
||||
]);
|
||||
|
||||
var code = sortFunctionName +
|
||||
'(' + listCode + ', "' + type + '", ' + reverse + ')';
|
||||
return [code, Blockly.Python.ORDER_FUNCTION_CALL];
|
||||
};
|
||||
|
||||
Blockly.Python['lists_split'] = function(block) {
|
||||
// Block for splitting text into a list, or joining a list into text.
|
||||
var mode = block.getFieldValue('MODE');
|
||||
|
||||
@@ -28,7 +28,10 @@ Blockly.JavaScript.lists_setIndex=function(a){function b(){if(c.match(/^\w+$/))r
|
||||
c+".splice("+c+".length - "+f+", 0, "+a+");\n"}else if("RANDOM"==e){e=b();f=Blockly.JavaScript.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);e+="var "+f+" = Math.floor(Math.random() * "+c+".length);\n";if("SET"==d)return e+=c+"["+f+"] = "+a+";\n";if("INSERT"==d)return e+=c+".splice("+f+", 0, "+a+");\n"}throw"Unhandled combination (lists_setIndex).";};
|
||||
Blockly.JavaScript.lists_getSublist=function(a){var b=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_MEMBER)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.JavaScript.valueToCode(a,"AT1",Blockly.JavaScript.ORDER_NONE)||"1";a=Blockly.JavaScript.valueToCode(a,"AT2",Blockly.JavaScript.ORDER_NONE)||"1";return["FIRST"==c&&"LAST"==d?b+".concat()":Blockly.JavaScript.provideFunction_("lists_get_sublist",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+
|
||||
"(list, where1, at1, where2, at2) {"," function getAt(where, at) {"," if (where == 'FROM_START') {"," at--;"," } else if (where == 'FROM_END') {"," at = list.length - at;"," } else if (where == 'FIRST') {"," at = 0;"," } else if (where == 'LAST') {"," at = list.length - 1;"," } else {"," throw 'Unhandled option (lists_getSublist).';"," }"," return at;"," }"," at1 = getAt(where1, at1);"," at2 = getAt(where2, at2) + 1;"," return list.slice(at1, at2);",
|
||||
"}"])+"("+b+", '"+c+"', "+e+", '"+d+"', "+a+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]};Blockly.JavaScript.lists_split=function(a){var b=Blockly.JavaScript.valueToCode(a,"INPUT",Blockly.JavaScript.ORDER_MEMBER),c=Blockly.JavaScript.valueToCode(a,"DELIM",Blockly.JavaScript.ORDER_NONE)||"''";a=a.getFieldValue("MODE");if("SPLIT"==a)b||(b="''"),a="split";else if("JOIN"==a)b||(b="[]"),a="join";else throw"Unknown mode: "+a;return[b+"."+a+"("+c+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]};Blockly.JavaScript.logic={};
|
||||
"}"])+"("+b+", '"+c+"', "+e+", '"+d+"', "+a+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.lists_sort=function(a){var b=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_FUNCTION_CALL)||"[]",c="1"===a.getFieldValue("DIRECTION")?1:-1;a=a.getFieldValue("TYPE");var d=Blockly.JavaScript.provideFunction_("lists_get_sort_compare",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(type, direction) {"," var compareFuncs = {",' "NUMERIC": function(a, b) {'," return parseFloat(a) - parseFloat(b); },",' "TEXT": function(a, b) {',' return a.toString().localeCompare(b.toString(), "en"); },',
|
||||
' "IGNORE_CASE": function(a, b) {',' return a.toString().localeCompare(b.toString(), "en",',' {"sensitivity": "base"}); },'," };"," var compare = compareFuncs[type];"," return function(a, b) { return compare(a, b) * direction; }","}"]);return["("+b+").slice().sort("+d+'("'+a+'", '+c+"))",Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.lists_split=function(a){var b=Blockly.JavaScript.valueToCode(a,"INPUT",Blockly.JavaScript.ORDER_MEMBER),c=Blockly.JavaScript.valueToCode(a,"DELIM",Blockly.JavaScript.ORDER_NONE)||"''";a=a.getFieldValue("MODE");if("SPLIT"==a)b||(b="''"),a="split";else if("JOIN"==a)b||(b="[]"),a="join";else throw"Unknown mode: "+a;return[b+"."+a+"("+c+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]};Blockly.JavaScript.logic={};
|
||||
Blockly.JavaScript.controls_if=function(a){for(var b=0,c=Blockly.JavaScript.valueToCode(a,"IF"+b,Blockly.JavaScript.ORDER_NONE)||"false",d=Blockly.JavaScript.statementToCode(a,"DO"+b),e="if ("+c+") {\n"+d+"}",b=1;b<=a.elseifCount_;b++)c=Blockly.JavaScript.valueToCode(a,"IF"+b,Blockly.JavaScript.ORDER_NONE)||"false",d=Blockly.JavaScript.statementToCode(a,"DO"+b),e+=" else if ("+c+") {\n"+d+"}";a.elseCount_&&(d=Blockly.JavaScript.statementToCode(a,"ELSE"),e+=" else {\n"+d+"}");return e+"\n"};
|
||||
Blockly.JavaScript.logic_compare=function(a){var b={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],c="=="==b||"!="==b?Blockly.JavaScript.ORDER_EQUALITY:Blockly.JavaScript.ORDER_RELATIONAL,d=Blockly.JavaScript.valueToCode(a,"A",c)||"0";a=Blockly.JavaScript.valueToCode(a,"B",c)||"0";return[d+" "+b+" "+a,c]};
|
||||
Blockly.JavaScript.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?"&&":"||",c="&&"==b?Blockly.JavaScript.ORDER_LOGICAL_AND:Blockly.JavaScript.ORDER_LOGICAL_OR,d=Blockly.JavaScript.valueToCode(a,"A",c);a=Blockly.JavaScript.valueToCode(a,"B",c);if(d||a){var e="&&"==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+" "+b+" "+a,c]};
|
||||
|
||||
@@ -24,6 +24,8 @@ Blockly.Lua.lists_setIndex=function(a){var b=Blockly.Lua.valueToCode(a,"LIST",Bl
|
||||
Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(t, index, val)"," t[#t + 1 - index] = val","end"]):Blockly.Lua.provideFunction_("list_insert_from_end",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(t, index, val)"," table.insert(t, #t + 1 - index, val)","end"]);return c+"("+b+", "+e+", "+a+")\n"};
|
||||
Blockly.Lua.lists_getSublist=function(a){var b=Blockly.Lua.valueToCode(a,"LIST",Blockly.Lua.ORDER_HIGH)||"({})",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.Lua.valueToCode(a,"AT1",Blockly.Lua.ORDER_ADDITIVE)||"1";a=Blockly.Lua.valueToCode(a,"AT2",Blockly.Lua.ORDER_ADDITIVE)||"1";var f=Blockly.Lua.lists.getIndex_;return[Blockly.Lua.provideFunction_("list_sublist_"+Blockly.Lua.lists.gensym_(),["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(source)"," local t = {}"," local start = "+
|
||||
f("source",c,e)," local finish = "+f("source",d,a)," for i = start, finish do"," table.insert(t, source[i])"," end"," return t","end"])+"("+b+")",Blockly.Lua.ORDER_HIGH]};
|
||||
Blockly.Lua.lists_sort=function(a){var b=Blockly.Lua.valueToCode(a,"LIST",Blockly.Lua.ORDER_HIGH)||"({})",c="1"===a.getFieldValue("DIRECTION")?1:-1;a=a.getFieldValue("TYPE");return[Blockly.Lua.provideFunction_("list_sort",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(list, typev, direction)"," local t = {}"," for n,v in pairs(list) do table.insert(t, v) end"," local compareFuncs = {"," NUMERIC = function(a, b)"," return (tonumber(tostring(a)) or 0)"," < (tonumber(tostring(b)) or 0) end,",
|
||||
" TEXT = function(a, b)"," return tostring(a) < tostring(b) end,"," IGNORE_CASE = function(a, b)"," return string.lower(tostring(a)) < string.lower(tostring(b)) end"," }"," local compareTemp = compareFuncs[typev]"," local compare = compareTemp"," if direction == -1"," then compare = function(a, b) return compareTemp(b, a) end"," end"," table.sort(t, compare)"," return t","end"])+"("+b+',"'+a+'", '+c+")",Blockly.Lua.ORDER_HIGH]};
|
||||
Blockly.Lua.lists_split=function(a){var b=Blockly.Lua.valueToCode(a,"INPUT",Blockly.Lua.ORDER_NONE),c=Blockly.Lua.valueToCode(a,"DELIM",Blockly.Lua.ORDER_NONE)||"''";a=a.getFieldValue("MODE");if("SPLIT"==a)b||(b="''"),a=Blockly.Lua.provideFunction_("list_string_split",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(input, delim)"," local t = {}"," local pos = 1"," while true do"," next_delim = string.find(input, delim, pos)"," if next_delim == nil then"," table.insert(t, string.sub(input, pos))",
|
||||
" break"," else"," table.insert(t, string.sub(input, pos, next_delim-1))"," pos = next_delim + #delim"," end"," end"," return t","end"]);else if("JOIN"==a)b||(b="({})"),a="table.concat";else throw"Unknown mode: "+a;return[a+"("+b+", "+c+")",Blockly.Lua.ORDER_HIGH]};Blockly.Lua.logic={};Blockly.Lua.controls_if=function(a){for(var b=0,c=Blockly.Lua.valueToCode(a,"IF"+b,Blockly.Lua.ORDER_NONE)||"false",d=Blockly.Lua.statementToCode(a,"DO"+b),e="if "+c+" then\n"+d,b=1;b<=a.elseifCount_;b++)c=Blockly.Lua.valueToCode(a,"IF"+b,Blockly.Lua.ORDER_NONE)||"false",d=Blockly.Lua.statementToCode(a,"DO"+b),e+=" elseif "+c+" then\n"+d;a.elseCount_&&(d=Blockly.Lua.statementToCode(a,"ELSE"),e+=" else\n"+d);return e+"end\n"};
|
||||
Blockly.Lua.logic_compare=function(a){var b={EQ:"==",NEQ:"~=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],c=Blockly.Lua.valueToCode(a,"A",Blockly.Lua.ORDER_RELATIONAL)||"0";a=Blockly.Lua.valueToCode(a,"B",Blockly.Lua.ORDER_RELATIONAL)||"0";return[c+" "+b+" "+a,Blockly.Lua.ORDER_RELATIONAL]};
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "يحدد العنصر في
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "يحدد العنصر في الموضع المحدد في قائمة ما. #1 هو العنصر الأول.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "يحدد العنصر الأخير في قائمة.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "يحدد عنصرا عشوائيا في قائمة.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "إعداد قائمة من النصوص";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "إعداد نص من القائمة";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Siyahının göstərilən ye
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Siyahının göstərilən yerdəki elementini təyin edir. #1 birinci elementdir.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Siyahının sonuncu elementini təyin edir.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Siyahının təsadüfi seçilmiş bir elementini təyin edir.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specifi
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "مورد مشخصشده
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "مورد مشخصشده در یک فهرست را قرار میدهد. #1 اولین مورد است.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "آخرین مورد در یک فهرست را تعیین میکند.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "یک مورد تصادفی در یک فهرست را تعیین میکند.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Задае элемэнт у
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Задае элемэнт у пазначанай пазыцыі ў сьпісе. №1 — першы элемэнт.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Задае апошні элемэнт у сьпісе.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Задае выпадковы элемэнт у сьпісе.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "стварыць сьпіс з тэксту";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "стварыць тэкст са сьпісу";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Променя елемен
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Променя елемента на определена позиция в списък. #1 е първият елемент.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Променя последния елемент в списък.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Променя случаен елемент от списък.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "Направи списък от текст";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "направи текст от списък";
|
||||
|
||||
+10
-2
@@ -80,7 +80,7 @@ Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "তালিকা";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this list block."; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "create list with"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "তালিকায় একটি পদ যোগ করে।";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "তালিকায় একটি পদ যোগ করুন।";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "যেকোন সংখ্যক পদ নিয়ে একটি তালিকা তৈরি করুন।";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FIRST = "প্রথম";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# শেষ থেকে";
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specifi
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "লিখা থেকে তালিকা তৈরি করুন";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "তালিকা থেকে লিখা তৈরি করুন";
|
||||
@@ -165,7 +173,7 @@ Blockly.Msg.LOGIC_NEGATE_TITLE = "%1 নয়";
|
||||
Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "পাঠাবে সত্য যদি ইনপুট মিথ্যা হয়। পাঠাবে মিথ্যা যদি ইনপুট সত্য হয়।";
|
||||
Blockly.Msg.LOGIC_NULL = "কিছু না";
|
||||
Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated
|
||||
Blockly.Msg.LOGIC_NULL_TOOLTIP = "কিছু না ফেরত দিবে।";
|
||||
Blockly.Msg.LOGIC_NULL_TOOLTIP = "কিছু ফেরত দিবে না।";
|
||||
Blockly.Msg.LOGIC_OPERATION_AND = "এবং";
|
||||
Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated
|
||||
Blockly.Msg.LOGIC_OPERATION_OR = "অথবা";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Termenañ a ra an elfenn el
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Termenañ a ra an elfenn el lec'h meneget en ul listenn. #1 eo an elfenn ziwezhañ.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Termenañ a ra an elfenn diwezhañ en ul listenn.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Termenañ a ra un elfenn dre zegouezh en ul listenn.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "Krouiñ ul listenn diwar an destenn";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "Krouiñ un destenn diwar al listenn";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Modifica l'element de la pos
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Modifica l'element de la posició especificada d'una llista. #1 és el primer element.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Modifica l'últim element d'una llista.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Modifica un element a l'atzar d'una llista.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Nastaví položku na konkré
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Nastaví položku na konkrétní místo v seznamu. #1 je první položka.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Nastaví poslední položku v seznamu.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Nastaví náhodnou položku v seznamu.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "udělat z textu seznam";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "udělat ze seznamu text";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sætter elementet på den an
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sætter elementet på den angivne position i en liste. #1 er det første element.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sætter det sidste element i en liste.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sætter et tilfældigt element i en liste.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "lav tekst til liste";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "lav liste til tekst";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Setzt das Element an der ang
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Setzte das Element an der angegebenen Position in der Liste. #1 ist das erste Element.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Setzt das letzte Element in der Liste.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Setzt ein zufälliges Element in der Liste.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "Liste aus Text erstellen";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "Text aus Liste erstellen";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Ορίζει το στοιχ
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Ορίζει το στοιχείο στην καθορισμένη θέση σε μια λίστα. Το #1 είναι το πρώτο στοιχείο.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Ορίζει το τελευταίο στοιχείο σε μια λίστα.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Ορίζει ένα τυχαίο στοιχείο σε μια λίστα.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "κάνετε λίστα από το κείμενο";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "κάνετε κείμενο από τη λίστα";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specifi
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list.";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic";
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Establece el elemento en la
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Establece el elemento en la posición especificada en una lista. #1 es el primer elemento.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Establece el último elemento de una lista.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Establece un elemento aleatorio en una lista.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "hacer lista a partir de texto";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "hacer texto a partir de lista";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "مورد مشخصشده
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "مورد مشخصشده در یک فهرست را قرار میدهد. #1 اولین مورد است.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "آخرین مورد در یک فهرست را تعیین میکند.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "یک مورد تصادفی در یک فهرست را تعیین میکند.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "ایجاد فهرست از متن";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "ایجاد متن از فهرست";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Asettaa listan määrätyss
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Asettaa kohteen määrättyyn kohtaa listassa. Nro 1 on listan alku.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Asettaa listan viimeisen kohteen.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Asettaa satunnaisen kohteen listassa.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "tee lista tekstistä";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "tee listasta teksti";
|
||||
|
||||
+11
-3
@@ -7,7 +7,7 @@ goog.provide('Blockly.Msg.fr');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Ajouter un commentaire";
|
||||
Blockly.Msg.AUTH = "Veuillez autoriser cette application à permettre la sauvegarde de votre travail et à l’autoriser à la partager.";
|
||||
Blockly.Msg.AUTH = "Veuillez autoriser cette application à permettre la sauvegarde de votre travail et à l’autoriser d'être partagé par vous.";
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Modifier la valeur :";
|
||||
Blockly.Msg.CHAT = "Discutez avec votre collaborateur en tapant dans cette zone !";
|
||||
Blockly.Msg.CLEAN_UP = "Nettoyer les blocs";
|
||||
@@ -28,7 +28,7 @@ Blockly.Msg.COLOUR_RGB_BLUE = "bleu";
|
||||
Blockly.Msg.COLOUR_RGB_GREEN = "vert";
|
||||
Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html";
|
||||
Blockly.Msg.COLOUR_RGB_RED = "rouge";
|
||||
Blockly.Msg.COLOUR_RGB_TITLE = "colorer avec";
|
||||
Blockly.Msg.COLOUR_RGB_TITLE = "colorier avec";
|
||||
Blockly.Msg.COLOUR_RGB_TOOLTIP = "Créer une couleur avec la quantité spécifiée de rouge, vert et bleu. Les valeurs doivent être comprises entre 0 et 100.";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "quitter la boucle";
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Fixe l’élément à la pos
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Fixe l’élément à la position indiquée dans une liste. #1 est le premier élément.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Fixe le dernier élément dans une liste.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Fixe un élément au hasard dans une liste.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "créer une liste depuis le texte";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "créer un texte depuis la liste";
|
||||
@@ -261,7 +269,7 @@ Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = "Renvoie le sinus d’un angle en degrés (p
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "Renvoie la tangente d’un angle en degrés (pas en radians).";
|
||||
Blockly.Msg.ME = "Moi";
|
||||
Blockly.Msg.NEW_VARIABLE = "Nouvelle variable…";
|
||||
Blockly.Msg.NEW_VARIABLE_TITLE = "Nom de la nouvelle variable :";
|
||||
Blockly.Msg.NEW_VARIABLE_TITLE = "Nouveau nom de la variable :";
|
||||
Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ""; // untranslated
|
||||
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "autoriser les ordres";
|
||||
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "avec :";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "מגדיר את הפריט
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "מגדיר את הפריט במיקום שצוין ברשימה. #1 הוא הפריט הראשון.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "מגדיר את הפריט האחרון ברשימה.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "מגדיר פריט אקראי ברשימה.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "יצירת רשימה מטקסט";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "יצירת טקסט מרשימה";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "सूची मे बत
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "सूची मे बताए गये स्थान में आइटम सैट करता है। #1 पहला आइटम है।";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "सूची में आखरी आइटम सैट करता है।";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "सूची में रैन्डम आइटम सैट करता है।";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Setzt das Element zu en defi
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Setzt das Element zu en definierte Stell in en List. #1 ist das earschte Element.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Setzt das letzte Element an en List.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Setzt en zufälliches Element an en List.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "A megadott sorszámú elem c
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "A megadott sorszámú elem cseréje a listában. 1 az első elemet jelenti.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Az utolsó elem cseréje a listában.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Véletlenszerűen választott elem cseréje a listában.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "lista készítése szövegből";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "sztring készítése listából";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Defini le valor del elemento
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Defini le valor del elemento al position specificate in un lista. № 1 es le prime elemento.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Defini le valor del ultime elemento in un lista.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Defini le valor de un elemento aleatori in un lista.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "Crear un lista per un texto";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "crear un texto per un lista";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Tetapkan item ke dalam posis
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Tetapkan item ke dalam posisi yang telah ditentukan di dalam list. #1 adalah item yang pertama.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Menetapkan item terakhir dalam list.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Tetapkan secara acak sebuah item dalam list.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "buat list dari teks";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "buat teks dari list";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Setur atriðið í tiltekna
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Setur atriðið í tiltekna sætið í listanum. #1 er fyrsta atriðið.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Setur atriðið í síðasta sæti lista.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Setur atriðið í eitthvert sæti lista.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "gera lista úr texta";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "gera texta úr lista";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Imposta l'elemento nella pos
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Imposta l'elemento nella posizione indicata di una lista. 1 corrisponde al primo elemento.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Imposta l'ultimo elemento in una lista.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Imposta un elemento casuale in una lista.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "crea lista da testo";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "crea testo da lista";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "リスト内の指定され
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "リスト内の指定された位置に項目を設定します。# 1 は、最初の項目です。";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "リスト内の最後の項目を設定します。";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "リスト内にランダムなアイテムを設定します。";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "テキストからリストを作る";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "リストからテキストを作る";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "특정 번째 위치의 아
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "특정 번째 위치의 아이템으로 설정합니다. #1 는 첫번째 아이템.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "마지막 아이템으로 설정합니다.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "목록에서 임의 위치의 아이템을 설정합니다.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "텍스트에서 목록 만들기";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "목록에서 텍스트 만들기";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specifi
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Setzt en zoufällegt Element an eng Lëscht.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "مورد مشخصشده
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "مورد مشخصشده در یک فهرست را قرار میدهد. #1 اولین مورد است.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "آخرین مورد در یک فهرست را تعیین میکند.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "یک مورد تصادفی در یک فهرست را تعیین میکند.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "ساخت لیست إژ متن";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "ساخت متن إژ لیست";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specifi
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specifi
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specifi
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Masukkan item pada posisi ya
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Masukkan item pada posisi yang ditentukan dalam senarai. #1 ialah item terakhir.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Set item terakhir dalam senarai.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Set item rawak dalam senarai.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "buat senarai dgn teks";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "buat teks drpd senarai";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Setter inn elementet ved den
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Setter inn elementet ved den angitte posisjonen i en liste. #1 er det første elementet.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Angir det siste elementet i en liste.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Angir et tilfeldig element i en liste.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "lag liste av tekst";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "lag tekst av liste";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Stelt het item op een opgege
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Stelt het item op de opgegeven positie in de lijst in. Item 1 is het eerste item.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Stelt het laatste item van een lijst in.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Stelt een willekeurig item uit de lijst in.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "lijst maken van tekst";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "tekst maken van lijst";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specifi
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
+14
-6
@@ -7,7 +7,7 @@ goog.provide('Blockly.Msg.pl');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Dodaj komentarz";
|
||||
Blockly.Msg.AUTH = "Proszę autoryzować ten program, aby można było zapisać swoją pracę i umożliwić Ci dzielenie się nią.";
|
||||
Blockly.Msg.AUTH = "Autoryzuj ten program, aby można było zapisać Twoją pracę i umożliwić Ci dzielenie się nią z innymi.";
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Zmień wartość:";
|
||||
Blockly.Msg.CHAT = "Rozmawiaj z swoim współpracownikiem, pisząc w tym polu!";
|
||||
Blockly.Msg.CLEAN_UP = "Uporządkuj bloki";
|
||||
@@ -35,10 +35,10 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "wyjdź z pętli";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "przejdź do kolejnej iteracji pętli";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Wyjdź z zawierającej pętli.";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Pomiń resztę pętli i kontynuuj w kolejnej iteracji.";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Ostrzeżenie: Ten blok może być użyty tylko w pętli.";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Uwaga: Ten blok może być użyty tylko w pętli.";
|
||||
Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOREACH_TITLE = "dla każdego elementu %1 na liście %2";
|
||||
Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Dla każdego elementu z listy przyporządkuj zmienną '%1', a następnie wykonaj kilka instrukcji.";
|
||||
Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Dla każdego elementu listy ustaw zmienną %1 na ten element, a następnie wykonaj kilka instrukcji.";
|
||||
Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOR_TITLE = "licz z %1 od %2 do %3 co %4 (wartość kroku)";
|
||||
Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Przypisuje zmiennej %1 wartości od numeru startowego do numeru końcowego, licząc co określony interwał, wykonując określone bloki.";
|
||||
@@ -66,7 +66,7 @@ Blockly.Msg.DELETE_ALL_BLOCKS = "Usunąć wszystkie %1 bloki(ów)?";
|
||||
Blockly.Msg.DELETE_BLOCK = "Usuń blok";
|
||||
Blockly.Msg.DELETE_X_BLOCKS = "Usuń %1 bloki(ów)";
|
||||
Blockly.Msg.DISABLE_BLOCK = "Wyłącz blok";
|
||||
Blockly.Msg.DUPLICATE_BLOCK = "Powiel";
|
||||
Blockly.Msg.DUPLICATE_BLOCK = "Duplikuj";
|
||||
Blockly.Msg.ENABLE_BLOCK = "Włącz blok";
|
||||
Blockly.Msg.EXPAND_ALL = "Rozwiń bloki";
|
||||
Blockly.Msg.EXPAND_BLOCK = "Rozwiń blok";
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Ustawia element w określony
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Ustawia element w określonym miejscu na liście. #1 to pierwszy element.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Ustawia ostatni element na liście.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Ustawia losowy element na liście.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "stwórz listę z tekstu";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "stwórz tekst z listy";
|
||||
@@ -280,11 +288,11 @@ Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = "Tworzy funkcję bez wyniku.";
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = "zwróć";
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "Tworzy funkcję z wynikiem.";
|
||||
Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "Ostrzeżenie: Ta funkcja ma powtórzone parametry.";
|
||||
Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "Uwaga: Ta funkcja ma powtórzone parametry.";
|
||||
Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "Podświetl definicję funkcji";
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_HELPURL = "http://c2.com/cgi/wiki?GuardClause"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "Jeśli wartość jest prawdziwa, zwróć drugą wartość.";
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "Ostrzeżenie: Ten blok może być używany tylko w definicji funkcji.";
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "Uwaga: Ten blok może być używany tylko w definicji funkcji.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nazwa wejścia:";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Dodaj dane wejściowe do funkcji.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "wejścia";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "A fissa l'element a la posis
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "A fissa l'element a la posission ëspessificà an na lista. #1 a l'é ël prim element.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "A fissa l'ùltim element an na lista.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "A fissa n'element a l'ancàpit an na lista.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "fé na lista da 'n test";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "fé 'n test da na lista";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Define o item da posição e
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Define o item da posição especificada de uma lista. #1 é o primeiro item.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Define o último item de uma lista.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Define um item aleatório de uma lista.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "Fazer uma lista a partir do texto";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "fazer um texto a partir da lista";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Define o item na posição e
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Define o item na posição especificada de uma lista. #1 é o primeiro item.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Define o último item de uma lista.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Define um item aleatório de uma lista.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "fazer lista a partir de texto";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "fazer texto a partir da lista";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Setează elementul la poziţ
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Setează elementul la poziţia specificată într-o listă. #1 este primul element.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Setează ultimul element într-o listă.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Setează un element aleator într-o listă.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "convertește textul în listă";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "convertește lista în text";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Присваивает зн
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Присваивает значение элементу в указанной позиции списка (№1 - первый элемент).";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Присваивает значение последнему элементу списка.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Присваивает значение случайному элементу списка.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "сделать список из текста";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "собрать текст из списка";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Impostat s'elementu in su po
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Impostat s'elementu in su postu inditau de una lista. Postu 1 est po su primu elementu.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Impostat s'urtimu elementu in una lista.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Impostat unu elementu random in una lista.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "fai una lista de unu testu";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "fai unu testu de una lista";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specifi
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specifi
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Nastaví prvok na určenej p
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Nastaví prvok na určenej pozícii v zozname. #1 je prvý prvok.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Nastaví posledný prvok v zozname.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Nastaví posledný prvok v zozname.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "vytvoriť zoznam z textu";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "vytvoriť text zo zoznamu";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Nastavi element na določene
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Nastavi element na določenem mestu v seznamu. Prvi element je št. 1.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Nastavi zadnji element seznama.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Nastavi naključni element seznama.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "ustvari seznam iz besedila";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "ustvari besedilo iz seznama";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Vendos sendin ne pozicionin
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Vendos sendin në pozicionin e specifikuar në listë. #1 është sendi i parë.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Vendos sendin e fundit në listë.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Vendos një send të rastësishëm në listë.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Поставља ставк
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Поставља ставку на одређени положај на списку. #1 је прва ставка.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Поставља последњу ставку на списку.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Поставља случајну ставку на списку.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "направите листу са текста";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "да текст из листе";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sätter in objektet vid en s
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sätter in objektet vid en specificerad position i en lista. #1 är det första objektet.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Anger det sista elementet i en lista.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sätter in ett slumpat objekt i en lista.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "skapa lista från text";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "skapa text från lista";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "பட்டியலில
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "பட்டியலில் கேட்ட இடத்தில் உருப்படியை வை. #1, முதல் உருப்படி.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "மதிப்பை பட்டியலில் கடைசி உருப்படியில் வை";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "மதிப்பை பட்டியலில் சீரற்ற உருப்படியில் வை";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "உரையில் இருந்து பட்டியல் உருவாக்கு";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "பட்டியலில் இருந்து உரை உருவாக்கு";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specifi
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "กำหนดไอเท
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "กำหนดไอเท็มในตำแหน่งที่ระบุในรายการ #1 คือไอเท็มอันแรกสุด";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "กำหนดไอเท็มอันสุดท้ายในรายการ";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "กำหนดไอเท็มแบบสุ่มในรายการ";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "สร้างรายการจากข้อความ";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "สร้างข้อความจากรายการ";
|
||||
|
||||
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Pag set ng item sa tinukoy n
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Pag set ng item sa tinukoy na position sa isang list. #1 ay ang unang item.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Pag set sa huling item sa isang list.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Pag set ng walang pinipiling item sa isang list.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
+16
-8
@@ -10,7 +10,7 @@ Blockly.Msg.ADD_COMMENT = "QInHom chel";
|
||||
Blockly.Msg.AUTH = "ngogh nablIj DapollaHmeH qoj latlhvaD DangeHlaHmeH chaw' yInob.";
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "choH:";
|
||||
Blockly.Msg.CHAT = "beqpu'lI'vaD bIjawmeH naDev yIrI'!";
|
||||
Blockly.Msg.CLEAN_UP = "ngoghmey Say'";
|
||||
Blockly.Msg.CLEAN_UP = "ngoghmeyvaD tlhegh rurmoH";
|
||||
Blockly.Msg.COLLAPSE_ALL = "ngoghmey DejmoH";
|
||||
Blockly.Msg.COLLAPSE_BLOCK = "ngogh DejmoH";
|
||||
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "rItlh wa'";
|
||||
@@ -143,12 +143,20 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specifi
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "tetlh ghom ghItlhmey";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "ghItlhmey ghom tetlh";
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "tetlh ghermeH ghItlh wav";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "ghItlh chenmoHmeH tetlh gherHa'";
|
||||
Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, separated by a delimiter."; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "rarwI'Hom";
|
||||
Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "rarwI'Hom lo'";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_FALSE = "teHbe'";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Returns either true or false."; // untranslated
|
||||
@@ -271,7 +279,7 @@ Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Proce
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Run the user-defined function '%1' and use its output."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "qel:";
|
||||
Blockly.Msg.PROCEDURES_CREATE_DO = "chel '%1'";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "mIwQInHom yIchel...";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "mIw yIDel...";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_DO = "";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "mIw";
|
||||
@@ -289,7 +297,7 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "pong:";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "qelwI'mey";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated
|
||||
Blockly.Msg.REDO = "wumqa'";
|
||||
Blockly.Msg.REDO = "vangqa'";
|
||||
Blockly.Msg.REMOVE_COMMENT = "QInHom chelHa'";
|
||||
Blockly.Msg.RENAME_VARIABLE = "lIw pong choH...";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "Hoch \"%1\" lIwmey pongmey choH:";
|
||||
@@ -354,8 +362,8 @@ Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "poSnIHlogh pei";
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "poSlogh pei";
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "nIHlogh pei";
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated
|
||||
Blockly.Msg.TODAY = "jajvam";
|
||||
Blockly.Msg.UNDO = "wumHa'";
|
||||
Blockly.Msg.TODAY = "DaHjaj";
|
||||
Blockly.Msg.UNDO = "vangHa'";
|
||||
Blockly.Msg.VARIABLES_DEFAULT_NAME = "Doch";
|
||||
Blockly.Msg.VARIABLES_GET_CREATE_SET = "chel 'choH %1'";
|
||||
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
|
||||
|
||||
+10
-2
@@ -143,6 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Bir öğeyi belirtilen yere
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Bir öğeyi belirtilen yere göre listeye yerleştirir . #1 ilk öğedir .";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Bir listedeki son öğeyi yerleştirir .";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Listeye rast gele bir öğe yerleştirir .";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "metinden liste yap";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "listeden metin yap";
|
||||
@@ -289,7 +297,7 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "girdi adı:";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "İşleve bir girdi ekleyin.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "girdiler";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Bu işlevin girdilerini ekleyin, çıkarın, ya da yeniden sıralayın.";
|
||||
Blockly.Msg.REDO = "Redo"; // untranslated
|
||||
Blockly.Msg.REDO = "Yinele";
|
||||
Blockly.Msg.REMOVE_COMMENT = "Yorumu Sil";
|
||||
Blockly.Msg.RENAME_VARIABLE = "Değişkeni yeniden adlandır...";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "Tüm '%1' değişkenlerini yeniden isimlendir:";
|
||||
@@ -355,7 +363,7 @@ Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "solundan boşlukları temizle";
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "sağından boşlukları temizle";
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "Metnin bir veya her iki sondan da boşlukları silinmiş şekilde kopyasını verir.";
|
||||
Blockly.Msg.TODAY = "Bugün";
|
||||
Blockly.Msg.UNDO = "Undo"; // untranslated
|
||||
Blockly.Msg.UNDO = "Geri al";
|
||||
Blockly.Msg.VARIABLES_DEFAULT_NAME = "öge";
|
||||
Blockly.Msg.VARIABLES_GET_CREATE_SET = "'set %1' oluştur";
|
||||
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user