mirror of
https://github.com/google/blockly.git
synced 2026-06-17 16:45:13 +02:00
Merge remote-tracking branch 'upstream/develop' into feature/simple_multitouch
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# Contributing to Blockly
|
||||
|
||||
Please make pull requests against develop, not master. If your patch needs to go into master immediately, include a note in your PR.
|
||||
|
||||
For more information, head over to the [Blockly Developers site](https://developers.google.com/blockly/guides/modify/contributing).
|
||||
+100
-106
@@ -76,9 +76,7 @@ goog.asserts.assertString=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isS
|
||||
goog.asserts.assertObject=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isObject(a)&&goog.asserts.doAssertFailure_("Expected object but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};goog.asserts.assertArray=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isArray(a)&&goog.asserts.doAssertFailure_("Expected array but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};
|
||||
goog.asserts.assertBoolean=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isBoolean(a)&&goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};goog.asserts.assertElement=function(a,b,c){!goog.asserts.ENABLE_ASSERTS||goog.isObject(a)&&a.nodeType==goog.dom.NodeType.ELEMENT||goog.asserts.doAssertFailure_("Expected Element but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};
|
||||
goog.asserts.assertInstanceof=function(a,b,c,d){!goog.asserts.ENABLE_ASSERTS||a instanceof b||goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.",[goog.asserts.getType_(b),goog.asserts.getType_(a)],c,Array.prototype.slice.call(arguments,3));return a};goog.asserts.assertObjectPrototypeIsIntact=function(){for(var a in Object.prototype)goog.asserts.fail(a+" should not be enumerable in Object.prototype.")};
|
||||
goog.asserts.getType_=function(a){return a instanceof Function?a.displayName||a.name||"unknown type name":a instanceof Object?a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a):null===a?"null":typeof a};goog.debug.entryPointRegistry={};goog.debug.EntryPointMonitor=function(){};goog.debug.entryPointRegistry.refList_=[];goog.debug.entryPointRegistry.monitors_=[];goog.debug.entryPointRegistry.monitorsMayExist_=!1;goog.debug.entryPointRegistry.register=function(a){goog.debug.entryPointRegistry.refList_[goog.debug.entryPointRegistry.refList_.length]=a;if(goog.debug.entryPointRegistry.monitorsMayExist_)for(var b=goog.debug.entryPointRegistry.monitors_,c=0;c<b.length;c++)a(goog.bind(b[c].wrap,b[c]))};
|
||||
goog.debug.entryPointRegistry.monitorAll=function(a){goog.debug.entryPointRegistry.monitorsMayExist_=!0;for(var b=goog.bind(a.wrap,a),c=0;c<goog.debug.entryPointRegistry.refList_.length;c++)goog.debug.entryPointRegistry.refList_[c](b);goog.debug.entryPointRegistry.monitors_.push(a)};
|
||||
goog.debug.entryPointRegistry.unmonitorAllIfPossible=function(a){var b=goog.debug.entryPointRegistry.monitors_;goog.asserts.assert(a==b[b.length-1],"Only the most recent monitor can be unwrapped.");a=goog.bind(a.unwrap,a);for(var c=0;c<goog.debug.entryPointRegistry.refList_.length;c++)goog.debug.entryPointRegistry.refList_[c](a);b.length--};goog.array={};goog.NATIVE_ARRAY_PROTOTYPES=goog.TRUSTED_SITE;goog.array.ASSUME_NATIVE_FUNCTIONS=!1;goog.array.peek=function(a){return a[a.length-1]};goog.array.last=goog.array.peek;
|
||||
goog.asserts.getType_=function(a){return a instanceof Function?a.displayName||a.name||"unknown type name":a instanceof Object?a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a):null===a?"null":typeof a};goog.array={};goog.NATIVE_ARRAY_PROTOTYPES=goog.TRUSTED_SITE;goog.array.ASSUME_NATIVE_FUNCTIONS=!1;goog.array.peek=function(a){return a[a.length-1]};goog.array.last=goog.array.peek;
|
||||
goog.array.indexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.indexOf)?function(a,b,c){goog.asserts.assert(null!=a.length);return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(goog.isString(a))return goog.isString(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};
|
||||
goog.array.lastIndexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.lastIndexOf)?function(a,b,c){goog.asserts.assert(null!=a.length);return Array.prototype.lastIndexOf.call(a,b,null==c?a.length-1:c)}:function(a,b,c){c=null==c?a.length-1:c;0>c&&(c=Math.max(0,a.length+c));if(goog.isString(a))return goog.isString(b)&&1==b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1};
|
||||
goog.array.forEach=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(a,b,c){goog.asserts.assert(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=goog.isString(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)};goog.array.forEachRight=function(a,b,c){for(var d=a.length,e=goog.isString(a)?a.split(""):a,d=d-1;0<=d;--d)d in e&&b.call(c,e[d],d,a)};
|
||||
@@ -103,7 +101,13 @@ goog.array.binaryInsert=function(a,b,c){c=goog.array.binarySearch(a,b,c);return
|
||||
goog.array.range=function(a,b,c){var d=[],e=0,f=a;c=c||1;void 0!==b&&(e=a,f=b);if(0>c*(f-e))return[];if(0<c)for(a=e;a<f;a+=c)d.push(a);else for(a=e;a>f;a+=c)d.push(a);return d};goog.array.repeat=function(a,b){for(var c=[],d=0;d<b;d++)c[d]=a;return c};goog.array.flatten=function(a){for(var b=[],c=0;c<arguments.length;c++){var d=arguments[c];if(goog.isArray(d))for(var e=0;e<d.length;e+=8192)for(var f=goog.array.slice(d,e,e+8192),f=goog.array.flatten.apply(null,f),g=0;g<f.length;g++)b.push(f[g]);else b.push(d)}return b};
|
||||
goog.array.rotate=function(a,b){goog.asserts.assert(null!=a.length);a.length&&(b%=a.length,0<b?Array.prototype.unshift.apply(a,a.splice(-b,b)):0>b&&Array.prototype.push.apply(a,a.splice(0,-b)));return a};goog.array.moveItem=function(a,b,c){goog.asserts.assert(0<=b&&b<a.length);goog.asserts.assert(0<=c&&c<a.length);b=Array.prototype.splice.call(a,b,1);Array.prototype.splice.call(a,c,0,b[0])};
|
||||
goog.array.zip=function(a){if(!arguments.length)return[];for(var b=[],c=arguments[0].length,d=1;d<arguments.length;d++)arguments[d].length<c&&(c=arguments[d].length);for(d=0;d<c;d++){for(var e=[],f=0;f<arguments.length;f++)e.push(arguments[f][d]);b.push(e)}return b};goog.array.shuffle=function(a,b){for(var c=b||Math.random,d=a.length-1;0<d;d--){var e=Math.floor(c()*(d+1)),f=a[d];a[d]=a[e];a[e]=f}};goog.array.copyByIndex=function(a,b){var c=[];goog.array.forEach(b,function(b){c.push(a[b])});return c};
|
||||
goog.array.concatMap=function(a,b,c){return goog.array.concat.apply([],goog.array.map(a,b,c))};goog.labs={};goog.labs.userAgent={};goog.labs.userAgent.util={};goog.labs.userAgent.util.getNativeUserAgentString_=function(){var a=goog.labs.userAgent.util.getNavigator_();return a&&(a=a.userAgent)?a:""};goog.labs.userAgent.util.getNavigator_=function(){return goog.global.navigator};goog.labs.userAgent.util.userAgent_=goog.labs.userAgent.util.getNativeUserAgentString_();goog.labs.userAgent.util.setUserAgent=function(a){goog.labs.userAgent.util.userAgent_=a||goog.labs.userAgent.util.getNativeUserAgentString_()};
|
||||
goog.array.concatMap=function(a,b,c){return goog.array.concat.apply([],goog.array.map(a,b,c))};goog.math={};goog.math.randomInt=function(a){return Math.floor(Math.random()*a)};goog.math.uniformRandom=function(a,b){return a+Math.random()*(b-a)};goog.math.clamp=function(a,b,c){return Math.min(Math.max(a,b),c)};goog.math.modulo=function(a,b){var c=a%b;return 0>c*b?c+b:c};goog.math.lerp=function(a,b,c){return a+c*(b-a)};goog.math.nearlyEquals=function(a,b,c){return Math.abs(a-b)<=(c||1E-6)};goog.math.standardAngle=function(a){return goog.math.modulo(a,360)};
|
||||
goog.math.standardAngleInRadians=function(a){return goog.math.modulo(a,2*Math.PI)};goog.math.toRadians=function(a){return a*Math.PI/180};goog.math.toDegrees=function(a){return 180*a/Math.PI};goog.math.angleDx=function(a,b){return b*Math.cos(goog.math.toRadians(a))};goog.math.angleDy=function(a,b){return b*Math.sin(goog.math.toRadians(a))};goog.math.angle=function(a,b,c,d){return goog.math.standardAngle(goog.math.toDegrees(Math.atan2(d-b,c-a)))};
|
||||
goog.math.angleDifference=function(a,b){var c=goog.math.standardAngle(b)-goog.math.standardAngle(a);180<c?c-=360:-180>=c&&(c=360+c);return c};goog.math.sign=Math.sign||function(a){return 0<a?1:0>a?-1:a};
|
||||
goog.math.longestCommonSubsequence=function(a,b,c,d){c=c||function(a,b){return a==b};d=d||function(b,c){return a[b]};for(var e=a.length,f=b.length,g=[],h=0;h<e+1;h++)g[h]=[],g[h][0]=0;for(var k=0;k<f+1;k++)g[0][k]=0;for(h=1;h<=e;h++)for(k=1;k<=f;k++)c(a[h-1],b[k-1])?g[h][k]=g[h-1][k-1]+1:g[h][k]=Math.max(g[h-1][k],g[h][k-1]);for(var m=[],h=e,k=f;0<h&&0<k;)c(a[h-1],b[k-1])?(m.unshift(d(h-1,k-1)),h--,k--):g[h-1][k]>g[h][k-1]?h--:k--;return m};
|
||||
goog.math.sum=function(a){return goog.array.reduce(arguments,function(a,c){return a+c},0)};goog.math.average=function(a){return goog.math.sum.apply(null,arguments)/arguments.length};goog.math.sampleVariance=function(a){var b=arguments.length;if(2>b)return 0;var c=goog.math.average.apply(null,arguments);return goog.math.sum.apply(null,goog.array.map(arguments,function(a){return Math.pow(a-c,2)}))/(b-1)};goog.math.standardDeviation=function(a){return Math.sqrt(goog.math.sampleVariance.apply(null,arguments))};
|
||||
goog.math.isInt=function(a){return isFinite(a)&&0==a%1};goog.math.isFiniteNumber=function(a){return isFinite(a)&&!isNaN(a)};goog.math.isNegativeZero=function(a){return 0==a&&0>1/a};goog.math.log10Floor=function(a){if(0<a){var b=Math.round(Math.log(a)*Math.LOG10E);return b-(parseFloat("1e"+b)>a?1:0)}return 0==a?-Infinity:NaN};goog.math.safeFloor=function(a,b){goog.asserts.assert(!goog.isDef(b)||0<b);return Math.floor(a+(b||2E-15))};
|
||||
goog.math.safeCeil=function(a,b){goog.asserts.assert(!goog.isDef(b)||0<b);return Math.ceil(a-(b||2E-15))};goog.labs={};goog.labs.userAgent={};goog.labs.userAgent.util={};goog.labs.userAgent.util.getNativeUserAgentString_=function(){var a=goog.labs.userAgent.util.getNavigator_();return a&&(a=a.userAgent)?a:""};goog.labs.userAgent.util.getNavigator_=function(){return goog.global.navigator};goog.labs.userAgent.util.userAgent_=goog.labs.userAgent.util.getNativeUserAgentString_();goog.labs.userAgent.util.setUserAgent=function(a){goog.labs.userAgent.util.userAgent_=a||goog.labs.userAgent.util.getNativeUserAgentString_()};
|
||||
goog.labs.userAgent.util.getUserAgent=function(){return goog.labs.userAgent.util.userAgent_};goog.labs.userAgent.util.matchUserAgent=function(a){var b=goog.labs.userAgent.util.getUserAgent();return goog.string.contains(b,a)};goog.labs.userAgent.util.matchUserAgentIgnoreCase=function(a){var b=goog.labs.userAgent.util.getUserAgent();return goog.string.caseInsensitiveContains(b,a)};
|
||||
goog.labs.userAgent.util.extractVersionTuples=function(a){for(var b=RegExp("(\\w[\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g"),c=[],d;d=b.exec(a);)c.push([d[1],d[2],d[3]||void 0]);return c};goog.object={};goog.object.is=function(a,b){return a===b?0!==a||1/a===1/b:a!==a&&b!==b};goog.object.forEach=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};goog.object.filter=function(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d};goog.object.map=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d};goog.object.some=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return!0;return!1};
|
||||
goog.object.every=function(a,b,c){for(var d in a)if(!b.call(c,a[d],d,a))return!1;return!0};goog.object.getCount=function(a){var b=0,c;for(c in a)b++;return b};goog.object.getAnyKey=function(a){for(var b in a)return b};goog.object.getAnyValue=function(a){for(var b in a)return a[b]};goog.object.contains=function(a,b){return goog.object.containsValue(a,b)};goog.object.getValues=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b};
|
||||
@@ -138,54 +142,7 @@ goog.userAgent.ANDROID=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_ANDR
|
||||
goog.userAgent.determineVersion_=function(){var a="",b=goog.userAgent.getVersionRegexResult_();b&&(a=b?b[1]:"");return goog.userAgent.IE&&(b=goog.userAgent.getDocumentMode_(),null!=b&&b>parseFloat(a))?String(b):a};
|
||||
goog.userAgent.getVersionRegexResult_=function(){var a=goog.userAgent.getUserAgentString();if(goog.userAgent.GECKO)return/rv\:([^\);]+)(\)|;)/.exec(a);if(goog.userAgent.EDGE)return/Edge\/([\d\.]+)/.exec(a);if(goog.userAgent.IE)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(goog.userAgent.WEBKIT)return/WebKit\/(\S+)/.exec(a);if(goog.userAgent.OPERA)return/(?:Version)[ \/]?(\S+)/.exec(a)};goog.userAgent.getDocumentMode_=function(){var a=goog.global.document;return a?a.documentMode:void 0};
|
||||
goog.userAgent.VERSION=goog.userAgent.determineVersion_();goog.userAgent.compare=function(a,b){return goog.string.compareVersions(a,b)};goog.userAgent.isVersionOrHigherCache_={};goog.userAgent.isVersionOrHigher=function(a){return goog.userAgent.ASSUME_ANY_VERSION||goog.reflect.cache(goog.userAgent.isVersionOrHigherCache_,a,function(){return 0<=goog.string.compareVersions(goog.userAgent.VERSION,a)})};goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher;
|
||||
goog.userAgent.isDocumentModeOrHigher=function(a){return Number(goog.userAgent.DOCUMENT_MODE)>=a};goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher;goog.userAgent.DOCUMENT_MODE=function(){var a=goog.global.document,b=goog.userAgent.getDocumentMode_();return a&&goog.userAgent.IE?b||("CSS1Compat"==a.compatMode?parseInt(goog.userAgent.VERSION,10):5):void 0}();goog.events={};
|
||||
goog.events.BrowserFeature={HAS_W3C_BUTTON:!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9),HAS_W3C_EVENT_SUPPORT:!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9),SET_KEY_CODE_TO_PREVENT_DEFAULT:goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("9"),HAS_NAVIGATOR_ONLINE_PROPERTY:!goog.userAgent.WEBKIT||goog.userAgent.isVersionOrHigher("528"),HAS_HTML5_NETWORK_EVENT_SUPPORT:goog.userAgent.GECKO&&goog.userAgent.isVersionOrHigher("1.9b")||goog.userAgent.IE&&goog.userAgent.isVersionOrHigher("8")||
|
||||
goog.userAgent.OPERA&&goog.userAgent.isVersionOrHigher("9.5")||goog.userAgent.WEBKIT&&goog.userAgent.isVersionOrHigher("528"),HTML5_NETWORK_EVENTS_FIRE_ON_BODY:goog.userAgent.GECKO&&!goog.userAgent.isVersionOrHigher("8")||goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("9"),TOUCH_ENABLED:"ontouchstart"in goog.global||!!(goog.global.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!goog.global.navigator||!goog.global.navigator.msMaxTouchPoints)};goog.disposable={};goog.disposable.IDisposable=function(){};goog.disposable.IDisposable.prototype.dispose=goog.abstractMethod;goog.disposable.IDisposable.prototype.isDisposed=goog.abstractMethod;goog.Disposable=function(){goog.Disposable.MONITORING_MODE!=goog.Disposable.MonitoringMode.OFF&&(goog.Disposable.INCLUDE_STACK_ON_CREATION&&(this.creationStack=Error().stack),goog.Disposable.instances_[goog.getUid(this)]=this);this.disposed_=this.disposed_;this.onDisposeCallbacks_=this.onDisposeCallbacks_};goog.Disposable.MonitoringMode={OFF:0,PERMANENT:1,INTERACTIVE:2};goog.Disposable.MONITORING_MODE=0;goog.Disposable.INCLUDE_STACK_ON_CREATION=!0;goog.Disposable.instances_={};
|
||||
goog.Disposable.getUndisposedObjects=function(){var a=[],b;for(b in goog.Disposable.instances_)goog.Disposable.instances_.hasOwnProperty(b)&&a.push(goog.Disposable.instances_[Number(b)]);return a};goog.Disposable.clearUndisposedObjects=function(){goog.Disposable.instances_={}};goog.Disposable.prototype.disposed_=!1;goog.Disposable.prototype.isDisposed=function(){return this.disposed_};goog.Disposable.prototype.getDisposed=goog.Disposable.prototype.isDisposed;
|
||||
goog.Disposable.prototype.dispose=function(){if(!this.disposed_&&(this.disposed_=!0,this.disposeInternal(),goog.Disposable.MONITORING_MODE!=goog.Disposable.MonitoringMode.OFF)){var a=goog.getUid(this);if(goog.Disposable.MONITORING_MODE==goog.Disposable.MonitoringMode.PERMANENT&&!goog.Disposable.instances_.hasOwnProperty(a))throw Error(this+" did not call the goog.Disposable base constructor or was disposed of after a clearUndisposedObjects call");delete goog.Disposable.instances_[a]}};
|
||||
goog.Disposable.prototype.registerDisposable=function(a){this.addOnDisposeCallback(goog.partial(goog.dispose,a))};goog.Disposable.prototype.addOnDisposeCallback=function(a,b){this.disposed_?goog.isDef(b)?a.call(b):a():(this.onDisposeCallbacks_||(this.onDisposeCallbacks_=[]),this.onDisposeCallbacks_.push(goog.isDef(b)?goog.bind(a,b):a))};goog.Disposable.prototype.disposeInternal=function(){if(this.onDisposeCallbacks_)for(;this.onDisposeCallbacks_.length;)this.onDisposeCallbacks_.shift()()};
|
||||
goog.Disposable.isDisposed=function(a){return a&&"function"==typeof a.isDisposed?a.isDisposed():!1};goog.dispose=function(a){a&&"function"==typeof a.dispose&&a.dispose()};goog.disposeAll=function(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];goog.isArrayLike(d)?goog.disposeAll.apply(null,d):goog.dispose(d)}};goog.events.EventId=function(a){this.id=a};goog.events.EventId.prototype.toString=function(){return this.id};goog.events.Event=function(a,b){this.type=a instanceof goog.events.EventId?String(a):a;this.currentTarget=this.target=b;this.defaultPrevented=this.propagationStopped_=!1;this.returnValue_=!0};goog.events.Event.prototype.stopPropagation=function(){this.propagationStopped_=!0};goog.events.Event.prototype.preventDefault=function(){this.defaultPrevented=!0;this.returnValue_=!1};goog.events.Event.stopPropagation=function(a){a.stopPropagation()};goog.events.Event.preventDefault=function(a){a.preventDefault()};goog.events.getVendorPrefixedName_=function(a){return goog.userAgent.WEBKIT?"webkit"+a:goog.userAgent.OPERA?"o"+a.toLowerCase():a.toLowerCase()};
|
||||
goog.events.EventType={CLICK:"click",RIGHTCLICK:"rightclick",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",SELECTSTART:"selectstart",WHEEL:"wheel",KEYPRESS:"keypress",KEYDOWN:"keydown",KEYUP:"keyup",BLUR:"blur",FOCUS:"focus",DEACTIVATE:"deactivate",FOCUSIN:goog.userAgent.IE?"focusin":"DOMFocusIn",FOCUSOUT:goog.userAgent.IE?"focusout":"DOMFocusOut",CHANGE:"change",RESET:"reset",
|
||||
SELECT:"select",SUBMIT:"submit",INPUT:"input",PROPERTYCHANGE:"propertychange",DRAGSTART:"dragstart",DRAG:"drag",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",DRAGEND:"dragend",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",TOUCHCANCEL:"touchcancel",BEFOREUNLOAD:"beforeunload",CONSOLEMESSAGE:"consolemessage",CONTEXTMENU:"contextmenu",DOMCONTENTLOADED:"DOMContentLoaded",ERROR:"error",HELP:"help",LOAD:"load",LOSECAPTURE:"losecapture",ORIENTATIONCHANGE:"orientationchange",
|
||||
READYSTATECHANGE:"readystatechange",RESIZE:"resize",SCROLL:"scroll",UNLOAD:"unload",CANPLAY:"canplay",CANPLAYTHROUGH:"canplaythrough",DURATIONCHANGE:"durationchange",EMPTIED:"emptied",ENDED:"ended",LOADEDDATA:"loadeddata",LOADEDMETADATA:"loadedmetadata",PAUSE:"pause",PLAY:"play",PLAYING:"playing",RATECHANGE:"ratechange",SEEKED:"seeked",SEEKING:"seeking",STALLED:"stalled",SUSPEND:"suspend",TIMEUPDATE:"timeupdate",VOLUMECHANGE:"volumechange",WAITING:"waiting",HASHCHANGE:"hashchange",PAGEHIDE:"pagehide",
|
||||
PAGESHOW:"pageshow",POPSTATE:"popstate",COPY:"copy",PASTE:"paste",CUT:"cut",BEFORECOPY:"beforecopy",BEFORECUT:"beforecut",BEFOREPASTE:"beforepaste",ONLINE:"online",OFFLINE:"offline",MESSAGE:"message",CONNECT:"connect",ANIMATIONSTART:goog.events.getVendorPrefixedName_("AnimationStart"),ANIMATIONEND:goog.events.getVendorPrefixedName_("AnimationEnd"),ANIMATIONITERATION:goog.events.getVendorPrefixedName_("AnimationIteration"),TRANSITIONEND:goog.events.getVendorPrefixedName_("TransitionEnd"),POINTERDOWN:"pointerdown",
|
||||
POINTERUP:"pointerup",POINTERCANCEL:"pointercancel",POINTERMOVE:"pointermove",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",MSGESTURECHANGE:"MSGestureChange",MSGESTUREEND:"MSGestureEnd",MSGESTUREHOLD:"MSGestureHold",MSGESTURESTART:"MSGestureStart",MSGESTURETAP:"MSGestureTap",MSGOTPOINTERCAPTURE:"MSGotPointerCapture",MSINERTIASTART:"MSInertiaStart",MSLOSTPOINTERCAPTURE:"MSLostPointerCapture",
|
||||
MSPOINTERCANCEL:"MSPointerCancel",MSPOINTERDOWN:"MSPointerDown",MSPOINTERENTER:"MSPointerEnter",MSPOINTERHOVER:"MSPointerHover",MSPOINTERLEAVE:"MSPointerLeave",MSPOINTERMOVE:"MSPointerMove",MSPOINTEROUT:"MSPointerOut",MSPOINTEROVER:"MSPointerOver",MSPOINTERUP:"MSPointerUp",TEXT:"text",TEXTINPUT:"textInput",COMPOSITIONSTART:"compositionstart",COMPOSITIONUPDATE:"compositionupdate",COMPOSITIONEND:"compositionend",EXIT:"exit",LOADABORT:"loadabort",LOADCOMMIT:"loadcommit",LOADREDIRECT:"loadredirect",LOADSTART:"loadstart",
|
||||
LOADSTOP:"loadstop",RESPONSIVE:"responsive",SIZECHANGED:"sizechanged",UNRESPONSIVE:"unresponsive",VISIBILITYCHANGE:"visibilitychange",STORAGE:"storage",DOMSUBTREEMODIFIED:"DOMSubtreeModified",DOMNODEINSERTED:"DOMNodeInserted",DOMNODEREMOVED:"DOMNodeRemoved",DOMNODEREMOVEDFROMDOCUMENT:"DOMNodeRemovedFromDocument",DOMNODEINSERTEDINTODOCUMENT:"DOMNodeInsertedIntoDocument",DOMATTRMODIFIED:"DOMAttrModified",DOMCHARACTERDATAMODIFIED:"DOMCharacterDataModified",BEFOREPRINT:"beforeprint",AFTERPRINT:"afterprint"};goog.events.BrowserEvent=function(a,b){goog.events.Event.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.platformModifierKey=!1;this.event_=null;a&&this.init(a,b)};goog.inherits(goog.events.BrowserEvent,goog.events.Event);
|
||||
goog.events.BrowserEvent.MouseButton={LEFT:0,MIDDLE:1,RIGHT:2};goog.events.BrowserEvent.IEButtonMap=[1,4,2];
|
||||
goog.events.BrowserEvent.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;e?goog.userAgent.GECKO&&(goog.reflect.canAccessProperty(e,"nodeName")||(e=null)):c==goog.events.EventType.MOUSEOVER?e=a.fromElement:c==goog.events.EventType.MOUSEOUT&&(e=a.toElement);this.relatedTarget=e;goog.isNull(d)?(this.offsetX=goog.userAgent.WEBKIT||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=
|
||||
goog.userAgent.WEBKIT||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=
|
||||
a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.platformModifierKey=goog.userAgent.MAC?a.metaKey:a.ctrlKey;this.state=a.state;this.event_=a;a.defaultPrevented&&this.preventDefault()};goog.events.BrowserEvent.prototype.isButton=function(a){return goog.events.BrowserFeature.HAS_W3C_BUTTON?this.event_.button==a:"click"==this.type?a==goog.events.BrowserEvent.MouseButton.LEFT:!!(this.event_.button&goog.events.BrowserEvent.IEButtonMap[a])};
|
||||
goog.events.BrowserEvent.prototype.isMouseActionButton=function(){return this.isButton(goog.events.BrowserEvent.MouseButton.LEFT)&&!(goog.userAgent.WEBKIT&&goog.userAgent.MAC&&this.ctrlKey)};goog.events.BrowserEvent.prototype.stopPropagation=function(){goog.events.BrowserEvent.superClass_.stopPropagation.call(this);this.event_.stopPropagation?this.event_.stopPropagation():this.event_.cancelBubble=!0};
|
||||
goog.events.BrowserEvent.prototype.preventDefault=function(){goog.events.BrowserEvent.superClass_.preventDefault.call(this);var a=this.event_;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,goog.events.BrowserFeature.SET_KEY_CODE_TO_PREVENT_DEFAULT)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};goog.events.BrowserEvent.prototype.getBrowserEvent=function(){return this.event_};goog.events.Listenable=function(){};goog.events.Listenable.IMPLEMENTED_BY_PROP="closure_listenable_"+(1E6*Math.random()|0);goog.events.Listenable.addImplementation=function(a){a.prototype[goog.events.Listenable.IMPLEMENTED_BY_PROP]=!0};goog.events.Listenable.isImplementedBy=function(a){return!(!a||!a[goog.events.Listenable.IMPLEMENTED_BY_PROP])};goog.events.ListenableKey=function(){};goog.events.ListenableKey.counter_=0;goog.events.ListenableKey.reserveKey=function(){return++goog.events.ListenableKey.counter_};goog.events.Listener=function(a,b,c,d,e,f){goog.events.Listener.ENABLE_MONITORING&&(this.creationStack=Error().stack);this.listener=a;this.proxy=b;this.src=c;this.type=d;this.capture=!!e;this.handler=f;this.key=goog.events.ListenableKey.reserveKey();this.removed=this.callOnce=!1};goog.events.Listener.ENABLE_MONITORING=!1;goog.events.Listener.prototype.markAsRemoved=function(){this.removed=!0;this.handler=this.src=this.proxy=this.listener=null};goog.events.ListenerMap=function(a){this.src=a;this.listeners={};this.typeCount_=0};goog.events.ListenerMap.prototype.getTypeCount=function(){return this.typeCount_};goog.events.ListenerMap.prototype.getListenerCount=function(){var a=0,b;for(b in this.listeners)a+=this.listeners[b].length;return a};
|
||||
goog.events.ListenerMap.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.listeners[f];a||(a=this.listeners[f]=[],this.typeCount_++);var g=goog.events.ListenerMap.findListenerIndex_(a,b,d,e);-1<g?(b=a[g],c||(b.callOnce=!1)):(b=new goog.events.Listener(b,null,this.src,f,!!d,e),b.callOnce=c,a.push(b));return b};
|
||||
goog.events.ListenerMap.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.listeners))return!1;var e=this.listeners[a];b=goog.events.ListenerMap.findListenerIndex_(e,b,c,d);return-1<b?(e[b].markAsRemoved(),goog.array.removeAt(e,b),0==e.length&&(delete this.listeners[a],this.typeCount_--),!0):!1};
|
||||
goog.events.ListenerMap.prototype.removeByKey=function(a){var b=a.type;if(!(b in this.listeners))return!1;var c=goog.array.remove(this.listeners[b],a);c&&(a.markAsRemoved(),0==this.listeners[b].length&&(delete this.listeners[b],this.typeCount_--));return c};goog.events.ListenerMap.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.listeners)if(!a||c==a){for(var d=this.listeners[c],e=0;e<d.length;e++)++b,d[e].markAsRemoved();delete this.listeners[c];this.typeCount_--}return b};
|
||||
goog.events.ListenerMap.prototype.getListeners=function(a,b){var c=this.listeners[a.toString()],d=[];if(c)for(var e=0;e<c.length;++e){var f=c[e];f.capture==b&&d.push(f)}return d};goog.events.ListenerMap.prototype.getListener=function(a,b,c,d){a=this.listeners[a.toString()];var e=-1;a&&(e=goog.events.ListenerMap.findListenerIndex_(a,b,c,d));return-1<e?a[e]:null};
|
||||
goog.events.ListenerMap.prototype.hasListener=function(a,b){var c=goog.isDef(a),d=c?a.toString():"",e=goog.isDef(b);return goog.object.some(this.listeners,function(a,g){for(var h=0;h<a.length;++h)if(!(c&&a[h].type!=d||e&&a[h].capture!=b))return!0;return!1})};goog.events.ListenerMap.findListenerIndex_=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.removed&&f.listener==b&&f.capture==!!c&&f.handler==d)return e}return-1};goog.events.LISTENER_MAP_PROP_="closure_lm_"+(1E6*Math.random()|0);goog.events.onString_="on";goog.events.onStringMap_={};goog.events.CaptureSimulationMode={OFF_AND_FAIL:0,OFF_AND_SILENT:1,ON:2};goog.events.CAPTURE_SIMULATION_MODE=2;goog.events.listenerCountEstimate_=0;
|
||||
goog.events.listen=function(a,b,c,d,e){if(goog.isArray(b)){for(var f=0;f<b.length;f++)goog.events.listen(a,b[f],c,d,e);return null}c=goog.events.wrapListener(c);return goog.events.Listenable.isImplementedBy(a)?a.listen(b,c,d,e):goog.events.listen_(a,b,c,!1,d,e)};
|
||||
goog.events.listen_=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=!!e;if(g&&!goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT){if(goog.events.CAPTURE_SIMULATION_MODE==goog.events.CaptureSimulationMode.OFF_AND_FAIL)return goog.asserts.fail("Can not register capture listener in IE8-."),null;if(goog.events.CAPTURE_SIMULATION_MODE==goog.events.CaptureSimulationMode.OFF_AND_SILENT)return null}var h=goog.events.getListenerMap_(a);h||(a[goog.events.LISTENER_MAP_PROP_]=h=new goog.events.ListenerMap(a));
|
||||
c=h.add(b,c,d,e,f);if(c.proxy)return c;d=goog.events.getProxy();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,g);else if(a.attachEvent)a.attachEvent(goog.events.getOnString_(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");goog.events.listenerCountEstimate_++;return c};
|
||||
goog.events.getProxy=function(){var a=goog.events.handleBrowserEvent_,b=goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b};
|
||||
goog.events.listenOnce=function(a,b,c,d,e){if(goog.isArray(b)){for(var f=0;f<b.length;f++)goog.events.listenOnce(a,b[f],c,d,e);return null}c=goog.events.wrapListener(c);return goog.events.Listenable.isImplementedBy(a)?a.listenOnce(b,c,d,e):goog.events.listen_(a,b,c,!0,d,e)};goog.events.listenWithWrapper=function(a,b,c,d,e){b.listen(a,c,d,e)};
|
||||
goog.events.unlisten=function(a,b,c,d,e){if(goog.isArray(b)){for(var f=0;f<b.length;f++)goog.events.unlisten(a,b[f],c,d,e);return null}c=goog.events.wrapListener(c);if(goog.events.Listenable.isImplementedBy(a))return a.unlisten(b,c,d,e);if(!a)return!1;d=!!d;if(a=goog.events.getListenerMap_(a))if(b=a.getListener(b,c,d,e))return goog.events.unlistenByKey(b);return!1};
|
||||
goog.events.unlistenByKey=function(a){if(goog.isNumber(a)||!a||a.removed)return!1;var b=a.src;if(goog.events.Listenable.isImplementedBy(b))return b.unlistenByKey(a);var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent&&b.detachEvent(goog.events.getOnString_(c),d);goog.events.listenerCountEstimate_--;(c=goog.events.getListenerMap_(b))?(c.removeByKey(a),0==c.getTypeCount()&&(c.src=null,b[goog.events.LISTENER_MAP_PROP_]=null)):a.markAsRemoved();return!0};
|
||||
goog.events.unlistenWithWrapper=function(a,b,c,d,e){b.unlisten(a,c,d,e)};goog.events.removeAll=function(a,b){if(!a)return 0;if(goog.events.Listenable.isImplementedBy(a))return a.removeAllListeners(b);var c=goog.events.getListenerMap_(a);if(!c)return 0;var d=0,e=b&&b.toString(),f;for(f in c.listeners)if(!e||f==e)for(var g=c.listeners[f].concat(),h=0;h<g.length;++h)goog.events.unlistenByKey(g[h])&&++d;return d};
|
||||
goog.events.getListeners=function(a,b,c){return goog.events.Listenable.isImplementedBy(a)?a.getListeners(b,c):a?(a=goog.events.getListenerMap_(a))?a.getListeners(b,c):[]:[]};goog.events.getListener=function(a,b,c,d,e){c=goog.events.wrapListener(c);d=!!d;return goog.events.Listenable.isImplementedBy(a)?a.getListener(b,c,d,e):a?(a=goog.events.getListenerMap_(a))?a.getListener(b,c,d,e):null:null};
|
||||
goog.events.hasListener=function(a,b,c){if(goog.events.Listenable.isImplementedBy(a))return a.hasListener(b,c);a=goog.events.getListenerMap_(a);return!!a&&a.hasListener(b,c)};goog.events.expose=function(a){var b=[],c;for(c in a)a[c]&&a[c].id?b.push(c+" = "+a[c]+" ("+a[c].id+")"):b.push(c+" = "+a[c]);return b.join("\n")};goog.events.getOnString_=function(a){return a in goog.events.onStringMap_?goog.events.onStringMap_[a]:goog.events.onStringMap_[a]=goog.events.onString_+a};
|
||||
goog.events.fireListeners=function(a,b,c,d){return goog.events.Listenable.isImplementedBy(a)?a.fireListeners(b,c,d):goog.events.fireListeners_(a,b,c,d)};goog.events.fireListeners_=function(a,b,c,d){var e=!0;if(a=goog.events.getListenerMap_(a))if(b=a.listeners[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.capture==c&&!f.removed&&(f=goog.events.fireListener(f,d),e=e&&!1!==f)}return e};
|
||||
goog.events.fireListener=function(a,b){var c=a.listener,d=a.handler||a.src;a.callOnce&&goog.events.unlistenByKey(a);return c.call(d,b)};goog.events.getTotalListenerCount=function(){return goog.events.listenerCountEstimate_};goog.events.dispatchEvent=function(a,b){goog.asserts.assert(goog.events.Listenable.isImplementedBy(a),"Can not use goog.events.dispatchEvent with non-goog.events.Listenable instance.");return a.dispatchEvent(b)};
|
||||
goog.events.protectBrowserEventEntryPoint=function(a){goog.events.handleBrowserEvent_=a.protectEntryPoint(goog.events.handleBrowserEvent_)};
|
||||
goog.events.handleBrowserEvent_=function(a,b){if(a.removed)return!0;if(!goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT){var c=b||goog.getObjectByName("window.event"),d=new goog.events.BrowserEvent(c,this),e=!0;if(goog.events.CAPTURE_SIMULATION_MODE==goog.events.CaptureSimulationMode.ON){if(!goog.events.isMarkedIeEvent_(c)){goog.events.markIeEvent_(c);for(var c=[],f=d.currentTarget;f;f=f.parentNode)c.push(f);for(var f=a.type,g=c.length-1;!d.propagationStopped_&&0<=g;g--){d.currentTarget=c[g];var h=
|
||||
goog.events.fireListeners_(c[g],f,!0,d),e=e&&h}for(g=0;!d.propagationStopped_&&g<c.length;g++)d.currentTarget=c[g],h=goog.events.fireListeners_(c[g],f,!1,d),e=e&&h}}else e=goog.events.fireListener(a,d);return e}return goog.events.fireListener(a,new goog.events.BrowserEvent(b,this))};goog.events.markIeEvent_=function(a){var b=!1;if(0==a.keyCode)try{a.keyCode=-1;return}catch(c){b=!0}if(b||void 0==a.returnValue)a.returnValue=!0};goog.events.isMarkedIeEvent_=function(a){return 0>a.keyCode||void 0!=a.returnValue};
|
||||
goog.events.uniqueIdCounter_=0;goog.events.getUniqueId=function(a){return a+"_"+goog.events.uniqueIdCounter_++};goog.events.getListenerMap_=function(a){a=a[goog.events.LISTENER_MAP_PROP_];return a instanceof goog.events.ListenerMap?a:null};goog.events.LISTENER_WRAPPER_PROP_="__closure_events_fn_"+(1E9*Math.random()>>>0);
|
||||
goog.events.wrapListener=function(a){goog.asserts.assert(a,"Listener can not be null.");if(goog.isFunction(a))return a;goog.asserts.assert(a.handleEvent,"An object listener must have handleEvent method.");a[goog.events.LISTENER_WRAPPER_PROP_]||(a[goog.events.LISTENER_WRAPPER_PROP_]=function(b){return a.handleEvent(b)});return a[goog.events.LISTENER_WRAPPER_PROP_]};goog.debug.entryPointRegistry.register(function(a){goog.events.handleBrowserEvent_=a(goog.events.handleBrowserEvent_)});goog.math={};goog.math.randomInt=function(a){return Math.floor(Math.random()*a)};goog.math.uniformRandom=function(a,b){return a+Math.random()*(b-a)};goog.math.clamp=function(a,b,c){return Math.min(Math.max(a,b),c)};goog.math.modulo=function(a,b){var c=a%b;return 0>c*b?c+b:c};goog.math.lerp=function(a,b,c){return a+c*(b-a)};goog.math.nearlyEquals=function(a,b,c){return Math.abs(a-b)<=(c||1E-6)};goog.math.standardAngle=function(a){return goog.math.modulo(a,360)};
|
||||
goog.math.standardAngleInRadians=function(a){return goog.math.modulo(a,2*Math.PI)};goog.math.toRadians=function(a){return a*Math.PI/180};goog.math.toDegrees=function(a){return 180*a/Math.PI};goog.math.angleDx=function(a,b){return b*Math.cos(goog.math.toRadians(a))};goog.math.angleDy=function(a,b){return b*Math.sin(goog.math.toRadians(a))};goog.math.angle=function(a,b,c,d){return goog.math.standardAngle(goog.math.toDegrees(Math.atan2(d-b,c-a)))};
|
||||
goog.math.angleDifference=function(a,b){var c=goog.math.standardAngle(b)-goog.math.standardAngle(a);180<c?c-=360:-180>=c&&(c=360+c);return c};goog.math.sign=Math.sign||function(a){return 0<a?1:0>a?-1:a};
|
||||
goog.math.longestCommonSubsequence=function(a,b,c,d){c=c||function(a,b){return a==b};d=d||function(b,c){return a[b]};for(var e=a.length,f=b.length,g=[],h=0;h<e+1;h++)g[h]=[],g[h][0]=0;for(var k=0;k<f+1;k++)g[0][k]=0;for(h=1;h<=e;h++)for(k=1;k<=f;k++)c(a[h-1],b[k-1])?g[h][k]=g[h-1][k-1]+1:g[h][k]=Math.max(g[h-1][k],g[h][k-1]);for(var m=[],h=e,k=f;0<h&&0<k;)c(a[h-1],b[k-1])?(m.unshift(d(h-1,k-1)),h--,k--):g[h-1][k]>g[h][k-1]?h--:k--;return m};
|
||||
goog.math.sum=function(a){return goog.array.reduce(arguments,function(a,c){return a+c},0)};goog.math.average=function(a){return goog.math.sum.apply(null,arguments)/arguments.length};goog.math.sampleVariance=function(a){var b=arguments.length;if(2>b)return 0;var c=goog.math.average.apply(null,arguments);return goog.math.sum.apply(null,goog.array.map(arguments,function(a){return Math.pow(a-c,2)}))/(b-1)};goog.math.standardDeviation=function(a){return Math.sqrt(goog.math.sampleVariance.apply(null,arguments))};
|
||||
goog.math.isInt=function(a){return isFinite(a)&&0==a%1};goog.math.isFiniteNumber=function(a){return isFinite(a)&&!isNaN(a)};goog.math.isNegativeZero=function(a){return 0==a&&0>1/a};goog.math.log10Floor=function(a){if(0<a){var b=Math.round(Math.log(a)*Math.LOG10E);return b-(parseFloat("1e"+b)>a?1:0)}return 0==a?-Infinity:NaN};goog.math.safeFloor=function(a,b){goog.asserts.assert(!goog.isDef(b)||0<b);return Math.floor(a+(b||2E-15))};
|
||||
goog.math.safeCeil=function(a,b){goog.asserts.assert(!goog.isDef(b)||0<b);return Math.ceil(a-(b||2E-15))};goog.dom.BrowserFeature={CAN_ADD_NAME_OR_TYPE_ATTRIBUTES:!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9),CAN_USE_CHILDREN_ATTRIBUTE:!goog.userAgent.GECKO&&!goog.userAgent.IE||goog.userAgent.IE&&goog.userAgent.isDocumentModeOrHigher(9)||goog.userAgent.GECKO&&goog.userAgent.isVersionOrHigher("1.9.1"),CAN_USE_INNER_TEXT:goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("9"),CAN_USE_PARENT_ELEMENT_PROPERTY:goog.userAgent.IE||goog.userAgent.OPERA||goog.userAgent.WEBKIT,INNER_HTML_NEEDS_SCOPED_ELEMENT:goog.userAgent.IE,
|
||||
goog.userAgent.isDocumentModeOrHigher=function(a){return Number(goog.userAgent.DOCUMENT_MODE)>=a};goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher;goog.userAgent.DOCUMENT_MODE=function(){var a=goog.global.document,b=goog.userAgent.getDocumentMode_();return a&&goog.userAgent.IE?b||("CSS1Compat"==a.compatMode?parseInt(goog.userAgent.VERSION,10):5):void 0}();goog.dom.BrowserFeature={CAN_ADD_NAME_OR_TYPE_ATTRIBUTES:!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9),CAN_USE_CHILDREN_ATTRIBUTE:!goog.userAgent.GECKO&&!goog.userAgent.IE||goog.userAgent.IE&&goog.userAgent.isDocumentModeOrHigher(9)||goog.userAgent.GECKO&&goog.userAgent.isVersionOrHigher("1.9.1"),CAN_USE_INNER_TEXT:goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("9"),CAN_USE_PARENT_ELEMENT_PROPERTY:goog.userAgent.IE||goog.userAgent.OPERA||goog.userAgent.WEBKIT,INNER_HTML_NEEDS_SCOPED_ELEMENT:goog.userAgent.IE,
|
||||
LEGACY_IE_RANGES:goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(9)};goog.dom.TagName={A:"A",ABBR:"ABBR",ACRONYM:"ACRONYM",ADDRESS:"ADDRESS",APPLET:"APPLET",AREA:"AREA",ARTICLE:"ARTICLE",ASIDE:"ASIDE",AUDIO:"AUDIO",B:"B",BASE:"BASE",BASEFONT:"BASEFONT",BDI:"BDI",BDO:"BDO",BIG:"BIG",BLOCKQUOTE:"BLOCKQUOTE",BODY:"BODY",BR:"BR",BUTTON:"BUTTON",CANVAS:"CANVAS",CAPTION:"CAPTION",CENTER:"CENTER",CITE:"CITE",CODE:"CODE",COL:"COL",COLGROUP:"COLGROUP",COMMAND:"COMMAND",DATA:"DATA",DATALIST:"DATALIST",DD:"DD",DEL:"DEL",DETAILS:"DETAILS",DFN:"DFN",DIALOG:"DIALOG",DIR:"DIR",DIV:"DIV",
|
||||
DL:"DL",DT:"DT",EM:"EM",EMBED:"EMBED",FIELDSET:"FIELDSET",FIGCAPTION:"FIGCAPTION",FIGURE:"FIGURE",FONT:"FONT",FOOTER:"FOOTER",FORM:"FORM",FRAME:"FRAME",FRAMESET:"FRAMESET",H1:"H1",H2:"H2",H3:"H3",H4:"H4",H5:"H5",H6:"H6",HEAD:"HEAD",HEADER:"HEADER",HGROUP:"HGROUP",HR:"HR",HTML:"HTML",I:"I",IFRAME:"IFRAME",IMG:"IMG",INPUT:"INPUT",INS:"INS",ISINDEX:"ISINDEX",KBD:"KBD",KEYGEN:"KEYGEN",LABEL:"LABEL",LEGEND:"LEGEND",LI:"LI",LINK:"LINK",MAP:"MAP",MARK:"MARK",MATH:"MATH",MENU:"MENU",META:"META",METER:"METER",
|
||||
NAV:"NAV",NOFRAMES:"NOFRAMES",NOSCRIPT:"NOSCRIPT",OBJECT:"OBJECT",OL:"OL",OPTGROUP:"OPTGROUP",OPTION:"OPTION",OUTPUT:"OUTPUT",P:"P",PARAM:"PARAM",PRE:"PRE",PROGRESS:"PROGRESS",Q:"Q",RP:"RP",RT:"RT",RUBY:"RUBY",S:"S",SAMP:"SAMP",SCRIPT:"SCRIPT",SECTION:"SECTION",SELECT:"SELECT",SMALL:"SMALL",SOURCE:"SOURCE",SPAN:"SPAN",STRIKE:"STRIKE",STRONG:"STRONG",STYLE:"STYLE",SUB:"SUB",SUMMARY:"SUMMARY",SUP:"SUP",SVG:"SVG",TABLE:"TABLE",TBODY:"TBODY",TD:"TD",TEMPLATE:"TEMPLATE",TEXTAREA:"TEXTAREA",TFOOT:"TFOOT",
|
||||
@@ -404,7 +361,50 @@ goog.style.getFontSize=function(a){var b=goog.style.getStyle_(a,"fontSize"),c=go
|
||||
"left","pixelLeft")}c=goog.dom.createDom("SPAN",{style:"visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;"});goog.dom.appendChild(a,c);b=c.offsetHeight;goog.dom.removeNode(c);return b};goog.style.parseStyleAttribute=function(a){var b={};goog.array.forEach(a.split(/\s*;\s*/),function(a){var d=a.match(/\s*([\w-]+)\s*\:(.+)/);d&&(a=d[1],d=goog.string.trim(d[2]),b[goog.string.toCamelCase(a.toLowerCase())]=d)});return b};
|
||||
goog.style.toStyleAttribute=function(a){var b=[];goog.object.forEach(a,function(a,d){b.push(goog.string.toSelectorCase(d),":",a,";")});return b.join("")};goog.style.setFloat=function(a,b){a.style[goog.userAgent.IE?"styleFloat":"cssFloat"]=b};goog.style.getFloat=function(a){return a.style[goog.userAgent.IE?"styleFloat":"cssFloat"]||""};
|
||||
goog.style.getScrollbarWidth=function(a){var b=goog.dom.createElement("DIV");a&&(b.className=a);b.style.cssText="overflow:auto;position:absolute;top:0;width:100px;height:100px";a=goog.dom.createElement("DIV");goog.style.setSize(a,"200px","200px");b.appendChild(a);goog.dom.appendChild(goog.dom.getDocument().body,b);a=b.offsetWidth-b.clientWidth;goog.dom.removeNode(b);return a};goog.style.MATRIX_TRANSLATION_REGEX_=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;
|
||||
goog.style.getCssTranslation=function(a){a=goog.style.getComputedTransform(a);return a?(a=a.match(goog.style.MATRIX_TRANSLATION_REGEX_))?new goog.math.Coordinate(parseFloat(a[1]),parseFloat(a[2])):new goog.math.Coordinate(0,0):new goog.math.Coordinate(0,0)};goog.Thenable=function(){};goog.Thenable.prototype.then=function(a,b,c){};goog.Thenable.IMPLEMENTED_BY_PROP="$goog_Thenable";goog.Thenable.addImplementation=function(a){goog.exportProperty(a.prototype,"then",a.prototype.then);COMPILED?a.prototype[goog.Thenable.IMPLEMENTED_BY_PROP]=!0:a.prototype.$goog_Thenable=!0};goog.Thenable.isImplementedBy=function(a){if(!a)return!1;try{return COMPILED?!!a[goog.Thenable.IMPLEMENTED_BY_PROP]:!!a.$goog_Thenable}catch(b){return!1}};goog.async={};goog.async.FreeList=function(a,b,c){this.limit_=c;this.create_=a;this.reset_=b;this.occupants_=0;this.head_=null};goog.async.FreeList.prototype.get=function(){var a;0<this.occupants_?(this.occupants_--,a=this.head_,this.head_=a.next,a.next=null):a=this.create_();return a};goog.async.FreeList.prototype.put=function(a){this.reset_(a);this.occupants_<this.limit_&&(this.occupants_++,a.next=this.head_,this.head_=a)};goog.async.FreeList.prototype.occupants=function(){return this.occupants_};goog.async.WorkQueue=function(){this.workTail_=this.workHead_=null};goog.async.WorkQueue.DEFAULT_MAX_UNUSED=100;goog.async.WorkQueue.freelist_=new goog.async.FreeList(function(){return new goog.async.WorkItem},function(a){a.reset()},goog.async.WorkQueue.DEFAULT_MAX_UNUSED);goog.async.WorkQueue.prototype.add=function(a,b){var c=this.getUnusedItem_();c.set(a,b);this.workTail_?this.workTail_.next=c:(goog.asserts.assert(!this.workHead_),this.workHead_=c);this.workTail_=c};
|
||||
goog.style.getCssTranslation=function(a){a=goog.style.getComputedTransform(a);return a?(a=a.match(goog.style.MATRIX_TRANSLATION_REGEX_))?new goog.math.Coordinate(parseFloat(a[1]),parseFloat(a[2])):new goog.math.Coordinate(0,0):new goog.math.Coordinate(0,0)};goog.debug.entryPointRegistry={};goog.debug.EntryPointMonitor=function(){};goog.debug.entryPointRegistry.refList_=[];goog.debug.entryPointRegistry.monitors_=[];goog.debug.entryPointRegistry.monitorsMayExist_=!1;goog.debug.entryPointRegistry.register=function(a){goog.debug.entryPointRegistry.refList_[goog.debug.entryPointRegistry.refList_.length]=a;if(goog.debug.entryPointRegistry.monitorsMayExist_)for(var b=goog.debug.entryPointRegistry.monitors_,c=0;c<b.length;c++)a(goog.bind(b[c].wrap,b[c]))};
|
||||
goog.debug.entryPointRegistry.monitorAll=function(a){goog.debug.entryPointRegistry.monitorsMayExist_=!0;for(var b=goog.bind(a.wrap,a),c=0;c<goog.debug.entryPointRegistry.refList_.length;c++)goog.debug.entryPointRegistry.refList_[c](b);goog.debug.entryPointRegistry.monitors_.push(a)};
|
||||
goog.debug.entryPointRegistry.unmonitorAllIfPossible=function(a){var b=goog.debug.entryPointRegistry.monitors_;goog.asserts.assert(a==b[b.length-1],"Only the most recent monitor can be unwrapped.");a=goog.bind(a.unwrap,a);for(var c=0;c<goog.debug.entryPointRegistry.refList_.length;c++)goog.debug.entryPointRegistry.refList_[c](a);b.length--};goog.events={};
|
||||
goog.events.BrowserFeature={HAS_W3C_BUTTON:!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9),HAS_W3C_EVENT_SUPPORT:!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9),SET_KEY_CODE_TO_PREVENT_DEFAULT:goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("9"),HAS_NAVIGATOR_ONLINE_PROPERTY:!goog.userAgent.WEBKIT||goog.userAgent.isVersionOrHigher("528"),HAS_HTML5_NETWORK_EVENT_SUPPORT:goog.userAgent.GECKO&&goog.userAgent.isVersionOrHigher("1.9b")||goog.userAgent.IE&&goog.userAgent.isVersionOrHigher("8")||
|
||||
goog.userAgent.OPERA&&goog.userAgent.isVersionOrHigher("9.5")||goog.userAgent.WEBKIT&&goog.userAgent.isVersionOrHigher("528"),HTML5_NETWORK_EVENTS_FIRE_ON_BODY:goog.userAgent.GECKO&&!goog.userAgent.isVersionOrHigher("8")||goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("9"),TOUCH_ENABLED:"ontouchstart"in goog.global||!!(goog.global.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!goog.global.navigator||!goog.global.navigator.msMaxTouchPoints)};goog.disposable={};goog.disposable.IDisposable=function(){};goog.disposable.IDisposable.prototype.dispose=goog.abstractMethod;goog.disposable.IDisposable.prototype.isDisposed=goog.abstractMethod;goog.Disposable=function(){goog.Disposable.MONITORING_MODE!=goog.Disposable.MonitoringMode.OFF&&(goog.Disposable.INCLUDE_STACK_ON_CREATION&&(this.creationStack=Error().stack),goog.Disposable.instances_[goog.getUid(this)]=this);this.disposed_=this.disposed_;this.onDisposeCallbacks_=this.onDisposeCallbacks_};goog.Disposable.MonitoringMode={OFF:0,PERMANENT:1,INTERACTIVE:2};goog.Disposable.MONITORING_MODE=0;goog.Disposable.INCLUDE_STACK_ON_CREATION=!0;goog.Disposable.instances_={};
|
||||
goog.Disposable.getUndisposedObjects=function(){var a=[],b;for(b in goog.Disposable.instances_)goog.Disposable.instances_.hasOwnProperty(b)&&a.push(goog.Disposable.instances_[Number(b)]);return a};goog.Disposable.clearUndisposedObjects=function(){goog.Disposable.instances_={}};goog.Disposable.prototype.disposed_=!1;goog.Disposable.prototype.isDisposed=function(){return this.disposed_};goog.Disposable.prototype.getDisposed=goog.Disposable.prototype.isDisposed;
|
||||
goog.Disposable.prototype.dispose=function(){if(!this.disposed_&&(this.disposed_=!0,this.disposeInternal(),goog.Disposable.MONITORING_MODE!=goog.Disposable.MonitoringMode.OFF)){var a=goog.getUid(this);if(goog.Disposable.MONITORING_MODE==goog.Disposable.MonitoringMode.PERMANENT&&!goog.Disposable.instances_.hasOwnProperty(a))throw Error(this+" did not call the goog.Disposable base constructor or was disposed of after a clearUndisposedObjects call");delete goog.Disposable.instances_[a]}};
|
||||
goog.Disposable.prototype.registerDisposable=function(a){this.addOnDisposeCallback(goog.partial(goog.dispose,a))};goog.Disposable.prototype.addOnDisposeCallback=function(a,b){this.disposed_?goog.isDef(b)?a.call(b):a():(this.onDisposeCallbacks_||(this.onDisposeCallbacks_=[]),this.onDisposeCallbacks_.push(goog.isDef(b)?goog.bind(a,b):a))};goog.Disposable.prototype.disposeInternal=function(){if(this.onDisposeCallbacks_)for(;this.onDisposeCallbacks_.length;)this.onDisposeCallbacks_.shift()()};
|
||||
goog.Disposable.isDisposed=function(a){return a&&"function"==typeof a.isDisposed?a.isDisposed():!1};goog.dispose=function(a){a&&"function"==typeof a.dispose&&a.dispose()};goog.disposeAll=function(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];goog.isArrayLike(d)?goog.disposeAll.apply(null,d):goog.dispose(d)}};goog.events.EventId=function(a){this.id=a};goog.events.EventId.prototype.toString=function(){return this.id};goog.events.Event=function(a,b){this.type=a instanceof goog.events.EventId?String(a):a;this.currentTarget=this.target=b;this.defaultPrevented=this.propagationStopped_=!1;this.returnValue_=!0};goog.events.Event.prototype.stopPropagation=function(){this.propagationStopped_=!0};goog.events.Event.prototype.preventDefault=function(){this.defaultPrevented=!0;this.returnValue_=!1};goog.events.Event.stopPropagation=function(a){a.stopPropagation()};goog.events.Event.preventDefault=function(a){a.preventDefault()};goog.events.getVendorPrefixedName_=function(a){return goog.userAgent.WEBKIT?"webkit"+a:goog.userAgent.OPERA?"o"+a.toLowerCase():a.toLowerCase()};
|
||||
goog.events.EventType={CLICK:"click",RIGHTCLICK:"rightclick",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",SELECTSTART:"selectstart",WHEEL:"wheel",KEYPRESS:"keypress",KEYDOWN:"keydown",KEYUP:"keyup",BLUR:"blur",FOCUS:"focus",DEACTIVATE:"deactivate",FOCUSIN:goog.userAgent.IE?"focusin":"DOMFocusIn",FOCUSOUT:goog.userAgent.IE?"focusout":"DOMFocusOut",CHANGE:"change",RESET:"reset",
|
||||
SELECT:"select",SUBMIT:"submit",INPUT:"input",PROPERTYCHANGE:"propertychange",DRAGSTART:"dragstart",DRAG:"drag",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",DRAGEND:"dragend",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",TOUCHCANCEL:"touchcancel",BEFOREUNLOAD:"beforeunload",CONSOLEMESSAGE:"consolemessage",CONTEXTMENU:"contextmenu",DOMCONTENTLOADED:"DOMContentLoaded",ERROR:"error",HELP:"help",LOAD:"load",LOSECAPTURE:"losecapture",ORIENTATIONCHANGE:"orientationchange",
|
||||
READYSTATECHANGE:"readystatechange",RESIZE:"resize",SCROLL:"scroll",UNLOAD:"unload",CANPLAY:"canplay",CANPLAYTHROUGH:"canplaythrough",DURATIONCHANGE:"durationchange",EMPTIED:"emptied",ENDED:"ended",LOADEDDATA:"loadeddata",LOADEDMETADATA:"loadedmetadata",PAUSE:"pause",PLAY:"play",PLAYING:"playing",RATECHANGE:"ratechange",SEEKED:"seeked",SEEKING:"seeking",STALLED:"stalled",SUSPEND:"suspend",TIMEUPDATE:"timeupdate",VOLUMECHANGE:"volumechange",WAITING:"waiting",HASHCHANGE:"hashchange",PAGEHIDE:"pagehide",
|
||||
PAGESHOW:"pageshow",POPSTATE:"popstate",COPY:"copy",PASTE:"paste",CUT:"cut",BEFORECOPY:"beforecopy",BEFORECUT:"beforecut",BEFOREPASTE:"beforepaste",ONLINE:"online",OFFLINE:"offline",MESSAGE:"message",CONNECT:"connect",ANIMATIONSTART:goog.events.getVendorPrefixedName_("AnimationStart"),ANIMATIONEND:goog.events.getVendorPrefixedName_("AnimationEnd"),ANIMATIONITERATION:goog.events.getVendorPrefixedName_("AnimationIteration"),TRANSITIONEND:goog.events.getVendorPrefixedName_("TransitionEnd"),POINTERDOWN:"pointerdown",
|
||||
POINTERUP:"pointerup",POINTERCANCEL:"pointercancel",POINTERMOVE:"pointermove",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",MSGESTURECHANGE:"MSGestureChange",MSGESTUREEND:"MSGestureEnd",MSGESTUREHOLD:"MSGestureHold",MSGESTURESTART:"MSGestureStart",MSGESTURETAP:"MSGestureTap",MSGOTPOINTERCAPTURE:"MSGotPointerCapture",MSINERTIASTART:"MSInertiaStart",MSLOSTPOINTERCAPTURE:"MSLostPointerCapture",
|
||||
MSPOINTERCANCEL:"MSPointerCancel",MSPOINTERDOWN:"MSPointerDown",MSPOINTERENTER:"MSPointerEnter",MSPOINTERHOVER:"MSPointerHover",MSPOINTERLEAVE:"MSPointerLeave",MSPOINTERMOVE:"MSPointerMove",MSPOINTEROUT:"MSPointerOut",MSPOINTEROVER:"MSPointerOver",MSPOINTERUP:"MSPointerUp",TEXT:"text",TEXTINPUT:"textInput",COMPOSITIONSTART:"compositionstart",COMPOSITIONUPDATE:"compositionupdate",COMPOSITIONEND:"compositionend",EXIT:"exit",LOADABORT:"loadabort",LOADCOMMIT:"loadcommit",LOADREDIRECT:"loadredirect",LOADSTART:"loadstart",
|
||||
LOADSTOP:"loadstop",RESPONSIVE:"responsive",SIZECHANGED:"sizechanged",UNRESPONSIVE:"unresponsive",VISIBILITYCHANGE:"visibilitychange",STORAGE:"storage",DOMSUBTREEMODIFIED:"DOMSubtreeModified",DOMNODEINSERTED:"DOMNodeInserted",DOMNODEREMOVED:"DOMNodeRemoved",DOMNODEREMOVEDFROMDOCUMENT:"DOMNodeRemovedFromDocument",DOMNODEINSERTEDINTODOCUMENT:"DOMNodeInsertedIntoDocument",DOMATTRMODIFIED:"DOMAttrModified",DOMCHARACTERDATAMODIFIED:"DOMCharacterDataModified",BEFOREPRINT:"beforeprint",AFTERPRINT:"afterprint"};goog.events.BrowserEvent=function(a,b){goog.events.Event.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.platformModifierKey=!1;this.event_=null;a&&this.init(a,b)};goog.inherits(goog.events.BrowserEvent,goog.events.Event);
|
||||
goog.events.BrowserEvent.MouseButton={LEFT:0,MIDDLE:1,RIGHT:2};goog.events.BrowserEvent.IEButtonMap=[1,4,2];
|
||||
goog.events.BrowserEvent.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;e?goog.userAgent.GECKO&&(goog.reflect.canAccessProperty(e,"nodeName")||(e=null)):c==goog.events.EventType.MOUSEOVER?e=a.fromElement:c==goog.events.EventType.MOUSEOUT&&(e=a.toElement);this.relatedTarget=e;goog.isNull(d)?(this.offsetX=goog.userAgent.WEBKIT||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=
|
||||
goog.userAgent.WEBKIT||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=
|
||||
a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.platformModifierKey=goog.userAgent.MAC?a.metaKey:a.ctrlKey;this.state=a.state;this.event_=a;a.defaultPrevented&&this.preventDefault()};goog.events.BrowserEvent.prototype.isButton=function(a){return goog.events.BrowserFeature.HAS_W3C_BUTTON?this.event_.button==a:"click"==this.type?a==goog.events.BrowserEvent.MouseButton.LEFT:!!(this.event_.button&goog.events.BrowserEvent.IEButtonMap[a])};
|
||||
goog.events.BrowserEvent.prototype.isMouseActionButton=function(){return this.isButton(goog.events.BrowserEvent.MouseButton.LEFT)&&!(goog.userAgent.WEBKIT&&goog.userAgent.MAC&&this.ctrlKey)};goog.events.BrowserEvent.prototype.stopPropagation=function(){goog.events.BrowserEvent.superClass_.stopPropagation.call(this);this.event_.stopPropagation?this.event_.stopPropagation():this.event_.cancelBubble=!0};
|
||||
goog.events.BrowserEvent.prototype.preventDefault=function(){goog.events.BrowserEvent.superClass_.preventDefault.call(this);var a=this.event_;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,goog.events.BrowserFeature.SET_KEY_CODE_TO_PREVENT_DEFAULT)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};goog.events.BrowserEvent.prototype.getBrowserEvent=function(){return this.event_};goog.events.Listenable=function(){};goog.events.Listenable.IMPLEMENTED_BY_PROP="closure_listenable_"+(1E6*Math.random()|0);goog.events.Listenable.addImplementation=function(a){a.prototype[goog.events.Listenable.IMPLEMENTED_BY_PROP]=!0};goog.events.Listenable.isImplementedBy=function(a){return!(!a||!a[goog.events.Listenable.IMPLEMENTED_BY_PROP])};goog.events.ListenableKey=function(){};goog.events.ListenableKey.counter_=0;goog.events.ListenableKey.reserveKey=function(){return++goog.events.ListenableKey.counter_};goog.events.Listener=function(a,b,c,d,e,f){goog.events.Listener.ENABLE_MONITORING&&(this.creationStack=Error().stack);this.listener=a;this.proxy=b;this.src=c;this.type=d;this.capture=!!e;this.handler=f;this.key=goog.events.ListenableKey.reserveKey();this.removed=this.callOnce=!1};goog.events.Listener.ENABLE_MONITORING=!1;goog.events.Listener.prototype.markAsRemoved=function(){this.removed=!0;this.handler=this.src=this.proxy=this.listener=null};goog.events.ListenerMap=function(a){this.src=a;this.listeners={};this.typeCount_=0};goog.events.ListenerMap.prototype.getTypeCount=function(){return this.typeCount_};goog.events.ListenerMap.prototype.getListenerCount=function(){var a=0,b;for(b in this.listeners)a+=this.listeners[b].length;return a};
|
||||
goog.events.ListenerMap.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.listeners[f];a||(a=this.listeners[f]=[],this.typeCount_++);var g=goog.events.ListenerMap.findListenerIndex_(a,b,d,e);-1<g?(b=a[g],c||(b.callOnce=!1)):(b=new goog.events.Listener(b,null,this.src,f,!!d,e),b.callOnce=c,a.push(b));return b};
|
||||
goog.events.ListenerMap.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.listeners))return!1;var e=this.listeners[a];b=goog.events.ListenerMap.findListenerIndex_(e,b,c,d);return-1<b?(e[b].markAsRemoved(),goog.array.removeAt(e,b),0==e.length&&(delete this.listeners[a],this.typeCount_--),!0):!1};
|
||||
goog.events.ListenerMap.prototype.removeByKey=function(a){var b=a.type;if(!(b in this.listeners))return!1;var c=goog.array.remove(this.listeners[b],a);c&&(a.markAsRemoved(),0==this.listeners[b].length&&(delete this.listeners[b],this.typeCount_--));return c};goog.events.ListenerMap.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.listeners)if(!a||c==a){for(var d=this.listeners[c],e=0;e<d.length;e++)++b,d[e].markAsRemoved();delete this.listeners[c];this.typeCount_--}return b};
|
||||
goog.events.ListenerMap.prototype.getListeners=function(a,b){var c=this.listeners[a.toString()],d=[];if(c)for(var e=0;e<c.length;++e){var f=c[e];f.capture==b&&d.push(f)}return d};goog.events.ListenerMap.prototype.getListener=function(a,b,c,d){a=this.listeners[a.toString()];var e=-1;a&&(e=goog.events.ListenerMap.findListenerIndex_(a,b,c,d));return-1<e?a[e]:null};
|
||||
goog.events.ListenerMap.prototype.hasListener=function(a,b){var c=goog.isDef(a),d=c?a.toString():"",e=goog.isDef(b);return goog.object.some(this.listeners,function(a,g){for(var h=0;h<a.length;++h)if(!(c&&a[h].type!=d||e&&a[h].capture!=b))return!0;return!1})};goog.events.ListenerMap.findListenerIndex_=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.removed&&f.listener==b&&f.capture==!!c&&f.handler==d)return e}return-1};goog.events.LISTENER_MAP_PROP_="closure_lm_"+(1E6*Math.random()|0);goog.events.onString_="on";goog.events.onStringMap_={};goog.events.CaptureSimulationMode={OFF_AND_FAIL:0,OFF_AND_SILENT:1,ON:2};goog.events.CAPTURE_SIMULATION_MODE=2;goog.events.listenerCountEstimate_=0;
|
||||
goog.events.listen=function(a,b,c,d,e){if(goog.isArray(b)){for(var f=0;f<b.length;f++)goog.events.listen(a,b[f],c,d,e);return null}c=goog.events.wrapListener(c);return goog.events.Listenable.isImplementedBy(a)?a.listen(b,c,d,e):goog.events.listen_(a,b,c,!1,d,e)};
|
||||
goog.events.listen_=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=!!e;if(g&&!goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT){if(goog.events.CAPTURE_SIMULATION_MODE==goog.events.CaptureSimulationMode.OFF_AND_FAIL)return goog.asserts.fail("Can not register capture listener in IE8-."),null;if(goog.events.CAPTURE_SIMULATION_MODE==goog.events.CaptureSimulationMode.OFF_AND_SILENT)return null}var h=goog.events.getListenerMap_(a);h||(a[goog.events.LISTENER_MAP_PROP_]=h=new goog.events.ListenerMap(a));
|
||||
c=h.add(b,c,d,e,f);if(c.proxy)return c;d=goog.events.getProxy();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,g);else if(a.attachEvent)a.attachEvent(goog.events.getOnString_(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");goog.events.listenerCountEstimate_++;return c};
|
||||
goog.events.getProxy=function(){var a=goog.events.handleBrowserEvent_,b=goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b};
|
||||
goog.events.listenOnce=function(a,b,c,d,e){if(goog.isArray(b)){for(var f=0;f<b.length;f++)goog.events.listenOnce(a,b[f],c,d,e);return null}c=goog.events.wrapListener(c);return goog.events.Listenable.isImplementedBy(a)?a.listenOnce(b,c,d,e):goog.events.listen_(a,b,c,!0,d,e)};goog.events.listenWithWrapper=function(a,b,c,d,e){b.listen(a,c,d,e)};
|
||||
goog.events.unlisten=function(a,b,c,d,e){if(goog.isArray(b)){for(var f=0;f<b.length;f++)goog.events.unlisten(a,b[f],c,d,e);return null}c=goog.events.wrapListener(c);if(goog.events.Listenable.isImplementedBy(a))return a.unlisten(b,c,d,e);if(!a)return!1;d=!!d;if(a=goog.events.getListenerMap_(a))if(b=a.getListener(b,c,d,e))return goog.events.unlistenByKey(b);return!1};
|
||||
goog.events.unlistenByKey=function(a){if(goog.isNumber(a)||!a||a.removed)return!1;var b=a.src;if(goog.events.Listenable.isImplementedBy(b))return b.unlistenByKey(a);var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent&&b.detachEvent(goog.events.getOnString_(c),d);goog.events.listenerCountEstimate_--;(c=goog.events.getListenerMap_(b))?(c.removeByKey(a),0==c.getTypeCount()&&(c.src=null,b[goog.events.LISTENER_MAP_PROP_]=null)):a.markAsRemoved();return!0};
|
||||
goog.events.unlistenWithWrapper=function(a,b,c,d,e){b.unlisten(a,c,d,e)};goog.events.removeAll=function(a,b){if(!a)return 0;if(goog.events.Listenable.isImplementedBy(a))return a.removeAllListeners(b);var c=goog.events.getListenerMap_(a);if(!c)return 0;var d=0,e=b&&b.toString(),f;for(f in c.listeners)if(!e||f==e)for(var g=c.listeners[f].concat(),h=0;h<g.length;++h)goog.events.unlistenByKey(g[h])&&++d;return d};
|
||||
goog.events.getListeners=function(a,b,c){return goog.events.Listenable.isImplementedBy(a)?a.getListeners(b,c):a?(a=goog.events.getListenerMap_(a))?a.getListeners(b,c):[]:[]};goog.events.getListener=function(a,b,c,d,e){c=goog.events.wrapListener(c);d=!!d;return goog.events.Listenable.isImplementedBy(a)?a.getListener(b,c,d,e):a?(a=goog.events.getListenerMap_(a))?a.getListener(b,c,d,e):null:null};
|
||||
goog.events.hasListener=function(a,b,c){if(goog.events.Listenable.isImplementedBy(a))return a.hasListener(b,c);a=goog.events.getListenerMap_(a);return!!a&&a.hasListener(b,c)};goog.events.expose=function(a){var b=[],c;for(c in a)a[c]&&a[c].id?b.push(c+" = "+a[c]+" ("+a[c].id+")"):b.push(c+" = "+a[c]);return b.join("\n")};goog.events.getOnString_=function(a){return a in goog.events.onStringMap_?goog.events.onStringMap_[a]:goog.events.onStringMap_[a]=goog.events.onString_+a};
|
||||
goog.events.fireListeners=function(a,b,c,d){return goog.events.Listenable.isImplementedBy(a)?a.fireListeners(b,c,d):goog.events.fireListeners_(a,b,c,d)};goog.events.fireListeners_=function(a,b,c,d){var e=!0;if(a=goog.events.getListenerMap_(a))if(b=a.listeners[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.capture==c&&!f.removed&&(f=goog.events.fireListener(f,d),e=e&&!1!==f)}return e};
|
||||
goog.events.fireListener=function(a,b){var c=a.listener,d=a.handler||a.src;a.callOnce&&goog.events.unlistenByKey(a);return c.call(d,b)};goog.events.getTotalListenerCount=function(){return goog.events.listenerCountEstimate_};goog.events.dispatchEvent=function(a,b){goog.asserts.assert(goog.events.Listenable.isImplementedBy(a),"Can not use goog.events.dispatchEvent with non-goog.events.Listenable instance.");return a.dispatchEvent(b)};
|
||||
goog.events.protectBrowserEventEntryPoint=function(a){goog.events.handleBrowserEvent_=a.protectEntryPoint(goog.events.handleBrowserEvent_)};
|
||||
goog.events.handleBrowserEvent_=function(a,b){if(a.removed)return!0;if(!goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT){var c=b||goog.getObjectByName("window.event"),d=new goog.events.BrowserEvent(c,this),e=!0;if(goog.events.CAPTURE_SIMULATION_MODE==goog.events.CaptureSimulationMode.ON){if(!goog.events.isMarkedIeEvent_(c)){goog.events.markIeEvent_(c);for(var c=[],f=d.currentTarget;f;f=f.parentNode)c.push(f);for(var f=a.type,g=c.length-1;!d.propagationStopped_&&0<=g;g--){d.currentTarget=c[g];var h=
|
||||
goog.events.fireListeners_(c[g],f,!0,d),e=e&&h}for(g=0;!d.propagationStopped_&&g<c.length;g++)d.currentTarget=c[g],h=goog.events.fireListeners_(c[g],f,!1,d),e=e&&h}}else e=goog.events.fireListener(a,d);return e}return goog.events.fireListener(a,new goog.events.BrowserEvent(b,this))};goog.events.markIeEvent_=function(a){var b=!1;if(0==a.keyCode)try{a.keyCode=-1;return}catch(c){b=!0}if(b||void 0==a.returnValue)a.returnValue=!0};goog.events.isMarkedIeEvent_=function(a){return 0>a.keyCode||void 0!=a.returnValue};
|
||||
goog.events.uniqueIdCounter_=0;goog.events.getUniqueId=function(a){return a+"_"+goog.events.uniqueIdCounter_++};goog.events.getListenerMap_=function(a){a=a[goog.events.LISTENER_MAP_PROP_];return a instanceof goog.events.ListenerMap?a:null};goog.events.LISTENER_WRAPPER_PROP_="__closure_events_fn_"+(1E9*Math.random()>>>0);
|
||||
goog.events.wrapListener=function(a){goog.asserts.assert(a,"Listener can not be null.");if(goog.isFunction(a))return a;goog.asserts.assert(a.handleEvent,"An object listener must have handleEvent method.");a[goog.events.LISTENER_WRAPPER_PROP_]||(a[goog.events.LISTENER_WRAPPER_PROP_]=function(b){return a.handleEvent(b)});return a[goog.events.LISTENER_WRAPPER_PROP_]};goog.debug.entryPointRegistry.register(function(a){goog.events.handleBrowserEvent_=a(goog.events.handleBrowserEvent_)});goog.Thenable=function(){};goog.Thenable.prototype.then=function(a,b,c){};goog.Thenable.IMPLEMENTED_BY_PROP="$goog_Thenable";goog.Thenable.addImplementation=function(a){goog.exportProperty(a.prototype,"then",a.prototype.then);COMPILED?a.prototype[goog.Thenable.IMPLEMENTED_BY_PROP]=!0:a.prototype.$goog_Thenable=!0};goog.Thenable.isImplementedBy=function(a){if(!a)return!1;try{return COMPILED?!!a[goog.Thenable.IMPLEMENTED_BY_PROP]:!!a.$goog_Thenable}catch(b){return!1}};goog.async={};goog.async.FreeList=function(a,b,c){this.limit_=c;this.create_=a;this.reset_=b;this.occupants_=0;this.head_=null};goog.async.FreeList.prototype.get=function(){var a;0<this.occupants_?(this.occupants_--,a=this.head_,this.head_=a.next,a.next=null):a=this.create_();return a};goog.async.FreeList.prototype.put=function(a){this.reset_(a);this.occupants_<this.limit_&&(this.occupants_++,a.next=this.head_,this.head_=a)};goog.async.FreeList.prototype.occupants=function(){return this.occupants_};goog.async.WorkQueue=function(){this.workTail_=this.workHead_=null};goog.async.WorkQueue.DEFAULT_MAX_UNUSED=100;goog.async.WorkQueue.freelist_=new goog.async.FreeList(function(){return new goog.async.WorkItem},function(a){a.reset()},goog.async.WorkQueue.DEFAULT_MAX_UNUSED);goog.async.WorkQueue.prototype.add=function(a,b){var c=this.getUnusedItem_();c.set(a,b);this.workTail_?this.workTail_.next=c:(goog.asserts.assert(!this.workHead_),this.workHead_=c);this.workTail_=c};
|
||||
goog.async.WorkQueue.prototype.remove=function(){var a=null;this.workHead_&&(a=this.workHead_,this.workHead_=this.workHead_.next,this.workHead_||(this.workTail_=null),a.next=null);return a};goog.async.WorkQueue.prototype.returnUnused=function(a){goog.async.WorkQueue.freelist_.put(a)};goog.async.WorkQueue.prototype.getUnusedItem_=function(){return goog.async.WorkQueue.freelist_.get()};goog.async.WorkItem=function(){this.next=this.scope=this.fn=null};
|
||||
goog.async.WorkItem.prototype.set=function(a,b){this.fn=a;this.scope=b;this.next=null};goog.async.WorkItem.prototype.reset=function(){this.next=this.scope=this.fn=null};goog.functions={};goog.functions.constant=function(a){return function(){return a}};goog.functions.FALSE=goog.functions.constant(!1);goog.functions.TRUE=goog.functions.constant(!0);goog.functions.NULL=goog.functions.constant(null);goog.functions.identity=function(a,b){return a};goog.functions.error=function(a){return function(){throw Error(a);}};goog.functions.fail=function(a){return function(){throw a;}};
|
||||
goog.functions.lock=function(a,b){b=b||0;return function(){return a.apply(this,Array.prototype.slice.call(arguments,0,b))}};goog.functions.nth=function(a){return function(){return arguments[a]}};goog.functions.partialRight=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.push.apply(b,c);return a.apply(this,b)}};goog.functions.withReturnValue=function(a,b){return goog.functions.sequence(a,goog.functions.constant(b))};
|
||||
@@ -874,15 +874,6 @@ goog.ui.tree.TreeControl.prototype.handleKeyEvent=function(a){var b;(b=this.type
|
||||
goog.ui.tree.TreeControl.prototype.createNode=function(a){return new goog.ui.tree.TreeNode(a||goog.html.SafeHtml.EMPTY,this.getConfig(),this.getDomHelper())};goog.ui.tree.TreeControl.prototype.setNode=function(a){this.typeAhead_.setNodeInMap(a)};goog.ui.tree.TreeControl.prototype.removeNode=function(a){this.typeAhead_.removeNodeFromMap(a)};goog.ui.tree.TreeControl.prototype.clearTypeAhead=function(){this.typeAhead_.clear()};goog.ui.tree.TreeControl.defaultConfig=goog.ui.tree.BaseNode.defaultConfig;
|
||||
// Copyright 2013 Google Inc. Apache License 2.0
|
||||
var Blockly={Blocks:{}};Blockly.Blocks.ONE_BASED_INDEXING=!0;
|
||||
// Copyright 2016 Google Inc. Apache License 2.0
|
||||
Blockly.Touch={};Blockly.Touch.touchIdentifier_=null;Blockly.Touch.onTouchUpWrapper_=null;Blockly.Touch.TOUCH_MAP={};goog.events.BrowserFeature.TOUCH_ENABLED&&(Blockly.Touch.TOUCH_MAP={mousedown:["touchstart"],mousemove:["touchmove"],mouseup:["touchend","touchcancel"]});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)};
|
||||
Blockly.onMouseUp_=function(a){a=Blockly.getMainWorkspace();a.dragMode_!=Blockly.DRAG_NONE&&(Blockly.Touch.clearTouchIdentifier(),Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN),a.dragMode_=Blockly.DRAG_NONE,Blockly.Touch.onTouchUpWrapper_&&(Blockly.unbindEvent_(Blockly.Touch.onTouchUpWrapper_),Blockly.Touch.onTouchUpWrapper_=null),Blockly.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.onMouseMoveWrapper_),Blockly.onMouseMoveWrapper_=null))};
|
||||
Blockly.onMouseMove_=function(a){var b=Blockly.getMainWorkspace();if(b.dragMode_!=Blockly.DRAG_NONE){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_(),
|
||||
b.dragMode_=Blockly.DRAG_FREE);a.stopPropagation();a.preventDefault()}};Blockly.Touch.clearTouchIdentifier=function(){console.trace("\tclearing touch identifier");null==Blockly.Touch.touchIdentifier_&&console.log("\t\ttouch identifier was already null");Blockly.Touch.touchIdentifier_=null};Blockly.Touch.shouldHandleEvent=function(a){return!Blockly.Touch.isMouseOrTouchEvent(a)||Blockly.Touch.checkTouchIdentifier(a)};
|
||||
Blockly.Touch.checkTouchIdentifier=function(a){var b;try{b=a.changedTouches&&a.changedTouches.item(0)&&void 0!=a.changedTouches.item(0).identifier&&null!=a.changedTouches.item(0).identifier?a.changedTouches.item(0).identifier:"mouse"}catch(c){b=a.changedTouches&&a.changedTouches[0]&&void 0!=a.changedTouches[0].identifier&&null!=a.changedTouches[0].identifier?a.changedTouches[0].identifier:"mouse"}return void 0!=Blockly.Touch.touchIdentifier_&&null!=Blockly.Touch.touchIdentifier_?Blockly.Touch.touchIdentifier_==
|
||||
b:"mousedown"==a.type||"touchstart"==a.type?(console.trace("setting touch identfier"),Blockly.Touch.touchIdentifier_=b,!0):!1};Blockly.Touch.setClientFromTouch=function(a){if(0==a.type.indexOf("touch")){var b=a.changedTouches[0];a.clientX=b.clientX;a.clientY=b.clientY}};Blockly.Touch.isMouseOrTouchEvent=function(a){return 0==a.type.indexOf("touch")||0==a.type.indexOf("mouse")};
|
||||
Blockly.Touch.splitEventByTouches=function(a){var b=[];if(a.changedTouches)for(var c=0;c<a.changedTouches.length;c++)b.push({type:a.type,changedTouches:[a.changedTouches[c]],target:a.target,stopPropagation:function(){a.stopPropagation()},preventDefault:function(){a.preventDefault()}});else b.push(a);return b};
|
||||
// Copyright 2012 Google Inc. Apache License 2.0
|
||||
Blockly.Workspace=function(a){this.id=Blockly.genUid();Blockly.Workspace.WorkspaceDB_[this.id]=this;this.options=a||{};this.RTL=!!this.options.RTL;this.horizontalLayout=!!this.options.horizontalLayout;this.toolboxPosition=this.options.toolboxPosition;this.topBlocks_=[];this.listeners_=[];this.undoStack_=[];this.redoStack_=[];this.blockDB_=Object.create(null);this.variableList=[]};Blockly.Workspace.prototype.rendered=!1;Blockly.Workspace.prototype.MAX_UNDO=1024;
|
||||
Blockly.Workspace.prototype.dispose=function(){this.listeners_.length=0;this.clear();delete Blockly.Workspace.WorkspaceDB_[this.id]};Blockly.Workspace.SCAN_ANGLE=3;Blockly.Workspace.prototype.addTopBlock=function(a){this.topBlocks_.push(a);if(this.isFlyout){a=Blockly.Variables.allUsedVariables(a);for(var b=0;b<a.length;b++)-1==this.variableList.indexOf(a[b])&&this.variableList.push(a[b])}};
|
||||
@@ -898,14 +889,14 @@ Blockly.Workspace.prototype.addChangeListener=function(a){this.listeners_.push(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;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.bubbleMouseUp_=function(){Blockly.Touch.clearTouchIdentifier();Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN);Blockly.Bubble.unbindDragEvents_()};
|
||||
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.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_=
|
||||
Blockly.createSvgElement("g",{"class":this.workspace_.RTL?"blocklyResizeSW":"blocklyResizeSE"},this.bubbleGroup_),c=2*Blockly.Bubble.BORDER_WIDTH,Blockly.createSvgElement("polygon",{points:"0,x x,x x,0".replace(/x/g,c.toString())},this.resizeGroup_),Blockly.createSvgElement("line",{"class":"blocklyResizeLine",x1:c/3,y1:c-1,x2:c-1,y2:c/3},this.resizeGroup_),Blockly.createSvgElement("line",{"class":"blocklyResizeLine",x1:2*c/3,y1:c-1,x2:c-1,y2:2*c/3},this.resizeGroup_)):this.resizeGroup_=null;this.bubbleGroup_.appendChild(a);
|
||||
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.bubbleMouseUp_),Blockly.Bubble.onMouseMoveWrapper_=Blockly.bindEvent_(document,
|
||||
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.bubbleMouseUp_),Blockly.Bubble.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",this,this.resizeMouseMove_),
|
||||
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){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+
|
||||
@@ -960,7 +951,7 @@ Blockly.Field.prototype.getScaledBBox_=function(){var a=this.borderRect_.getBBox
|
||||
Blockly.Field.prototype.updateTextNode_=function(){if(this.textElement_){var a=this.text_;a.length>this.maxDisplayLength&&(a=a.substring(0,this.maxDisplayLength-2)+"\u2026");goog.dom.removeChildren(this.textElement_);a=a.replace(/\s/g,Blockly.Field.NBSP);this.sourceBlock_.RTL&&a&&(a+="\u200f");a||(a=Blockly.Field.NBSP);a=document.createTextNode(a);this.textElement_.appendChild(a);this.size_.width=0}};Blockly.Field.prototype.getValue=function(){return this.getText()};
|
||||
Blockly.Field.prototype.setValue=function(a){if(null!==a){var b=this.getValue();b!=a&&(this.sourceBlock_&&Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.Change(this.sourceBlock_,"field",this.name,b,a)),this.setText(a))}};
|
||||
Blockly.Field.prototype.onMouseUp_=function(a){if(!goog.userAgent.IPHONE&&!goog.userAgent.IPAD||goog.userAgent.isVersionOrHigher("537.51.2")||0===a.layerX||0===a.layerY)Blockly.isRightButton(a)||this.sourceBlock_.workspace.isDragging()||this.sourceBlock_.isEditable()&&this.showEditor_()};Blockly.Field.prototype.setTooltip=function(a){};Blockly.Field.prototype.getAbsoluteXY_=function(){return goog.style.getPageOffset(this.borderRect_)};Blockly.Tooltip={};Blockly.Tooltip.visible=!1;Blockly.Tooltip.LIMIT=50;Blockly.Tooltip.mouseOutPid_=0;Blockly.Tooltip.showPid_=0;Blockly.Tooltip.lastX_=0;Blockly.Tooltip.lastY_=0;Blockly.Tooltip.element_=null;Blockly.Tooltip.poisonedElement_=null;Blockly.Tooltip.OFFSET_X=0;Blockly.Tooltip.OFFSET_Y=10;Blockly.Tooltip.RADIUS_OK=10;Blockly.Tooltip.HOVER_MS=750;Blockly.Tooltip.MARGINS=5;Blockly.Tooltip.DIV=null;
|
||||
Blockly.Tooltip.createDom=function(){Blockly.Tooltip.DIV||(Blockly.Tooltip.DIV=goog.dom.createDom("DIV","blocklyTooltipDiv"),document.body.appendChild(Blockly.Tooltip.DIV))};Blockly.Tooltip.bindMouseEvents=function(a){Blockly.bindEvent_(a,"mouseover",null,Blockly.Tooltip.onMouseOver_);Blockly.bindEvent_(a,"mouseout",null,Blockly.Tooltip.onMouseOut_);a.addEventListener("mousemove",Blockly.Tooltip.onMouseMove_,!1)};
|
||||
Blockly.Tooltip.createDom=function(){Blockly.Tooltip.DIV||(Blockly.Tooltip.DIV=goog.dom.createDom("DIV","blocklyTooltipDiv"),document.body.appendChild(Blockly.Tooltip.DIV))};Blockly.Tooltip.bindMouseEvents=function(a){Blockly.bindEvent_(a,"mouseover",null,Blockly.Tooltip.onMouseOver_);Blockly.bindEvent_(a,"mouseout",null,Blockly.Tooltip.onMouseOut_);Blockly.bindEvent_(a,"mousemove",null,Blockly.Tooltip.onMouseMove_)};
|
||||
Blockly.Tooltip.onMouseOver_=function(a){for(a=a.target;!goog.isString(a.tooltip)&&!goog.isFunction(a.tooltip);)a=a.tooltip;Blockly.Tooltip.element_!=a&&(Blockly.Tooltip.hide(),Blockly.Tooltip.poisonedElement_=null,Blockly.Tooltip.element_=a);clearTimeout(Blockly.Tooltip.mouseOutPid_)};Blockly.Tooltip.onMouseOut_=function(a){Blockly.Tooltip.mouseOutPid_=setTimeout(function(){Blockly.Tooltip.element_=null;Blockly.Tooltip.poisonedElement_=null;Blockly.Tooltip.hide()},1);clearTimeout(Blockly.Tooltip.showPid_)};
|
||||
Blockly.Tooltip.onMouseMove_=function(a){if(Blockly.Tooltip.element_&&Blockly.Tooltip.element_.tooltip&&Blockly.dragMode_==Blockly.DRAG_NONE&&!Blockly.WidgetDiv.isVisible())if(Blockly.Tooltip.visible){var b=Blockly.Tooltip.lastX_-a.pageX;a=Blockly.Tooltip.lastY_-a.pageY;Math.sqrt(b*b+a*a)>Blockly.Tooltip.RADIUS_OK&&Blockly.Tooltip.hide()}else Blockly.Tooltip.poisonedElement_!=Blockly.Tooltip.element_&&(clearTimeout(Blockly.Tooltip.showPid_),Blockly.Tooltip.lastX_=a.pageX,Blockly.Tooltip.lastY_=a.pageY,
|
||||
Blockly.Tooltip.showPid_=setTimeout(Blockly.Tooltip.show_,Blockly.Tooltip.HOVER_MS))};Blockly.Tooltip.hide=function(){Blockly.Tooltip.visible&&(Blockly.Tooltip.visible=!1,Blockly.Tooltip.DIV&&(Blockly.Tooltip.DIV.style.display="none"));clearTimeout(Blockly.Tooltip.showPid_)};
|
||||
@@ -977,7 +968,9 @@ Blockly.ConnectionDB.prototype.findConnection=function(a){if(!this.length)return
|
||||
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&&m.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 m=[],h=g=k;if(d.length){for(;0<=g&&c(g);)g--;do h++;while(h<d.length&&c(h))}return m};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};Blockly.constants={};Blockly.DRAG_RADIUS=5;Blockly.SNAP_RADIUS=20;Blockly.BUMP_DELAY=250;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750;Blockly.SOUND_LIMIT=100;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.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
|
||||
Blockly.constants={};Blockly.DRAG_RADIUS=5;Blockly.SNAP_RADIUS=20;Blockly.BUMP_DELAY=250;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750;Blockly.SOUND_LIMIT=100;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;Blockly.ALIGN_RIGHT=1;Blockly.DRAG_NONE=0;Blockly.DRAG_STICKY=1;Blockly.DRAG_BEGIN=1;Blockly.DRAG_FREE=2;Blockly.OPPOSITE_TYPE=[];Blockly.OPPOSITE_TYPE[Blockly.INPUT_VALUE]=Blockly.OUTPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.OUTPUT_VALUE]=Blockly.INPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.NEXT_STATEMENT]=Blockly.PREVIOUS_STATEMENT;Blockly.OPPOSITE_TYPE[Blockly.PREVIOUS_STATEMENT]=Blockly.NEXT_STATEMENT;Blockly.TOOLBOX_AT_TOP=0;Blockly.TOOLBOX_AT_BOTTOM=1;
|
||||
Blockly.TOOLBOX_AT_LEFT=2;Blockly.TOOLBOX_AT_RIGHT=3;Blockly.Options=function(a){var b=!!a.readOnly;if(b)var c=null,d=!1,e=!1,f=!1,g=!1,h=!1,k=!1;else c=Blockly.Options.parseToolboxTree(a.toolbox),d=!(!c||!c.getElementsByTagName("category").length),e=a.trashcan,void 0===e&&(e=d),f=a.collapse,void 0===f&&(f=d),g=a.comments,void 0===g&&(g=d),h=a.disable,void 0===h&&(h=d),k=a.sounds,void 0===k&&(k=!0);var m=!!a.rtl,p=a.horizontalLayout;void 0===p&&(p=!1);var l=a.toolboxPosition,l="end"===l?!1:!0,l=p?l?Blockly.TOOLBOX_AT_TOP:Blockly.TOOLBOX_AT_BOTTOM:l==
|
||||
m?Blockly.TOOLBOX_AT_RIGHT:Blockly.TOOLBOX_AT_LEFT,n=a.scrollbars;void 0===n&&(n=d);var q=a.css;void 0===q&&(q=!0);var t="https://blockly-demo.appspot.com/static/media/";a.media?t=a.media:a.path&&(t=a.path+"media/");this.RTL=m;this.collapse=f;this.comments=g;this.disable=h;this.readOnly=b;this.maxBlocks=a.maxBlocks||Infinity;this.pathToMedia=t;this.hasCategories=d;this.hasScrollbars=n;this.hasTrashcan=e;this.hasSounds=k;this.hasCss=q;this.horizontalLayout=p;this.languageTree=c;this.gridOptions=Blockly.Options.parseGridOptions_(a);
|
||||
@@ -992,7 +985,7 @@ Blockly.Scrollbar=function(a,b,c){this.workspace_=a;this.pair_=c||!1;this.horizo
|
||||
this.svgHandle_.setAttribute("width",Blockly.Scrollbar.scrollbarThickness-5),this.svgHandle_.setAttribute("x",2.5),this.lengthAttribute_="height",this.positionAttribute_="y");this.onMouseDownBarWrapper_=Blockly.bindEvent_(this.svgBackground_,"mousedown",this,this.onMouseDownBar_);this.onMouseDownHandleWrapper_=Blockly.bindEvent_(this.svgHandle_,"mousedown",this,this.onMouseDownHandle_)};Blockly.Scrollbar.prototype.scrollViewSize_=0;Blockly.Scrollbar.prototype.handleLength_=0;
|
||||
Blockly.Scrollbar.prototype.handlePosition_=0;Blockly.Scrollbar.prototype.isVisible_=!0;Blockly.Scrollbar.scrollbarThickness=15;goog.events.BrowserFeature.TOUCH_ENABLED&&(Blockly.Scrollbar.scrollbarThickness=25);
|
||||
Blockly.Scrollbar.metricsAreEquivalent_=function(a,b){return a&&b&&a.viewWidth==b.viewWidth&&a.viewHeight==b.viewHeight&&a.viewLeft==b.viewLeft&&a.viewTop==b.viewTop&&a.absoluteTop==b.absoluteTop&&a.absoluteLeft==b.absoluteLeft&&a.contentWidth==b.contentWidth&&a.contentHeight==b.contentHeight&&a.contentLeft==b.contentLeft&&a.contentTop==b.contentTop?!0:!1};
|
||||
Blockly.Scrollbar.prototype.dispose=function(){this.cleanUp_();Blockly.unbindEvent_(this.onMouseDownBarWrapper_);this.onMouseDownBarWrapper_=null;Blockly.unbindEvent_(this.onMouseDownHandleWrapper_);this.onMouseDownHandleWrapper_=null;goog.dom.removeNode(this.svgGroup_);this.workspace_=this.svgHandle_=this.svgBackground_=this.svgGroup_=null};Blockly.Scrollbar.prototype.setHandleLength_=function(a){this.handleLength_=a;this.svgHandle_.setAttribute(this.lengthAttribute_,this.handleLength_)};
|
||||
Blockly.Scrollbar.prototype.dispose=function(){this.onMouseUpHandle_();Blockly.unbindEvent_(this.onMouseDownBarWrapper_);this.onMouseDownBarWrapper_=null;Blockly.unbindEvent_(this.onMouseDownHandleWrapper_);this.onMouseDownHandleWrapper_=null;goog.dom.removeNode(this.svgGroup_);this.workspace_=this.svgHandle_=this.svgBackground_=this.svgGroup_=null};Blockly.Scrollbar.prototype.setHandleLength_=function(a){this.handleLength_=a;this.svgHandle_.setAttribute(this.lengthAttribute_,this.handleLength_)};
|
||||
Blockly.Scrollbar.prototype.setHandlePosition=function(a){this.handlePosition_=a;this.svgHandle_.setAttribute(this.positionAttribute_,this.handlePosition_)};Blockly.Scrollbar.prototype.setScrollViewSize_=function(a){this.scrollViewSize_=a;this.svgBackground_.setAttribute(this.lengthAttribute_,this.scrollViewSize_)};Blockly.Scrollbar.prototype.setPosition=function(a,b){this.position_.x=a;this.position_.y=b;this.svgGroup_.setAttribute("transform","translate("+this.position_.x+","+this.position_.y+")")};
|
||||
Blockly.Scrollbar.prototype.resize=function(a){if(!a&&(a=this.workspace_.getMetrics(),!a))return;Blockly.Scrollbar.metricsAreEquivalent_(a,this.oldHostMetrics_)||(this.oldHostMetrics_=a,this.horizontal_?this.resizeHorizontal_(a):this.resizeVertical_(a),this.onScroll_())};Blockly.Scrollbar.prototype.resizeHorizontal_=function(a){this.resizeViewHorizontal(a)};
|
||||
Blockly.Scrollbar.prototype.resizeViewHorizontal=function(a){var b=a.viewWidth-1;this.pair_&&(b-=Blockly.Scrollbar.scrollbarThickness);this.setScrollViewSize_(Math.max(0,b));b=a.absoluteLeft+.5;this.pair_&&this.workspace_.RTL&&(b+=Blockly.Scrollbar.scrollbarThickness);this.setPosition(b,a.absoluteTop+a.viewHeight-Blockly.Scrollbar.scrollbarThickness-.5);this.resizeContentHorizontal(a)};
|
||||
@@ -1001,11 +994,10 @@ Blockly.Scrollbar.prototype.resizeViewVertical=function(a){var b=a.viewHeight-1;
|
||||
Blockly.Scrollbar.prototype.resizeContentVertical=function(a){this.pair_||this.setVisible(this.scrollViewSize_<a.contentHeight);this.ratio_=this.scrollViewSize_/a.contentHeight;if(-Infinity==this.ratio_||Infinity==this.ratio_||isNaN(this.ratio_))this.ratio_=0;this.setHandleLength_(Math.max(0,a.viewHeight*this.ratio_));this.setHandlePosition(this.constrainHandle_((a.viewTop-a.contentTop)*this.ratio_))};
|
||||
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.svgHandle_=Blockly.createSvgElement("rect",{"class":"blocklyScrollbarHandle",rx:a,ry:a},this.svgGroup_);Blockly.Scrollbar.insertAfter_(this.svgGroup_,this.workspace_.getBubbleCanvas())};
|
||||
Blockly.Scrollbar.prototype.isVisible=function(){return this.isVisible_};Blockly.Scrollbar.prototype.setVisible=function(a){if(a!=this.isVisible()){if(this.pair_)throw"Unable to toggle visibility of paired scrollbars.";(this.isVisible_=a)?this.svgGroup_.setAttribute("display","block"):(this.workspace_.setMetrics({x:0,y:0}),this.svgGroup_.setAttribute("display","none"))}};
|
||||
Blockly.Scrollbar.prototype.onMouseDownBar_=function(a){Blockly.Touch.clearTouchIdentifier();this.cleanUp_();if(Blockly.isRightButton(a))a.stopPropagation();else{var b=Blockly.mouseToSvg(a,this.workspace_.getParentSvg(),this.workspace_.getInverseScreenCTM()),b=this.horizontal_?b.x:b.y,c=Blockly.getSvgXY_(this.svgHandle_,this.workspace_),c=this.horizontal_?c.x:c.y,d=this.handlePosition_,e=.95*this.handleLength_;b<=c?d-=e:b>=c+this.handleLength_&&(d+=e);this.setHandlePosition(this.constrainHandle_(d));
|
||||
this.onScroll_();a.stopPropagation();a.preventDefault()}};
|
||||
Blockly.Scrollbar.prototype.onMouseDownHandle_=function(a){this.cleanUp_();Blockly.isRightButton(a)?a.stopPropagation():(this.startDragHandle=this.handlePosition_,this.startDragMouse=this.horizontal_?a.clientX:a.clientY,Blockly.Scrollbar.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",this,this.onMouseUpHandle_),Blockly.Scrollbar.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",this,this.onMouseMoveHandle_),a.stopPropagation(),a.preventDefault())};
|
||||
Blockly.Scrollbar.prototype.onMouseMoveHandle_=function(a){this.setHandlePosition(this.constrainHandle_(this.startDragHandle+((this.horizontal_?a.clientX:a.clientY)-this.startDragMouse)));this.onScroll_()};Blockly.Scrollbar.prototype.onMouseUpHandle_=function(){Blockly.Touch.clearTouchIdentifier();this.cleanUp_()};
|
||||
Blockly.Scrollbar.prototype.cleanUp_=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.onMouseDownBar_=function(a){this.onMouseUpHandle_();if(Blockly.isRightButton(a))a.stopPropagation();else{var b=Blockly.mouseToSvg(a,this.workspace_.getParentSvg(),this.workspace_.getInverseScreenCTM()),b=this.horizontal_?b.x:b.y,c=Blockly.getSvgXY_(this.svgHandle_,this.workspace_),c=this.horizontal_?c.x:c.y,d=this.handlePosition_,e=.95*this.handleLength_;b<=c?d-=e:b>=c+this.handleLength_&&(d+=e);this.setHandlePosition(this.constrainHandle_(d));this.onScroll_();a.stopPropagation();
|
||||
a.preventDefault()}};Blockly.Scrollbar.prototype.onMouseDownHandle_=function(a){this.onMouseUpHandle_();Blockly.isRightButton(a)?a.stopPropagation():(this.startDragHandle=this.handlePosition_,this.startDragMouse=this.horizontal_?a.clientX:a.clientY,Blockly.Scrollbar.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",this,this.onMouseUpHandle_),Blockly.Scrollbar.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",this,this.onMouseMoveHandle_),a.stopPropagation(),a.preventDefault())};
|
||||
Blockly.Scrollbar.prototype.onMouseMoveHandle_=function(a){this.setHandlePosition(this.constrainHandle_(this.startDragHandle+((this.horizontal_?a.clientX:a.clientY)-this.startDragMouse)));this.onScroll_()};
|
||||
Blockly.Scrollbar.prototype.onMouseUpHandle_=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.constrainHandle_=function(a){return a=0>=a||isNaN(a)||this.scrollViewSize_<this.handleLength_?0:Math.min(a,this.scrollViewSize_-this.handleLength_)};Blockly.Scrollbar.prototype.onScroll_=function(){var a=this.handlePosition_/this.scrollViewSize_;isNaN(a)&&(a=0);var b={};this.horizontal_?b.x=a:b.y=a;this.workspace_.setMetrics(b)};Blockly.Scrollbar.prototype.set=function(a){this.setHandlePosition(this.constrainHandle_(a*this.ratio_));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.SPRITE_LEFT_=0;Blockly.Trashcan.prototype.SPRITE_TOP_=32;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;Blockly.Trashcan.prototype.left_=0;Blockly.Trashcan.prototype.top_=0;
|
||||
@@ -1040,7 +1032,7 @@ Blockly.ZoomControls=function(a){this.workspace_=a};Blockly.ZoomControls.prototy
|
||||
Blockly.ZoomControls.prototype.createDom=function(){var a=this.workspace_;this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyZoom"},null);var b=String(Math.random()).substring(2),c=Blockly.createSvgElement("clipPath",{id:"blocklyZoomoutClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32,y:77},c);var d=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-64,y:-15,"clip-path":"url(#blocklyZoomoutClipPath"+b+")"},this.svgGroup_);
|
||||
d.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a.options.pathToMedia+Blockly.SPRITE.url);c=Blockly.createSvgElement("clipPath",{id:"blocklyZoominClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32,y:43},c);var e=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-32,y:-49,"clip-path":"url(#blocklyZoominClipPath"+b+")"},this.svgGroup_);e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a.options.pathToMedia+
|
||||
Blockly.SPRITE.url);c=Blockly.createSvgElement("clipPath",{id:"blocklyZoomresetClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32},c);b=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,y:-92,"clip-path":"url(#blocklyZoomresetClipPath"+b+")"},this.svgGroup_);b.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a.options.pathToMedia+Blockly.SPRITE.url);Blockly.bindEvent_(b,"mousedown",null,function(b){a.setScale(1);a.scrollCenter();
|
||||
Blockly.Touch.clearTouchIdentifier();b.stopPropagation();b.preventDefault()});Blockly.bindEvent_(e,"mousedown",null,function(b){a.zoomCenter(1);Blockly.Touch.clearTouchIdentifier();b.stopPropagation();b.preventDefault()});Blockly.bindEvent_(d,"mousedown",null,function(b){a.zoomCenter(-1);Blockly.Touch.clearTouchIdentifier();b.stopPropagation();b.preventDefault()});return this.svgGroup_};Blockly.ZoomControls.prototype.init=function(a){this.bottom_=this.MARGIN_BOTTOM_+a;return this.bottom_+this.HEIGHT_};
|
||||
b.stopPropagation();b.preventDefault()});Blockly.bindEvent_(e,"mousedown",null,function(b){a.zoomCenter(1);b.stopPropagation();b.preventDefault()});Blockly.bindEvent_(d,"mousedown",null,function(b){a.zoomCenter(-1);b.stopPropagation();b.preventDefault()});return this.svgGroup_};Blockly.ZoomControls.prototype.init=function(a){this.bottom_=this.MARGIN_BOTTOM_+a;return this.bottom_+this.HEIGHT_};
|
||||
Blockly.ZoomControls.prototype.dispose=function(){this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null);this.workspace_=null};
|
||||
Blockly.ZoomControls.prototype.position=function(){var a=this.workspace_.getMetrics();a&&(this.workspace_.RTL?(this.left_=this.MARGIN_SIDE_+Blockly.Scrollbar.scrollbarThickness,a.toolboxPosition==Blockly.TOOLBOX_AT_LEFT&&(this.left_+=a.flyoutWidth,this.workspace_.toolbox_&&(this.left_+=a.absoluteLeft))):(this.left_=a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_-Blockly.Scrollbar.scrollbarThickness,a.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT&&(this.left_-=a.flyoutWidth)),this.top_=a.viewHeight+
|
||||
a.absoluteTop-this.HEIGHT_-this.bottom_,a.toolboxPosition==Blockly.TOOLBOX_AT_BOTTOM&&(this.top_-=a.flyoutHeight),this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))};
|
||||
@@ -1063,13 +1055,12 @@ Blockly.WorkspaceSvg.prototype.traceOn=function(a){this.traceOn_=a;this.traceWra
|
||||
Blockly.WorkspaceSvg.prototype.highlightBlock=function(a){this.traceOn_&&Blockly.dragMode_!=Blockly.DRAG_NONE&&this.traceOn(!1);if(this.traceOn_){var b=null;if(a&&(b=this.getBlockById(a),!b))return;this.traceOn(!1);b?b.select():Blockly.selected&&Blockly.selected.unselect();var c=this;setTimeout(function(){c.traceOn(!0)},1)}};
|
||||
Blockly.WorkspaceSvg.prototype.paste=function(a){if(this.rendered&&!(a.getElementsByTagName("block").length>=this.remainingCapacity())){Blockly.terminateDrag_();Blockly.Events.disable();try{var b=Blockly.Xml.domToBlock(a,this),c=parseInt(a.getAttribute("x"),10),d=parseInt(a.getAttribute("y"),10);if(!isNaN(c)&&!isNaN(d)){this.RTL&&(c=-c);do{a=!1;for(var e=this.getAllBlocks(),f=0,g;g=e[f];f++){var h=g.getRelativeToSurfaceXY();if(1>=Math.abs(c-h.x)&&1>=Math.abs(d-h.y)){a=!0;break}}if(!a)for(var k=b.getConnections_(!1),
|
||||
f=0,m;m=k[f];f++)if(m.closest(Blockly.SNAP_RADIUS,new goog.math.Coordinate(c,d)).connection){a=!0;break}a&&(c=this.RTL?c-Blockly.SNAP_RADIUS:c+Blockly.SNAP_RADIUS,d+=2*Blockly.SNAP_RADIUS)}while(a);b.moveBy(c,d)}}finally{Blockly.Events.enable()}Blockly.Events.isEnabled()&&!b.isShadow()&&Blockly.Events.fire(new Blockly.Events.Create(b));b.select()}};
|
||||
Blockly.WorkspaceSvg.prototype.createVariable=function(a){Blockly.WorkspaceSvg.superClass_.createVariable.call(this,a);this.toolbox_&&this.toolbox_.flyout_&&!Blockly.Flyout.startFlyout_&&this.toolbox_.refreshSelection()};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.createVariable=function(a){Blockly.WorkspaceSvg.superClass_.createVariable.call(this,a);this.toolbox_&&this.toolbox_.flyout_&&this.toolbox_.refreshSelection()};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.isTargetInput_(a)?Blockly.Touch.clearTouchIdentifier():(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),Blockly.Touch.clearTouchIdentifier()):this.scrollbar&&(this.dragMode_=Blockly.DRAG_BEGIN,this.startDragMouseX=
|
||||
a.clientX,this.startDragMouseY=a.clientY,this.startDragMetrics=this.getMetrics(),this.startScrollX=this.scrollX,this.startScrollY=this.scrollY,"mouseup"in Blockly.Touch.TOUCH_MAP&&(Blockly.Touch.onTouchUpWrapper_=Blockly.Touch.onTouchUpWrapper_||[],Blockly.Touch.onTouchUpWrapper_=Blockly.Touch.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(),this.getInverseScreenCTM());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(),this.getInverseScreenCTM());a.x/=this.scale;a.y/=this.scale;return goog.math.Coordinate.sum(this.dragDeltaXY_,a)};Blockly.WorkspaceSvg.prototype.isDragging=function(){return Blockly.dragMode_==Blockly.DRAG_FREE||Blockly.Flyout.startFlyout_&&Blockly.Flyout.startFlyout_.dragMode_==Blockly.DRAG_FREE||this.dragMode_==Blockly.DRAG_FREE};
|
||||
Blockly.WorkspaceSvg.prototype.onMouseWheel_=function(a){Blockly.terminateDrag_();var b=0<a.deltaY?-1:1,c=Blockly.mouseToSvg(a,this.getParentSvg(),this.getInverseScreenCTM());this.zoom(c.x,c.y,b);a.preventDefault()};
|
||||
Blockly.WorkspaceSvg.prototype.onMouseDown_=function(a){this.markFocused();Blockly.isTargetInput_(a)||(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.dragMode_=Blockly.DRAG_BEGIN,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(),this.getInverseScreenCTM());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(),this.getInverseScreenCTM());a.x/=this.scale;a.y/=this.scale;return goog.math.Coordinate.sum(this.dragDeltaXY_,a)};
|
||||
Blockly.WorkspaceSvg.prototype.isDragging=function(){return Blockly.dragMode_==Blockly.DRAG_FREE||Blockly.Flyout.startFlyout_&&Blockly.Flyout.startFlyout_.dragMode_==Blockly.DRAG_FREE||this.dragMode_==Blockly.DRAG_FREE};Blockly.WorkspaceSvg.prototype.onMouseWheel_=function(a){Blockly.terminateDrag_();var b=0<a.deltaY?-1:1,c=Blockly.mouseToSvg(a,this.getParentSvg(),this.getInverseScreenCTM());this.zoom(c.x,c.y,b);a.preventDefault()};
|
||||
Blockly.WorkspaceSvg.prototype.getBlocksBoundingBox=function(){var a=this.getTopBlocks(!1);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);this.resizeContents()};
|
||||
Blockly.WorkspaceSvg.prototype.showContextMenu_=function(a){function b(a){if(a.isDeletable())l=l.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=l.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,
|
||||
@@ -1179,11 +1170,11 @@ 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)"touchstart"==a.type&&Blockly.isRightButton(a)&&(Blockly.Flyout.blockRightClick_(a,this),a.stopPropagation(),a.preventDefault());else{this.isInMutator&&this.workspace.resize();this.workspace.updateScreenCalculationsIfScrolled();this.workspace.markFocused();Blockly.terminateDrag_();this.select();Blockly.hideChaff();if(Blockly.isRightButton(a))this.showContextMenu_(a),Blockly.Touch.clearTouchIdentifier();
|
||||
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.Touch.clearTouchIdentifier();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.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&&!this.isInFlyout){this.isInMutator&&this.workspace.resize();this.workspace.updateScreenCalculationsIfScrolled();this.workspace.markFocused();Blockly.terminateDrag_();this.select();Blockly.hideChaff();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.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_?
|
||||
@@ -1367,13 +1358,12 @@ Blockly.Flyout.prototype.layout_=function(a,b){this.workspace_.scale=this.target
|
||||
k:d,c);this.horizontalLayout_?d+=h.width+b[e]-k:c+=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.backgroundButtons_[e]=h;this.addBlockListeners_(g,f,h)}else"button"==f.type&&(f=f.button,g=f.createDom(),f.moveTo(d,c),f.show(),Blockly.bindEvent_(g,"mouseup",f,f.onMouseUp),this.buttons_.push(f),this.horizontalLayout_?d+=f.width+b[e]:c+=f.height+b[e])};
|
||||
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(b=0;a=this.backgroundButtons_[b];b++)goog.dom.removeNode(a);for(b=this.backgroundButtons_.length=0;a=this.buttons_[b];b++)a.dispose();this.buttons_.length=0};
|
||||
Blockly.Flyout.prototype.addBlockListeners_=function(a,b,c){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.blockRightClick_=function(a,b){Blockly.terminateDrag_();Blockly.hideChaff(!0);b.showContextMenu_(a);Blockly.Touch.clearTouchIdentifier()};
|
||||
Blockly.Flyout.prototype.blockMouseDown_=function(a){var b=this;return function(c){Blockly.isRightButton(c)?Blockly.Flyout.blockRightClick_(c,a):(Blockly.terminateDrag_(),Blockly.hideChaff(!0),Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED),b.startDragMouseY_=c.clientY,b.startDragMouseX_=c.clientX,Blockly.Flyout.startDownEvent_=c,Blockly.Flyout.startBlock_=a,Blockly.Flyout.startFlyout_=b,Blockly.Flyout.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",b,b.onMouseUp_),Blockly.Flyout.onMouseMoveBlockWrapper_=
|
||||
Blockly.Flyout.prototype.blockMouseDown_=function(a){var b=this;return function(c){Blockly.terminateDrag_();Blockly.hideChaff(!0);Blockly.isRightButton(c)?a.showContextMenu_(c):(Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED),b.startDragMouseY_=c.clientY,b.startDragMouseX_=c.clientX,Blockly.Flyout.startDownEvent_=c,Blockly.Flyout.startBlock_=a,Blockly.Flyout.startFlyout_=b,Blockly.Flyout.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",b,b.onMouseUp_),Blockly.Flyout.onMouseMoveBlockWrapper_=
|
||||
Blockly.bindEvent_(document,"mousemove",b,b.onMouseMoveBlock_));c.stopPropagation();c.preventDefault()}};
|
||||
Blockly.Flyout.prototype.onMouseDown_=function(a){Blockly.isRightButton(a)?Blockly.Touch.clearTouchIdentifier():(Blockly.hideChaff(!0),this.dragMode_=Blockly.DRAG_FREE,this.startDragMouseY_=a.clientY,this.startDragMouseX_=a.clientX,Blockly.Flyout.startFlyout_=this,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){this.workspace_.isDragging()||(Blockly.Touch.clearTouchIdentifier(),this.autoClose?this.createBlockFunc_(Blockly.Flyout.startBlock_)(Blockly.Flyout.startDownEvent_):Blockly.WidgetDiv.isVisible()||Blockly.Events.fire(new Blockly.Events.Ui(Blockly.Flyout.startBlock_,"click",void 0,void 0)));Blockly.terminateDrag_()};
|
||||
Blockly.Flyout.prototype.onMouseDown_=function(a){Blockly.isRightButton(a)||(Blockly.hideChaff(!0),this.dragMode_=Blockly.DRAG_FREE,this.startDragMouseY_=a.clientY,this.startDragMouseX_=a.clientX,Blockly.Flyout.startFlyout_=this,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){this.workspace_.isDragging()||(this.autoClose?this.createBlockFunc_(Blockly.Flyout.startBlock_)(Blockly.Flyout.startDownEvent_):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=this.getMetrics_();if(this.horizontalLayout_){if(!(0>b.contentWidth-b.viewWidth)){var c=a.clientX-this.startDragMouseX_;this.startDragMouseX_=a.clientX;a=b.viewLeft-c;a=goog.math.clamp(a,0,b.contentWidth-b.viewWidth);this.scrollbar_.set(a)}}else 0>b.contentHeight-b.viewHeight||(c=a.clientY-this.startDragMouseY_,this.startDragMouseY_=a.clientY,a=b.viewTop-c,a=goog.math.clamp(a,0,b.contentHeight-b.viewHeight),this.scrollbar_.set(a))};
|
||||
Blockly.Flyout.prototype.onMouseMoveBlock_=function(a){"mousemove"==a.type&&1>=a.clientX&&0==a.clientY&&0==a.button||(this.determineDragIntention_(a.clientX-Blockly.Flyout.startDownEvent_.clientX,a.clientY-Blockly.Flyout.startDownEvent_.clientY)?(Blockly.longStop_(),this.createBlockFunc_(Blockly.Flyout.startBlock_)(Blockly.Flyout.startDownEvent_)):this.dragMode_==Blockly.DRAG_FREE&&(Blockly.longStop_(),this.onMouseMove_(a)));a.stopPropagation()};
|
||||
Blockly.Flyout.prototype.onMouseMoveBlock_=function(a){if(!("mousemove"==a.type&&1>=a.clientX&&0==a.clientY&&0==a.button))if(this.determineDragIntention_(a.clientX-Blockly.Flyout.startDownEvent_.clientX,a.clientY-Blockly.Flyout.startDownEvent_.clientY))this.createBlockFunc_(Blockly.Flyout.startBlock_)(Blockly.Flyout.startDownEvent_);else if(this.dragMode_==Blockly.DRAG_FREE)this.onMouseMove_(a);a.stopPropagation()};
|
||||
Blockly.Flyout.prototype.determineDragIntention_=function(a,b){if(this.dragMode_==Blockly.DRAG_FREE)return!1;if(Math.sqrt(a*a+b*b)<this.DRAG_RADIUS)return this.dragMode_=Blockly.DRAG_STICKY,!1;if(this.isDragTowardWorkspace_(a,b)||!this.scrollbar_.isVisible())return!0;this.dragMode_=Blockly.DRAG_FREE;return!1};
|
||||
Blockly.Flyout.prototype.isDragTowardWorkspace_=function(a,b){var c=Math.atan2(b,a)/Math.PI*180,d=!1,e=this.dragAngleRange_;if(this.horizontalLayout_)this.toolboxPosition_==Blockly.TOOLBOX_AT_TOP?c<90+e&&c>90-e&&(d=!0):c>-90-e&&c<-90+e&&(d=!0);else if(this.toolboxPosition_==Blockly.TOOLBOX_AT_LEFT)c<e&&c>-e&&(d=!0);else if(c<-180+e||c>180-e)d=!0;return d};
|
||||
Blockly.Flyout.prototype.createBlockFunc_=function(a){var b=this;return function(c){if(!Blockly.isRightButton(c)&&!a.disabled){Blockly.Events.disable();try{var d=b.placeNewBlock_(a)}finally{Blockly.Events.enable()}Blockly.Events.isEnabled()&&(Blockly.Events.setGroup(!0),Blockly.Events.fire(new Blockly.Events.Create(d)));b.autoClose?b.hide():b.filterForCapacity_();d.onMouseDown_(c);Blockly.dragMode_=Blockly.DRAG_FREE;d.setDragging_(!0)}}};
|
||||
@@ -1381,16 +1371,16 @@ Blockly.Flyout.prototype.placeNewBlock_=function(a){var b=this.targetWorkspace_,
|
||||
c.y+=d/e-d);a=Blockly.Xml.blockToDom(a);a=Blockly.Xml.domToBlock(a,b);e=a.getSvgRoot();if(!e)throw"block is not rendered.";e=Blockly.getSvgXY_(e,b);e.x+=b.scrollX/b.scale-b.scrollX;e.y+=b.scrollY/b.scale-b.scrollY;b.toolbox_&&!b.scrollbar&&(e.x+=b.toolbox_.getWidth()/b.scale,e.y+=b.toolbox_.getHeight()/b.scale);a.moveBy(c.x-e.x,c.y-e.y);return a};
|
||||
Blockly.Flyout.prototype.filterForCapacity_=function(){for(var a=this.targetWorkspace_.remainingCapacity(),b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++)if(-1==this.permanentlyDisabled_.indexOf(d)){var e=d.getDescendants();d.setDisabled(e.length>a)}};
|
||||
Blockly.Flyout.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var a=this.svgGroup_.getBoundingClientRect(),b=a.left,c=a.top,d=a.width,a=a.height;return this.toolboxPosition_==Blockly.TOOLBOX_AT_TOP?new goog.math.Rect(-1E9,c-1E9,2E9,1E9+a):this.toolboxPosition_==Blockly.TOOLBOX_AT_BOTTOM?new goog.math.Rect(-1E9,c,2E9,1E9+a):this.toolboxPosition_==Blockly.TOOLBOX_AT_LEFT?new goog.math.Rect(b-1E9,-1E9,1E9+d,2E9):new goog.math.Rect(b,-1E9,1E9+d,2E9)};
|
||||
Blockly.Flyout.terminateDrag_=function(){Blockly.Flyout.startFlyout_&&(Blockly.Flyout.startFlyout_.dragMode_==Blockly.DRAG_FREE&&Blockly.Touch.clearTouchIdentifier(),Blockly.Flyout.startFlyout_.dragMode_=Blockly.DRAG_NONE,Blockly.Flyout.startFlyout_=null);Blockly.Flyout.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseUpWrapper_),Blockly.Flyout.onMouseUpWrapper_=null);Blockly.Flyout.onMouseMoveBlockWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveBlockWrapper_),Blockly.Flyout.onMouseMoveBlockWrapper_=
|
||||
null);Blockly.Flyout.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveWrapper_),Blockly.Flyout.onMouseMoveWrapper_=null);Blockly.Flyout.startDownEvent_=null;Blockly.Flyout.startBlock_=null};
|
||||
Blockly.Flyout.terminateDrag_=function(){Blockly.Flyout.startFlyout_&&(Blockly.Flyout.startFlyout_.dragMode_=Blockly.DRAG_NONE);Blockly.Flyout.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseUpWrapper_),Blockly.Flyout.onMouseUpWrapper_=null);Blockly.Flyout.onMouseMoveBlockWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveBlockWrapper_),Blockly.Flyout.onMouseMoveBlockWrapper_=null);Blockly.Flyout.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveWrapper_),
|
||||
Blockly.Flyout.onMouseMoveWrapper_=null);Blockly.Flyout.startDownEvent_=null;Blockly.Flyout.startBlock_=null;Blockly.Flyout.startFlyout_=null};
|
||||
Blockly.Flyout.prototype.reflowHorizontal=function(a){this.workspace_.scale=this.targetWorkspace_.scale;for(var b=0,c=0,d;d=a[c];c++)b=Math.max(b,d.getHeightWidth().height);b+=1.5*this.MARGIN;b*=this.workspace_.scale;b+=Blockly.Scrollbar.scrollbarThickness;if(this.height_!=b){for(c=0;d=a[c];c++){var e=d.getHeightWidth();if(d.flyoutRect_){d.flyoutRect_.setAttribute("width",e.width);d.flyoutRect_.setAttribute("height",e.height);var f=d.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0,g=d.getRelativeToSurfaceXY();
|
||||
d.flyoutRect_.setAttribute("y",g.y);d.flyoutRect_.setAttribute("x",this.RTL?g.x-e.width+f:g.x-f);(e=d.startHat_?Blockly.BlockSvg.START_HAT_HEIGHT:0)&&d.moveBy(0,e);d.flyoutRect_.setAttribute("y",g.y)}}this.height_=b;this.targetWorkspace_.resize()}};
|
||||
Blockly.Flyout.prototype.reflowVertical=function(a){this.workspace_.scale=this.targetWorkspace_.scale;for(var b=0,c=0,d;d=a[c];c++){var e=d.getHeightWidth().width;d.outputConnection&&(e-=Blockly.BlockSvg.TAB_WIDTH);b=Math.max(b,e)}for(c=0;d=this.buttons_[c];c++)b=Math.max(b,d.width);b+=1.5*this.MARGIN+Blockly.BlockSvg.TAB_WIDTH;b*=this.workspace_.scale;b+=Blockly.Scrollbar.scrollbarThickness;if(this.width_!=b){for(c=0;d=a[c];c++){e=d.getHeightWidth();if(this.RTL){var f=d.getRelativeToSurfaceXY().x,
|
||||
g=b/this.workspace_.scale-this.MARGIN,g=g-Blockly.BlockSvg.TAB_WIDTH;d.moveBy(g-f,0)}d.flyoutRect_&&(d.flyoutRect_.setAttribute("width",e.width),d.flyoutRect_.setAttribute("height",e.height),g=d.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0,f=d.getRelativeToSurfaceXY(),d.flyoutRect_.setAttribute("x",this.RTL?f.x-e.width+g:f.x-g),(e=d.startHat_?Blockly.BlockSvg.START_HAT_HEIGHT:0)&&d.moveBy(0,e),d.flyoutRect_.setAttribute("y",f.y))}this.width_=b;this.targetWorkspace_.resize()}};
|
||||
Blockly.Flyout.prototype.reflow=function(){this.reflowWrapper_&&this.workspace_.removeChangeListener(this.reflowWrapper_);var a=this.workspace_.getTopBlocks(!1);this.horizontalLayout_?this.reflowHorizontal(a):this.reflowVertical(a);this.reflowWrapper_&&this.workspace_.addChangeListener(this.reflowWrapper_)};Blockly.Toolbox=function(a){this.workspace_=a;this.RTL=a.options.RTL;this.horizontalLayout_=a.options.horizontalLayout;this.toolboxPosition=a.options.toolboxPosition;this.config_={indentWidth:19,cssRoot:"blocklyTreeRoot",cssHideRoot:"blocklyHidden",cssItem:"",cssTreeRow:"blocklyTreeRow",cssItemLabel:"blocklyTreeLabel",cssTreeIcon:"blocklyTreeIcon",cssExpandedFolderIcon:"blocklyTreeIconOpen",cssFileIcon:"blocklyTreeIconNone",cssSelectedRow:"blocklyTreeSelected"};this.treeSeparatorConfig_={cssTreeRow:"blocklyTreeSeparator"};
|
||||
this.horizontalLayout_&&(this.config_.cssTreeRow+=a.RTL?" blocklyHorizontalTreeRtl":" blocklyHorizontalTree",this.treeSeparatorConfig_.cssTreeRow="blocklyTreeSeparatorHorizontal "+(a.RTL?"blocklyHorizontalTreeRtl":"blocklyHorizontalTree"),this.config_.cssTreeIcon="")};Blockly.Toolbox.prototype.width=0;Blockly.Toolbox.prototype.height=0;Blockly.Toolbox.prototype.selectedOption_=null;Blockly.Toolbox.prototype.lastCategory_=null;
|
||||
Blockly.Toolbox.prototype.init=function(){var a=this.workspace_,b=this.workspace_.getParentSvg();this.HtmlDiv=goog.dom.createDom("DIV","blocklyToolboxDiv");this.HtmlDiv.setAttribute("dir",a.RTL?"RTL":"LTR");b.parentNode.insertBefore(this.HtmlDiv,b);Blockly.bindEvent_(this.HtmlDiv,"mousedown",this,function(a){Blockly.isRightButton(a)||a.target==this.HtmlDiv?Blockly.hideChaff(!1):Blockly.hideChaff(!0);Blockly.Touch.clearTouchIdentifier()});this.flyout_=new Blockly.Flyout({disabledPatternId:a.options.disabledPatternId,
|
||||
parentWorkspace:a,RTL:a.RTL,horizontalLayout:a.horizontalLayout,toolboxPosition:a.options.toolboxPosition});goog.dom.insertSiblingAfter(this.flyout_.createDom(),a.svgGroup_);this.flyout_.init(a);this.config_.cleardotPath=a.options.pathToMedia+"1x1.gif";this.config_.cssCollapsedFolderIcon="blocklyTreeIconClosed"+(a.RTL?"Rtl":"Ltr");this.tree_=b=new Blockly.Toolbox.TreeControl(this,this.config_);b.setShowRootNode(!1);b.setShowLines(!1);b.setShowExpandIcons(!1);b.setSelectedItem(null);a=this.populate_(a.options.languageTree);
|
||||
Blockly.Toolbox.prototype.init=function(){var a=this.workspace_,b=this.workspace_.getParentSvg();this.HtmlDiv=goog.dom.createDom("DIV","blocklyToolboxDiv");this.HtmlDiv.setAttribute("dir",a.RTL?"RTL":"LTR");b.parentNode.insertBefore(this.HtmlDiv,b);Blockly.bindEvent_(this.HtmlDiv,"mousedown",this,function(a){Blockly.isRightButton(a)||a.target==this.HtmlDiv?Blockly.hideChaff(!1):Blockly.hideChaff(!0)});this.flyout_=new Blockly.Flyout({disabledPatternId:a.options.disabledPatternId,parentWorkspace:a,
|
||||
RTL:a.RTL,horizontalLayout:a.horizontalLayout,toolboxPosition:a.options.toolboxPosition});goog.dom.insertSiblingAfter(this.flyout_.createDom(),a.svgGroup_);this.flyout_.init(a);this.config_.cleardotPath=a.options.pathToMedia+"1x1.gif";this.config_.cssCollapsedFolderIcon="blocklyTreeIconClosed"+(a.RTL?"Rtl":"Ltr");this.tree_=b=new Blockly.Toolbox.TreeControl(this,this.config_);b.setShowRootNode(!1);b.setShowLines(!1);b.setShowExpandIcons(!1);b.setSelectedItem(null);a=this.populate_(a.options.languageTree);
|
||||
b.render(this.HtmlDiv);a&&b.setSelectedItem(a);this.addColour_();this.position()};Blockly.Toolbox.prototype.dispose=function(){this.flyout_.dispose();this.tree_.dispose();goog.dom.removeNode(this.HtmlDiv);this.lastCategory_=this.workspace_=null};Blockly.Toolbox.prototype.getWidth=function(){return this.width};Blockly.Toolbox.prototype.getHeight=function(){return this.height};
|
||||
Blockly.Toolbox.prototype.position=function(){var a=this.HtmlDiv;if(a){var b=this.workspace_.getParentSvg();goog.style.getPageOffset(b);b=Blockly.svgSize(b);this.horizontalLayout_?(a.style.left="0",a.style.height="auto",a.style.width=b.width+"px",this.height=a.offsetHeight,this.toolboxPosition==Blockly.TOOLBOX_AT_TOP?a.style.top="0":a.style.bottom="0"):(this.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT?a.style.right="0":a.style.left="0",a.style.height=b.height+"px",this.width=a.offsetWidth);this.flyout_.position()}};
|
||||
Blockly.Toolbox.prototype.populate_=function(a){this.tree_.removeChildren();this.tree_.blocks=[];this.hasColours_=!1;a=this.syncTrees_(a,this.tree_,this.workspace_.options.pathToMedia);if(this.tree_.blocks.length)throw"Toolbox cannot have both blocks and categories in the root level.";this.workspace_.resizeContents();return a};
|
||||
@@ -1399,8 +1389,8 @@ Blockly.Toolbox.prototype.syncTrees_=function(a,b,c){for(var d=null,e=null,f=0,g
|
||||
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(){if(!this.HtmlDiv)return null;var a=this.HtmlDiv.getBoundingClientRect(),b=a.left,c=a.top,d=a.width,a=a.height;return this.toolboxPosition==Blockly.TOOLBOX_AT_LEFT?new goog.math.Rect(-1E7,-1E7,1E7+b+d,2E7):this.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT?new goog.math.Rect(b,-1E7,1E7+d,2E7):this.toolboxPosition==Blockly.TOOLBOX_AT_TOP?new goog.math.Rect(-1E7,-1E7,2E7,1E7+c+a):new goog.math.Rect(0,c,2E7,1E7+d)};
|
||||
Blockly.Toolbox.prototype.refreshSelection=function(){var a=this.tree_.getSelectedItem();a&&a.blocks&&this.flyout_.show(a.blocks)};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);var a=this.getElement();goog.events.BrowserFeature.TOUCH_ENABLED&&Blockly.bindEvent_(a,goog.events.EventType.TOUCHSTART,this,this.handleTouchEvent_);Blockly.bindEvent_(a,"mouseup",this,Blockly.Touch.clearTouchIdentifier)};
|
||||
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.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&&(this.horizontalLayout_=a.horizontalLayout_,b=function(){Blockly.svgResize(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){};
|
||||
@@ -1439,11 +1429,11 @@ a.contentWidth>(b.RTL?a.viewWidth:a.viewWidth+e))for(var g=c.getTopBlocks(!1),h=
|
||||
Blockly.init_=function(a){var b=a.options,c=a.getParentSvg();Blockly.bindEvent_(c,"contextmenu",null,function(a){Blockly.isTargetInput_(a)||a.preventDefault()});c=Blockly.bindEvent_(window,"resize",null,function(){Blockly.hideChaff(!0);Blockly.svgResize(a)});a.setResizeHandlerWrapper(c);Blockly.inject.bindDocumentEvents_();b.languageTree&&(a.toolbox_?a.toolbox_.init(a):a.flyout_&&(a.flyout_.init(a),a.flyout_.show(b.languageTree.childNodes),a.flyout_.scrollToStart(),a.scrollX=a.flyout_.width_,b.toolboxPosition==
|
||||
Blockly.TOOLBOX_AT_RIGHT&&(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.svgResize(Blockly.getMainWorkspace())}));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,!0));c.push(Blockly.bindEvent_(document,"touchstart",null,d,!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,e){var f=!1,g=function(a){var b=!e;a=Blockly.Touch.splitEventByTouches(a);for(var g=0,h;h=a[g];g++)if(!b||Blockly.Touch.shouldHandleEvent(h))Blockly.Touch.setClientFromTouch(h),c?d.call(c,h):d(h),f=!0};a.addEventListener(b,g,!1);var h=[[a,b,g]];if(b in Blockly.Touch.TOUCH_MAP)for(var k=function(a){g(a);f&&a.preventDefault()},m=0,p;p=Blockly.Touch.TOUCH_MAP[b][m];m++)a.addEventListener(p,k,!1),h.push([a,p,k]);return h};
|
||||
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.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.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.isRightButton=function(a){return a.ctrlKey&&goog.userAgent.MAC?!0:2==a.button};Blockly.mouseToSvg=function(a,b,c){var d=b.createSVGPoint();d.x=a.clientX;d.y=a.clientY;c||(c=b.getScreenCTM().inverse());return d.matrixTransform(c)};
|
||||
@@ -1453,10 +1443,14 @@ Blockly.utils.tokenizeInterpolation=function(a){var b=[];a=a.split("");a.push(""
|
||||
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";Blockly.utils.wrap=function(a,b){for(var c=a.split("\n"),d=0;d<c.length;d++)c[d]=Blockly.utils.wrap_line_(c[d],b);return c.join("\n")};
|
||||
Blockly.utils.wrap_line_=function(a,b){if(a.length<=b)return a;for(var c=a.trim().split(/\s+/),d=0;d<c.length;d++)c[d].length>b&&(b=c[d].length);var e,d=-Infinity,f,g=1;do{e=d;f=a;for(var h=[],k=c.length/g,m=1,d=0;d<c.length-1;d++)m<(d+1.5)/k?(m++,h[d]=!0):h[d]=!1;h=Blockly.utils.wrapMutate_(c,h,b);d=Blockly.utils.wrapScore_(c,h,b);a=Blockly.utils.wrapToText_(c,h);g++}while(d>e);return f};
|
||||
Blockly.utils.wrapScore_=function(a,b,c){for(var d=[0],e=[],f=0;f<a.length;f++)d[d.length-1]+=a[f].length,!0===b[f]?(d.push(0),e.push(a[f].charAt(a[f].length-1))):!1===b[f]&&d[d.length-1]++;a=Math.max.apply(Math,d);for(f=b=0;f<d.length;f++)b-=2*Math.pow(Math.abs(c-d[f]),1.5),b-=Math.pow(a-d[f],1.5),-1!=".?!".indexOf(e[f])?b+=c/3:-1!=",;)]}".indexOf(e[f])&&(b+=c/4);1<d.length&&d[d.length-1]<=d[d.length-2]&&(b+=.5);return b};
|
||||
Blockly.utils.wrapMutate_=function(a,b,c){for(var d=Blockly.utils.wrapScore_(a,b,c),e,f=0;f<b.length-1;f++)if(b[f]!=b[f+1]){var g=[].concat(b);g[f]=!g[f];g[f+1]=!g[f+1];var h=Blockly.utils.wrapScore_(a,g,c);h>d&&(d=h,e=g)}return e?Blockly.utils.wrapMutate_(a,e,c):b};Blockly.utils.wrapToText_=function(a,b){for(var c=[],d=0;d<a.length;d++)c.push(a[d]),void 0!==b[d]&&c.push(b[d]?"\n":" ");return c.join("")};var CLOSURE_DEFINES={"goog.DEBUG":!1};Blockly.mainWorkspace=null;Blockly.selected=null;Blockly.highlightedConnection_=null;Blockly.localConnection_=null;Blockly.draggingConnections_=[];Blockly.clipboardXml_=null;Blockly.clipboardSource_=null;Blockly.dragMode_=Blockly.DRAG_NONE;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.resizeSvgContents=function(a){a.resizeContents()};
|
||||
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.utils.wrapMutate_=function(a,b,c){for(var d=Blockly.utils.wrapScore_(a,b,c),e,f=0;f<b.length-1;f++)if(b[f]!=b[f+1]){var g=[].concat(b);g[f]=!g[f];g[f+1]=!g[f+1];var h=Blockly.utils.wrapScore_(a,g,c);h>d&&(d=h,e=g)}return e?Blockly.utils.wrapMutate_(a,e,c):b};Blockly.utils.wrapToText_=function(a,b){for(var c=[],d=0;d<a.length;d++)c.push(a[d]),void 0!==b[d]&&c.push(b[d]?"\n":" ");return c.join("")};var CLOSURE_DEFINES={"goog.DEBUG":!1};Blockly.mainWorkspace=null;Blockly.selected=null;Blockly.highlightedConnection_=null;Blockly.localConnection_=null;Blockly.draggingConnections_=[];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.resizeSvgContents=function(a){a.resizeContents()};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.dragMode_=Blockly.DRAG_NONE;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.dragMode_!=Blockly.DRAG_NONE){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_(),b.dragMode_=Blockly.DRAG_FREE);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.Events.setGroup(!0),Blockly.clipboardSource_.paste(Blockly.clipboardXml_),Blockly.Events.setGroup(!1)):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.copy_=function(a){var b=Blockly.Xml.blockToDom(a);Blockly.dragMode_!=Blockly.DRAG_FREE&&Blockly.Xml.deleteNext(b);var c=a.getRelativeToSurfaceXY();b.setAttribute("x",a.RTL?-c.x:c.x);b.setAttribute("y",c.y);Blockly.clipboardXml_=b;Blockly.clipboardSource_=a.workspace};
|
||||
Blockly.duplicate_=function(a){var b=Blockly.clipboardXml_,c=Blockly.clipboardSource_;Blockly.copy_(a);a.workspace.paste(Blockly.clipboardXml_);Blockly.clipboardXml_=b;Blockly.clipboardSource_=c};Blockly.onContextMenu_=function(a){Blockly.isTargetInput_(a)||a.preventDefault()};Blockly.hideChaff=function(a){Blockly.Tooltip.hide();Blockly.WidgetDiv.hide();a||(a=Blockly.getMainWorkspace(),a.toolbox_&&a.toolbox_.flyout_&&a.toolbox_.flyout_.autoClose&&a.toolbox_.clearSelection())};
|
||||
Blockly.addChangeListener=function(a){console.warn("Deprecated call to Blockly.addChangeListener, use workspace.addChangeListener instead.");return Blockly.getMainWorkspace().addChangeListener(a)};Blockly.getMainWorkspace=function(){return Blockly.mainWorkspace};goog.global.console||(goog.global.console={log:function(){},warn:function(){}});goog.global.Blockly||(goog.global.Blockly={});goog.global.Blockly.getMainWorkspace=Blockly.getMainWorkspace;goog.global.Blockly.addChangeListener=Blockly.addChangeListener;
|
||||
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)};
|
||||
Blockly.copy_=function(a){var b=Blockly.Xml.blockToDom(a);Blockly.dragMode_!=Blockly.DRAG_FREE&&Blockly.Xml.deleteNext(b);var c=a.getRelativeToSurfaceXY();b.setAttribute("x",a.RTL?-c.x:c.x);b.setAttribute("y",c.y);Blockly.clipboardXml_=b;Blockly.clipboardSource_=a.workspace};Blockly.duplicate_=function(a){var b=Blockly.clipboardXml_,c=Blockly.clipboardSource_;Blockly.copy_(a);a.workspace.paste(Blockly.clipboardXml_);Blockly.clipboardXml_=b;Blockly.clipboardSource_=c};
|
||||
Blockly.onContextMenu_=function(a){Blockly.isTargetInput_(a)||a.preventDefault()};Blockly.hideChaff=function(a){Blockly.Tooltip.hide();Blockly.WidgetDiv.hide();a||(a=Blockly.getMainWorkspace(),a.toolbox_&&a.toolbox_.flyout_&&a.toolbox_.flyout_.autoClose&&a.toolbox_.clearSelection())};Blockly.addChangeListener=function(a){console.warn("Deprecated call to Blockly.addChangeListener, use workspace.addChangeListener instead.");return Blockly.getMainWorkspace().addChangeListener(a)};
|
||||
Blockly.getMainWorkspace=function(){return Blockly.mainWorkspace};goog.global.console||(goog.global.console={log:function(){},warn:function(){}});goog.global.Blockly||(goog.global.Blockly={});goog.global.Blockly.getMainWorkspace=Blockly.getMainWorkspace;goog.global.Blockly.addChangeListener=Blockly.addChangeListener;
|
||||
+1493
-1495
File diff suppressed because one or more lines are too long
+4
-1
@@ -322,9 +322,12 @@ Blockly.Workspace.prototype.deleteVariable = function(name) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
window.confirm(
|
||||
var ok = window.confirm(
|
||||
Blockly.Msg.DELETE_VARIABLE_CONFIRMATION.replace('%1', uses.length).
|
||||
replace('%2', name));
|
||||
if (!ok) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Blockly.Events.setGroup(true);
|
||||
|
||||
@@ -29,7 +29,7 @@ Blockly.Blocks['factory_base'] = {
|
||||
this.setColour(120);
|
||||
this.appendDummyInput()
|
||||
.appendField('name')
|
||||
.appendField(new Blockly.FieldTextInput('math_foo'), 'NAME');
|
||||
.appendField(new Blockly.FieldTextInput('block_type'), 'NAME');
|
||||
this.appendStatementInput('INPUTS')
|
||||
.setCheck('Input')
|
||||
.appendField('inputs');
|
||||
|
||||
@@ -64,6 +64,8 @@ AppController = function() {
|
||||
this.tabMap[AppController.EXPORTER] =
|
||||
goog.dom.getElement('blocklibraryExporter_tab');
|
||||
|
||||
// Last selected tab.
|
||||
this.lastSelectedTab = null;
|
||||
// Selected tab.
|
||||
this.selectedTab = AppController.BLOCK_FACTORY;
|
||||
};
|
||||
@@ -228,23 +230,6 @@ AppController.prototype.getBlockTypeFromXml_ = function(xmlText) {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the Block Factory tab to show selected block when user selects a
|
||||
* different block in the block library dropdown. Tied to block library dropdown
|
||||
* in index.html.
|
||||
*
|
||||
* @param {!Element} blockLibraryDropdown - HTML select element from which the
|
||||
* user selects a block to work on.
|
||||
*/
|
||||
AppController.prototype.onSelectedBlockChanged
|
||||
= function(blockLibraryDropdown) {
|
||||
// Get selected block type.
|
||||
var blockType = this.blockLibraryController.getSelectedBlockType(
|
||||
blockLibraryDropdown);
|
||||
// Update Block Factory page by showing the selected block.
|
||||
this.blockLibraryController.openBlock(blockType);
|
||||
};
|
||||
|
||||
/**
|
||||
* Add click handlers to each tab to allow switching between the Block Factory,
|
||||
* Workspace Factory, and Block Exporter tab.
|
||||
@@ -268,6 +253,7 @@ AppController.prototype.addTabHandlers = function(tabMap) {
|
||||
* AppController.WORKSPACE_FACTORY, or AppController.EXPORTER
|
||||
*/
|
||||
AppController.prototype.setSelected_ = function(tabName) {
|
||||
this.lastSelectedTab = this.selectedTab;
|
||||
this.selectedTab = tabName;
|
||||
};
|
||||
|
||||
@@ -297,18 +283,36 @@ AppController.prototype.onTab = function() {
|
||||
var exporterTab = this.tabMap[AppController.EXPORTER];
|
||||
var workspaceFactoryTab = this.tabMap[AppController.WORKSPACE_FACTORY];
|
||||
|
||||
// Turn selected tab on and other tabs off.
|
||||
this.styleTabs_();
|
||||
// Warn user if they have unsaved changes when leaving Block Factory.
|
||||
if (this.lastSelectedTab == AppController.BLOCK_FACTORY &&
|
||||
this.selectedTab != AppController.BLOCK_FACTORY) {
|
||||
|
||||
var hasUnsavedChanges =
|
||||
!FactoryUtils.savedBlockChanges(this.blockLibraryController);
|
||||
if (hasUnsavedChanges &&
|
||||
!confirm('You have unsaved changes in Block Factory.')) {
|
||||
// If the user doesn't want to switch tabs with unsaved changes,
|
||||
// stay on Block Factory Tab.
|
||||
this.setSelected_(AppController.BLOCK_FACTORY);
|
||||
this.lastSelectedTab = AppController.BLOCK_FACTORY;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Only enable key events in workspace factory if workspace factory tab is
|
||||
// selected.
|
||||
this.workspaceFactoryController.keyEventsEnabled =
|
||||
this.selectedTab == AppController.WORKSPACE_FACTORY;
|
||||
|
||||
// Turn selected tab on and other tabs off.
|
||||
this.styleTabs_();
|
||||
|
||||
if (this.selectedTab == AppController.EXPORTER) {
|
||||
// Show container of exporter.
|
||||
FactoryUtils.show('blockLibraryExporter');
|
||||
// Hide other tabs.
|
||||
FactoryUtils.hide('workspaceFactoryContent');
|
||||
FactoryUtils.hide('blockFactoryContent');
|
||||
// Show exporter tab.
|
||||
FactoryUtils.show('blockLibraryExporter');
|
||||
|
||||
// Need accurate state in order to know which blocks are used in workspace
|
||||
// factory.
|
||||
@@ -321,17 +325,20 @@ AppController.prototype.onTab = function() {
|
||||
// Update exporter's block selector to reflect current block library.
|
||||
this.exporter.updateSelector();
|
||||
|
||||
// Update the preview to reflect any changes made to the blocks.
|
||||
// Update the exporter's preview to reflect any changes made to the blocks.
|
||||
this.exporter.updatePreview();
|
||||
|
||||
} else if (this.selectedTab == AppController.BLOCK_FACTORY) {
|
||||
// Hide container of exporter.
|
||||
// Hide other tabs.
|
||||
FactoryUtils.hide('blockLibraryExporter');
|
||||
FactoryUtils.hide('workspaceFactoryContent');
|
||||
// Show Block Factory.
|
||||
FactoryUtils.show('blockFactoryContent');
|
||||
|
||||
} else if (this.selectedTab == AppController.WORKSPACE_FACTORY) {
|
||||
// Hide container of exporter.
|
||||
// Hide other tabs.
|
||||
FactoryUtils.hide('blockLibraryExporter');
|
||||
FactoryUtils.hide('blockFactoryContent');
|
||||
// Show workspace factory container.
|
||||
FactoryUtils.show('workspaceFactoryContent');
|
||||
// Update block library category.
|
||||
@@ -376,16 +383,16 @@ AppController.prototype.assignExporterClickHandlers = function() {
|
||||
document.getElementById('dropdownDiv_setBlocks').classList.remove("show");
|
||||
});
|
||||
|
||||
document.getElementById('dropdown_clearSelected').addEventListener('click',
|
||||
document.getElementById('dropdown_addAllFromLib').addEventListener('click',
|
||||
function() {
|
||||
self.exporter.clearSelectedBlocks();
|
||||
self.exporter.selectAllBlocks();
|
||||
self.exporter.updatePreview();
|
||||
document.getElementById('dropdownDiv_setBlocks').classList.remove("show");
|
||||
});
|
||||
|
||||
document.getElementById('dropdown_addAllFromLib').addEventListener('click',
|
||||
document.getElementById('clearSelectedButton').addEventListener('click',
|
||||
function() {
|
||||
self.exporter.selectAllBlocks();
|
||||
self.exporter.clearSelectedBlocks();
|
||||
self.exporter.updatePreview();
|
||||
document.getElementById('dropdownDiv_setBlocks').classList.remove("show");
|
||||
});
|
||||
@@ -462,27 +469,30 @@ AppController.prototype.ifCheckedDisplay = function(checkbox, elementArray) {
|
||||
*/
|
||||
AppController.prototype.assignLibraryClickHandlers = function() {
|
||||
var self = this;
|
||||
// Assign button click handlers for Block Library.
|
||||
|
||||
// Button for saving block to library.
|
||||
document.getElementById('saveToBlockLibraryButton').addEventListener('click',
|
||||
function() {
|
||||
self.blockLibraryController.saveToBlockLibrary();
|
||||
});
|
||||
|
||||
// Button for removing selected block from library.
|
||||
document.getElementById('removeBlockFromLibraryButton').addEventListener(
|
||||
'click',
|
||||
function() {
|
||||
self.blockLibraryController.removeFromBlockLibrary();
|
||||
});
|
||||
|
||||
// Button for clearing the block library.
|
||||
document.getElementById('clearBlockLibraryButton').addEventListener('click',
|
||||
function() {
|
||||
self.blockLibraryController.clearBlockLibrary();
|
||||
});
|
||||
|
||||
var dropdown = document.getElementById('blockLibraryDropdown');
|
||||
dropdown.addEventListener('change',
|
||||
// Hide and show the block library dropdown.
|
||||
document.getElementById('button_blockLib').addEventListener('click',
|
||||
function() {
|
||||
self.onSelectedBlockChanged(dropdown);
|
||||
document.getElementById('dropdownDiv_blockLib').classList.toggle("show");
|
||||
});
|
||||
};
|
||||
|
||||
@@ -519,8 +529,19 @@ AppController.prototype.assignBlockFactoryClickHandlers = function() {
|
||||
|
||||
document.getElementById('createNewBlockButton')
|
||||
.addEventListener('click', function() {
|
||||
BlockFactory.showStarterBlock();
|
||||
BlockLibraryView.selectDefaultOption('blockLibraryDropdown');
|
||||
// If there are unsaved changes warn user, check if they'd like to
|
||||
// proceed with unsaved changes, and act accordingly.
|
||||
var proceedWithUnsavedChanges =
|
||||
self.blockLibraryController.warnIfUnsavedChanges();
|
||||
if (!proceedWithUnsavedChanges) {
|
||||
return;
|
||||
}
|
||||
|
||||
BlockFactory.showStarterBlock();
|
||||
self.blockLibraryController.setNoneSelected();
|
||||
|
||||
// Close the Block Library Dropdown.
|
||||
goog.dom.getElement('dropdownDiv_blockLib').classList.remove("show");
|
||||
});
|
||||
};
|
||||
|
||||
@@ -528,7 +549,20 @@ AppController.prototype.assignBlockFactoryClickHandlers = function() {
|
||||
* Add event listeners for the block factory.
|
||||
*/
|
||||
AppController.prototype.addBlockFactoryEventListeners = function() {
|
||||
// Update code on changes to block being edited.
|
||||
BlockFactory.mainWorkspace.addChangeListener(BlockFactory.updateLanguage);
|
||||
|
||||
// Disable blocks not attached to the factory_base block.
|
||||
BlockFactory.mainWorkspace.addChangeListener(Blockly.Events.disableOrphans);
|
||||
|
||||
// Update the buttons on the screen based on whether
|
||||
// changes have been saved.
|
||||
var self = this;
|
||||
BlockFactory.mainWorkspace.addChangeListener(function() {
|
||||
self.blockLibraryController.updateButtons(FactoryUtils.savedBlockChanges(
|
||||
self.blockLibraryController));
|
||||
});
|
||||
|
||||
document.getElementById('direction')
|
||||
.addEventListener('change', BlockFactory.updatePreview);
|
||||
document.getElementById('languageTA')
|
||||
@@ -565,22 +599,41 @@ AppController.prototype.initializeBlocklyStorage = function() {
|
||||
* Handle resizing of elements.
|
||||
*/
|
||||
AppController.prototype.onresize = function(event) {
|
||||
// Handle resizing of Block Factory elements.
|
||||
var expandList = [
|
||||
document.getElementById('blockly'),
|
||||
document.getElementById('blocklyMask'),
|
||||
document.getElementById('preview'),
|
||||
document.getElementById('languagePre'),
|
||||
document.getElementById('languageTA'),
|
||||
document.getElementById('generatorPre')
|
||||
];
|
||||
for (var i = 0, expand; expand = expandList[i]; i++) {
|
||||
expand.style.width = (expand.parentNode.offsetWidth - 2) + 'px';
|
||||
expand.style.height = (expand.parentNode.offsetHeight - 2) + 'px';
|
||||
if (this.selectedTab == AppController.BLOCK_FACTORY) {
|
||||
// Handle resizing of Block Factory elements.
|
||||
var expandList = [
|
||||
document.getElementById('blocklyPreviewContainer'),
|
||||
document.getElementById('blockly'),
|
||||
document.getElementById('blocklyMask'),
|
||||
document.getElementById('preview'),
|
||||
document.getElementById('languagePre'),
|
||||
document.getElementById('languageTA'),
|
||||
document.getElementById('generatorPre'),
|
||||
];
|
||||
for (var i = 0, expand; expand = expandList[i]; i++) {
|
||||
expand.style.width = (expand.parentNode.offsetWidth - 2) + 'px';
|
||||
expand.style.height = (expand.parentNode.offsetHeight - 2) + 'px';
|
||||
}
|
||||
} else if (this.selectedTab == AppController.EXPORTER) {
|
||||
// Handle resize of Exporter block options.
|
||||
this.exporter.view.centerPreviewBlocks();
|
||||
}
|
||||
};
|
||||
|
||||
// Handle resize of Exporter block options.
|
||||
this.exporter.view.centerPreviewBlocks();
|
||||
/**
|
||||
* Handler for the window's 'onbeforeunload' event. When a user has unsaved
|
||||
* changes and refreshes or leaves the page, confirm that they want to do so
|
||||
* before actually refreshing.
|
||||
*/
|
||||
AppController.prototype.confirmLeavePage = function() {
|
||||
if ((!BlockFactory.isStarterBlock() &&
|
||||
!FactoryUtils.savedBlockChanges(this.blockLibraryController)) ||
|
||||
this.workspaceFactoryController.hasUnsavedChanges()) {
|
||||
// When a string is assigned to the returnValue Event property, a dialog box
|
||||
// appears, asking the users for confirmation to leave the page.
|
||||
return 'You will lose any unsaved changes. Are you sure you want ' +
|
||||
'to exit this page?';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -598,7 +651,7 @@ AppController.prototype.init = function() {
|
||||
this.assignBlockFactoryClickHandlers();
|
||||
|
||||
this.onresize();
|
||||
self = this;
|
||||
var self = this;
|
||||
window.addEventListener('resize', function() {
|
||||
self.onresize();
|
||||
});
|
||||
|
||||
@@ -51,6 +51,9 @@ BlockLibraryController = function(blockLibraryName, opt_blockLibraryStorage) {
|
||||
this.name = blockLibraryName;
|
||||
// Create a new, empty Block Library Storage object, or load existing one.
|
||||
this.storage = opt_blockLibraryStorage || new BlockLibraryStorage(this.name);
|
||||
// The BlockLibraryView object handles the proper updating and formatting of
|
||||
// the block library dropdown.
|
||||
this.view = new BlockLibraryView();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -59,7 +62,7 @@ BlockLibraryController = function(blockLibraryName, opt_blockLibraryStorage) {
|
||||
*
|
||||
* @return {string} The current block's type.
|
||||
*/
|
||||
BlockLibraryController.prototype.getCurrentBlockType_ = function() {
|
||||
BlockLibraryController.prototype.getCurrentBlockType = function() {
|
||||
var rootBlock = FactoryUtils.getRootBlock(BlockFactory.mainWorkspace);
|
||||
var blockType = rootBlock.getFieldValue('NAME').trim().toLowerCase();
|
||||
// Replace white space with underscores
|
||||
@@ -67,17 +70,17 @@ BlockLibraryController.prototype.getCurrentBlockType_ = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes current block from Block Library
|
||||
* Removes current block from Block Library and updates the save and delete
|
||||
* buttons so that user may save block to library and but not delete.
|
||||
*
|
||||
* @param {string} blockType - Type of block.
|
||||
*/
|
||||
BlockLibraryController.prototype.removeFromBlockLibrary = function() {
|
||||
var blockType = this.getCurrentBlockType_();
|
||||
var blockType = this.getCurrentBlockType();
|
||||
this.storage.removeBlock(blockType);
|
||||
this.storage.saveToLocalStorage();
|
||||
this.populateBlockLibrary();
|
||||
// Show default block.
|
||||
BlockFactory.showStarterBlock();
|
||||
this.view.updateButtons(blockType, false, false);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -86,20 +89,24 @@ BlockLibraryController.prototype.removeFromBlockLibrary = function() {
|
||||
* @param {string} blockType - Block to edit on block factory.
|
||||
*/
|
||||
BlockLibraryController.prototype.openBlock = function(blockType) {
|
||||
var xml = this.storage.getBlockXml(blockType);
|
||||
BlockFactory.mainWorkspace.clear();
|
||||
Blockly.Xml.domToWorkspace(xml, BlockFactory.mainWorkspace);
|
||||
if (blockType) {
|
||||
var xml = this.storage.getBlockXml(blockType);
|
||||
BlockFactory.mainWorkspace.clear();
|
||||
Blockly.Xml.domToWorkspace(xml, BlockFactory.mainWorkspace);
|
||||
BlockFactory.mainWorkspace.clearUndo();
|
||||
} else {
|
||||
BlockFactory.showStarterBlock();
|
||||
this.view.setSelectedBlockType(null);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns type of block selected from library.
|
||||
*
|
||||
* @param {Element} blockLibraryDropdown - The block library dropdown.
|
||||
* @return {string} Type of block selected.
|
||||
*/
|
||||
BlockLibraryController.prototype.getSelectedBlockType =
|
||||
function(blockLibraryDropdown) {
|
||||
return BlockLibraryView.getSelected(blockLibraryDropdown);
|
||||
BlockLibraryController.prototype.getSelectedBlockType = function() {
|
||||
return this.view.getSelectedBlockType();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -107,19 +114,18 @@ BlockLibraryController.prototype.getSelectedBlockType =
|
||||
* updating the dropdown and displaying the starter block (factory_base).
|
||||
*/
|
||||
BlockLibraryController.prototype.clearBlockLibrary = function() {
|
||||
var check = confirm(
|
||||
'Click OK to clear your block library.');
|
||||
var check = confirm('Delete all blocks from library?');
|
||||
if (check) {
|
||||
// Clear Block Library Storage.
|
||||
this.storage.clear();
|
||||
this.storage.saveToLocalStorage();
|
||||
// Update dropdown.
|
||||
BlockLibraryView.clearOptions('blockLibraryDropdown');
|
||||
// Add a default, blank option to dropdown for when no block from library is
|
||||
// selected.
|
||||
BlockLibraryView.addDefaultOption('blockLibraryDropdown');
|
||||
this.view.clearOptions();
|
||||
// Show default block.
|
||||
BlockFactory.showStarterBlock();
|
||||
// User may not save the starter block, but will get explicit instructions
|
||||
// upon clicking the red save button.
|
||||
this.view.updateButtons(null);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -127,16 +133,14 @@ BlockLibraryController.prototype.clearBlockLibrary = function() {
|
||||
* Saves current block to local storage and updates dropdown.
|
||||
*/
|
||||
BlockLibraryController.prototype.saveToBlockLibrary = function() {
|
||||
var blockType = this.getCurrentBlockType_();
|
||||
// If block under that name already exists, confirm that user wants to replace
|
||||
// saved block.
|
||||
if (this.isInBlockLibrary(blockType)) {
|
||||
var replace = confirm('You already have a block called ' + blockType +
|
||||
' in your library. Click OK to replace.');
|
||||
if (!replace) {
|
||||
// Do not save if user doesn't want to replace the saved block.
|
||||
return;
|
||||
}
|
||||
var blockType = this.getCurrentBlockType();
|
||||
// If user has not changed the name of the starter block.
|
||||
if (blockType == 'block_type') {
|
||||
// Do not save block if it has the default type, 'block_type'.
|
||||
alert('You cannot save a block under the name "block_type". Try changing ' +
|
||||
'the name before saving. Then, click on the "Block Library" button ' +
|
||||
'to view your saved blocks.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Create block xml.
|
||||
@@ -144,6 +148,11 @@ BlockLibraryController.prototype.saveToBlockLibrary = function() {
|
||||
var block = FactoryUtils.getRootBlock(BlockFactory.mainWorkspace);
|
||||
xmlElement.appendChild(Blockly.Xml.blockToDomWithXY(block));
|
||||
|
||||
// Do not add option again if block type is already in library.
|
||||
if (!this.has(blockType)) {
|
||||
this.view.addOption(blockType, true, true);
|
||||
}
|
||||
|
||||
// Save block.
|
||||
this.storage.addBlock(blockType, xmlElement);
|
||||
this.storage.saveToLocalStorage();
|
||||
@@ -152,12 +161,8 @@ BlockLibraryController.prototype.saveToBlockLibrary = function() {
|
||||
// main workspace.
|
||||
this.openBlock(blockType);
|
||||
|
||||
// Do not add another option to dropdown if replacing.
|
||||
if (replace) {
|
||||
return;
|
||||
}
|
||||
BlockLibraryView.addOption(
|
||||
blockType, blockType, 'blockLibraryDropdown', true, true);
|
||||
// Add select handler to the new option.
|
||||
this.addOptionSelectHandler(blockType);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -166,7 +171,7 @@ BlockLibraryController.prototype.saveToBlockLibrary = function() {
|
||||
* @param {string} blockType - Type of block.
|
||||
* @return {boolean} Boolean indicating whether or not block is in the library.
|
||||
*/
|
||||
BlockLibraryController.prototype.isInBlockLibrary = function(blockType) {
|
||||
BlockLibraryController.prototype.has = function(blockType) {
|
||||
var blockLibrary = this.storage.blocks;
|
||||
return (blockType in blockLibrary && blockLibrary[blockType] != null);
|
||||
};
|
||||
@@ -175,19 +180,13 @@ BlockLibraryController.prototype.isInBlockLibrary = function(blockType) {
|
||||
* Populates the dropdown menu.
|
||||
*/
|
||||
BlockLibraryController.prototype.populateBlockLibrary = function() {
|
||||
BlockLibraryView.clearOptions('blockLibraryDropdown');
|
||||
// Add a default, blank option to dropdown for when no block from library is
|
||||
// selected.
|
||||
BlockLibraryView.addDefaultOption('blockLibraryDropdown');
|
||||
// Add option for each saved block.
|
||||
this.view.clearOptions();
|
||||
// Add an unselected option for each saved block.
|
||||
var blockLibrary = this.storage.blocks;
|
||||
for (var block in blockLibrary) {
|
||||
// Make sure the block wasn't deleted.
|
||||
if (blockLibrary[block] != null) {
|
||||
BlockLibraryView.addOption(
|
||||
block, block, 'blockLibraryDropdown', false, true);
|
||||
}
|
||||
for (var blockType in blockLibrary) {
|
||||
this.view.addOption(blockType, false);
|
||||
}
|
||||
this.addOptionSelectHandlers();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -199,6 +198,16 @@ BlockLibraryController.prototype.getBlockLibrary = function() {
|
||||
return this.storage.getBlockXmlTextMap();
|
||||
};
|
||||
|
||||
/**
|
||||
* Return stored xml of a given block type.
|
||||
*
|
||||
* @param {!string} blockType - The type of block.
|
||||
* @return {!Element} Xml element of a given block type or null.
|
||||
*/
|
||||
BlockLibraryController.prototype.getBlockXml = function(blockType) {
|
||||
return this.storage.getBlockXml(blockType);
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the block library storage object from which exporter exports.
|
||||
*
|
||||
@@ -237,3 +246,92 @@ BlockLibraryController.prototype.hasEmptyBlockLibrary = function() {
|
||||
BlockLibraryController.prototype.getStoredBlockTypes = function() {
|
||||
return this.storage.getBlockTypes();
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the currently selected block option to none.
|
||||
*/
|
||||
BlockLibraryController.prototype.setNoneSelected = function() {
|
||||
this.view.setSelectedBlockType(null);
|
||||
};
|
||||
|
||||
/**
|
||||
* If there are unsaved changes to the block in open in Block Factory
|
||||
* and the block is not the starter block, check if user wants to proceed,
|
||||
* knowing that it will cause them to lose their changes.
|
||||
*
|
||||
* @return {boolean} Whether or not to proceed.
|
||||
*/
|
||||
BlockLibraryController.prototype.warnIfUnsavedChanges = function() {
|
||||
if (!FactoryUtils.savedBlockChanges(this)) {
|
||||
return confirm('You have unsaved changes. By proceeding without saving ' +
|
||||
' your block first, you will lose these changes.');
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Add select handler for an option of a given block type. The handler will to
|
||||
* update the view and the selected block accordingly.
|
||||
*
|
||||
* @param {!string} blockType - The type of block represented by the option is
|
||||
* for.
|
||||
*/
|
||||
BlockLibraryController.prototype.addOptionSelectHandler = function(blockType) {
|
||||
var self = this;
|
||||
|
||||
// Click handler for a block option. Sets the block option as the selected
|
||||
// option and opens the block for edit in Block Factory.
|
||||
var setSelectedAndOpen_ = function(blockOption) {
|
||||
var blockType = blockOption.textContent;
|
||||
self.view.setSelectedBlockType(blockType);
|
||||
self.openBlock(blockType);
|
||||
// The block is saved in the block library and all changes have been saved
|
||||
// when the user opens a block from the block library dropdown.
|
||||
// Thus, the buttons show up as a disabled update button and an enabled
|
||||
// delete.
|
||||
self.view.updateButtons(blockType, true, true);
|
||||
self.view.hide();
|
||||
};
|
||||
|
||||
// Returns a block option select handler.
|
||||
var makeOptionSelectHandler_ = function(blockOption) {
|
||||
return function() {
|
||||
// If there are unsaved changes warn user, check if they'd like to
|
||||
// proceed with unsaved changes, and act accordingly.
|
||||
var proceedWithUnsavedChanges = self.warnIfUnsavedChanges();
|
||||
if (!proceedWithUnsavedChanges) {
|
||||
return;
|
||||
}
|
||||
setSelectedAndOpen_(blockOption);
|
||||
};
|
||||
};
|
||||
|
||||
// Assign a click handler to the block option.
|
||||
var blockOption = this.view.optionMap[blockType];
|
||||
// Use an additional closure to correctly assign the tab callback.
|
||||
blockOption.addEventListener(
|
||||
'click', makeOptionSelectHandler_(blockOption));
|
||||
};
|
||||
|
||||
/**
|
||||
* Add select handlers to each option to update the view and the selected
|
||||
* blocks accordingly.
|
||||
*/
|
||||
BlockLibraryController.prototype.addOptionSelectHandlers = function() {
|
||||
// Assign a click handler to each block option.
|
||||
for (var blockType in this.view.optionMap) {
|
||||
this.addOptionSelectHandler(blockType);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Update the save and delete buttons based on the current block type of the
|
||||
* block the user is currently editing.
|
||||
*
|
||||
* @param {boolean} Whether changes to the block have been saved.
|
||||
*/
|
||||
BlockLibraryController.prototype.updateButtons = function(savedChanges) {
|
||||
var blockType = this.getCurrentBlockType();
|
||||
var isInLibrary = this.has(blockType);
|
||||
this.view.updateButtons(blockType, isInLibrary, savedChanges);
|
||||
};
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Javascript for Block Library's UI for pulling blocks from the
|
||||
* Block Library's storage to edit in Block Factory.
|
||||
* @fileoverview Javascript for BlockLibraryView class. It manages the display
|
||||
* of the Block Library dropdown, save, and delete buttons.
|
||||
*
|
||||
* @author quachtina96 (Tina Quach)
|
||||
*/
|
||||
@@ -29,89 +29,198 @@
|
||||
|
||||
goog.provide('BlockLibraryView');
|
||||
|
||||
goog.require('goog.dom');
|
||||
goog.require('goog.dom.classlist');
|
||||
|
||||
/**
|
||||
* BlockLibraryView Class
|
||||
* @constructor
|
||||
*/
|
||||
var BlockLibraryView = function() {
|
||||
// Div element to contain the block types to choose from.
|
||||
// Id of the div that holds the block library view.
|
||||
this.blockLibraryViewDivID = 'dropdownDiv_blockLib';
|
||||
this.dropdown = goog.dom.getElement('dropdownDiv_blockLib');
|
||||
// Map of block type to corresponding 'a' element that is the option in the
|
||||
// dropdown. Used to quickly and easily get a specific option.
|
||||
this.optionMap = Object.create(null);
|
||||
// Save and delete buttons.
|
||||
this.saveButton = goog.dom.getElement('saveToBlockLibraryButton');
|
||||
this.deleteButton = goog.dom.getElement('removeBlockFromLibraryButton');
|
||||
// Initially, user should not be able to delete a block. They must save a
|
||||
// block or select a stored block first.
|
||||
this.deleteButton.disabled = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Open the Block Library dropdown.
|
||||
*/
|
||||
BlockLibraryView.prototype.show = function() {
|
||||
this.dropdown.classList.add("show");
|
||||
};
|
||||
|
||||
/**
|
||||
* Close the Block Library dropdown.
|
||||
*/
|
||||
BlockLibraryView.prototype.hide = function() {
|
||||
this.dropdown.classList.remove("show");
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a node of a given element type and appends to the node with given id.
|
||||
*
|
||||
* @param {string} optionIdentifier - String used to identify option.
|
||||
* @param {string} optionText - Text to display in the dropdown for the option.
|
||||
* @param {string} dropdownID - ID for HTML select element.
|
||||
* @param {!string} blockType - Type of block.
|
||||
* @param {boolean} selected - Whether or not the option should be selected on
|
||||
* the dropdown.
|
||||
* @param {boolean} enabled - Whether or not the option should be enabled.
|
||||
*/
|
||||
BlockLibraryView.addOption
|
||||
= function(optionIdentifier, optionText, dropdownID, selected, enabled) {
|
||||
var dropdown = document.getElementById(dropdownID);
|
||||
var option = document.createElement('option');
|
||||
// The value attribute of a dropdown's option is not visible in the UI, but is
|
||||
// useful for identifying different options that may have the same text.
|
||||
option.value = optionIdentifier;
|
||||
// The text attribute is what the user sees in the dropdown for the option.
|
||||
option.text = optionText;
|
||||
option.selected = selected;
|
||||
option.disabled = !enabled;
|
||||
dropdown.add(option);
|
||||
BlockLibraryView.prototype.addOption = function(blockType, selected) {
|
||||
// Create option.
|
||||
var option = goog.dom.createDom('a', {
|
||||
'id': 'dropdown_' + blockType,
|
||||
'class': 'blockLibOpt'
|
||||
}, blockType);
|
||||
|
||||
// Add option to dropdown.
|
||||
this.dropdown.appendChild(option);
|
||||
this.optionMap[blockType] = option;
|
||||
|
||||
// Select the block.
|
||||
if (selected) {
|
||||
this.setSelectedBlockType(blockType);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds a default, blank option to dropdown for when no block from library is
|
||||
* selected.
|
||||
* Sets a given block type to selected and all other blocks to deselected.
|
||||
* If null, deselects all blocks.
|
||||
*
|
||||
* @param {string} dropdownID - ID of HTML select element
|
||||
* @param {string} blockTypeToSelect - Type of block to select or null.
|
||||
*/
|
||||
BlockLibraryView.addDefaultOption = function(dropdownID) {
|
||||
BlockLibraryView.addOption(
|
||||
'BLOCK_LIBRARY_DEFAULT_BLANK', '', dropdownID, true, false);
|
||||
BlockLibraryView.prototype.setSelectedBlockType = function(blockTypeToSelect) {
|
||||
// Select given block type and deselect all others. Will deselect all blocks
|
||||
// if null or invalid block type selected.
|
||||
for (var blockType in this.optionMap) {
|
||||
var option = this.optionMap[blockType];
|
||||
if (blockType == blockTypeToSelect) {
|
||||
this.selectOption_(option);
|
||||
} else {
|
||||
this.deselectOption_(option);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Selects the default, blank option in dropdown identified by given ID.
|
||||
* Selects a given option.
|
||||
* @private
|
||||
*
|
||||
* @param {string} dropdownID - ID of HTML select element
|
||||
* @param {!Element} option - HTML 'a' element in the dropdown that represents
|
||||
* a particular block type.
|
||||
*/
|
||||
BlockLibraryView.selectDefaultOption = function(dropdownID) {
|
||||
var dropdown = document.getElementById(dropdownID);
|
||||
// Deselect currently selected option.
|
||||
var index = dropdown.selectedIndex;
|
||||
dropdown.options[index].selected = false;
|
||||
// Select default option, always the first in the dropdown.
|
||||
var defaultOption = dropdown.options[0];
|
||||
defaultOption.selected = true;
|
||||
BlockLibraryView.prototype.selectOption_ = function(option) {
|
||||
goog.dom.classlist.add(option, 'dropdown-content-selected');
|
||||
};
|
||||
|
||||
/**
|
||||
* Deselects a given option.
|
||||
* @private
|
||||
*
|
||||
* @param {!Element} option - HTML 'a' element in the dropdown that represents
|
||||
* a particular block type.
|
||||
*/
|
||||
BlockLibraryView.prototype.deselectOption_ = function(option) {
|
||||
goog.dom.classlist.remove(option, 'dropdown-content-selected');
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the save and delete buttons to represent how the current block will
|
||||
* be saved by including the block type in the button text as well as indicating
|
||||
* whether the block is being saved or updated.
|
||||
*
|
||||
* @param {!string} blockType - The type of block being edited.
|
||||
* @param {boolean} isInLibrary - Whether the block type is in the library.
|
||||
* @param {boolean} savedChanges - Whether changes to block have been saved.
|
||||
*/
|
||||
BlockLibraryView.prototype.updateButtons =
|
||||
function(blockType, isInLibrary, savedChanges) {
|
||||
if (blockType) {
|
||||
// User is editing a block.
|
||||
|
||||
if (!isInLibrary) {
|
||||
// Block type has not been saved to library yet. Disable the delete button
|
||||
// and allow user to save.
|
||||
this.saveButton.textContent = 'Save "' + blockType + '"';
|
||||
this.saveButton.disabled = false;
|
||||
this.deleteButton.disabled = true;
|
||||
} else {
|
||||
// Block type has already been saved. Disable the save button unless the
|
||||
// there are unsaved changes (checked below).
|
||||
this.saveButton.textContent = 'Update "' + blockType + '"';
|
||||
this.saveButton.disabled = true;
|
||||
this.deleteButton.disabled = false;
|
||||
}
|
||||
this.deleteButton.textContent = 'Delete "' + blockType + '"';
|
||||
|
||||
// If changes to block have been made and are not saved, make button
|
||||
// green to encourage user to save the block.
|
||||
if (!savedChanges) {
|
||||
var buttonFormatClass = 'button_warn';
|
||||
|
||||
// If block type is the default, 'block_type', make button red to alert
|
||||
// user.
|
||||
if (blockType == 'block_type') {
|
||||
buttonFormatClass = 'button_alert';
|
||||
}
|
||||
goog.dom.classlist.add(this.saveButton, buttonFormatClass);
|
||||
this.saveButton.disabled = false;
|
||||
|
||||
} else {
|
||||
// No changes to save.
|
||||
var classesToRemove = ['button_alert', 'button_warn'];
|
||||
goog.dom.classlist.removeAll(this.saveButton, classesToRemove);
|
||||
this.saveButton.disabled = true;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes option currently selected in dropdown from dropdown menu.
|
||||
*/
|
||||
BlockLibraryView.prototype.removeSelectedOption = function() {
|
||||
var selectedOption = this.getSelectedOption();
|
||||
this.dropdown.removeNode(selectedOption);
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns block type of selected block.
|
||||
*
|
||||
* @param {Element} dropdown - HTML select element.
|
||||
* @return {string} Type of block selected.
|
||||
*/
|
||||
BlockLibraryView.getSelected = function(dropdown) {
|
||||
var index = dropdown.selectedIndex;
|
||||
return dropdown.options[index].value;
|
||||
BlockLibraryView.prototype.getSelectedBlockType = function() {
|
||||
var selectedOption = this.getSelectedOption();
|
||||
var blockType = selectedOption.textContent;
|
||||
return blockType;
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes option currently selected in dropdown from dropdown menu.
|
||||
* Returns selected option.
|
||||
*
|
||||
* @param {string} dropdownID - ID of HTML select element within which to find
|
||||
* the selected option.
|
||||
* @return {!Element} HTML 'a' element that is the option for a block type.
|
||||
*/
|
||||
BlockLibraryView.removeSelectedOption = function(dropdownID) {
|
||||
var dropdown = document.getElementById(dropdownID);
|
||||
if (dropdown) {
|
||||
dropdown.remove(dropdown.selectedIndex);
|
||||
}
|
||||
BlockLibraryView.prototype.getSelectedOption = function() {
|
||||
return goog.dom.getElementByClass('dropdown-content-selected', this.dropdown);
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes all options from dropdown.
|
||||
*
|
||||
* @param {string} dropdownID - ID of HTML select element to clear options of.
|
||||
*/
|
||||
BlockLibraryView.clearOptions = function(dropdownID) {
|
||||
var dropdown = document.getElementById(dropdownID);
|
||||
while (dropdown.length > 0) {
|
||||
dropdown.remove(dropdown.length - 1);
|
||||
BlockLibraryView.prototype.clearOptions = function() {
|
||||
var blockOpts = goog.dom.getElementsByClass('blockLibOpt', this.dropdown);
|
||||
if (blockOpts) {
|
||||
for (var i = 0, option; option = blockOpts[i]; i++) {
|
||||
goog.dom.removeNode(option);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ body {
|
||||
background-color: #fff;
|
||||
font-family: sans-serif;
|
||||
margin: 0 5px;
|
||||
overflow: hidden
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@@ -63,8 +63,13 @@ p {
|
||||
padding: 5px 0px;
|
||||
}
|
||||
|
||||
#factoryHeader {
|
||||
display: table;
|
||||
height: 10%;
|
||||
}
|
||||
|
||||
#blockly {
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#blocklyMask {
|
||||
@@ -133,8 +138,9 @@ button, .buttonStyle {
|
||||
}
|
||||
|
||||
#blockFactoryContent {
|
||||
height: 87%;
|
||||
height: 85%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#blockFactoryPreview {
|
||||
@@ -170,15 +176,15 @@ button, .buttonStyle {
|
||||
}
|
||||
|
||||
#blocklyWorkspaceContainer {
|
||||
height: 95%;
|
||||
padding: 2px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#workspaceFactoryContent {
|
||||
clear: both;
|
||||
display: none;
|
||||
height: 100%;
|
||||
height: 90%;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
/* Exporter */
|
||||
@@ -186,7 +192,9 @@ button, .buttonStyle {
|
||||
#blockLibraryExporter {
|
||||
clear: both;
|
||||
display: none;
|
||||
height: 100%;
|
||||
height: 90%;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
#exportSelector {
|
||||
@@ -294,6 +302,28 @@ button, .buttonStyle {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
/* Block Library */
|
||||
|
||||
#dropdownDiv_blockLib {
|
||||
max-height: 65%;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
#button_blockLib {
|
||||
border-color: darkgrey;
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
.button_alert {
|
||||
background-color: #fcc;
|
||||
border-color: #f99;
|
||||
}
|
||||
|
||||
.button_warn {
|
||||
background-color: #aea;
|
||||
border-color: #5d5;
|
||||
}
|
||||
|
||||
/* Tabs */
|
||||
|
||||
.tab {
|
||||
@@ -369,17 +399,26 @@ td {
|
||||
width: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
#wfactoryHeader {
|
||||
height: 29%;
|
||||
padding: 0.5%;
|
||||
}
|
||||
|
||||
#workspaceTabs {
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid #ccc;
|
||||
display: table;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#toolbox_section {
|
||||
height: 405px;
|
||||
height: 85%;
|
||||
width: 60%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#previewHelp {
|
||||
padding: 10px;
|
||||
width: 98%;
|
||||
}
|
||||
|
||||
#toolbox_blocks {
|
||||
@@ -388,34 +427,66 @@ td {
|
||||
}
|
||||
|
||||
#preview_blocks {
|
||||
height: 395px;
|
||||
height: 80%;
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#createDiv {
|
||||
height: 79%;
|
||||
padding: 0.5%;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
#previewDiv {
|
||||
border: 10px solid #eee;
|
||||
height: 77%;
|
||||
margin-right: 0.5%;
|
||||
padding-bottom: 10px;
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
#previewBorder {
|
||||
border: 5px solid #ddd;
|
||||
padding: 2%;
|
||||
height: 100%;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
#toolbox_div, #preload_div {
|
||||
.disabled {
|
||||
background-color: white;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#toolbox_div {
|
||||
display: table;
|
||||
height: auto;
|
||||
margin-right: 5%;
|
||||
overflow: hidden;
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
#workspace_options {
|
||||
max-height: 250px;
|
||||
#preload_div {
|
||||
display: table;
|
||||
height: 70%;
|
||||
margin-right: 5%;
|
||||
max-height: 500px;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
#shadowBlockDropdown {
|
||||
height: 15%;
|
||||
}
|
||||
|
||||
#preloadHelp {
|
||||
display: table-row;
|
||||
height: 30%;
|
||||
}
|
||||
|
||||
#workspace_options {
|
||||
display: table-row;
|
||||
margin-top: 2%;
|
||||
}
|
||||
|
||||
#disable_div {
|
||||
@@ -429,6 +500,10 @@ td {
|
||||
z-index: -1; /* Start behind workspace */
|
||||
}
|
||||
|
||||
#grid_options, #zoom_options, #maxBlockNumber_option {
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
/* Rules for Closure popup color picker */
|
||||
.goog-palette {
|
||||
outline: none;
|
||||
@@ -473,13 +548,12 @@ td {
|
||||
|
||||
/* The container <div> - needed to position the dropdown content */
|
||||
.dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Dropdown Content (Hidden by Default) */
|
||||
.dropdown-content {
|
||||
background-color: #f9f9f9;
|
||||
background-color: #FFF;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,.2);
|
||||
display: none;
|
||||
min-width: 170px;
|
||||
@@ -497,9 +571,14 @@ td {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Change color of dropdown links on hover. */
|
||||
/* Change color of dropdown links on hover. */
|
||||
.dropdown-content a:hover, .dropdown-content label:hover {
|
||||
background-color: #f1f1f1
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
/* Change color of dropdown links on selected. */
|
||||
.dropdown-content-selected {
|
||||
background-color: #DDD;
|
||||
}
|
||||
|
||||
/* Show the dropdown menu */
|
||||
|
||||
@@ -60,19 +60,12 @@ BlockFactory.UNNAMED = 'unnamed';
|
||||
*/
|
||||
BlockFactory.oldDir = null;
|
||||
|
||||
/**
|
||||
* Inject code into a pre tag, with syntax highlighting.
|
||||
* Safe from HTML/script injection.
|
||||
* @param {string} code Lines of code.
|
||||
* @param {string} id ID of <pre> element to inject into.
|
||||
/*
|
||||
* The starting xml for the Block Factory main workspace. Contains the
|
||||
* unmovable, undeletable factory_base block.
|
||||
*/
|
||||
FactoryUtils.injectCode = function(code, id) {
|
||||
var pre = document.getElementById(id);
|
||||
pre.textContent = code;
|
||||
code = pre.innerHTML;
|
||||
code = prettyPrintOne(code, 'js');
|
||||
pre.innerHTML = code;
|
||||
};
|
||||
BlockFactory.STARTER_BLOCK_XML_TEXT = '<xml><block type="factory_base" ' +
|
||||
'deletable="false" movable="false"></block></xml>';
|
||||
|
||||
/**
|
||||
* Change the language code format.
|
||||
@@ -216,11 +209,19 @@ BlockFactory.updatePreview = function() {
|
||||
// standard library.
|
||||
var rootBlock = FactoryUtils.getRootBlock(BlockFactory.mainWorkspace);
|
||||
if (StandardCategories.coreBlockTypes.indexOf(blockType) != -1) {
|
||||
rootBlock.setWarningText('A standard Blockly.Block already exists ' +
|
||||
rootBlock.setWarningText('A core Blockly block already exists ' +
|
||||
'under this name.');
|
||||
|
||||
} else if (blockType == 'block_type') {
|
||||
// Warn user to let them know they can't save a block under the default
|
||||
// name 'block_type'
|
||||
rootBlock.setWarningText('You cannot save a block with the default ' +
|
||||
'name, "block_type"');
|
||||
|
||||
} else {
|
||||
rootBlock.setWarningText(null);
|
||||
}
|
||||
|
||||
} finally {
|
||||
Blockly.Blocks = backupBlocks;
|
||||
}
|
||||
@@ -243,10 +244,22 @@ BlockFactory.disableEnableLink = function() {
|
||||
* Render starter block (factory_base).
|
||||
*/
|
||||
BlockFactory.showStarterBlock = function() {
|
||||
BlockFactory.mainWorkspace.clear();
|
||||
var xml = '<xml><block type="factory_base" deletable="false" ' +
|
||||
'movable="false"></block></xml>';
|
||||
Blockly.Xml.domToWorkspace(
|
||||
Blockly.Xml.textToDom(xml), BlockFactory.mainWorkspace);
|
||||
BlockFactory.mainWorkspace.clear();
|
||||
var xml = Blockly.Xml.textToDom(BlockFactory.STARTER_BLOCK_XML_TEXT);
|
||||
Blockly.Xml.domToWorkspace(xml, BlockFactory.mainWorkspace);
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns whether or not the current block open is the starter block.
|
||||
*/
|
||||
BlockFactory.isStarterBlock = function() {
|
||||
var rootBlock = FactoryUtils.getRootBlock(BlockFactory.mainWorkspace);
|
||||
// The starter block does not have blocks nested into the factory_base block.
|
||||
return !(rootBlock.getChildren().length > 0 ||
|
||||
// The starter block's name is the default, 'block_type'.
|
||||
rootBlock.getFieldValue('NAME').trim().toLowerCase() != 'block_type' ||
|
||||
// The starter block has no connections.
|
||||
rootBlock.getFieldValue('CONNECTIONS') != 'NONE' ||
|
||||
// The starter block has automatic inputs.
|
||||
rootBlock.getFieldValue('INLINE') != 'AUTO');
|
||||
};
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
*/
|
||||
goog.provide('FactoryUtils');
|
||||
|
||||
goog.require('goog.dom.classes');
|
||||
|
||||
/**
|
||||
* Get block definition code for the current block.
|
||||
*
|
||||
@@ -886,3 +884,106 @@ FactoryUtils.injectCode = function(code, id) {
|
||||
code = prettyPrintOne(code, 'js');
|
||||
pre.innerHTML = code;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns whether or not two blocks are the same based on their xml. Expects
|
||||
* xml with a single child node that is a factory_base block, the xml found on
|
||||
* Block Factory's main workspace.
|
||||
*
|
||||
* @param {!Element} blockXml1 - An xml element with a single child node that
|
||||
* is a factory_base block.
|
||||
* @param {!Element} blockXml2 - An xml element with a single child node that
|
||||
* is a factory_base block.
|
||||
* @return {boolean} Whether or not two blocks are the same based on their xml.
|
||||
*/
|
||||
FactoryUtils.sameBlockXml = function(blockXml1, blockXml2) {
|
||||
// Each xml element should contain a single child element with a 'block' tag
|
||||
if (goog.string.caseInsensitiveCompare(blockXml1.tagName, 'xml') ||
|
||||
goog.string.caseInsensitiveCompare(blockXml2.tagName, 'xml')) {
|
||||
throw new Error('Expected two xml elements, recieved elements with tag ' +
|
||||
'names: ' + blockXml1.tagName + ' and ' + blockXml2.tagName + '.');
|
||||
}
|
||||
|
||||
// Compare the block elements directly. The xml tags may include other meta
|
||||
// information we want to igrore.
|
||||
var blockElement1 = blockXml1.getElementsByTagName('block')[0];
|
||||
var blockElement2 = blockXml2.getElementsByTagName('block')[0];
|
||||
|
||||
if (!(blockElement1 && blockElement2)) {
|
||||
throw new Error('Could not get find block element in xml.');
|
||||
}
|
||||
|
||||
var blockXmlText1 = Blockly.Xml.domToText(blockElement1);
|
||||
var blockXmlText2 = Blockly.Xml.domToText(blockElement2);
|
||||
|
||||
// Strip white space.
|
||||
blockXmlText1 = blockXmlText1.replace(/\s+/g, '');
|
||||
blockXmlText2 = blockXmlText2.replace(/\s+/g, '');
|
||||
|
||||
// Return whether or not changes have been saved.
|
||||
return blockXmlText1 == blockXmlText2;
|
||||
};
|
||||
|
||||
/*
|
||||
* Checks if a block has a variable field. Blocks with variable fields cannot
|
||||
* be shadow blocks.
|
||||
*
|
||||
* @param {Blockly.Block} block The block to check if a variable field exists.
|
||||
* @return {boolean} True if the block has a variable field, false otherwise.
|
||||
*/
|
||||
FactoryUtils.hasVariableField = function(block) {
|
||||
if (!block) {
|
||||
return false;
|
||||
}
|
||||
for (var i = 0, input; input = block.inputList[i]; i++) {
|
||||
for (var j = 0, field; field = input.fieldRow[j]; j++) {
|
||||
if (field.name == 'VAR') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if a block is a procedures block. If procedures block names are
|
||||
* ever updated or expanded, this function should be updated as well (no
|
||||
* other known markers for procedure blocks beyond name).
|
||||
*
|
||||
* @param {Blockly.Block} block The block to check.
|
||||
* @return {boolean} True if hte block is a procedure block, false otherwise.
|
||||
*/
|
||||
FactoryUtils.isProcedureBlock = function(block) {
|
||||
return block &&
|
||||
(block.type == 'procedures_defnoreturn' ||
|
||||
block.type == 'procedures_defreturn' ||
|
||||
block.type == 'procedures_callnoreturn' ||
|
||||
block.type == 'procedures_callreturn' ||
|
||||
block.type == 'procedures_ifreturn');
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns whether or not a modified block's changes has been saved to the
|
||||
* Block Library.
|
||||
* TODO(quachtina96): move into the Block Factory Controller once made.
|
||||
*
|
||||
* @param {!BlockLibraryController} blockLibraryController - Block Library
|
||||
* Controller storing custom blocks.
|
||||
* @return {boolean} True if all changes made to the block have been saved to
|
||||
* the given Block Library.
|
||||
*/
|
||||
FactoryUtils.savedBlockChanges = function(blockLibraryController) {
|
||||
if (BlockFactory.isStarterBlock()) {
|
||||
return true;
|
||||
}
|
||||
var blockType = blockLibraryController.getCurrentBlockType();
|
||||
var currentXml = Blockly.Xml.workspaceToDom(BlockFactory.mainWorkspace);
|
||||
|
||||
if (blockLibraryController.has(blockType)) {
|
||||
// Block is saved in block library.
|
||||
var savedXml = blockLibraryController.getBlockXml(blockType);
|
||||
return FactoryUtils.sameBlockXml(savedXml, currentXml);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
window.addEventListener('load', init);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body onbeforeunload="return blocklyFactory.confirmLeavePage()">
|
||||
<h1><a href="https://developers.google.com/blockly/">Blockly</a> >
|
||||
<a href="../index.html">Demos</a> > Blockly Factory
|
||||
<button id="helpButton" title="View documentation in new window.">
|
||||
@@ -50,26 +50,27 @@
|
||||
</h1>
|
||||
<div id="tabContainer">
|
||||
<div id="blockFactory_tab" class="tab tabon"> Block Factory</div>
|
||||
<div id="workspaceFactory_tab" class="tab taboff"> Workspace Factory</div>
|
||||
<div id="blocklibraryExporter_tab" class="tab taboff"> Block Exporter</div>
|
||||
<div id="workspaceFactory_tab" class="tab taboff"> Workspace Factory</div>
|
||||
</div>
|
||||
|
||||
<!-- Exporter tab -->
|
||||
<div id="blockLibraryExporter">
|
||||
<br>
|
||||
<p id="helperText"> First, select blocks from your block library by dragging them into your workspace. Then, use the Export Settings form to download starter code for selected blocks.
|
||||
<p id="helperText"> First, select blocks from your block library by clicking on them. Then, use the Export Settings form to download starter code for selected blocks.
|
||||
</p>
|
||||
<div id="exportSelector">
|
||||
<br>
|
||||
<h3> Block Selector </h3>
|
||||
<div class='dropdown'>
|
||||
<button id="button_setBlocks">Select From Library</button>
|
||||
<button id="button_setBlocks">Select</button>
|
||||
<div id="dropdownDiv_setBlocks" class="dropdown-content">
|
||||
<a id='dropdown_addAllFromLib' title="Select all block library blocks.">All Stored</a>
|
||||
<a id='dropdown_addAllUsed' title="Select all block library blocks used in workspace factory.">All Used</a>
|
||||
<a id='dropdown_clearSelected' title="Clear selected blocks.">Clear</a>
|
||||
<a id='dropdown_addAllFromLib' title="Select all block library blocks.">All Stored in Block Library</a>
|
||||
<a id='dropdown_addAllUsed' title="Select all block library blocks used in workspace factory.">All Used in Workspace Factory</a>
|
||||
</div>
|
||||
<button id='clearSelectedButton' title="Clear selected blocks.">Clear Selected</a>
|
||||
</div>
|
||||
|
||||
<div id="blockSelector"></div>
|
||||
</div>
|
||||
|
||||
@@ -132,7 +133,8 @@
|
||||
<!-- Workspace Factory tab -->
|
||||
|
||||
<div id="workspaceFactoryContent">
|
||||
<p>
|
||||
<div id="factoryHeader">
|
||||
<p>
|
||||
<div class="dropdown">
|
||||
<button id="button_importBlocks">Import Custom Blocks</button>
|
||||
<div id="dropdownDiv_importBlocks" class="dropdown-content">
|
||||
@@ -156,31 +158,33 @@
|
||||
<div class="dropdown">
|
||||
<button id="button_export">Export</button>
|
||||
<div id="dropdownDiv_export" class="dropdown-content">
|
||||
<a id='dropdown_exportOptions'>Starter Code</a>
|
||||
<a id='dropdown_exportToolbox'>Toolbox</a>
|
||||
<a id='dropdown_exportPreload'>Workspace Blocks</a>
|
||||
<a id='dropdown_exportOptions'>Inject Options</a>
|
||||
<a id='dropdown_exportAll'>All</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="button_clear">Clear</button>
|
||||
|
||||
</p>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<section id="createDiv">
|
||||
<h3>Edit</h3>
|
||||
<p id="editHelpText">Drag blocks into the workspace to configure the toolbox in your custom workspace.</p>
|
||||
<table id='workspaceTabs' style="width:auto">
|
||||
<div id="createHeader">
|
||||
<h3>Edit</h3>
|
||||
<p id="editHelpText">Drag blocks into the workspace to configure the toolbox in your custom workspace.</p>
|
||||
</div>
|
||||
<table id='workspaceTabs' style="width:auto; height:auto">
|
||||
<td id="tab_toolbox" class="tabon">Toolbox</td>
|
||||
<td id="tab_preload" class="taboff">Workspace</td>
|
||||
</table>
|
||||
<section id="toolbox_section">
|
||||
<div id="toolbox_blocks" class="content"></div>
|
||||
<div id='disable_div'></div>
|
||||
<div id="toolbox_blocks"></div>
|
||||
</section>
|
||||
<aside id="toolbox_div">
|
||||
<p id="categoryHeader">Your categories will appear here</p>
|
||||
<table id="categoryTable" style="width:auto">
|
||||
<table id="categoryTable" style="width:auto; height:auto">
|
||||
</table>
|
||||
<p> </p>
|
||||
|
||||
@@ -190,6 +194,7 @@
|
||||
<a id='dropdown_newCategory'>New Category</a>
|
||||
<a id='dropdown_loadCategory'>Standard Category</a>
|
||||
<a id='dropdown_separator'>Separator</a>
|
||||
<a id='dropdown_loadStandardToolbox'>Standard Toolbox</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -209,48 +214,49 @@
|
||||
|
||||
</aside>
|
||||
|
||||
<div class='dropdown'>
|
||||
<button id="button_editShadow">Edit Block</button>
|
||||
<div id="dropdownDiv_editShadowAdd" class="dropdown-content">
|
||||
<a id='dropdown_addShadow'>Add Shadow</a>
|
||||
</div>
|
||||
<div id="dropdownDiv_editShadowRemove" class="dropdown-content">
|
||||
<a id='dropdown_removeShadow'>Remove Shadow</a>
|
||||
</div>
|
||||
</div>
|
||||
<button id='button_addShadow' style='display:none'>Make Shadow</button>
|
||||
<button id='button_removeShadow' style='display:none'>Remove Shadow</button>
|
||||
|
||||
<aside id='preload_div' style='display:none'>
|
||||
<p>Configure the <a href="https://developers.google.com/blockly/guides/get-started/web">options</a> for your Blockly inject call.</p>
|
||||
<button class="small" id="button_standardOptions">Reset Options</button>
|
||||
<form id="workspace_options">
|
||||
<div id="preloadHelp">
|
||||
<p>Configure the options for your Blockly inject call.</p>
|
||||
<button id="button_optionsHelp">Help</button>
|
||||
<button class="small" id="button_standardOptions">Reset to Default</button>
|
||||
</div>
|
||||
<div id="workspace_options">
|
||||
<input type="checkbox" id="option_readOnly_checkbox" class="optionsInput">Read Only<br>
|
||||
<input type="checkbox" id="option_collapse_checkbox" class="optionsInput">Collapsible Blocks<br>
|
||||
<input type="checkbox" id="option_comments_checkbox" class="optionsInput">Comments for Blocks<br>
|
||||
<input type="checkbox" id="option_css_checkbox" class="optionsInput">Use Blockly CSS<br>
|
||||
<input type="checkbox" id="option_disable_checkbox" class="optionsInput">Disabled Blocks<br>
|
||||
<input type="checkbox" id="option_grid_checkbox" class="optionsInput">Use Grid<br>
|
||||
<div id="grid_options" name="grid" style="display:none">
|
||||
Spacing <input type="text" id="gridOption_spacing_text" class="optionsInput"value="0"><br>
|
||||
Length <input type="text" id="gridOption_length_text" class="optionsInput" value="1"><br>
|
||||
Spacing <input type="number" id="gridOption_spacing_number" class="optionsInput" value="0"><br>
|
||||
Length <input type="number" id="gridOption_length_number" class="optionsInput" value="1"><br>
|
||||
Color <input type="text" id="gridOption_colour_text" class="optionsInput" value="#888"><br>
|
||||
<input type="checkbox" id="gridOption_snap_checkbox" class="optionsInput" value="grid_snap_checkbox">Snap<br>
|
||||
</div>
|
||||
Max Blocks <input type="text" id="option_maxBlocks_text" class="optionsInput" value="Infinity"><br>
|
||||
<input type="checkbox" id="option_infiniteBlocks_checkbox" class="optionsInput" value="checked">Infinite Blocks<br>
|
||||
<div id="maxBlockNumber_option" style="display:none">
|
||||
Max Blocks <input type="number" id="option_maxBlocks_number" class="optionsInput" value=100><br>
|
||||
</div>
|
||||
Path to Blockly Media <input type="text" id="option_media_text" class="optionsInput"><br>
|
||||
<input type="checkbox" id="option_readOnly_checkbox" class="optionsInput">Read Only<br>
|
||||
<input type="checkbox" id="option_rtl_checkbox" class="optionsInput">Layout with RTL<br>
|
||||
<input type="checkbox" id="option_scrollbars_checkbox" class="optionsInput">Scrollbars<br>
|
||||
<input type="checkbox" id="option_sounds_checkbox" class="optionsInput">Sounds<br>
|
||||
<input type="checkbox" id="option_trashcan_checkbox" class="optionsInput">Trashcan<br>
|
||||
<div id="trashcan_option">
|
||||
<input type="checkbox" id="option_trashcan_checkbox" class="optionsInput">Trashcan<br>
|
||||
</div>
|
||||
<input type="checkbox" id="option_zoom_checkbox" class="optionsInput">Zoom<br>
|
||||
<div id="zoom_options" name="zoom" style="display:none">
|
||||
<input type="checkbox" id="zoomOption_controls_checkbox" class="optionsInput">Zoom Controls<br>
|
||||
<input type="checkbox" id="zoomOption_wheel_checkbox" class="optionsInput">Zoom Wheel<br>
|
||||
Start Scale <input type="text" id="zoomOption_startScale_text" class="optionsInput" name="startScale" value="1.0"><br>
|
||||
Max Scale <input type="text" id="zoomOption_maxScale_text" class="optionsInput" value="3"><br>
|
||||
Min Scale <input type="text" id="zoomOption_minScale_text" class="optionsInput" value="0.3"><br>
|
||||
Scale Speed <input type="text" id="zoomOption_scaleSpeed_text" class="optionsInput" value="1.2"><br>
|
||||
Start Scale <input type="number" id="zoomOption_startScale_number" class="optionsInput" name="startScale" value="1.0"><br>
|
||||
Max Scale <input type="number" id="zoomOption_maxScale_number" class="optionsInput" value="3"><br>
|
||||
Min Scale <input type="number" id="zoomOption_minScale_number" class="optionsInput" value="0.3"><br>
|
||||
Scale Speed <input type="number" id="zoomOption_scaleSpeed_number" class="optionsInput" value="1.2"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
@@ -258,8 +264,10 @@
|
||||
|
||||
<aside id="previewDiv">
|
||||
<div id="previewBorder">
|
||||
<h3>Preview</h3>
|
||||
<p>This is what your custom workspace will look like.</p>
|
||||
<div id="previewHelp">
|
||||
<h3>Preview</h3>
|
||||
<p>This is what your custom workspace will look like.</p>
|
||||
</div>
|
||||
<div id="preview_blocks" class="content"></div>
|
||||
</div>
|
||||
</aside>
|
||||
@@ -267,32 +275,34 @@
|
||||
|
||||
<!-- Blockly Factory Tab -->
|
||||
<table id="blockFactoryContent">
|
||||
<tr>
|
||||
<tr width="100%" height="10%">
|
||||
<td width="50%" height="5%">
|
||||
<table>
|
||||
<tr id="blockLibrary">
|
||||
<td id="blockLibraryContainer">
|
||||
<span>
|
||||
<h3>Block Library:</h3>
|
||||
<select id="blockLibraryDropdown">
|
||||
<div class='dropdown'>
|
||||
<button id="button_blockLib">Block Library</button>
|
||||
<div id="dropdownDiv_blockLib" class="dropdown-content">
|
||||
<a id='createNewBlockButton'>Create New Block</a>
|
||||
</div>
|
||||
</div>
|
||||
<select id="blockLibraryDropdown" style="display:none">
|
||||
</select>
|
||||
</span>
|
||||
</td>
|
||||
<td id="blockLibraryControls">
|
||||
<button id="saveToBlockLibraryButton" title="Save block to Block Library.">
|
||||
<span>Save Block</span>
|
||||
Save "block_type"
|
||||
</button>
|
||||
<button id="removeBlockFromLibraryButton" title="Remove block from Block Library.">
|
||||
<span>Delete Block</span>
|
||||
</button>
|
||||
<button id="createNewBlockButton" title="Create a new block.">
|
||||
<span> Create Block</span>
|
||||
Delete "block_type"
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<td height="5%">
|
||||
<table id="blockFactoryPreview">
|
||||
<tr>
|
||||
<td id="previewContainer">
|
||||
@@ -323,13 +333,13 @@
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr height="80%">
|
||||
<td id="blocklyWorkspaceContainer">
|
||||
<div id="blockly"></div>
|
||||
<div id="blocklyMask"></div>
|
||||
</td>
|
||||
<td width="50%" height="95%">
|
||||
<table>
|
||||
<td width="50%">
|
||||
<table id="blocklyPreviewContainer">
|
||||
<tr>
|
||||
<td height="30%">
|
||||
<div id="preview"></div>
|
||||
@@ -337,7 +347,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="5%">
|
||||
<h3>Language code:
|
||||
<h3>Block Definition:
|
||||
<select id="format">
|
||||
<option value="JSON">JSON</option>
|
||||
<option value="JavaScript">JavaScript</option>
|
||||
@@ -372,6 +382,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<xml id="blockfactory_toolbox" class="toolbox">
|
||||
|
||||
@@ -57,7 +57,7 @@ WorkspaceFactoryController = function(toolboxName, toolboxDiv, previewDiv) {
|
||||
colour: '#ccc',
|
||||
snap: true},
|
||||
media: '../../media/',
|
||||
toolbox: this.toolbox,
|
||||
toolbox: this.toolbox
|
||||
});
|
||||
|
||||
// Workspace for user to preview their changes.
|
||||
@@ -84,6 +84,10 @@ WorkspaceFactoryController = function(toolboxName, toolboxDiv, previewDiv) {
|
||||
this.selectedMode = WorkspaceFactoryController.MODE_TOOLBOX;
|
||||
// True if key events are enabled, false otherwise.
|
||||
this.keyEventsEnabled = true;
|
||||
// True if there are unsaved changes in the toolbox, false otherwise.
|
||||
this.hasUnsavedToolboxChanges = false;
|
||||
// True if there are unsaved changes in the preloaded blocks, false otherwise.
|
||||
this.hasUnsavedPreloadChanges = false;
|
||||
};
|
||||
|
||||
// Toolbox editing mode. Changes the user makes to the workspace updates the
|
||||
@@ -98,52 +102,26 @@ WorkspaceFactoryController.MODE_PRELOAD = 'preload';
|
||||
* before), and then creates a tab and switches to it.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.addCategory = function() {
|
||||
// Check if it's the first category added.
|
||||
var isFirstCategory = !this.model.hasElements();
|
||||
// Give the option to save blocks if their workspace is not empty and they
|
||||
// are creating their first category.
|
||||
if (isFirstCategory && this.toolboxWorkspace.getAllBlocks().length > 0) {
|
||||
var confirmCreate = confirm('Do you want to save your work in another '
|
||||
+ 'category? If you don\'t, the blocks in your workspace will be ' +
|
||||
'deleted.');
|
||||
|
||||
// Create a new category for current blocks.
|
||||
if (confirmCreate) {
|
||||
var name = prompt('Enter the name of the category for your ' +
|
||||
'current blocks: ');
|
||||
if (!name) { // Exit if cancelled.
|
||||
return;
|
||||
}
|
||||
|
||||
// Create the new category.
|
||||
this.createCategory(name, true);
|
||||
// Set the new category as selected.
|
||||
var id = this.model.getCategoryIdByName(name);
|
||||
this.model.setSelectedById(id);
|
||||
this.view.setCategoryTabSelection(id, true);
|
||||
// Allow user to use the default options for injecting with categories.
|
||||
this.allowToSetDefaultOptions();
|
||||
// Update preview here in case exit early.
|
||||
this.updatePreview();
|
||||
}
|
||||
}
|
||||
// Transfers the user's blocks to a flyout if it's the first category created.
|
||||
this.transferFlyoutBlocksToCategory();
|
||||
|
||||
// After possibly creating a category, check again if it's the first category.
|
||||
isFirstCategory = !this.model.hasElements();
|
||||
var isFirstCategory = !this.model.hasElements();
|
||||
// Get name from user.
|
||||
name = this.promptForNewCategoryName('Enter the name of your new category: ');
|
||||
if (!name) { //Exit if cancelled.
|
||||
return;
|
||||
}
|
||||
// Create category.
|
||||
this.createCategory(name, isFirstCategory);
|
||||
this.createCategory(name);
|
||||
// Switch to category.
|
||||
this.switchElement(this.model.getCategoryIdByName(name));
|
||||
|
||||
// Allow the user to use the default options for injecting the workspace
|
||||
// Sets the default options for injecting the workspace
|
||||
// when there are categories if adding the first category.
|
||||
if (isFirstCategory) {
|
||||
this.allowToSetDefaultOptions();
|
||||
this.view.setCategoryOptions(this.model.hasElements());
|
||||
this.generateNewOptions();
|
||||
}
|
||||
// Update preview.
|
||||
this.updatePreview();
|
||||
@@ -156,16 +134,13 @@ WorkspaceFactoryController.prototype.addCategory = function() {
|
||||
*
|
||||
* @param {!string} name Name of category being added.
|
||||
* @param {!string} id The ID of the category being added.
|
||||
* @param {boolean} isFirstCategory True if it's the first category created,
|
||||
* false otherwise.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.createCategory = function(name,
|
||||
isFirstCategory) {
|
||||
WorkspaceFactoryController.prototype.createCategory = function(name) {
|
||||
// Create empty category
|
||||
var category = new ListElement(ListElement.TYPE_CATEGORY, name);
|
||||
this.model.addElementToList(category);
|
||||
// Create new category.
|
||||
var tab = this.view.addCategoryRow(name, category.id, isFirstCategory);
|
||||
var tab = this.view.addCategoryRow(name, category.id);
|
||||
this.addClickToSwitch(tab, category.id);
|
||||
};
|
||||
|
||||
@@ -187,6 +162,32 @@ WorkspaceFactoryController.prototype.addClickToSwitch = function(tab, id) {
|
||||
this.view.bindClick(tab, clickFunction(id));
|
||||
};
|
||||
|
||||
/**
|
||||
* Transfers the blocks in the user's flyout to a new category if
|
||||
* the user is creating their first category and their workspace is not
|
||||
* empty. Should be called whenever it is possible to switch from single flyout
|
||||
* to categories (not including importing).
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.transferFlyoutBlocksToCategory =
|
||||
function() {
|
||||
// Saves the user's blocks from the flyout in a category if there is no
|
||||
// toolbox and the user has dragged in blocks.
|
||||
if (!this.model.hasElements() &&
|
||||
this.toolboxWorkspace.getAllBlocks().length > 0) {
|
||||
// Create the new category.
|
||||
this.createCategory('Category 1', true);
|
||||
// Set the new category as selected.
|
||||
var id = this.model.getCategoryIdByName('Category 1');
|
||||
this.model.setSelectedById(id);
|
||||
this.view.setCategoryTabSelection(id, true);
|
||||
// Allow user to use the default options for injecting with categories.
|
||||
this.view.setCategoryOptions(this.model.hasElements());
|
||||
this.generateNewOptions();
|
||||
// Update preview here in case exit early.
|
||||
this.updatePreview();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Attached to "-" button. Checks if the user wants to delete
|
||||
* the current element. Removes the element and switches to another element.
|
||||
@@ -231,9 +232,6 @@ WorkspaceFactoryController.prototype.removeElement = function() {
|
||||
this.toolboxWorkspace.clear();
|
||||
this.toolboxWorkspace.clearUndo();
|
||||
this.model.createDefaultSelectedIfEmpty();
|
||||
// Allow the user to use the default options for injecting the workspace
|
||||
// when there are no categories.
|
||||
this.allowToSetDefaultOptions();
|
||||
}
|
||||
// Update preview.
|
||||
this.updatePreview();
|
||||
@@ -324,29 +322,32 @@ WorkspaceFactoryController.prototype.clearAndLoadElement = function(id) {
|
||||
* configuration)
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.exportXmlFile = function(exportMode) {
|
||||
// Generate XML.
|
||||
if (exportMode == WorkspaceFactoryController.MODE_TOOLBOX) {
|
||||
// Export the toolbox XML.
|
||||
|
||||
var configXml = Blockly.Xml.domToPrettyText
|
||||
(this.generator.generateToolboxXml());
|
||||
} else if (exportMode == WorkspaceFactoryController.MODE_PRELOAD) {
|
||||
// Export the pre-loaded block XML.
|
||||
|
||||
var configXml = Blockly.Xml.domToPrettyText
|
||||
(this.generator.generateWorkspaceXml());
|
||||
} else {
|
||||
// Unknown mode. Throw error.
|
||||
throw new Error ("Unknown export mode: " + exportMode);
|
||||
}
|
||||
|
||||
// Get file name.
|
||||
// Get file name.
|
||||
var fileName = prompt('File Name for ' + (exportMode ==
|
||||
WorkspaceFactoryController.MODE_TOOLBOX ? 'toolbox XML: ' :
|
||||
'pre-loaded workspace XML: '));
|
||||
if (!fileName) { // If cancelled
|
||||
return;
|
||||
}
|
||||
|
||||
// Generate XML.
|
||||
if (exportMode == WorkspaceFactoryController.MODE_TOOLBOX) {
|
||||
// Export the toolbox XML.
|
||||
|
||||
var configXml = Blockly.Xml.domToPrettyText
|
||||
(this.generator.generateToolboxXml());
|
||||
this.hasUnsavedToolboxChanges = false;
|
||||
} else if (exportMode == WorkspaceFactoryController.MODE_PRELOAD) {
|
||||
// Export the pre-loaded block XML.
|
||||
|
||||
var configXml = Blockly.Xml.domToPrettyText
|
||||
(this.generator.generateWorkspaceXml());
|
||||
this.hasUnsavedPreloadChanges = false;
|
||||
} else {
|
||||
// Unknown mode. Throw error.
|
||||
throw new Error ("Unknown export mode: " + exportMode);
|
||||
}
|
||||
|
||||
// Download file.
|
||||
var data = new Blob([configXml], {type: 'text/xml'});
|
||||
this.view.createAndDownloadFile(fileName, data);
|
||||
@@ -356,17 +357,16 @@ WorkspaceFactoryController.prototype.exportXmlFile = function(exportMode) {
|
||||
* Export the options object to be used for the Blockly inject call. Gets a
|
||||
* file name from the user and downloads the options object to that file.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.exportOptionsFile = function() {
|
||||
var fileName = prompt('File Name for options object for injecting: ');
|
||||
WorkspaceFactoryController.prototype.exportInjectFile = function() {
|
||||
var fileName = prompt('File Name for starter Blockly workspace code: ');
|
||||
if (!fileName) { // If cancelled.
|
||||
return;
|
||||
}
|
||||
// Generate new options to remove toolbox XML from options object (if
|
||||
// necessary).
|
||||
this.generateNewOptions();
|
||||
// TODO(evd2014): Use Regex to prettify JSON generated.
|
||||
var data = new Blob([JSON.stringify(this.model.options)],
|
||||
{type: 'text/javascript'});
|
||||
var printableOptions = this.generator.generateInjectString()
|
||||
var data = new Blob([printableOptions], {type: 'text/javascript'});
|
||||
this.view.createAndDownloadFile(fileName, data);
|
||||
};
|
||||
|
||||
@@ -416,6 +416,9 @@ WorkspaceFactoryController.prototype.updatePreview = function() {
|
||||
if (!this.previewWorkspace.toolbox_) {
|
||||
this.reinjectPreview(tree); // Create a toolbox, expensive.
|
||||
} else {
|
||||
// Close the toolbox before updating it so that the user has to reopen
|
||||
// the flyout and see their updated toolbox (open flyout doesn't update)
|
||||
this.previewWorkspace.toolbox_.clearSelection();
|
||||
this.previewWorkspace.updateToolbox(tree);
|
||||
}
|
||||
}
|
||||
@@ -437,9 +440,22 @@ WorkspaceFactoryController.prototype.updatePreview = function() {
|
||||
WorkspaceFactoryController.prototype.saveStateFromWorkspace = function() {
|
||||
if (this.selectedMode == WorkspaceFactoryController.MODE_TOOLBOX) {
|
||||
// If currently editing the toolbox.
|
||||
// Update flags if toolbox has been changed.
|
||||
if (this.model.getSelectedXml() !=
|
||||
Blockly.Xml.workspaceToDom(this.toolboxWorkspace)) {
|
||||
this.hasUnsavedToolboxChanges = true;
|
||||
}
|
||||
|
||||
this.model.getSelected().saveFromWorkspace(this.toolboxWorkspace);
|
||||
|
||||
} else if (this.selectedMode == WorkspaceFactoryController.MODE_PRELOAD) {
|
||||
// If currently editing the pre-loaded workspace.
|
||||
// Update flags if preloaded blocks have been changed.
|
||||
if (this.model.getPreloadXml() !=
|
||||
Blockly.Xml.workspaceToDom(this.toolboxWorkspace)) {
|
||||
this.hasUnsavedPreloadChanges = true;
|
||||
}
|
||||
|
||||
this.model.savePreloadXml
|
||||
(Blockly.Xml.workspaceToDom(this.toolboxWorkspace));
|
||||
}
|
||||
@@ -455,8 +471,9 @@ WorkspaceFactoryController.prototype.saveStateFromWorkspace = function() {
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.reinjectPreview = function(tree) {
|
||||
this.previewWorkspace.dispose();
|
||||
this.model.setOptionsAttribute('toolbox', Blockly.Xml.domToPrettyText(tree));
|
||||
this.previewWorkspace = Blockly.inject('preview_blocks', this.model.options);
|
||||
var injectOptions = this.readOptions_();
|
||||
injectOptions['toolbox'] = Blockly.Xml.domToPrettyText(tree);
|
||||
this.previewWorkspace = Blockly.inject('preview_blocks', injectOptions);
|
||||
Blockly.Xml.domToWorkspace(this.generator.generateWorkspaceXml(),
|
||||
this.previewWorkspace);
|
||||
};
|
||||
@@ -562,7 +579,21 @@ WorkspaceFactoryController.prototype.loadCategory = function() {
|
||||
}
|
||||
} while (!this.isStandardCategoryName(name));
|
||||
|
||||
// Check if the user can create that standard category.
|
||||
// Load category.
|
||||
this.loadCategoryByName(name);
|
||||
};
|
||||
|
||||
/**
|
||||
* Loads a Standard Category by name and switches to it. Leverages
|
||||
* StandardCategories. Returns if cannot load standard category.
|
||||
*
|
||||
* @param {string} name Name of the standard category to load.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.loadCategoryByName = function(name) {
|
||||
// Check if the user can load that standard category.
|
||||
if (!this.isStandardCategoryName(name)) {
|
||||
return;
|
||||
}
|
||||
if (this.model.hasVariables() && name.toLowerCase() == 'variables') {
|
||||
alert('A Variables category already exists. You cannot create multiple' +
|
||||
' variables categories.');
|
||||
@@ -580,6 +611,9 @@ WorkspaceFactoryController.prototype.loadCategory = function() {
|
||||
+ '. Rename your category and try again.');
|
||||
return;
|
||||
}
|
||||
// Transfers current flyout blocks to a category if it's the first category
|
||||
// created.
|
||||
this.transferFlyoutBlocksToCategory();
|
||||
|
||||
var isFirstCategory = !this.model.hasElements();
|
||||
// Copy the standard category in the model.
|
||||
@@ -589,7 +623,7 @@ WorkspaceFactoryController.prototype.loadCategory = function() {
|
||||
this.model.addElementToList(copy);
|
||||
|
||||
// Update the copy in the view.
|
||||
var tab = this.view.addCategoryRow(copy.name, copy.id, isFirstCategory);
|
||||
var tab = this.view.addCategoryRow(copy.name, copy.id);
|
||||
this.addClickToSwitch(tab, copy.id);
|
||||
// Color the category tab in the view.
|
||||
if (copy.color) {
|
||||
@@ -604,12 +638,29 @@ WorkspaceFactoryController.prototype.loadCategory = function() {
|
||||
if (isFirstCategory) {
|
||||
// Allow the user to use the default options for injecting the workspace
|
||||
// when there are categories.
|
||||
this.allowToSetDefaultOptions();
|
||||
this.view.setCategoryOptions(this.model.hasElements());
|
||||
this.generateNewOptions();
|
||||
}
|
||||
// Update preview.
|
||||
this.updatePreview();
|
||||
};
|
||||
|
||||
/**
|
||||
* Loads the standard Blockly toolbox into the editing space. Should only
|
||||
* be called when the mode is set to toolbox.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.loadStandardToolbox = function() {
|
||||
this.loadCategoryByName('Logic');
|
||||
this.loadCategoryByName('Loops');
|
||||
this.loadCategoryByName('Math');
|
||||
this.loadCategoryByName('Text');
|
||||
this.loadCategoryByName('Lists');
|
||||
this.loadCategoryByName('Colour');
|
||||
this.addSeparator();
|
||||
this.loadCategoryByName('Variables');
|
||||
this.loadCategoryByName('Functions');
|
||||
}
|
||||
|
||||
/**
|
||||
* Given the name of a category, determines if it's the name of a standard
|
||||
* category (case insensitive).
|
||||
@@ -633,11 +684,9 @@ WorkspaceFactoryController.prototype.isStandardCategoryName = function(name) {
|
||||
* the separator, and updates the preview.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.addSeparator = function() {
|
||||
// Don't allow the user to add a separator if a category has not been created.
|
||||
if (!this.model.hasElements()) {
|
||||
alert('Add a category before adding a separator.');
|
||||
return;
|
||||
}
|
||||
// If adding the first element in the toolbox, transfers the user's blocks
|
||||
// in a flyout to a category.
|
||||
this.transferFlyoutBlocksToCategory();
|
||||
// Create the separator in the model.
|
||||
var separator = new ListElement(ListElement.TYPE_SEPARATOR);
|
||||
this.model.addElementToList(separator);
|
||||
@@ -681,12 +730,32 @@ WorkspaceFactoryController.prototype.importFile = function(file, importMode) {
|
||||
try {
|
||||
var tree = Blockly.Xml.textToDom(reader.result);
|
||||
if (importMode == WorkspaceFactoryController.MODE_TOOLBOX) {
|
||||
// Switch mode and import toolbox XML.
|
||||
// Switch mode.
|
||||
controller.setMode(WorkspaceFactoryController.MODE_TOOLBOX);
|
||||
|
||||
// Confirm that the user wants to override their current toolbox.
|
||||
var hasToolboxElements = controller.model.hasElements() ||
|
||||
controller.getAllBlocks().length > 0;
|
||||
if (hasToolboxElements &&
|
||||
!confirm('Are you sure you want to import? You will lose your '
|
||||
+ 'current toolbox. ')) {
|
||||
return;
|
||||
}
|
||||
// Import toolbox XML.
|
||||
controller.importToolboxFromTree_(tree);
|
||||
|
||||
} else if (importMode == WorkspaceFactoryController.MODE_PRELOAD) {
|
||||
// Switch mode and import pre-loaded workspace XML.
|
||||
// Switch mode.
|
||||
controller.setMode(WorkspaceFactoryController.MODE_PRELOAD);
|
||||
|
||||
// Confirm that the user wants to override their current blocks.
|
||||
if (controller.toolboxWorkspace.getAllBlocks().length > 0 &&
|
||||
!confirm('Are you sure you want to import? You will lose your '
|
||||
+ 'current workspace blocks. ')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Import pre-loaded workspace XML.
|
||||
controller.importPreloadFromTree_(tree);
|
||||
} else {
|
||||
// Throw error if invalid mode.
|
||||
@@ -771,9 +840,11 @@ WorkspaceFactoryController.prototype.importToolboxFromTree_ = function(tree) {
|
||||
(this.model.getSelectedId()), this.model.getSelected());
|
||||
|
||||
this.saveStateFromWorkspace();
|
||||
// Allow the user to set default configuration options for a single flyout
|
||||
// or multiple categories.
|
||||
this.allowToSetDefaultOptions();
|
||||
|
||||
// Set default configuration options for a single flyout or multiple
|
||||
// categories.
|
||||
this.view.setCategoryOptions(this.model.hasElements());
|
||||
this.generateNewOptions();
|
||||
|
||||
this.updatePreview();
|
||||
};
|
||||
@@ -828,6 +899,10 @@ WorkspaceFactoryController.prototype.importPreloadFromTree_ = function(tree) {
|
||||
* "Clear" button.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.clearAll = function() {
|
||||
if (!confirm('Are you sure you want to clear all of your work in Workspace' +
|
||||
' Factory?')) {
|
||||
return;
|
||||
}
|
||||
var hasCategories = this.model.hasElements();
|
||||
this.model.clearToolboxList();
|
||||
this.view.clearToolboxTabs();
|
||||
@@ -837,9 +912,10 @@ WorkspaceFactoryController.prototype.clearAll = function() {
|
||||
this.toolboxWorkspace.clear();
|
||||
this.toolboxWorkspace.clearUndo();
|
||||
this.saveStateFromWorkspace();
|
||||
if (hasCategories) {
|
||||
this.allowToSetDefaultOptions();
|
||||
}
|
||||
this.hasUnsavedToolboxChanges = false;
|
||||
this.hasUnsavedPreloadChanges = false;
|
||||
this.view.setCategoryOptions(this.model.hasElements());
|
||||
this.generateNewOptions();
|
||||
this.updatePreview();
|
||||
};
|
||||
|
||||
@@ -881,7 +957,7 @@ WorkspaceFactoryController.prototype.addShadowForBlockAndChildren_ =
|
||||
this.view.markShadowBlock(block);
|
||||
this.model.addShadowBlock(block.id);
|
||||
|
||||
if (this.hasVariableField(block)) {
|
||||
if (FactoryUtils.hasVariableField(block)) {
|
||||
block.setWarningText('Cannot make variable blocks shadow blocks.');
|
||||
}
|
||||
|
||||
@@ -892,26 +968,6 @@ WorkspaceFactoryController.prototype.addShadowForBlockAndChildren_ =
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if a block has a variable field. Blocks with variable fields cannot
|
||||
* be shadow blocks.
|
||||
*
|
||||
* @param {Blockly.Block} block The block to check if a variable field exists.
|
||||
* @return {boolean} True if the block has a variable field, false otherwise.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.hasVariableField = function(block) {
|
||||
if (!block) {
|
||||
return false;
|
||||
}
|
||||
for (var i = 0; i < block.inputList.length; i++) {
|
||||
if (block.inputList[i].fieldRow.length > 0 &&
|
||||
block.inputList[i].fieldRow[0].name == 'VAR') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* If the currently selected block is a user-generated shadow block, this
|
||||
* function makes it a normal block again, removing it from the list of
|
||||
@@ -956,6 +1012,14 @@ WorkspaceFactoryController.prototype.convertShadowBlocks = function() {
|
||||
for (var i = 0, block; block = blocks[i]; i++) {
|
||||
if (block.isShadow()) {
|
||||
block.setShadow(false);
|
||||
// Delete the shadow DOM attached to the block so that the shadow block
|
||||
// does not respawn. Dependent on implementation details.
|
||||
var parentConnection = block.outputConnection ?
|
||||
block.outputConnection.targetConnection :
|
||||
block.previousConnection.targetConnection;
|
||||
if (parentConnection) {
|
||||
parentConnection.setShadowDom(null);
|
||||
}
|
||||
this.model.addShadowBlock(block.id);
|
||||
this.view.markShadowBlock(block);
|
||||
}
|
||||
@@ -1035,35 +1099,27 @@ WorkspaceFactoryController.prototype.setStandardOptionsAndUpdate = function() {
|
||||
this.generateNewOptions();
|
||||
};
|
||||
|
||||
/**
|
||||
* Asks the user if they want to use default configuration options specific
|
||||
* to categories or a single flyout of blocks. If desired, makes the necessary
|
||||
* changes to the options object depending on if there are categories and then
|
||||
* updates the preview workspace. Only updates category/flyout specific
|
||||
* options, not the base default options that are set regardless of if
|
||||
* categories or a single flyout are used.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.allowToSetDefaultOptions = function() {
|
||||
if (!this.model.hasElements() && !confirm('Do you want to use the default ' +
|
||||
'workspace configuration options for injecting a workspace without ' +
|
||||
'categories?')) {
|
||||
return;
|
||||
} else if (this.model.hasElements() && !confirm('Do you want to use the ' +
|
||||
'default workspace configuration options for injecting a workspace ' +
|
||||
'with categories?')) {
|
||||
return;
|
||||
}
|
||||
this.view.setCategoryOptions(this.model.hasElements());
|
||||
this.generateNewOptions();
|
||||
};
|
||||
|
||||
/**
|
||||
* Generates a new options object for injecting a Blockly workspace based
|
||||
* on user input. Should be called every time a change has been made to
|
||||
* an input field. Updates the model and reinjects the preview workspace.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.generateNewOptions = function() {
|
||||
var optionsObj = new Object(null);
|
||||
this.model.setOptions(this.readOptions_());
|
||||
|
||||
this.reinjectPreview(Blockly.Options.parseToolboxTree
|
||||
(this.generator.generateToolboxXml()));
|
||||
};
|
||||
|
||||
/**
|
||||
* Generates a new options object for injecting a Blockly workspace based on
|
||||
* user input.
|
||||
* @private
|
||||
*
|
||||
* @return {!Object} Blockly injection options object.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.readOptions_ = function() {
|
||||
var optionsObj = Object.create(null);
|
||||
|
||||
// Add all standard options to the options object.
|
||||
// Use parse int to get numbers from value inputs.
|
||||
@@ -1074,8 +1130,14 @@ WorkspaceFactoryController.prototype.generateNewOptions = function() {
|
||||
optionsObj['css'] = document.getElementById('option_css_checkbox').checked;
|
||||
optionsObj['disable'] =
|
||||
document.getElementById('option_disable_checkbox').checked;
|
||||
optionsObj['maxBlocks'] =
|
||||
parseInt(document.getElementById('option_maxBlocks_text').value);
|
||||
if (document.getElementById('option_infiniteBlocks_checkbox').checked) {
|
||||
optionsObj['maxBlocks'] = Infinity;
|
||||
} else {
|
||||
var maxBlocksValue =
|
||||
document.getElementById('option_maxBlocks_number').value;
|
||||
optionsObj['maxBlocks'] = typeof maxBlocksValue == 'string' ?
|
||||
parseInt(maxBlocksValue) : maxBlocksValue;
|
||||
}
|
||||
optionsObj['media'] = document.getElementById('option_media_text').value;
|
||||
optionsObj['readOnly'] =
|
||||
document.getElementById('option_readOnly_checkbox').checked;
|
||||
@@ -1084,16 +1146,21 @@ WorkspaceFactoryController.prototype.generateNewOptions = function() {
|
||||
document.getElementById('option_scrollbars_checkbox').checked;
|
||||
optionsObj['sounds'] =
|
||||
document.getElementById('option_sounds_checkbox').checked;
|
||||
optionsObj['trashcan'] =
|
||||
document.getElementById('option_trashcan_checkbox').checked;
|
||||
if (!optionsObj['readOnly']) {
|
||||
optionsObj['trashcan'] =
|
||||
document.getElementById('option_trashcan_checkbox').checked;
|
||||
}
|
||||
|
||||
// If using a grid, add all grid options.
|
||||
if (document.getElementById('option_grid_checkbox').checked) {
|
||||
var grid = new Object(null);
|
||||
grid['spacing'] =
|
||||
parseInt(document.getElementById('gridOption_spacing_text').value);
|
||||
grid['length'] =
|
||||
parseInt(document.getElementById('gridOption_length_text').value);
|
||||
var grid = Object.create(null);
|
||||
var spacingValue =
|
||||
document.getElementById('gridOption_spacing_number').value;
|
||||
grid['spacing'] = typeof spacingValue == 'string' ?
|
||||
parseInt(spacingValue) : spacingValue;
|
||||
var lengthValue = document.getElementById('gridOption_length_number').value;
|
||||
grid['length'] = typeof lengthValue == 'string' ?
|
||||
parseInt(lengthValue) : lengthValue;
|
||||
grid['colour'] = document.getElementById('gridOption_colour_text').value;
|
||||
grid['snap'] = document.getElementById('gridOption_snap_checkbox').checked;
|
||||
optionsObj['grid'] = grid;
|
||||
@@ -1101,26 +1168,31 @@ WorkspaceFactoryController.prototype.generateNewOptions = function() {
|
||||
|
||||
// If using zoom, add all zoom options.
|
||||
if (document.getElementById('option_zoom_checkbox').checked) {
|
||||
var zoom = new Object(null);
|
||||
var zoom = Object.create(null);
|
||||
zoom['controls'] =
|
||||
document.getElementById('zoomOption_controls_checkbox').checked;
|
||||
zoom['wheel'] =
|
||||
document.getElementById('zoomOption_wheel_checkbox').checked;
|
||||
zoom['startScale'] =
|
||||
parseInt(document.getElementById('zoomOption_startScale_text').value);
|
||||
zoom['maxScale'] =
|
||||
parseInt(document.getElementById('zoomOption_maxScale_text').value);
|
||||
zoom['minScale'] =
|
||||
parseInt(document.getElementById('zoomOption_minScale_text').value);
|
||||
zoom['scaleSpeed'] =
|
||||
parseInt(document.getElementById('zoomOption_scaleSpeed_text').value);
|
||||
var startScaleValue =
|
||||
document.getElementById('zoomOption_startScale_number').value;
|
||||
zoom['startScale'] = typeof startScaleValue == 'string' ?
|
||||
parseFloat(startScaleValue) : startScaleValue;
|
||||
var maxScaleValue =
|
||||
document.getElementById('zoomOption_maxScale_number').value;
|
||||
zoom['maxcale'] = typeof maxScaleValue == 'string' ?
|
||||
parseFloat(maxScaleValue) : maxScaleValue;
|
||||
var minScaleValue =
|
||||
document.getElementById('zoomOption_minScale_number').value;
|
||||
zoom['minScale'] = typeof minScaleValue == 'string' ?
|
||||
parseFloat(minScaleValue) : minScaleValue;
|
||||
var scaleSpeedValue =
|
||||
document.getElementById('zoomOption_scaleSpeed_number').value;
|
||||
zoom['startScale'] = typeof startScaleValue == 'string' ?
|
||||
parseFloat(scaleSpeedValue) : scaleSpeedValue;
|
||||
optionsObj['zoom'] = zoom;
|
||||
}
|
||||
|
||||
this.model.setOptions(optionsObj);
|
||||
|
||||
this.reinjectPreview(Blockly.Options.parseToolboxTree
|
||||
(this.generator.generateToolboxXml()));
|
||||
return optionsObj;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1135,7 +1207,7 @@ WorkspaceFactoryController.prototype.generateNewOptions = function() {
|
||||
WorkspaceFactoryController.prototype.importBlocks =
|
||||
function(file, format) {
|
||||
// Generate category name from file name.
|
||||
var categoryName = file.name + ' blocks';
|
||||
var categoryName = file.name;
|
||||
|
||||
var controller = this;
|
||||
var reader = new FileReader();
|
||||
@@ -1144,9 +1216,19 @@ WorkspaceFactoryController.prototype.importBlocks =
|
||||
reader.onload = function() {
|
||||
try {
|
||||
// Define blocks using block types from file.
|
||||
var blockTypes = FactoryUtils.defineAndGetBlockTypes(reader.result, format);
|
||||
var blocks = controller.generator.getDefinedBlocks(blockTypes);
|
||||
var blockTypes = FactoryUtils.defineAndGetBlockTypes(reader.result,
|
||||
format);
|
||||
|
||||
// If an imported block type is already defined, check if the user wants
|
||||
// to override the current block definition.
|
||||
if (controller.model.hasDefinedBlockTypes(blockTypes) &&
|
||||
!confirm('An imported block uses the same name as a block '
|
||||
+ 'already in your toolbox. Are you sure you want to override the '
|
||||
+ 'currently defined block?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var blocks = controller.generator.getDefinedBlocks(blockTypes);
|
||||
// Generate category XML and append to toolbox.
|
||||
var categoryXml = FactoryUtils.generateCategoryXml(blocks, categoryName);
|
||||
// Get random color for category between 0 and 360. Gives each imported
|
||||
@@ -1156,9 +1238,10 @@ WorkspaceFactoryController.prototype.importBlocks =
|
||||
controller.toolbox.appendChild(categoryXml);
|
||||
controller.toolboxWorkspace.updateToolbox(controller.toolbox);
|
||||
// Update imported block types.
|
||||
this.model.addImportedBlocks(blockTypes);
|
||||
controller.model.addImportedBlockTypes(blockTypes);
|
||||
// Reload current category to possibly reflect any newly defined blocks.
|
||||
this.clearAndLoadXml_(Blockly.Xml.workspaceToDom(this.toolboxWorkspace));
|
||||
controller.clearAndLoadXml_
|
||||
(Blockly.Xml.workspaceToDom(controller.toolboxWorkspace));
|
||||
} catch (e) {
|
||||
alert('Cannot read blocks from file.');
|
||||
window.console.log(e);
|
||||
@@ -1187,6 +1270,7 @@ WorkspaceFactoryController.prototype.setBlockLibCategory =
|
||||
|
||||
// Update the toolbox and toolboxWorkspace.
|
||||
this.toolbox.replaceChild(categoryXml, blockLibCategory);
|
||||
this.toolboxWorkspace.toolbox_.clearSelection();
|
||||
this.toolboxWorkspace.updateToolbox(this.toolbox);
|
||||
|
||||
// Update the block library types.
|
||||
@@ -1231,3 +1315,30 @@ WorkspaceFactoryController.prototype.warnForUndefinedBlocks_ = function() {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* Determines if a standard variable category is in the custom toolbox.
|
||||
*
|
||||
* @return {boolean} True if a variables category is in use, false otherwise.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.hasVariablesCategory = function() {
|
||||
return this.model.hasVariables();
|
||||
};
|
||||
|
||||
/**
|
||||
* Determines if a standard procedures category is in the custom toolbox.
|
||||
*
|
||||
* @return {boolean} True if a procedures category is in use, false otherwise.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.hasProceduresCategory = function() {
|
||||
return this.model.hasProcedures();
|
||||
};
|
||||
|
||||
/**
|
||||
* Determines if there are any unsaved changes in workspace factory.
|
||||
*
|
||||
* @return {boolean} True if there are unsaved changes, false otherwise.
|
||||
*/
|
||||
WorkspaceFactoryController.prototype.hasUnsavedChanges = function() {
|
||||
return this.hasUnsavedToolboxChanges || this.hasUnsavedPreloadChanges;
|
||||
};
|
||||
|
||||
@@ -118,6 +118,8 @@ WorkspaceFactoryGenerator.prototype.generateToolboxXml = function() {
|
||||
* it includes XY and ID attributes). Uses a workspace and converts user
|
||||
* generated shadow blocks to actual shadow blocks.
|
||||
*
|
||||
* @return {!Element} XML element representing toolbox or flyout corresponding
|
||||
* to toolbox workspace.
|
||||
*/
|
||||
WorkspaceFactoryGenerator.prototype.generateWorkspaceXml = function() {
|
||||
// Load workspace XML to hidden workspace with user-generated shadow blocks
|
||||
@@ -128,11 +130,61 @@ WorkspaceFactoryGenerator.prototype.generateWorkspaceXml = function() {
|
||||
|
||||
// Generate XML and set attributes.
|
||||
var generatedXml = Blockly.Xml.workspaceToDom(this.hiddenWorkspace);
|
||||
generatedXml.setAttribute('id', 'preload_blocks');
|
||||
generatedXml.setAttribute('id', 'workspaceBlocks');
|
||||
generatedXml.setAttribute('style', 'display:none');
|
||||
return generatedXml;
|
||||
};
|
||||
|
||||
/**
|
||||
* Generates a string representation of the options object for injecting the
|
||||
* workspace and starter code.
|
||||
*
|
||||
* @return {!string} String representation of starter code for injecting.
|
||||
*/
|
||||
WorkspaceFactoryGenerator.prototype.generateInjectString = function() {
|
||||
|
||||
var addAttributes = function(obj, tabChar) {
|
||||
if (!obj) {
|
||||
return '{}\n';
|
||||
}
|
||||
var str = '';
|
||||
for (var key in obj) {
|
||||
if (key == 'grid' || key == 'zoom') {
|
||||
var temp = tabChar + key + ' : {\n' + addAttributes(obj[key],
|
||||
tabChar + '\t') + tabChar + '}, \n';
|
||||
} else if (typeof obj[key] == 'string') {
|
||||
var temp = tabChar + key + ' : \'' + obj[key] + '\', \n';
|
||||
} else {
|
||||
var temp = tabChar + key + ' : ' + obj[key] + ', \n';
|
||||
}
|
||||
str += temp;
|
||||
}
|
||||
var lastCommaIndex = str.lastIndexOf(',');
|
||||
str = str.slice(0, lastCommaIndex) + '\n';
|
||||
return str;
|
||||
};
|
||||
|
||||
var attributes = addAttributes(this.model.options, '\t');
|
||||
if (!this.model.options['readOnly']) {
|
||||
attributes = '\ttoolbox : toolbox, \n' +
|
||||
attributes;
|
||||
}
|
||||
var finalStr = '/* TODO: Change toolbox XML ID if necessary. Can export ' +
|
||||
'toolbox XML from Workspace Factory. */\n' +
|
||||
'var toolbox = document.getElementById("toolbox");\n\n';
|
||||
finalStr += 'var options = { \n' + attributes + '};';
|
||||
finalStr += '\n\n/* Inject your workspace */ \nvar workspace = Blockly.' +
|
||||
'inject(/* TODO: Add ID of div to inject Blockly into */, options);';
|
||||
finalStr += '\n\n/* Load Workspace Blocks from XML to workspace. ' +
|
||||
'Remove all code below if no blocks to load */\n\n' +
|
||||
'/* TODO: Change workspace blocks XML ID if necessary. Can export' +
|
||||
' workspace blocks XML from Workspace Factory. */\n' +
|
||||
'var workspaceBlocks = document.getElementById("workspaceBlocks"); \n\n' +
|
||||
'/* Load blocks to workspace. */\n' +
|
||||
'Blockly.Xml.domToWorkspace(workspace, workspaceBlocks);';
|
||||
return finalStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the given XML to the hidden workspace and sets any user-generated
|
||||
* shadow blocks to be actual shadow blocks.
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
* @author Emma Dauterman (evd2014)
|
||||
*/
|
||||
|
||||
goog.require('FactoryUtils');
|
||||
|
||||
/**
|
||||
* Namespace for workspace factory initialization methods.
|
||||
* @namespace
|
||||
@@ -45,7 +47,6 @@ WorkspaceFactoryInit.initWorkspaceFactory = function(controller) {
|
||||
document.getElementById('button_up').disabled = true;
|
||||
document.getElementById('button_down').disabled = true;
|
||||
document.getElementById('button_editCategory').disabled = true;
|
||||
document.getElementById('button_editShadow').disabled = true;
|
||||
|
||||
this.initColorPicker_(controller);
|
||||
this.addWorkspaceFactoryEventListeners_(controller);
|
||||
@@ -192,6 +193,13 @@ WorkspaceFactoryInit.assignWorkspaceFactoryClickHandlers_ =
|
||||
document.getElementById('dropdownDiv_add').classList.remove("show");
|
||||
});
|
||||
|
||||
document.getElementById('dropdown_loadStandardToolbox').addEventListener
|
||||
('click',
|
||||
function() {
|
||||
controller.loadStandardToolbox();
|
||||
document.getElementById('dropdownDiv_add').classList.remove("show");
|
||||
});
|
||||
|
||||
document.getElementById('button_remove').addEventListener
|
||||
('click',
|
||||
function() {
|
||||
@@ -215,16 +223,16 @@ WorkspaceFactoryInit.assignWorkspaceFactoryClickHandlers_ =
|
||||
document.getElementById('dropdown_exportOptions').addEventListener
|
||||
('click',
|
||||
function() {
|
||||
controller.exportOptionsFile();
|
||||
controller.exportInjectFile();
|
||||
document.getElementById('dropdownDiv_export').classList.remove("show");
|
||||
});
|
||||
|
||||
document.getElementById('dropdown_exportAll').addEventListener
|
||||
('click',
|
||||
function() {
|
||||
controller.exportInjectFile();
|
||||
controller.exportXmlFile(WorkspaceFactoryController.MODE_TOOLBOX);
|
||||
controller.exportXmlFile(WorkspaceFactoryController.MODE_PRELOAD);
|
||||
controller.exportOptionsFile();
|
||||
document.getElementById('dropdownDiv_export').classList.remove("show");
|
||||
});
|
||||
|
||||
@@ -256,34 +264,6 @@ WorkspaceFactoryInit.assignWorkspaceFactoryClickHandlers_ =
|
||||
toggle("show");
|
||||
});
|
||||
|
||||
document.getElementById('button_editShadow').addEventListener
|
||||
('click',
|
||||
function() {
|
||||
if (Blockly.selected) {
|
||||
// Can only edit blocks when a block is selected.
|
||||
|
||||
if (!controller.isUserGenShadowBlock(Blockly.selected.id) &&
|
||||
Blockly.selected.getSurroundParent() != null) {
|
||||
// If a block is selected that could be a valid shadow block (not a
|
||||
// shadow block, has a surrounding parent), let the user make it a
|
||||
// shadow block. Use toggle instead of add so that the user can
|
||||
// click the button again to make the dropdown disappear without
|
||||
// clicking one of the options.
|
||||
document.getElementById('dropdownDiv_editShadowRemove').classList.
|
||||
remove("show");
|
||||
document.getElementById('dropdownDiv_editShadowAdd').classList.
|
||||
toggle("show");
|
||||
} else {
|
||||
// If the block is a shadow block, let the user make it a normal
|
||||
// block.
|
||||
document.getElementById('dropdownDiv_editShadowAdd').classList.
|
||||
remove("show");
|
||||
document.getElementById('dropdownDiv_editShadowRemove').classList.
|
||||
toggle("show");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('dropdown_name').addEventListener
|
||||
('click',
|
||||
function() {
|
||||
@@ -352,24 +332,25 @@ document.getElementById('button_importBlocks').addEventListener
|
||||
controller.clearAll();
|
||||
});
|
||||
|
||||
document.getElementById('dropdown_addShadow').addEventListener
|
||||
document.getElementById('button_addShadow').addEventListener
|
||||
('click',
|
||||
function() {
|
||||
controller.addShadow();
|
||||
document.getElementById('dropdownDiv_editShadowAdd').classList.
|
||||
remove("show");
|
||||
WorkspaceFactoryInit.displayAddShadow_(false);
|
||||
WorkspaceFactoryInit.displayRemoveShadow_(true);
|
||||
});
|
||||
|
||||
document.getElementById('dropdown_removeShadow').addEventListener
|
||||
document.getElementById('button_removeShadow').addEventListener
|
||||
('click',
|
||||
function() {
|
||||
controller.removeShadow();
|
||||
document.getElementById('dropdownDiv_editShadowRemove').classList.
|
||||
remove("show");
|
||||
WorkspaceFactoryInit.displayAddShadow_(true);
|
||||
WorkspaceFactoryInit.displayRemoveShadow_(false);
|
||||
|
||||
// Disable shadow editing button if turning invalid shadow block back
|
||||
// to normal block.
|
||||
if (!Blockly.selected.getSurroundParent()) {
|
||||
document.getElementById('button_editShadow').disabled = true;
|
||||
document.getElementById('button_addShadow').disabled = true;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -377,6 +358,11 @@ document.getElementById('button_importBlocks').addEventListener
|
||||
('click', function() {
|
||||
controller.setStandardOptionsAndUpdate();
|
||||
});
|
||||
|
||||
document.getElementById('button_optionsHelp').addEventListener
|
||||
('click', function() {
|
||||
open('https://developers.google.com/blockly/guides/get-started/web');
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -435,6 +421,18 @@ WorkspaceFactoryInit.addWorkspaceFactoryEventListeners_ = function(controller) {
|
||||
e.element == 'selected')) {
|
||||
var selected = Blockly.selected;
|
||||
|
||||
// Show shadow button if a block is selected. Show "Add Shadow" if
|
||||
// a block is not a shadow block, show "Remove Shadow" if it is a
|
||||
// shadow block.
|
||||
if (selected) {
|
||||
var isShadow = controller.isUserGenShadowBlock(selected.id);
|
||||
WorkspaceFactoryInit.displayAddShadow_(!isShadow);
|
||||
WorkspaceFactoryInit.displayRemoveShadow_(isShadow);
|
||||
} else {
|
||||
WorkspaceFactoryInit.displayAddShadow_(false);
|
||||
WorkspaceFactoryInit.displayRemoveShadow_(false);
|
||||
}
|
||||
|
||||
if (selected != null && selected.getSurroundParent() != null &&
|
||||
!controller.isUserGenShadowBlock(selected.getSurroundParent().id)) {
|
||||
// Selected block is a valid shadow block or could be a valid shadow
|
||||
@@ -442,8 +440,10 @@ WorkspaceFactoryInit.addWorkspaceFactoryEventListeners_ = function(controller) {
|
||||
|
||||
// Enable block editing and remove warnings if the block is not a
|
||||
// variable user-generated shadow block.
|
||||
document.getElementById('button_editShadow').disabled = false;
|
||||
if (!controller.hasVariableField(selected) &&
|
||||
document.getElementById('button_addShadow').disabled = false;
|
||||
document.getElementById('button_removeShadow').disabled = false;
|
||||
|
||||
if (!FactoryUtils.hasVariableField(selected) &&
|
||||
controller.isDefinedBlock(selected)) {
|
||||
selected.setWarningText(null);
|
||||
}
|
||||
@@ -457,9 +457,9 @@ WorkspaceFactoryInit.addWorkspaceFactoryEventListeners_ = function(controller) {
|
||||
|
||||
if (!controller.isUserGenShadowBlock(selected.id)) {
|
||||
// Warn if a non-shadow block is nested inside a shadow block.
|
||||
selected.setWarningText('Only shadow blocks can be nested inside '
|
||||
selected.setWarningText('Only shadow blocks can be nested inside\n'
|
||||
+ 'other shadow blocks.');
|
||||
} else if (!controller.hasVariableField(selected)) {
|
||||
} else if (!FactoryUtils.hasVariableField(selected)) {
|
||||
// Warn if a shadow block is invalid only if not replacing
|
||||
// warning for variables.
|
||||
selected.setWarningText('Shadow blocks must be nested inside other'
|
||||
@@ -468,25 +468,23 @@ WorkspaceFactoryInit.addWorkspaceFactoryEventListeners_ = function(controller) {
|
||||
|
||||
// Give editing options so that the user can make an invalid shadow
|
||||
// block a normal block.
|
||||
document.getElementById('button_editShadow').disabled = false;
|
||||
document.getElementById('button_removeShadow').disabled = false;
|
||||
document.getElementById('button_addShadow').disabled = true;
|
||||
} else {
|
||||
// Selected block does not break any shadow block rules, but cannot
|
||||
// be a shadow block.
|
||||
|
||||
// Remove possible 'invalid shadow block placement' warning.
|
||||
if (selected != null && controller.isDefinedBlock(selected) &&
|
||||
(!controller.hasVariableField(selected) ||
|
||||
(!FactoryUtils.hasVariableField(selected) ||
|
||||
!controller.isUserGenShadowBlock(selected.id))) {
|
||||
selected.setWarningText(null);
|
||||
}
|
||||
|
||||
// No block selected that is a shadow block or could be a valid shadow
|
||||
// block. Disable block editing.
|
||||
document.getElementById('button_editShadow').disabled = true;
|
||||
document.getElementById('dropdownDiv_editShadowRemove').classList.
|
||||
remove("show");
|
||||
document.getElementById('dropdownDiv_editShadowAdd').classList.
|
||||
remove("show");
|
||||
document.getElementById('button_addShadow').disabled = true;
|
||||
document.getElementById('button_removeShadow').disabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -495,10 +493,80 @@ WorkspaceFactoryInit.addWorkspaceFactoryEventListeners_ = function(controller) {
|
||||
// shadow blocks.
|
||||
if (e.type == Blockly.Events.CREATE) {
|
||||
controller.convertShadowBlocks();
|
||||
|
||||
// Let the user create a Variables or Functions category if they use
|
||||
// blocks from either category.
|
||||
|
||||
// Get all children of a block and add them to childList.
|
||||
var getAllChildren = function(block, childList) {
|
||||
childList.push(block);
|
||||
var children = block.getChildren();
|
||||
for (var i = 0, child; child = children[i]; i++) {
|
||||
getAllChildren(child, childList);
|
||||
}
|
||||
};
|
||||
|
||||
var newBaseBlock = controller.toolboxWorkspace.getBlockById(e.blockId);
|
||||
var allNewBlocks = [];
|
||||
getAllChildren(newBaseBlock, allNewBlocks);
|
||||
var variableCreated = false;
|
||||
var procedureCreated = false;
|
||||
|
||||
// Check if the newly created block or any of its children are variable
|
||||
// or procedure blocks.
|
||||
for (var i = 0, block; block = allNewBlocks[i]; i++) {
|
||||
if (FactoryUtils.hasVariableField(block)) {
|
||||
variableCreated = true;
|
||||
} else if (FactoryUtils.isProcedureBlock(block)) {
|
||||
procedureCreated = true;
|
||||
}
|
||||
}
|
||||
|
||||
// If any of the newly created blocks are variable or procedure blocks,
|
||||
// prompt the user to create the corresponding standard category.
|
||||
if (variableCreated && !controller.hasVariablesCategory()) {
|
||||
if (confirm('Your new block has a variables field. To use this block '
|
||||
+ 'fully, you will need a Variables category. Do you want to add '
|
||||
+ 'a Variables category to your custom toolbox?')) {
|
||||
controller.setMode(WorkspaceFactoryController.MODE_TOOLBOX);
|
||||
controller.loadCategoryByName('variables');
|
||||
}
|
||||
}
|
||||
|
||||
if (procedureCreated && !controller.hasProceduresCategory()) {
|
||||
if (confirm('Your new block is a function block. To use this block '
|
||||
+ 'fully, you will need a Functions category. Do you want to add '
|
||||
+ 'a Functions category to your custom toolbox?')) {
|
||||
controller.setMode(WorkspaceFactoryController.MODE_TOOLBOX);
|
||||
controller.loadCategoryByName('functions');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Display or hide the add shadow button.
|
||||
*
|
||||
* @param {boolean} show True if the add shadow button should be shown, false
|
||||
* otherwise.
|
||||
*/
|
||||
WorkspaceFactoryInit.displayAddShadow_ = function(show) {
|
||||
document.getElementById('button_addShadow').style.display =
|
||||
show ? 'inline-block' : 'none';
|
||||
};
|
||||
|
||||
/**
|
||||
* Display or hide the remove shadow button.
|
||||
*
|
||||
* @param {boolean} show True if the remove shadow button should be shown, false
|
||||
* otherwise.
|
||||
*/
|
||||
WorkspaceFactoryInit.displayRemoveShadow_ = function(show) {
|
||||
document.getElementById('button_removeShadow').style.display =
|
||||
show ? 'inline-block' : 'none';
|
||||
}
|
||||
|
||||
/**
|
||||
* Add listeners for workspace factory options input elements.
|
||||
* @private
|
||||
@@ -525,6 +593,20 @@ WorkspaceFactoryInit.addWorkspaceFactoryOptionsListeners_ =
|
||||
'block' : 'none';
|
||||
});
|
||||
|
||||
document.getElementById('option_readOnly_checkbox').addEventListener('change',
|
||||
function(e) {
|
||||
document.getElementById('trashcan_option').style.display =
|
||||
document.getElementById('option_readOnly_checkbox').checked ?
|
||||
'none' : 'block';
|
||||
});
|
||||
|
||||
document.getElementById('option_infiniteBlocks_checkbox').addEventListener('change',
|
||||
function(e) {
|
||||
document.getElementById('maxBlockNumber_option').style.display =
|
||||
document.getElementById('option_infiniteBlocks_checkbox').checked ?
|
||||
'none' : 'block';
|
||||
});
|
||||
|
||||
// Generate new options every time an options input is updated.
|
||||
var optionsElements = document.getElementsByClassName('optionsInput');
|
||||
for (var i = 0; i < optionsElements.length; i++) {
|
||||
|
||||
@@ -94,7 +94,7 @@ WorkspaceFactoryModel.prototype.hasVariables = function() {
|
||||
* false otherwise.
|
||||
*/
|
||||
WorkspaceFactoryModel.prototype.hasProcedures = function() {
|
||||
return this.hasFunctionCategory;
|
||||
return this.hasProcedureCategory;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -420,16 +420,6 @@ WorkspaceFactoryModel.prototype.setOptions = function(options) {
|
||||
this.options = options;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets an attribute of the options object.
|
||||
*
|
||||
* @param {!string} name Name of the attribute to add.
|
||||
* @param {Object} value The value of the attribute to add.
|
||||
*/
|
||||
WorkspaceFactoryModel.prototype.setOptionsAttribute = function(name, value) {
|
||||
this.options[name] = value;
|
||||
};
|
||||
|
||||
/*
|
||||
* Returns an array of all the block types currently being used in the toolbox
|
||||
* and the pre-loaded blocks. No duplicates.
|
||||
@@ -505,6 +495,22 @@ WorkspaceFactoryModel.prototype.isDefinedBlockType = function(blockType) {
|
||||
var isLibBlock = this.libBlockTypes.indexOf(blockType) != -1;
|
||||
var isImportedBlock = this.importedBlockTypes.indexOf(blockType) != -1;
|
||||
return (isStandardBlock || isLibBlock || isImportedBlock);
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if any of the block types are already defined.
|
||||
*
|
||||
* @param {!Array<!string>} blockTypes Array of block types.
|
||||
* @return {boolean} True if a block type in the array is already defined,
|
||||
* false if none of the blocks are already defined.
|
||||
*/
|
||||
WorkspaceFactoryModel.prototype.hasDefinedBlockTypes = function(blockTypes) {
|
||||
for (var i = 0, blockType; blockType = blockTypes[i]; i++) {
|
||||
if (this.isDefinedBlockType(blockType)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
* @author Emma Dauterman (edauterman)
|
||||
*/
|
||||
|
||||
goog.require('FactoryUtils');
|
||||
|
||||
/**
|
||||
* Class for a WorkspaceFactoryView
|
||||
* @constructor
|
||||
@@ -43,19 +45,18 @@ WorkspaceFactoryView = function() {
|
||||
*
|
||||
* @param {!string} name The name of the category being created
|
||||
* @param {!string} id ID of category being created
|
||||
* @param {boolean} firstCategory true if it's the first category, false
|
||||
* otherwise
|
||||
* @return {!Element} DOM element created for tab
|
||||
*/
|
||||
WorkspaceFactoryView.prototype.addCategoryRow =
|
||||
function(name, id, firstCategory) {
|
||||
WorkspaceFactoryView.prototype.addCategoryRow = function(name, id) {
|
||||
var table = document.getElementById('categoryTable');
|
||||
var count = table.rows.length;
|
||||
|
||||
// Delete help label and enable category buttons if it's the first category.
|
||||
if (firstCategory) {
|
||||
if (count == 0) {
|
||||
document.getElementById('categoryHeader').textContent = 'Your Categories:';
|
||||
}
|
||||
|
||||
// Create tab.
|
||||
var count = table.rows.length;
|
||||
var row = table.insertRow(count);
|
||||
var nextEntry = row.insertCell(0);
|
||||
// Configure tab.
|
||||
@@ -253,9 +254,13 @@ WorkspaceFactoryView.prototype.setBorderColor = function(id, color) {
|
||||
* @param {!Element} The td DOM element representing the separator.
|
||||
*/
|
||||
WorkspaceFactoryView.prototype.addSeparatorTab = function(id) {
|
||||
// Create separator.
|
||||
var table = document.getElementById('categoryTable');
|
||||
var count = table.rows.length;
|
||||
|
||||
if (count == 0) {
|
||||
document.getElementById('categoryHeader').textContent = 'Your Categories:';
|
||||
}
|
||||
// Create separator.
|
||||
var row = table.insertRow(count);
|
||||
var nextEntry = row.insertCell(0);
|
||||
// Configure separator.
|
||||
@@ -275,7 +280,14 @@ WorkspaceFactoryView.prototype.addSeparatorTab = function(id) {
|
||||
* if it should be enabled.
|
||||
*/
|
||||
WorkspaceFactoryView.prototype.disableWorkspace = function(disable) {
|
||||
document.getElementById('disable_div').style.zIndex = disable ? 1 : -1;
|
||||
if (disable) {
|
||||
document.getElementById('toolbox_section').className = 'disabled';
|
||||
document.getElementById('toolbox_blocks').style.pointerEvents = 'none';
|
||||
} else {
|
||||
document.getElementById('toolbox_section').className = '';
|
||||
document.getElementById('toolbox_blocks').style.pointerEvents = 'auto';
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -334,6 +346,10 @@ WorkspaceFactoryView.prototype.markShadowBlock = function(block) {
|
||||
block.setWarningText('Shadow blocks must be nested inside' +
|
||||
' other blocks to be displayed.');
|
||||
}
|
||||
|
||||
if (FactoryUtils.hasVariableField(block)) {
|
||||
block.setWarningText('Cannot make variable blocks shadow blocks.');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -391,7 +407,8 @@ WorkspaceFactoryView.prototype.updateHelpText = function(mode) {
|
||||
WorkspaceFactoryView.prototype.setBaseOptions = function() {
|
||||
// Set basic options.
|
||||
document.getElementById('option_css_checkbox').checked = true;
|
||||
document.getElementById('option_maxBlocks_text').value = Infinity;
|
||||
document.getElementById('option_infiniteBlocks_checkbox').checked = true;
|
||||
document.getElementById('option_maxBlocks_number').value = 100;
|
||||
document.getElementById('option_media_text').value =
|
||||
'https://blockly-demo.appspot.com/static/media/';
|
||||
document.getElementById('option_readOnly_checkbox').checked = false;
|
||||
@@ -405,18 +422,18 @@ WorkspaceFactoryView.prototype.setBaseOptions = function() {
|
||||
document.getElementById('zoom_options').style.display = 'none';
|
||||
|
||||
// Set grid options.
|
||||
document.getElementById('gridOption_spacing_text').value = 0;
|
||||
document.getElementById('gridOption_length_text').value = 1;
|
||||
document.getElementById('gridOption_spacing_number').value = 0;
|
||||
document.getElementById('gridOption_length_number').value = 1;
|
||||
document.getElementById('gridOption_colour_text').value = '#888';
|
||||
document.getElementById('gridOption_snap_checkbox').checked = false;
|
||||
|
||||
// Set zoom options.
|
||||
document.getElementById('zoomOption_controls_checkbox').checked = false;
|
||||
document.getElementById('zoomOption_wheel_checkbox').checked = false;
|
||||
document.getElementById('zoomOption_startScale_text').value = 1.0;
|
||||
document.getElementById('zoomOption_maxScale_text').value = 3;
|
||||
document.getElementById('zoomOption_minScale_text').value = 0.3;
|
||||
document.getElementById('zoomOption_scaleSpeed_text').value = 1.2;
|
||||
document.getElementById('zoomOption_controls_checkbox').checked = true;
|
||||
document.getElementById('zoomOption_wheel_checkbox').checked = true;
|
||||
document.getElementById('zoomOption_startScale_number').value = 1.0;
|
||||
document.getElementById('zoomOption_maxScale_number').value = 3;
|
||||
document.getElementById('zoomOption_minScale_number').value = 0.3;
|
||||
document.getElementById('zoomOption_scaleSpeed_number').value = 1.2;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+9
-9
@@ -140,14 +140,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Променя първия е
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM = "Променя елемента на определена позиция в списък.";
|
||||
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_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "възходящо";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "низходящо";
|
||||
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_SORT_TOOLTIP = "Подреди копие на списъка.";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "по азбучен ред, без отчитане на малки и главни букви";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "в числов ред";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "по азбучен ред";
|
||||
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 = "направи текст от списък";
|
||||
@@ -293,7 +293,7 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "име на параметър";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Добавяне на параметър към функцията.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "вход";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Добави, премахни или пренареди входните параметри за тази функция.";
|
||||
Blockly.Msg.REDO = "Redo"; // untranslated
|
||||
Blockly.Msg.REDO = "Повторение";
|
||||
Blockly.Msg.REMOVE_COMMENT = "Премахни коментар";
|
||||
Blockly.Msg.RENAME_VARIABLE = "Преименувай променливата...";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "Преименувай всички '%1' променливи на:";
|
||||
@@ -359,7 +359,7 @@ Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "премахни интервалите
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "премахни интервалите отдясно";
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "Върни копие на текста с пемахнати интервали от диния или двата края.";
|
||||
Blockly.Msg.TODAY = "Днес";
|
||||
Blockly.Msg.UNDO = "Undo"; // untranslated
|
||||
Blockly.Msg.UNDO = "Отмяна";
|
||||
Blockly.Msg.VARIABLES_DEFAULT_NAME = "елемент";
|
||||
Blockly.Msg.VARIABLES_GET_CREATE_SET = "Създай \"промени стойността на %1\"";
|
||||
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
|
||||
|
||||
+28
-28
@@ -21,7 +21,7 @@ Blockly.Msg.COLOUR_PICKER_HELPURL = "https://diq.wikipedia.org/wiki/Reng";
|
||||
Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Choose a colour from the palette."; // untranslated
|
||||
Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com"; // untranslated
|
||||
Blockly.Msg.COLOUR_RANDOM_TITLE = "rengo rastameye";
|
||||
Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Choose a colour at random."; // untranslated
|
||||
Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Tesadufi yu ren bıweçin";
|
||||
Blockly.Msg.COLOUR_RGB_BLUE = "mawi";
|
||||
Blockly.Msg.COLOUR_RGB_GREEN = "kıho";
|
||||
Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html"; // untranslated
|
||||
@@ -29,9 +29,9 @@ Blockly.Msg.COLOUR_RGB_RED = "sur";
|
||||
Blockly.Msg.COLOUR_RGB_TITLE = "komponentên rengan";
|
||||
Blockly.Msg.COLOUR_RGB_TOOLTIP = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100."; // untranslated
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "break out of loop"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continue with next iteration of loop"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Break out of the containing loop."; // untranslated
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "Çerxen ra vec";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "Gama bin da çerxeni ra dewam ke";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Öujtewada çerxeni ra bıvıci";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Skip the rest of this loop, and continue with the next iteration."; // untranslated
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warning: This block may only be used within a loop."; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated
|
||||
@@ -40,7 +40,7 @@ Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variabl
|
||||
Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOR_TITLE = "count with %1 from %2 to %3 by %4"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks."; // untranslated
|
||||
Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Add a condition to the if block."; // untranslated
|
||||
Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Bloq da if'i rê yu şert dekerê de.";
|
||||
Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block."; // untranslated
|
||||
Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated
|
||||
Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Add, remove, or reorder sections to reconfigure this if block."; // untranslated
|
||||
@@ -53,7 +53,7 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "If the first value is true, then do the fir
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements."; // untranslated
|
||||
Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop";
|
||||
Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "bık";
|
||||
Blockly.Msg.CONTROLS_REPEAT_TITLE = "repeat %1 times"; // untranslated
|
||||
Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 fıni tekrar ke";
|
||||
Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Do some statements several times."; // untranslated
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "hend tekrar ke";
|
||||
@@ -156,7 +156,7 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaki
|
||||
Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated
|
||||
Blockly.Msg.LOGIC_BOOLEAN_FALSE = "ğelet";
|
||||
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
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Raşt yana çep erc dano";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TRUE = "raşt";
|
||||
Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Return true if both inputs equal each other."; // untranslated
|
||||
@@ -180,7 +180,7 @@ Blockly.Msg.LOGIC_TERNARY_CONDITION = "test";
|
||||
Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // untranslated
|
||||
Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "eke ğeleto";
|
||||
Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "eke raşto";
|
||||
Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated
|
||||
Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Şerta'test'i test keno. Eger ke şert raşta se erca 'raşt'i çarneno, çepo se erca 'çep' çarneno.";
|
||||
Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Aritmetik";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Return the sum of the two numbers."; // untranslated
|
||||
@@ -188,16 +188,16 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two num
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "Return the product of the two numbers."; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to the power of the second number."; // untranslated
|
||||
Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated
|
||||
Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter";
|
||||
Blockly.Msg.MATH_CHANGE_TITLE = "%2, keno %1 vurneno";
|
||||
Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'."; // untranslated
|
||||
Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated
|
||||
Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity)."; // untranslated
|
||||
Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant";
|
||||
Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Heryen sabitan ra yewi çerx ke:π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (bêsonp).";
|
||||
Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated
|
||||
Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; // untranslated
|
||||
Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated
|
||||
Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated
|
||||
Blockly.Msg.MATH_IS_DIVISIBLE_BY = "is divisible by"; // untranslated
|
||||
Blockly.Msg.MATH_IS_DIVISIBLE_BY = "Leteyêno";
|
||||
Blockly.Msg.MATH_IS_EVEN = "zewnco";
|
||||
Blockly.Msg.MATH_IS_NEGATIVE = "negatifo";
|
||||
Blockly.Msg.MATH_IS_ODD = "kıto";
|
||||
@@ -205,9 +205,9 @@ Blockly.Msg.MATH_IS_POSITIVE = "pozitifo";
|
||||
Blockly.Msg.MATH_IS_PRIME = "bıngehên";
|
||||
Blockly.Msg.MATH_IS_TOOLTIP = "Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false."; // untranslated
|
||||
Blockly.Msg.MATH_IS_WHOLE = "tamo";
|
||||
Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated
|
||||
Blockly.Msg.MATH_MODULO_TITLE = "remainder of %1 ÷ %2"; // untranslated
|
||||
Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; // untranslated
|
||||
Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation";
|
||||
Blockly.Msg.MATH_MODULO_TITLE = "%1 ÷ %2 ra menden";
|
||||
Blockly.Msg.MATH_MODULO_TOOLTIP = "Dı amoran ra amora menden çerx ke";
|
||||
Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated
|
||||
Blockly.Msg.MATH_NUMBER_HELPURL = "https://diq.wikipedia.org/wiki/Numre";
|
||||
Blockly.Msg.MATH_NUMBER_TOOLTIP = "Yew numre.";
|
||||
@@ -217,7 +217,7 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "Tewr gırdê lista";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "Wertey lista";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "Tewr qıcê lista";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "listey modi";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "random item of list"; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "Raştamaye objeya lista";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standard deviation of list"; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "koma liste";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; // untranslated
|
||||
@@ -225,14 +225,14 @@ Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Return the largest number in the list.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "Return the smallest number in the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "Return a list of the most common item(s) in the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "Return a random element from the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "Liste ra raştamaye yew elementi çerx ke";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "Return the standard deviation of the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = "Return the sum of all the numbers in the list."; // untranslated
|
||||
Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation";
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "Raştamaye nimande amor";
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation";
|
||||
Blockly.Msg.MATH_RANDOM_INT_TITLE = "random integer from %1 to %2"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated
|
||||
Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding";
|
||||
@@ -240,14 +240,14 @@ Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "gılor ke";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "Loğê cêri ke";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "Loğê cori ke";
|
||||
Blockly.Msg.MATH_ROUND_TOOLTIP = "Yu amorer loğê cêri yana cori ke";
|
||||
Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root";
|
||||
Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "mutlaq";
|
||||
Blockly.Msg.MATH_SINGLE_OP_ROOT = "karekok";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "Return the base 10 logarithm of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "Return the negation of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "Ena amorer nêravêrde deyne çerx ke.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated
|
||||
@@ -297,14 +297,14 @@ Blockly.Msg.REDO = "Anewe ke";
|
||||
Blockly.Msg.REMOVE_COMMENT = "Tefsiri Wedare";
|
||||
Blockly.Msg.RENAME_VARIABLE = "Vuriyayey fına name ke...";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "Rename all '%1' variables to:"; // untranslated
|
||||
Blockly.Msg.TEXT_APPEND_APPENDTEXT = "append text"; // untranslated
|
||||
Blockly.Msg.TEXT_APPEND_APPENDTEXT = "Metin dek";
|
||||
Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
|
||||
Blockly.Msg.TEXT_APPEND_TO = "rê";
|
||||
Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "to lower case"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "to Title Case"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "to UPPER CASE"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "Herfanê werdiyana";
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "Ser herf gırd";
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "HERFANÊ GIRDANA";
|
||||
Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_FIRST = "Herfa sıfti bıgi";
|
||||
Blockly.Msg.TEXT_CHARAT_FROM_END = "# ra tepya herfan bıgi";
|
||||
@@ -338,7 +338,7 @@ Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#
|
||||
Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 vengo";
|
||||
Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated
|
||||
Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated
|
||||
Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "create text with"; // untranslated
|
||||
Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "ya metin vıraz";
|
||||
Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated
|
||||
Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
|
||||
Blockly.Msg.TEXT_LENGTH_TITLE = "length of %1"; // untranslated
|
||||
@@ -351,8 +351,8 @@ Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // un
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "prompt for text with message"; // untranslated
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)"; // untranslated
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "A letter, word, or line of text."; // untranslated
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "Yu herfa, satır yana çekuya metini";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "trim spaces from both sides of"; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "trim spaces from left side of"; // untranslated
|
||||
|
||||
+6
-6
@@ -141,13 +141,13 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM = "Ορίζει το στοιχεί
|
||||
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";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "Αύξουσα";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "Φθίνουσα";
|
||||
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_SORT_TYPE_NUMERIC = "αριθμητικό";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "Αλφαβητικά";
|
||||
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 = "κάνετε κείμενο από τη λίστα";
|
||||
@@ -293,7 +293,7 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "όνομα εισόδου:";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Πρόσθεσε μια είσοδος στη συνάρτηση";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "είσοδοι";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Προσθέτει, αφαιρεί ή αναδιατάσσει εισόδους σε αυτήν τη λειτουργία";
|
||||
Blockly.Msg.REDO = "Redo"; // untranslated
|
||||
Blockly.Msg.REDO = "Ακύρωση αναίρεσης";
|
||||
Blockly.Msg.REMOVE_COMMENT = "Αφαίρεσε Το Σχόλιο";
|
||||
Blockly.Msg.RENAME_VARIABLE = "Μετονόμασε τη μεταβλητή...";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "Μετονόμασε όλες τις μεταβλητές «%1» σε:";
|
||||
@@ -359,7 +359,7 @@ Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "περίκοψε τα κενά από τ
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "περίκοψε τα κενά από την δεξιά πλευρά του";
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "Επιστρέφει ένα αντίγραφο του κειμένου με αφαιρεμένα τα κενά από το ένα ή και τα δύο άκρα.";
|
||||
Blockly.Msg.TODAY = "Σήμερα";
|
||||
Blockly.Msg.UNDO = "Undo"; // untranslated
|
||||
Blockly.Msg.UNDO = "Αναίρεση";
|
||||
Blockly.Msg.VARIABLES_DEFAULT_NAME = "αντικείμενο";
|
||||
Blockly.Msg.VARIABLES_GET_CREATE_SET = "Δημιούργησε «όρισε %1»";
|
||||
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
|
||||
|
||||
+391
@@ -0,0 +1,391 @@
|
||||
// This file was automatically generated. Do not modify.
|
||||
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.Msg.en.gb');
|
||||
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Add Comment";
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Change value:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Collapse Blocks";
|
||||
Blockly.Msg.COLLAPSE_BLOCK = "Collapse Block";
|
||||
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "colour 1";
|
||||
Blockly.Msg.COLOUR_BLEND_COLOUR2 = "colour 2";
|
||||
Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/"; // untranslated
|
||||
Blockly.Msg.COLOUR_BLEND_RATIO = "ratio";
|
||||
Blockly.Msg.COLOUR_BLEND_TITLE = "blend";
|
||||
Blockly.Msg.COLOUR_BLEND_TOOLTIP = "Blends two colours together with a given ratio (0.0 - 1.0).";
|
||||
Blockly.Msg.COLOUR_PICKER_HELPURL = "https://en.wikipedia.org/wiki/Colour";
|
||||
Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Choose a colour from the palette.";
|
||||
Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com"; // untranslated
|
||||
Blockly.Msg.COLOUR_RANDOM_TITLE = "random colour";
|
||||
Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Choose a colour at random.";
|
||||
Blockly.Msg.COLOUR_RGB_BLUE = "blue";
|
||||
Blockly.Msg.COLOUR_RGB_GREEN = "green";
|
||||
Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html"; // untranslated
|
||||
Blockly.Msg.COLOUR_RGB_RED = "red";
|
||||
Blockly.Msg.COLOUR_RGB_TITLE = "colour with";
|
||||
Blockly.Msg.COLOUR_RGB_TOOLTIP = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 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 = "break out of loop";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continue with next iteration of loop";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Break out of the containing loop.";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Skip the rest of this loop, and continue with the next iteration.";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warning: This block may only be used within a loop.";
|
||||
Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOREACH_TITLE = "for each item %1 in list %2";
|
||||
Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements.";
|
||||
Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOR_TITLE = "count with %1 from %2 to %3 by %4";
|
||||
Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks.";
|
||||
Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Add a condition to the if block.";
|
||||
Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block.";
|
||||
Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated
|
||||
Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Add, remove, or reorder sections to reconfigure this if block.";
|
||||
Blockly.Msg.CONTROLS_IF_MSG_ELSE = "else";
|
||||
Blockly.Msg.CONTROLS_IF_MSG_ELSEIF = "else if";
|
||||
Blockly.Msg.CONTROLS_IF_MSG_IF = "if";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "If a value is true, then do some statements.";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "If a value is true, then do the first block of statements. Otherwise, do the second block of statements.";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements.";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements.";
|
||||
Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop";
|
||||
Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "do";
|
||||
Blockly.Msg.CONTROLS_REPEAT_TITLE = "repeat %1 times";
|
||||
Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Do some statements several times.";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "repeat until";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "repeat while";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "While a value is false, then do some statements.";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "While a value is true, then do some statements.";
|
||||
Blockly.Msg.DELETE_ALL_BLOCKS = "Delete all %1 blocks?";
|
||||
Blockly.Msg.DELETE_BLOCK = "Delete Block";
|
||||
Blockly.Msg.DELETE_VARIABLE = "Delete the '%1' variable"; // untranslated
|
||||
Blockly.Msg.DELETE_VARIABLE_CONFIRMATION = "Delete %1 uses of the '%2' variable?"; // untranslated
|
||||
Blockly.Msg.DELETE_X_BLOCKS = "Delete %1 Blocks";
|
||||
Blockly.Msg.DISABLE_BLOCK = "Disable Block";
|
||||
Blockly.Msg.DUPLICATE_BLOCK = "Duplicate";
|
||||
Blockly.Msg.ENABLE_BLOCK = "Enable Block";
|
||||
Blockly.Msg.EXPAND_ALL = "Expand Blocks";
|
||||
Blockly.Msg.EXPAND_BLOCK = "Expand Block";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "External Inputs";
|
||||
Blockly.Msg.HELP = "Help";
|
||||
Blockly.Msg.INLINE_INPUTS = "Inline Inputs";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "create empty list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returns a list, of length 0, containing no data records"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "list"; // untranslated
|
||||
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 = "Add an item to the list."; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "Create a list with any number of items."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_FIRST = "first"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# from end"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_FROM_START = "#"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_GET = "get"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_LAST = "last"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_RANDOM = "random"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_REMOVE = "remove"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TAIL = ""; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "Returns the first item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM = "Returns the item at the specified position in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = "Returns the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "Returns a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "Removes and returns the first item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM = "Removes and returns the item at the specified position in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "Removes and returns the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "Removes and returns a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "Removes the first item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM = "Removes the item at the specified position in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "Removes the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "Removes a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = "to # from end"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START = "to #"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_END_LAST = "to last"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST = "get sub-list from first"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END = "get sub-list from # from end"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START = "get sub-list from #"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_TAIL = ""; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = "Creates a copy of the specified portion of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_INDEX_FROM_END_TOOLTIP = "%1 is the last item."; // untranslated
|
||||
Blockly.Msg.LISTS_INDEX_FROM_START_TOOLTIP = "%1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated
|
||||
Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated
|
||||
Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the list. Returns %1 if item is not found."; // untranslated
|
||||
Blockly.Msg.LISTS_INLIST = "in list"; // untranslated
|
||||
Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated
|
||||
Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 is empty"; // untranslated
|
||||
Blockly.Msg.LISTS_ISEMPTY_TOOLTIP = "Returns true if the list is empty."; // untranslated
|
||||
Blockly.Msg.LISTS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Lists#length-of"; // untranslated
|
||||
Blockly.Msg.LISTS_LENGTH_TITLE = "length of %1"; // untranslated
|
||||
Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Returns the length of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_REPEAT_TITLE = "create list with item %1 repeated %2 times"; // untranslated
|
||||
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Creates a list consisting of the given value repeated the specified number of times."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "as"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_INSERT = "insert at"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_SET = "set"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "Inserts the item at the start of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM = "Inserts the item at the specified position in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "Append the item to the end of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "Inserts the item randomly in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Sets the first item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM = "Sets the item at the specified position in a list."; // 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 = "descendente";
|
||||
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
|
||||
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 = "with delimiter"; // untranslated
|
||||
Blockly.Msg.LOGIC_BOOLEAN_FALSE = "false";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Returns either true or false.";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TRUE = "true";
|
||||
Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Return true if both inputs equal each other.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Return true if the first input is greater than the second input.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Return true if the first input is greater than or equal to the second input.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Return true if the first input is smaller than the second input.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Return true if the first input is smaller than or equal to the second input.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Return true if both inputs are not equal to each other.";
|
||||
Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated
|
||||
Blockly.Msg.LOGIC_NEGATE_TITLE = "not %1";
|
||||
Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returns true if the input is false. Returns false if the input is true.";
|
||||
Blockly.Msg.LOGIC_NULL = "null";
|
||||
Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated
|
||||
Blockly.Msg.LOGIC_NULL_TOOLTIP = "Returns null.";
|
||||
Blockly.Msg.LOGIC_OPERATION_AND = "and";
|
||||
Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated
|
||||
Blockly.Msg.LOGIC_OPERATION_OR = "or";
|
||||
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Return true if both inputs are true.";
|
||||
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true.";
|
||||
Blockly.Msg.LOGIC_TERNARY_CONDITION = "test";
|
||||
Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // untranslated
|
||||
Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "if false";
|
||||
Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "if true";
|
||||
Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value.";
|
||||
Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Return the sum of the two numbers.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "Return the product of the two numbers.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to the power of the second number.";
|
||||
Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter";
|
||||
Blockly.Msg.MATH_CHANGE_TITLE = "change %1 by %2";
|
||||
Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'.";
|
||||
Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant";
|
||||
Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity).";
|
||||
Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated
|
||||
Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; // untranslated
|
||||
Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated
|
||||
Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated
|
||||
Blockly.Msg.MATH_IS_DIVISIBLE_BY = "is divisible by";
|
||||
Blockly.Msg.MATH_IS_EVEN = "is even";
|
||||
Blockly.Msg.MATH_IS_NEGATIVE = "is negative";
|
||||
Blockly.Msg.MATH_IS_ODD = "is odd";
|
||||
Blockly.Msg.MATH_IS_POSITIVE = "is positive";
|
||||
Blockly.Msg.MATH_IS_PRIME = "is prime";
|
||||
Blockly.Msg.MATH_IS_TOOLTIP = "Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false.";
|
||||
Blockly.Msg.MATH_IS_WHOLE = "is whole";
|
||||
Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated
|
||||
Blockly.Msg.MATH_MODULO_TITLE = "remainder of %1 ÷ %2"; // untranslated
|
||||
Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; // untranslated
|
||||
Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated
|
||||
Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number";
|
||||
Blockly.Msg.MATH_NUMBER_TOOLTIP = "A number.";
|
||||
Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "average of list"; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "max of list"; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "median of list"; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "min of list"; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modes of list"; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "random item of list"; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standard deviation of list"; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "sum of list"; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Return the largest number in the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "Return the smallest number in the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "Return a list of the most common item(s) in the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "Return a random element from the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "Return the standard deviation of the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = "Return the sum of all the numbers in the list."; // untranslated
|
||||
Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "random fraction"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_INT_TITLE = "random integer from %1 to %2"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated
|
||||
Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "round";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "round down"; // untranslated
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "round up"; // untranslated
|
||||
Blockly.Msg.MATH_ROUND_TOOLTIP = "Round a number up or down.";
|
||||
Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root";
|
||||
Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolute";
|
||||
Blockly.Msg.MATH_SINGLE_OP_ROOT = "square root";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "Return the base 10 logarithm of a number.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "Return the negation of a number.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number.";
|
||||
Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions";
|
||||
Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number.";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number.";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number.";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_COS = "Return the cosine of a degree (not radian).";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = "Return the sine of a degree (not radian).";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "Return the tangent of a degree (not radian).";
|
||||
Blockly.Msg.NEW_VARIABLE = "New variable...";
|
||||
Blockly.Msg.NEW_VARIABLE_TITLE = "New variable name:";
|
||||
Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ""; // untranslated
|
||||
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "allow statements"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "with:"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Run the user-defined function '%1'."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Run the user-defined function '%1' and use its output."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "with:"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_CREATE_DO = "Create '%1'"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "Describe this function..."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_DO = ""; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "do something"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = "to"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = "Creates a function with no output."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = "return"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "Creates a function with an output."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "Warning: This function has duplicate parameters."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "Highlight function definition"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_HELPURL = "http://c2.com/cgi/wiki?GuardClause"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "If a value is true, then return a second value."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "Warning: This block may be used only within a function definition."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "input name:"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inputs"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated
|
||||
Blockly.Msg.REDO = "Redo";
|
||||
Blockly.Msg.REMOVE_COMMENT = "Remove Comment";
|
||||
Blockly.Msg.RENAME_VARIABLE = "Rename variable...";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "Rename all '%1' variables to:";
|
||||
Blockly.Msg.TEXT_APPEND_APPENDTEXT = "append text"; // untranslated
|
||||
Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
|
||||
Blockly.Msg.TEXT_APPEND_TO = "to"; // untranslated
|
||||
Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "to lower case"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "to Title Case"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "to UPPER CASE"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_FIRST = "get first letter"; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_FROM_END = "get letter # from end"; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_FROM_START = "get letter #"; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "in text"; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_LAST = "get last letter"; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_RANDOM = "get random letter"; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; // untranslated
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Add an item to the text."; // untranslated
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "join"; // untranslated
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "to letter #"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "to last letter"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in text"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "get substring from letter #"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated
|
||||
Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated
|
||||
Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "in text"; // untranslated
|
||||
Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find first occurrence of text"; // untranslated
|
||||
Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "find last occurrence of text"; // untranslated
|
||||
Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found."; // untranslated
|
||||
Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated
|
||||
Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 is empty"; // untranslated
|
||||
Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated
|
||||
Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated
|
||||
Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "create text with"; // untranslated
|
||||
Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated
|
||||
Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
|
||||
Blockly.Msg.TEXT_LENGTH_TITLE = "length of %1"; // untranslated
|
||||
Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; // untranslated
|
||||
Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_PRINT_TITLE = "print %1"; // untranslated
|
||||
Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "prompt for text with message"; // untranslated
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)"; // untranslated
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "A letter, word, or line of text."; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "trim spaces from both sides of"; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "trim spaces from left side of"; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "trim spaces from right side of"; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated
|
||||
Blockly.Msg.TODAY = "Today";
|
||||
Blockly.Msg.UNDO = "Undo";
|
||||
Blockly.Msg.VARIABLES_DEFAULT_NAME = "item";
|
||||
Blockly.Msg.VARIABLES_GET_CREATE_SET = "Create 'set %1'"; // untranslated
|
||||
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
|
||||
Blockly.Msg.VARIABLES_GET_TOOLTIP = "Returns the value of this variable."; // untranslated
|
||||
Blockly.Msg.VARIABLES_SET = "set %1 to %2"; // untranslated
|
||||
Blockly.Msg.VARIABLES_SET_CREATE_GET = "Create 'get %1'"; // untranslated
|
||||
Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated
|
||||
Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; // untranslated
|
||||
Blockly.Msg.VARIABLE_ALREADY_EXISTS = "A variable named '%1' already exists."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE;
|
||||
Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF;
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
|
||||
Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
|
||||
Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE;
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE;
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
|
||||
Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
|
||||
Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME;
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO;
|
||||
Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF;
|
||||
Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL;
|
||||
Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
|
||||
Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
|
||||
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME;
|
||||
Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME;
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME;
|
||||
Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT = Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT;
|
||||
+391
@@ -0,0 +1,391 @@
|
||||
// This file was automatically generated. Do not modify.
|
||||
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.Msg.et');
|
||||
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Lisa kommentaar";
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Muuda väärtust:";
|
||||
Blockly.Msg.CLEAN_UP = "Korista plokid kokku";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Tõmba plokid kokku";
|
||||
Blockly.Msg.COLLAPSE_BLOCK = "Tõmba plokk kokku";
|
||||
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "1. värvist";
|
||||
Blockly.Msg.COLOUR_BLEND_COLOUR2 = "2. värvist";
|
||||
Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/"; // untranslated
|
||||
Blockly.Msg.COLOUR_BLEND_RATIO = "suhtega";
|
||||
Blockly.Msg.COLOUR_BLEND_TITLE = "segu";
|
||||
Blockly.Msg.COLOUR_BLEND_TOOLTIP = "Segab kaks värvi määratud suhtega (0.0 - 1.0) kokku.";
|
||||
Blockly.Msg.COLOUR_PICKER_HELPURL = "https://en.wikipedia.org/wiki/Color";
|
||||
Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Valitud värv paletist.";
|
||||
Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com"; // untranslated
|
||||
Blockly.Msg.COLOUR_RANDOM_TITLE = "juhuslik värv";
|
||||
Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Juhuslikult valitud värv.";
|
||||
Blockly.Msg.COLOUR_RGB_BLUE = "sinisest";
|
||||
Blockly.Msg.COLOUR_RGB_GREEN = "rohelisest";
|
||||
Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html"; // untranslated
|
||||
Blockly.Msg.COLOUR_RGB_RED = "punasest";
|
||||
Blockly.Msg.COLOUR_RGB_TITLE = "segu";
|
||||
Blockly.Msg.COLOUR_RGB_TOOLTIP = "Tekitab värvi määratud hulgast punasest, rohelisest ja sinisest. Kõik väärtused peavad olema 0 ja 100 vahel.";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "katkesta kordus";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "liigu järgmisele kordusele";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Katkestab korduse ja liigub edasi korduse järel oleva koodi käivitamisele.";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Katkestab korduse sees oleva koodi käivitamise ja käivitab järgmise korduse.";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Hoiatus: Seda plokki saab kasutada ainult korduse sees.";
|
||||
Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOREACH_TITLE = "iga elemendiga %1 loendis %2";
|
||||
Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Iga elemendiga loendis anna muutujale '%1' elemendi väärtus ja kõivita plokis olevad käsud.";
|
||||
Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOR_TITLE = "loenda muutujaga %1 alates %2 kuni %3 %4 kaupa";
|
||||
Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Annab muutujale '%1' väärtused ühest numbrist teiseni, muutes seda intervalli kaupa ja käivitab igal muudatusel ploki sees oleva koodi.";
|
||||
Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Lisab „kui“ plokile tingimuse.";
|
||||
Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Lisab „kui“ plokile lõpliku tingimuseta koodiploki.";
|
||||
Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated
|
||||
Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Selle „kui“ ploki muutmine sektsioonide lisamise, eemaldamise ja järjestamisega.";
|
||||
Blockly.Msg.CONTROLS_IF_MSG_ELSE = "vastasel juhul";
|
||||
Blockly.Msg.CONTROLS_IF_MSG_ELSEIF = "vastasel juhul, kui";
|
||||
Blockly.Msg.CONTROLS_IF_MSG_IF = "kui";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Kui avaldis on tõene, käivita ploki sees olevad käsud.";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Kui avaldis on tõene, käivita käsud esimesest plokist. Vastasel juhul käivita käsud teisest plokist.";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Kui esimene avaldis on tõene, käivita käsud esimesest plokist. Vastasel juhul, kui teine avaldis on tõene, käivita käsud teisest plokist.";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Kui esimene avaldis on tõene, käivita käsud esimesest plokist. Vastasel juhul, kui teine avaldis on tõene, käivita käsud teisest plokist. Kui ükski avaldistest pole tõene, käivita käsud viimasest plokist.";
|
||||
Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop";
|
||||
Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "käivita";
|
||||
Blockly.Msg.CONTROLS_REPEAT_TITLE = "kordus %1 korda";
|
||||
Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Plokis olevate käskude käivitamine mitu korda.";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "kordus kuni pole";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "kordus kuni on";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Kuni avaldis pole tõene, korda plokis olevaid käske.";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Kuni avaldis on tõene, korda plokis olevaid käske.";
|
||||
Blockly.Msg.DELETE_ALL_BLOCKS = "Kas kustutada kõik %1 plokki?";
|
||||
Blockly.Msg.DELETE_BLOCK = "Kustuta plokk";
|
||||
Blockly.Msg.DELETE_VARIABLE = "Delete the '%1' variable"; // untranslated
|
||||
Blockly.Msg.DELETE_VARIABLE_CONFIRMATION = "Delete %1 uses of the '%2' variable?"; // untranslated
|
||||
Blockly.Msg.DELETE_X_BLOCKS = "Kustuta %1 plokki";
|
||||
Blockly.Msg.DISABLE_BLOCK = "Keela ploki kasutamine";
|
||||
Blockly.Msg.DUPLICATE_BLOCK = "Tekita duplikaat";
|
||||
Blockly.Msg.ENABLE_BLOCK = "Luba ploki kasutamine";
|
||||
Blockly.Msg.EXPAND_ALL = "Laota plokid laiali";
|
||||
Blockly.Msg.EXPAND_BLOCK = "Laota plokk laiali";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Sisendid ploki taga";
|
||||
Blockly.Msg.HELP = "Abi";
|
||||
Blockly.Msg.INLINE_INPUTS = "Sisendid ploki sees";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "tühi loend";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Tagastab loendi, mille pikkus on 0 ja milles pole ühtegi elementi.";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "loend";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "Loendiploki elementide lisamine, eemaldamine või järjestuse muutmine.";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "loend elementidest";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "Elemendi lisamine loendisse.";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "Tekitab mistahes arvust elementidest loendi.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FIRST = "esimene element";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# lõpust";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FROM_START = "#"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_GET = "võta";
|
||||
Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "võta ja eemalda";
|
||||
Blockly.Msg.LISTS_GET_INDEX_LAST = "viimane element";
|
||||
Blockly.Msg.LISTS_GET_INDEX_RANDOM = "juhuslik element";
|
||||
Blockly.Msg.LISTS_GET_INDEX_REMOVE = "eemalda";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TAIL = ""; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "Tagastab loendi esimese elemendi.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM = "Tagastab loendis määratud asukohal oleva elemendi.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = "Tagastab loendi viimase elemendi.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "Tagastab loendi juhusliku elemendi.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "Tagastab ja eemaldab loendist esimese elemendi.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM = "Tagastab ja eemaldab loendist määratud asukohal oleva elemendi.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "Tagastab ja eemaldab loendist viimase elemendi.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "Tagastab ja eemaldab loendist juhusliku elemendi.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "Eemaldab loendist esimese elemendi.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM = "Eemaldab loendist määratud asukohal oleva elemendi.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "Eemaldab loendist viimase elemendi.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "Eemaldab loendist juhusliku elemendi.";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = "elemendini # (lõpust)";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START = "elemendini #";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_END_LAST = "lõpuni";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST = "alamloend algusest";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END = "alamloend elemendist # (lõpust)";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START = "alamloend elemendist #";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_TAIL = ""; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = "Tekitab loendi määratud osast koopia.";
|
||||
Blockly.Msg.LISTS_INDEX_FROM_END_TOOLTIP = "Viimane element on %1.";
|
||||
Blockly.Msg.LISTS_INDEX_FROM_START_TOOLTIP = "Esimene element on %1.";
|
||||
Blockly.Msg.LISTS_INDEX_OF_FIRST = "esimene leitud element";
|
||||
Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_INDEX_OF_LAST = "viimane leitud element";
|
||||
Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Tagastab esimese/viimase loendist leitud elemendi asukoha (järjekorranumbri). Kui elementi ei leita, tagastab %1.";
|
||||
Blockly.Msg.LISTS_INLIST = "loendis";
|
||||
Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated
|
||||
Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 on tühi";
|
||||
Blockly.Msg.LISTS_ISEMPTY_TOOLTIP = "Tagastab „tõene“ kui loend on tühi.";
|
||||
Blockly.Msg.LISTS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Lists#length-of"; // untranslated
|
||||
Blockly.Msg.LISTS_LENGTH_TITLE = "%1 pikkus";
|
||||
Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Tagastab loendi pikkuse.";
|
||||
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_REPEAT_TITLE = "loend pikkusega %2 elemendist %1";
|
||||
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Tekitab uue loendi, millesse lisatakse ühte elementi pikkusega määratud arv kordi.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "väärtus:";
|
||||
Blockly.Msg.LISTS_SET_INDEX_INSERT = "lisa asukohale";
|
||||
Blockly.Msg.LISTS_SET_INDEX_SET = "asenda";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "Lisab loendi algusesse uue elemendi.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM = "Lisab määratud asukohale loendis uue elemendi.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "Lisab loendi lõppu uue elemendi.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "Lisab juhuslikule kohale loendis uue elemendi.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Asendab loendis esimese elemendi.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM = "Asendab loendis määratud kohal oleva elemendi.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Asendab loendis viimase elemendi.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Asendab loendis juhusliku elemendi.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "kasvavalt";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "kahanevalt";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "%1 %2 sorteeritud %3";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Loendi koopia sorteerimine.";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "tähestiku järgi (tähesuurust eirates)";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "arvväärtuste järgi";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "tähestiku järgi";
|
||||
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 = "loend, tekitatud tekstist";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "tekst, tekitatud loendist";
|
||||
Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Ühendab tekstide loendis olevad tükid üheks tekstiks, asetades tükkide vahele eraldaja.";
|
||||
Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Tükeldab teksti eraldajade kohalt ja asetab tükid tekstide loendisse.";
|
||||
Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "eraldajaga";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_FALSE = "väär";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Tagastab tõeväärtuse – kas „tõene“ või „väär“.";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TRUE = "tõene";
|
||||
Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Tagastab „tõene“, kui avaldiste väärtused on võrdsed.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Tagastab „tõene“, kui esimese avaldise väärtus on suurem kui teise väärtus.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Tagastab „tõene“, kui esimese avaldise väärtus on suurem või võrdne teise väärtusega.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Tagastab „tõene“, kui esimese avaldise väärtus on väiksem kui teise väärtus.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Tagastab „tõene“, kui esimese avaldise väärtus on väiksem või võrdne teise väärtusega.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Tagastab „tõene“, kui avaldiste väärtused pole võrdsed.";
|
||||
Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated
|
||||
Blockly.Msg.LOGIC_NEGATE_TITLE = "pole %1";
|
||||
Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Tagastab „tõene“, kui avaldis on väär. Tagastab „väär“, kui avaldis on tõene.";
|
||||
Blockly.Msg.LOGIC_NULL = "null";
|
||||
Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated
|
||||
Blockly.Msg.LOGIC_NULL_TOOLTIP = "Tagastab nulli.";
|
||||
Blockly.Msg.LOGIC_OPERATION_AND = "ja";
|
||||
Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated
|
||||
Blockly.Msg.LOGIC_OPERATION_OR = "või";
|
||||
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Tagastab „tõene“, kui mõlemad avaldised on tõesed.";
|
||||
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Tagastab „tõene“, kui vähemalt üks avaldistest on tõene.";
|
||||
Blockly.Msg.LOGIC_TERNARY_CONDITION = "tingimus";
|
||||
Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // untranslated
|
||||
Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "kui väär";
|
||||
Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "kui tõene";
|
||||
Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kui tingimuse väärtus on tõene, tagastab „kui tõene“ väärtuse, vastasel juhul „kui väär“ väärtuse.";
|
||||
Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://et.wikipedia.org/wiki/Aritmeetika";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Tagastab kahe arvu summa.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Tagastab kahe arvu jagatise.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Tagastab kahe arvu vahe.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "Tagastab kahe arvu korrutise.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Tagastab esimese arvu teise arvu astmes.";
|
||||
Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter";
|
||||
Blockly.Msg.MATH_CHANGE_TITLE = "muuda %1 %2 võrra";
|
||||
Blockly.Msg.MATH_CHANGE_TOOLTIP = "Lisab arvu muutujale '%1'.";
|
||||
Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant";
|
||||
Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Tagastab ühe konstantidest: π (3,141…), e (2,718…), φ (1.618…), √2) (1,414…), √½ (0,707…), või ∞ (infinity).";
|
||||
Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated
|
||||
Blockly.Msg.MATH_CONSTRAIN_TITLE = "%1 piirang %2 ja %3 vahele";
|
||||
Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Piirab arvu väärtuse toodud piiridesse (piirarvud kaasa arvatud).";
|
||||
Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated
|
||||
Blockly.Msg.MATH_IS_DIVISIBLE_BY = "jagub arvuga";
|
||||
Blockly.Msg.MATH_IS_EVEN = "on paarisarv";
|
||||
Blockly.Msg.MATH_IS_NEGATIVE = "on negatiivne arv";
|
||||
Blockly.Msg.MATH_IS_ODD = "on paaritu arv";
|
||||
Blockly.Msg.MATH_IS_POSITIVE = "on positiivne arv";
|
||||
Blockly.Msg.MATH_IS_PRIME = "on algarv";
|
||||
Blockly.Msg.MATH_IS_TOOLTIP = "Kontrollib kas arv on paarisarv, paaritu arv, algarv, täisarv, positiivne, negatiivne või jagub kindla arvuga. Tagastab „tõene“ või „väär“.";
|
||||
Blockly.Msg.MATH_IS_WHOLE = "on täisarv";
|
||||
Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation";
|
||||
Blockly.Msg.MATH_MODULO_TITLE = "%1 ÷ %2 jääk";
|
||||
Blockly.Msg.MATH_MODULO_TOOLTIP = "Tagastab esimese numbri teisega jagamisel tekkiva jäägi.";
|
||||
Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated
|
||||
Blockly.Msg.MATH_NUMBER_HELPURL = "https://et.wikipedia.org/wiki/Arv";
|
||||
Blockly.Msg.MATH_NUMBER_TOOLTIP = "Arv.";
|
||||
Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "loendi keskmine";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "loendi maksimum";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "loendi mediaan";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "loendi miinimum";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "loendi moodid";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "juhuslik element loendist";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "loendi standardhälve";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "loendi summa";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Tagastab loendis olevate arvväärtuste aritmeetilise keskmise.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Tagastab suurima loendis oleva arvu.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "Tagastab väikseima loendis oleva arvu.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "Tagastab loendi kõige sagedamini esinevate loendi liikmetega.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "Tagastab juhusliku elemendi loendist.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "Tagastab loendi standardhälbe.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = "Tagastab kõigi loendis olevate arvude summa.";
|
||||
Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation";
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "juhuslik murdosa";
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Tagastab juhusliku murdosa 0.0 (kaasa arvatud) and 1.0 (välja arvatud) vahel.";
|
||||
Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation";
|
||||
Blockly.Msg.MATH_RANDOM_INT_TITLE = "juhuslik täisarv %1 ja %2 vahel";
|
||||
Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Tagastab juhusliku täisarvu toodud piiride vahel (piirarvud kaasa arvatud).";
|
||||
Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "ümarda";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "ümarda alla";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "ümarda üles";
|
||||
Blockly.Msg.MATH_ROUND_TOOLTIP = "Ümardab arvu üles või alla.";
|
||||
Blockly.Msg.MATH_SINGLE_HELPURL = "https://et.wikipedia.org/wiki/Ruutjuur";
|
||||
Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absoluutväärtus";
|
||||
Blockly.Msg.MATH_SINGLE_OP_ROOT = "ruutjuur";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Tagastab arvu absoluutväärtuse.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Tagasta e arvu astmes.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Tagastab arvu naturaallogaritmi.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "Tagastab arvu kümnendlogaritm.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "Tagastab arvu vastandväärtuse.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Tagastab 10 arvu astmes.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Tagastab arvu ruutjuure.";
|
||||
Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_HELPURL = "https://et.wikipedia.org/wiki/Trigonomeetrilised_funktsioonid";
|
||||
Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Tagastab arvu arkuskoosiinuse.";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Tagastab arvu arkussiinuse.";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Tagastab arvu arkustangensi.";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_COS = "Tagastab arvu (kraadid) kosiinuse.";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = "Tagastab arvu (kraadid) siinuse.";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "Tagastab arvu (kraadid) tangensi.";
|
||||
Blockly.Msg.NEW_VARIABLE = "Uus muutuja ...";
|
||||
Blockly.Msg.NEW_VARIABLE_TITLE = "Uue muutuja nimi:";
|
||||
Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ""; // untranslated
|
||||
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "kood plokis";
|
||||
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "sisenditega:";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Käivitab kasutaja defineeritud funktsiooni '%1'.";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Run the user-defined function '%1' and use its output.";
|
||||
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "sisenditega:";
|
||||
Blockly.Msg.PROCEDURES_CREATE_DO = "Tekita '%1' plokk";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "Funktsiooni kirjeldus ...";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_DO = ""; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "teeme midagi";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = "funktsioon";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = "Tekitab funktsiooni, mis ei tagasta midagi.";
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = "tagasta";
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "Tekitab funktsiooni, mis tagastab midagi.";
|
||||
Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "Hoiatus: Sel funktsioonil on mitu sama nimega sisendit.";
|
||||
Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "Tõsta funktsiooni definitsioon esile";
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_HELPURL = "http://c2.com/cgi/wiki?GuardClause"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "Kui väärtus on tõene, tagastatakse teine väärtus.";
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "Hoiatus: Seda plokki saab kasutada ainult funktsiooni definitsioonis.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "sisend nimega:";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Lisab funktsioonile sisendi.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "sisendid";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Funktsiooni sisendite lisamine, eemaldamine või järjestuse muutmine.";
|
||||
Blockly.Msg.REDO = "Tee uuesti";
|
||||
Blockly.Msg.REMOVE_COMMENT = "Eemalda kommentaar";
|
||||
Blockly.Msg.RENAME_VARIABLE = "Nimeta muutuja ümber ...";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "Muutuja „%1“ uus nimi:";
|
||||
Blockly.Msg.TEXT_APPEND_APPENDTEXT = "lõppu tekst";
|
||||
Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
|
||||
Blockly.Msg.TEXT_APPEND_TO = "lisa muutuja";
|
||||
Blockly.Msg.TEXT_APPEND_TOOLTIP = "Lisab teksti muutuja „%1“ väärtuse lõppu.";
|
||||
Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "väikeste tähtedega";
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "Suurte Esitähtedega";
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "SUURTE TÄHTEDEGA";
|
||||
Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Tagastab muudetud tähesuurusega teksti koopia.";
|
||||
Blockly.Msg.TEXT_CHARAT_FIRST = "esimene sümbol";
|
||||
Blockly.Msg.TEXT_CHARAT_FROM_END = "lõpust sümbol #";
|
||||
Blockly.Msg.TEXT_CHARAT_FROM_START = "sümbol #";
|
||||
Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "tekstist";
|
||||
Blockly.Msg.TEXT_CHARAT_LAST = "viimane sümbol";
|
||||
Blockly.Msg.TEXT_CHARAT_RANDOM = "juhuslik sümbol";
|
||||
Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Tagastab tekstis määratud asukohal oleva sümboli.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Objekti lisamine tekstile.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "ühenda";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Tekstiploki muutmine sektsioonide lisamise, eemaldamise või järjestuse muutmisega.";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "kuni (lõpust) sümbolini #";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "kuni sümbolini #";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "kuni viimase sümbolini";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "tekstist";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "alates esimesest sümbolist";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "alates (lõpust) sümbolist #";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "alates sümbolist #";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Tagastab määratud tüki tekstist.";
|
||||
Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated
|
||||
Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "tekstist";
|
||||
Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "esimese leitud tekstitüki";
|
||||
Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "viimase leitud tekstitüki";
|
||||
Blockly.Msg.TEXT_INDEXOF_TAIL = "asukoht";
|
||||
Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Tagastab esimesest tekstist esimese/viimase leitud teise teksti asukoha (indeksi). Kui teksti ei leita, tagastab %1.";
|
||||
Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated
|
||||
Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 on tühi";
|
||||
Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Tagastab „tõene“, kui tekstis pole ühtegi sümbolit.";
|
||||
Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated
|
||||
Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "tekita tekst";
|
||||
Blockly.Msg.TEXT_JOIN_TOOLTIP = "Tekitab teksti ühendades mistahes arvu elemente.";
|
||||
Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
|
||||
Blockly.Msg.TEXT_LENGTH_TITLE = "%1 pikkus";
|
||||
Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Tagastab sümbolite aru (ka tühikud) toodud tekstis.";
|
||||
Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_PRINT_TITLE = "trüki %1";
|
||||
Blockly.Msg.TEXT_PRINT_TOOLTIP = "Trükib määratud teksti, numbri või mõne muu objekti väärtuse.";
|
||||
Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Küsib kasutajalt teadet näidates mingit arvu.";
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Küsib kasutajalt teadet näidates mingit teksti.";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "kasutajalt küsitud arv teatega";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "kasutajalt küsitud tekst teatega";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "Täht, sõna või rida teksti.";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "mõlemalt poolt eemaldatud tühikutega";
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "algusest eemaldatud tühikutega";
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "lõpust eemaldatud tühikutega";
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "Tagastab koopia tekstist, millel on tühikud ühelt või mõlemalt poolt eemaldatud.";
|
||||
Blockly.Msg.TODAY = "Täna";
|
||||
Blockly.Msg.UNDO = "Võta tagasi";
|
||||
Blockly.Msg.VARIABLES_DEFAULT_NAME = "objekt";
|
||||
Blockly.Msg.VARIABLES_GET_CREATE_SET = "Tekita 'määra „%1“ väärtuseks' plokk";
|
||||
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
|
||||
Blockly.Msg.VARIABLES_GET_TOOLTIP = "Tagastab selle muutuja väärtuse.";
|
||||
Blockly.Msg.VARIABLES_SET = "\"määra %1 väärtuseks %2";
|
||||
Blockly.Msg.VARIABLES_SET_CREATE_GET = "Tekita '„%1“ väärtus' plokk";
|
||||
Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated
|
||||
Blockly.Msg.VARIABLES_SET_TOOLTIP = "Määrab selle muutuja väärtuse võrdseks sisendi väärtusega.";
|
||||
Blockly.Msg.VARIABLE_ALREADY_EXISTS = "A variable named '%1' already exists."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE;
|
||||
Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF;
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
|
||||
Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
|
||||
Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE;
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE;
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
|
||||
Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
|
||||
Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME;
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO;
|
||||
Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF;
|
||||
Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL;
|
||||
Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
|
||||
Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
|
||||
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME;
|
||||
Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME;
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME;
|
||||
Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT = Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT;
|
||||
+5
-5
@@ -41,7 +41,7 @@ Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops
|
||||
Blockly.Msg.CONTROLS_FOR_TITLE = "با تعداد %1 از %2 به %3 با گامهای %4";
|
||||
Blockly.Msg.CONTROLS_FOR_TOOLTIP = "متغیر %1 را در مقادیر شروعشده از عدد انتهای به عدد انتهایی را دارد، با فواصل مشخصشده میشمارد و این بلوک مشخصشده را انجام میدهد.";
|
||||
Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "افزودن یک شرط به بلوک اگر.";
|
||||
Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "اضافهکردن نهایی، گرفتن همهٔ شرایط به بلوک اگر.";
|
||||
Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "اضافه کردن نهایی، گرفتن همهٔ شرایط به بلوک اگر.";
|
||||
Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated
|
||||
Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "افزودن، حذف یا بازمرتبسازی قسمتها برای پیکربندی دوبارهٔ این بلوک اگر.";
|
||||
Blockly.Msg.CONTROLS_IF_MSG_ELSE = "آنگاه";
|
||||
@@ -77,10 +77,10 @@ Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "ایجاد فهرست خالی";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "فهرستی با طول صفر شامل هیچ رکورد دادهای بر میگرداند.";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "فهرست";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "اضافهکردن، حذفکردن یا ترتیبسازی مجدد بخشها این بلوک فهرستی.";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "اضافه کردن، حذف کردن یا ترتیبسازی مجدد بخشها این بلوک فهرستی.";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "ایجاد فهرست با";
|
||||
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 = "# از انتها";
|
||||
@@ -317,7 +317,7 @@ Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "حرفی در موقعیت مشخصشده بر میگرداند.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "افزودن یک مورد به متن.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "عضویت";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "اضافهکردن، حذف یا مرتبسازی بحشها برای تنظیم مجدد این بلوک متنی.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "اضافه کردن، حذف یا مرتبسازی بحشها برای تنظیم مجدد این بلوک متنی.";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "به حرف # از انتها";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "به حرف #";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "به آخرین حرف";
|
||||
@@ -336,7 +336,7 @@ Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "شاخصی از اولین آخرین رخداد متن اول در متن دوم بر میگرداند. اگر متن یافت نشد %1 باز میگرداند.";
|
||||
Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated
|
||||
Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 خالی است";
|
||||
Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "اضافهکردن صحیح اگر متن فراهمشده خالی است.";
|
||||
Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "اضافه کردن صحیح اگر متن فراهمشده خالی است.";
|
||||
Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated
|
||||
Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "ایجاد متن با";
|
||||
Blockly.Msg.TEXT_JOIN_TOOLTIP = "یک تکهای از متن را با چسپاندن همهٔ تعداد از موارد ایجاد میکند.";
|
||||
|
||||
+9
-9
@@ -117,7 +117,7 @@ Blockly.Msg.LISTS_INDEX_FROM_START_TOOLTIP = "Numero %1 tarkoittaa listan ensimm
|
||||
Blockly.Msg.LISTS_INDEX_OF_FIRST = "etsi ensimmäinen esiintymä kohteelle";
|
||||
Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_INDEX_OF_LAST = "etsi viimeinen esiintymä kohteelle";
|
||||
Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Palauttaa kohteen ensimmäisen/viimeisen esiintymän kohdan. Palauttaa %1 jos tekstiä ei löydy.";
|
||||
Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Palauttaa kohteen ensimmäisen/viimeisen esiintymän kohdan listassa. Palauttaa %1 jos kohdetta ei löydy.";
|
||||
Blockly.Msg.LISTS_INLIST = "listassa";
|
||||
Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated
|
||||
Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 on tyhjä";
|
||||
@@ -140,14 +140,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Asettaa listan ensimmäisen koh
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM = "Asettaa kohteen annettuun kohtaan listassa.";
|
||||
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_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "nouseva";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "laskeva";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "lajittele %1 %2 %3";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Lajittele kopio luettelosta.";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "aakkosjärjestyksessä, ohita kapitaalit";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeerinen";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "aakkosjärjestys";
|
||||
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";
|
||||
|
||||
+9
-9
@@ -140,14 +140,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Az első elem cseréje a listá
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM = "A megadott sorszámú elem cseréje a listában.";
|
||||
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_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "növekvő";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "csökkenő";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "%1 %2 %3 rendezés";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Egy lista egy másolatának rendezése.";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "betűrendben nagybetű figyelmen kívül hagyásával";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numerikus";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "betűrendben";
|
||||
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";
|
||||
@@ -194,7 +194,7 @@ Blockly.Msg.MATH_CHANGE_TOOLTIP = "A \"%1\" változó értékének növelése eg
|
||||
Blockly.Msg.MATH_CONSTANT_HELPURL = "https://hu.wikipedia.org/wiki/Matematikai_konstans";
|
||||
Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Ismert matematikai konstans: π (3.141…), e (2.718…), φ (1.618…), gyök(2) (1.414…), gyök(½) (0.707…), vagy ∞ (végtelen).";
|
||||
Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated
|
||||
Blockly.Msg.MATH_CONSTRAIN_TITLE = "korlátozd %1 -t %2 és %3 közé";
|
||||
Blockly.Msg.MATH_CONSTRAIN_TITLE = "korlátozd %1-t %2 és %3 közé";
|
||||
Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Egy változó értékének korlátozása a megadott zárt intervallumra.";
|
||||
Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated
|
||||
Blockly.Msg.MATH_IS_DIVISIBLE_BY = "-nek osztója";
|
||||
|
||||
+8
-8
@@ -140,14 +140,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Setur atriðið í fyrsta sæti
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM = "Setur atriðið í tiltekna sætið í listanum.";
|
||||
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_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "hækkandi";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "lækkandi";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "raða %1 %2 %3";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Raða afriti lista.";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "í stafrófsröð án tillits til stafstöðu";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "í númeraröð";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "í stafrófsröð";
|
||||
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";
|
||||
|
||||
+1
-1
@@ -207,7 +207,7 @@ Blockly.Msg.MATH_IS_TOOLTIP = "数字が、偶数、奇数、素数、整数、
|
||||
Blockly.Msg.MATH_IS_WHOLE = "は整数";
|
||||
Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation";
|
||||
Blockly.Msg.MATH_MODULO_TITLE = "残りの %1 ÷ %2";
|
||||
Blockly.Msg.MATH_MODULO_TOOLTIP = "2 つの数値を除算した残りを返します。";
|
||||
Blockly.Msg.MATH_MODULO_TOOLTIP = "2つの数値を除算した余りを返します。";
|
||||
Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×";
|
||||
Blockly.Msg.MATH_NUMBER_HELPURL = "https://ja.wikipedia.org/wiki/数";
|
||||
Blockly.Msg.MATH_NUMBER_TOOLTIP = "数です。";
|
||||
|
||||
+8
-8
@@ -26,7 +26,7 @@ Blockly.Msg.COLOUR_RGB_BLUE = "파랑";
|
||||
Blockly.Msg.COLOUR_RGB_GREEN = "초록";
|
||||
Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html";
|
||||
Blockly.Msg.COLOUR_RGB_RED = "빨강";
|
||||
Blockly.Msg.COLOUR_RGB_TITLE = "RGB 색";
|
||||
Blockly.Msg.COLOUR_RGB_TITLE = "색";
|
||||
Blockly.Msg.COLOUR_RGB_TOOLTIP = "빨강,파랑,초록의 값을 이용하여 색을 만드십시오. 모든 값은 0과 100 사이에 있어야 합니다.";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://ko.wikipedia.org/wiki/%EC%A0%9C%EC%96%B4_%ED%9D%90%EB%A6%84";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "반복 중단";
|
||||
@@ -64,7 +64,7 @@ Blockly.Msg.DELETE_ALL_BLOCKS = "모든 블록 %1개를 삭제하겠습니까?";
|
||||
Blockly.Msg.DELETE_BLOCK = "블록 삭제";
|
||||
Blockly.Msg.DELETE_VARIABLE = "Delete the '%1' variable"; // untranslated
|
||||
Blockly.Msg.DELETE_VARIABLE_CONFIRMATION = "Delete %1 uses of the '%2' variable?"; // untranslated
|
||||
Blockly.Msg.DELETE_X_BLOCKS = "블록 %1 삭제";
|
||||
Blockly.Msg.DELETE_X_BLOCKS = "블록 %1개 삭제";
|
||||
Blockly.Msg.DISABLE_BLOCK = "블록 비활성화";
|
||||
Blockly.Msg.DUPLICATE_BLOCK = "중복됨";
|
||||
Blockly.Msg.ENABLE_BLOCK = "블록 활성화";
|
||||
@@ -293,7 +293,7 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "매개 변수:";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "함수에 값을 더합니다.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "매개 변수들";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "이 함수를 추가, 삭제, 혹은 재정렬합니다.";
|
||||
Blockly.Msg.REDO = "다시 시도";
|
||||
Blockly.Msg.REDO = "다시 실행";
|
||||
Blockly.Msg.REMOVE_COMMENT = "내용 제거";
|
||||
Blockly.Msg.RENAME_VARIABLE = "변수 이름 바꾸기:";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "'%1' 변수 이름을 바꾸기:";
|
||||
@@ -347,10 +347,10 @@ Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#pr
|
||||
Blockly.Msg.TEXT_PRINT_TITLE = "다음 내용 출력 %1";
|
||||
Blockly.Msg.TEXT_PRINT_TOOLTIP = "원하는 문장, 수, 값 등을 출력합니다.";
|
||||
Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user";
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "수 입력 받음.";
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "문장 입력 받음.";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "다음 안내 멘트를 활용해 수 입력";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "다음 안내 멘트를 활용해 문장 입력";
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "수에 대해 사용자의 입력을 받습니다.";
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "문장에 대해 사용자의 입력을 받습니다.";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "메시지를 활용해 수 입력";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "메시지를 활용해 문장 입력";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "문자, 단어, 문장.";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces";
|
||||
@@ -359,7 +359,7 @@ Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "왼쪽의 공백 문자 제거";
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "오른쪽의 공백 문자 제거";
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "문장의 왼쪽/오른쪽/양쪽에서 스페이스 문자를 제거해 돌려줍니다.";
|
||||
Blockly.Msg.TODAY = "오늘";
|
||||
Blockly.Msg.UNDO = "끄르다";
|
||||
Blockly.Msg.UNDO = "실행 취소";
|
||||
Blockly.Msg.VARIABLES_DEFAULT_NAME = "항목";
|
||||
Blockly.Msg.VARIABLES_GET_CREATE_SET = "'집합 %1' 생성";
|
||||
Blockly.Msg.VARIABLES_GET_HELPURL = "https://ko.wikipedia.org/wiki/%EB%B3%80%EC%88%98_(%EC%BB%B4%ED%93%A8%ED%84%B0_%EA%B3%BC%ED%95%99)";
|
||||
|
||||
+9
-9
@@ -140,14 +140,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Sets the first item in a list."
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM = "Sets the item at the specified position in a list."; // 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_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "didėjančia tvarka";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "mažėjančia tvarka";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "rūšiuoti %1 %2 %3";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Rūšiuoti sąrašo kopiją.";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "abecėlės, ignoruoti raidžių dydį";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "skaitmeninis";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "abėcėlės";
|
||||
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
|
||||
@@ -191,7 +191,7 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Grąžina pirmą skaičių pakeltą
|
||||
Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter";
|
||||
Blockly.Msg.MATH_CHANGE_TITLE = "padidink %1 (emptypage) %2";
|
||||
Blockly.Msg.MATH_CHANGE_TOOLTIP = "Prideda skaičių prie kintamojo '%1'. Kai skaičius neigiamas - gaunasi atimtis.";
|
||||
Blockly.Msg.MATH_CONSTANT_HELPURL = "https://lt.wikipedia.org/wiki/Matematin%C4%97_konstanta";
|
||||
Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant";
|
||||
Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity)."; // untranslated
|
||||
Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated
|
||||
Blockly.Msg.MATH_CONSTRAIN_TITLE = "apribok %1 tarp %2 ir %3";
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ Blockly.Msg.COLOUR_RGB_TOOLTIP = "Skapa en färg med det angivna mängden röd,
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "bryt ut ur loop";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "fortsätta med nästa upprepning av loop";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Bryta ut ur den innehållande upprepningen.";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Bryt ut ur den innehållande upprepningen.";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Hoppa över resten av denna loop och fortsätt med nästa loop.";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Varning: Detta block kan endast användas i en loop.";
|
||||
Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated
|
||||
|
||||
+27
-27
@@ -8,7 +8,7 @@ goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "ใส่คำอธิบาย";
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "เปลี่ยนค่า:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.CLEAN_UP = "จัดเรียงบล็อกให้เป็นแถว";
|
||||
Blockly.Msg.COLLAPSE_ALL = "ย่อบล็อก";
|
||||
Blockly.Msg.COLLAPSE_BLOCK = "ย่อบล็อก";
|
||||
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "สีที่ 1";
|
||||
@@ -31,15 +31,15 @@ Blockly.Msg.COLOUR_RGB_TOOLTIP = "สร้างสีด้วยการก
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "ออกจากการวนซ้ำ";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "เริ่มการวนซ้ำรอบต่อไป";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "ออกจากการวนซ้ำที่มีอยู่";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "ข้ามสิ่งที่เหลืออยู่ และไปเริ่มวนซ้ำรอบต่อไปทันที";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "ระวัง: บล็อกชนิดนี้สามารถใช้งานได้เมื่ออยู่ภายในการวนซ้ำเท่านั้น";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "ออกจากการวนซ้ำที่อยู่";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "ข้ามคำสั่งที่เหลืออยู่ และเริ่มต้นวนซ้ำรอบต่อไป";
|
||||
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "คำเตือน: บล็อกนี้ใช้งานได้ภายในการวนซ้ำเท่านั้น";
|
||||
Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOREACH_TITLE = "วนซ้ำทุกรายการ %1 ในรายการ %2";
|
||||
Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "ทำซ้ำทุกรายการ กำหนดค่าตัวแปร \"%1\" ตามรายการ และทำตามคำสั่งที่กำหนดไว้";
|
||||
Blockly.Msg.CONTROLS_FOREACH_TITLE = "จากทุกรายการ %1 ในรายชื่อ %2";
|
||||
Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "จากทุกรายการในรายชื่อ ตั้งค่าตัวแปร \"%1\" เป็นรายการ และทำตามคำสั่งที่กำหนดไว้";
|
||||
Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOR_TITLE = "นับ %1 จาก %2 จนถึง %3 เปลี่ยนค่าทีละ %4";
|
||||
Blockly.Msg.CONTROLS_FOR_TOOLTIP = "ตัวแปร \"%1\" จะมีค่าตั้งแต่จำนวนเริ่มต้น ไปจนถึงจำนวนสิ้นสุด โดยมีการเปลี่ยนแปลงตามจำนวนที่กำหนด";
|
||||
Blockly.Msg.CONTROLS_FOR_TITLE = "นับด้วย %1 จาก %2 จนถึง %3 เปลี่ยนค่าทีละ %4";
|
||||
Blockly.Msg.CONTROLS_FOR_TOOLTIP = "ตัวแปร '%1' จะเริ่มจากจำนวนเริ่มต้น ไปจนถึงจำนวนสุดท้าย ตามระยะที่กำหนด และ ทำบล็อกที่กำหนดไว้";
|
||||
Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "กำหนดเงื่อนไขของบล็อก \"ถ้า\"";
|
||||
Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "เพิ่มสิ่งสุดท้าย ที่จะตรวจจับความเป็นไปได้ทั้งหมดของบล็อก \"ถ้า\"";
|
||||
Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated
|
||||
@@ -57,16 +57,16 @@ Blockly.Msg.CONTROLS_REPEAT_TITLE = "ทำซ้ำ %1 ครั้ง";
|
||||
Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "ทำซ้ำบางคำสั่งหลายครั้ง";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "ทำซ้ำจนกระทั่ง";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "ทำซ้ำตราบเท่าที่";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "ตราบเท่าที่ค่าเป็นเท็จ ก็จะทำบางคำสั่ง";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "ตราบเท่าที่ค่าเป็นจริง ก็จะทำบางคำสั่ง";
|
||||
Blockly.Msg.DELETE_ALL_BLOCKS = "ต้องการลบบล็อกทั้ง %1 บล็อกหรือไม่";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "ทำซ้ำขณะที่";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "ขณะที่ค่าเป็นเท็จ ก็จะทำบางคำสั่ง";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "ขณะที่ค่าเป็นจริง ก็จะทำบางคำสั่ง";
|
||||
Blockly.Msg.DELETE_ALL_BLOCKS = "ลบ %1 บล็อกทั้งหมด?";
|
||||
Blockly.Msg.DELETE_BLOCK = "ลบบล็อก";
|
||||
Blockly.Msg.DELETE_VARIABLE = "Delete the '%1' variable"; // untranslated
|
||||
Blockly.Msg.DELETE_VARIABLE_CONFIRMATION = "Delete %1 uses of the '%2' variable?"; // untranslated
|
||||
Blockly.Msg.DELETE_X_BLOCKS = "ลบ %1 บล็อก";
|
||||
Blockly.Msg.DISABLE_BLOCK = "ปิดใช้งานบล็อก";
|
||||
Blockly.Msg.DUPLICATE_BLOCK = "ทำซ้ำ";
|
||||
Blockly.Msg.DUPLICATE_BLOCK = "ทำสำเนา";
|
||||
Blockly.Msg.ENABLE_BLOCK = "เปิดใช้งานบล็อก";
|
||||
Blockly.Msg.EXPAND_ALL = "ขยายบล็อก";
|
||||
Blockly.Msg.EXPAND_BLOCK = "ขยายบล็อก";
|
||||
@@ -140,14 +140,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "กำหนดไอเท็
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM = "กำหนดไอเท็มในตำแหน่งที่ระบุในรายการ";
|
||||
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_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "น้อยไปหามาก";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "มากไปหาน้อย";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "เรียงลำดับ %1 %2 %3";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "เรียงลำดับสำเนาของรายชื่อ";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "ตัวอักษร";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "ตัวเลข";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "ตัวอักษร";
|
||||
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 = "สร้างข้อความจากรายการ";
|
||||
@@ -267,7 +267,7 @@ Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "คืนค่า tangent ขององ
|
||||
Blockly.Msg.NEW_VARIABLE = "สร้างตัวแปร...";
|
||||
Blockly.Msg.NEW_VARIABLE_TITLE = "ชื่อตัวแปรใหม่:";
|
||||
Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ""; // untranslated
|
||||
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "allow statements"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "ข้อความที่ใช้ได้";
|
||||
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "ด้วย:";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_(computer_science)";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "เรียกใช้ฟังก์ชันที่สร้างโดยผู้ใช้ \"%1\"";
|
||||
@@ -275,7 +275,7 @@ Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Proce
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "เรียกใช้ฟังก์ชันที่สร้างโดยผู้ใช้ \"%1\" และใช้ผลลัพธ์ของมัน";
|
||||
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "ด้วย:";
|
||||
Blockly.Msg.PROCEDURES_CREATE_DO = "สร้าง \"%1\"";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "Describe this function..."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "อธิบายฟังก์ชันนี้";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_DO = ""; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "ทำอะไรบางอย่าง";
|
||||
@@ -290,10 +290,10 @@ Blockly.Msg.PROCEDURES_IFRETURN_HELPURL = "http://c2.com/cgi/wiki?GuardClause";
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "ถ้ามีค่าเป็นจริง ให้คืนค่าที่สอง";
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "ระวัง: บล็อกนี้ใช้เฉพาะในการสร้างฟังก์ชันเท่านั้น";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "ชื่อนำเข้า:";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "เพิ่มค่าป้อนเข้าฟังก์ชัน";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "นำเข้า";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated
|
||||
Blockly.Msg.REDO = "Redo"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "เพิ่ม, ลบ, หรือจัดเรียง ข้อมูลที่ป้อนเข้าฟังก์ชันนี้";
|
||||
Blockly.Msg.REDO = "ทำซ้ำ";
|
||||
Blockly.Msg.REMOVE_COMMENT = "เอาคำอธิบายออก";
|
||||
Blockly.Msg.RENAME_VARIABLE = "เปลี่ยนชื่อตัวแปร...";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "เปลี่ยนชื่อตัวแปร '%1' ทั้งหมดเป็น:";
|
||||
@@ -359,7 +359,7 @@ Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "ลบช่องว่างด้า
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "ลบช่องว่างข้างท้ายของ";
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "คืนค่าสำเนาของข้อความที่ลบเอาช่องว่างหน้าและหลังข้อความออกแล้ว";
|
||||
Blockly.Msg.TODAY = "วันนี้";
|
||||
Blockly.Msg.UNDO = "Undo"; // untranslated
|
||||
Blockly.Msg.UNDO = "ย้อนกลับ";
|
||||
Blockly.Msg.VARIABLES_DEFAULT_NAME = "รายการ";
|
||||
Blockly.Msg.VARIABLES_GET_CREATE_SET = "สร้าง \"กำหนด %1\"";
|
||||
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
|
||||
|
||||
+2
-2
@@ -144,8 +144,8 @@ Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#s
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "artan";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "azalan";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "kısa %1 %2 %3";
|
||||
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_TOOLTIP = "Listenin kısa bir kopyası.";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alfabetik, gözardı et";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "sayısal";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alfabetik";
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
|
||||
+11
-1
@@ -4,7 +4,8 @@
|
||||
"Gkostov",
|
||||
"Vodnokon4e",
|
||||
"Alpinistbg",
|
||||
"Miroslav35232"
|
||||
"Miroslav35232",
|
||||
"StanProg"
|
||||
]
|
||||
},
|
||||
"VARIABLES_DEFAULT_NAME": "елемент",
|
||||
@@ -25,6 +26,8 @@
|
||||
"DISABLE_BLOCK": "Деактивирай блок",
|
||||
"ENABLE_BLOCK": "Активирай блок",
|
||||
"HELP": "Помощ",
|
||||
"UNDO": "Отмяна",
|
||||
"REDO": "Повторение",
|
||||
"CHANGE_VALUE_TITLE": "Промени стойността:",
|
||||
"NEW_VARIABLE": "Нова променлива...",
|
||||
"NEW_VARIABLE_TITLE": "Ново име на променливата:",
|
||||
@@ -266,6 +269,13 @@
|
||||
"LISTS_GET_SUBLIST_END_FROM_END": "до № открая",
|
||||
"LISTS_GET_SUBLIST_END_LAST": "до края",
|
||||
"LISTS_GET_SUBLIST_TOOLTIP": "Копира част от списък.",
|
||||
"LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list",
|
||||
"LISTS_SORT_TOOLTIP": "Подреди копие на списъка.",
|
||||
"LISTS_SORT_ORDER_ASCENDING": "възходящо",
|
||||
"LISTS_SORT_ORDER_DESCENDING": "низходящо",
|
||||
"LISTS_SORT_TYPE_NUMERIC": "в числов ред",
|
||||
"LISTS_SORT_TYPE_TEXT": "по азбучен ред",
|
||||
"LISTS_SORT_TYPE_IGNORECASE": "по азбучен ред, без отчитане на малки и главни букви",
|
||||
"LISTS_SPLIT_LIST_FROM_TEXT": "Направи списък от текст",
|
||||
"LISTS_SPLIT_TEXT_FROM_LIST": "направи текст от списък",
|
||||
"LISTS_SPLIT_WITH_DELIMITER": "с разделител",
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"RENAME_VARIABLE": "Vuriyayey fına name ke...",
|
||||
"COLOUR_PICKER_HELPURL": "https://diq.wikipedia.org/wiki/Reng",
|
||||
"COLOUR_RANDOM_TITLE": "rengo rastameye",
|
||||
"COLOUR_RANDOM_TOOLTIP": "Tesadufi yu ren bıweçin",
|
||||
"COLOUR_RGB_TITLE": "komponentên rengan",
|
||||
"COLOUR_RGB_RED": "sur",
|
||||
"COLOUR_RGB_GREEN": "kıho",
|
||||
@@ -41,35 +42,48 @@
|
||||
"COLOUR_BLEND_COLOUR2": "reng 2",
|
||||
"COLOUR_BLEND_RATIO": "nisbet",
|
||||
"CONTROLS_REPEAT_HELPURL": "https://en.wikipedia.org/wiki/For_loop",
|
||||
"CONTROLS_REPEAT_TITLE": "%1 fıni tekrar ke",
|
||||
"CONTROLS_REPEAT_INPUT_DO": "bık",
|
||||
"CONTROLS_WHILEUNTIL_OPERATOR_WHILE": "Tekrar kerdış de",
|
||||
"CONTROLS_WHILEUNTIL_OPERATOR_UNTIL": "hend tekrar ke",
|
||||
"CONTROLS_WHILEUNTIL_TOOLTIP_WHILE": "Yew erc raşto se yu beyanat bıd.",
|
||||
"CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL": "Yew erc xırabo se tay beyanati bıd",
|
||||
"CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK": "Çerxen ra vec",
|
||||
"CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE": "Gama bin da çerxeni ra dewam ke",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "Öujtewada çerxeni ra bıvıci",
|
||||
"CONTROLS_IF_MSG_IF": "se",
|
||||
"CONTROLS_IF_MSG_ELSEIF": "niyose",
|
||||
"CONTROLS_IF_MSG_ELSE": "çıniyose",
|
||||
"CONTROLS_IF_ELSEIF_TOOLTIP": "Bloq da if'i rê yu şert dekerê de.",
|
||||
"LOGIC_OPERATION_AND": "û",
|
||||
"LOGIC_OPERATION_OR": "ya zi",
|
||||
"LOGIC_NEGATE_TITLE": "%1 niyo",
|
||||
"LOGIC_BOOLEAN_TRUE": "raşt",
|
||||
"LOGIC_BOOLEAN_FALSE": "ğelet",
|
||||
"LOGIC_BOOLEAN_TOOLTIP": "Raşt yana çep erc dano",
|
||||
"LOGIC_NULL": "veng",
|
||||
"LOGIC_NULL_TOOLTIP": "Veng çarneno ra.",
|
||||
"LOGIC_TERNARY_CONDITION": "test",
|
||||
"LOGIC_TERNARY_IF_TRUE": "eke raşto",
|
||||
"LOGIC_TERNARY_IF_FALSE": "eke ğeleto",
|
||||
"LOGIC_TERNARY_TOOLTIP": "Şerta'test'i test keno. Eger ke şert raşta se erca 'raşt'i çarneno, çepo se erca 'çep' çarneno.",
|
||||
"MATH_NUMBER_HELPURL": "https://diq.wikipedia.org/wiki/Numre",
|
||||
"MATH_NUMBER_TOOLTIP": "Yew numre.",
|
||||
"MATH_ARITHMETIC_HELPURL": "https://en.wikipedia.org/wiki/Aritmetik",
|
||||
"MATH_SINGLE_HELPURL": "https://en.wikipedia.org/wiki/Square_root",
|
||||
"MATH_SINGLE_OP_ROOT": "karekok",
|
||||
"MATH_SINGLE_OP_ABSOLUTE": "mutlaq",
|
||||
"MATH_SINGLE_TOOLTIP_NEG": "Ena amorer nêravêrde deyne çerx ke.",
|
||||
"MATH_CONSTANT_HELPURL": "https://en.wikipedia.org/wiki/Mathematical_constant",
|
||||
"MATH_CONSTANT_TOOLTIP": "Heryen sabitan ra yewi çerx ke:π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (bêsonp).",
|
||||
"MATH_IS_EVEN": "zewnco",
|
||||
"MATH_IS_ODD": "kıto",
|
||||
"MATH_IS_PRIME": "bıngehên",
|
||||
"MATH_IS_WHOLE": "tamo",
|
||||
"MATH_IS_POSITIVE": "pozitifo",
|
||||
"MATH_IS_NEGATIVE": "negatifo",
|
||||
"MATH_IS_DIVISIBLE_BY": "Leteyêno",
|
||||
"MATH_CHANGE_HELPURL": "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter",
|
||||
"MATH_CHANGE_TITLE": "%2, keno %1 vurneno",
|
||||
"MATH_ROUND_HELPURL": "https://en.wikipedia.org/wiki/Rounding",
|
||||
"MATH_ROUND_TOOLTIP": "Yu amorer loğê cêri yana cori ke",
|
||||
@@ -82,9 +96,20 @@
|
||||
"MATH_ONLIST_OPERATOR_AVERAGE": "Averacê lista",
|
||||
"MATH_ONLIST_OPERATOR_MEDIAN": "Wertey lista",
|
||||
"MATH_ONLIST_OPERATOR_MODE": "listey modi",
|
||||
"MATH_ONLIST_OPERATOR_RANDOM": "Raştamaye objeya lista",
|
||||
"MATH_ONLIST_TOOLTIP_RANDOM": "Liste ra raştamaye yew elementi çerx ke",
|
||||
"MATH_MODULO_HELPURL": "https://en.wikipedia.org/wiki/Modulo_operation",
|
||||
"MATH_MODULO_TITLE": "%1 ÷ %2 ra menden",
|
||||
"MATH_MODULO_TOOLTIP": "Dı amoran ra amora menden çerx ke",
|
||||
"MATH_RANDOM_INT_HELPURL": "https://en.wikipedia.org/wiki/Random_number_generation",
|
||||
"MATH_RANDOM_FLOAT_HELPURL": "https://en.wikipedia.org/wiki/Random_number_generation",
|
||||
"MATH_RANDOM_FLOAT_TITLE_RANDOM": "Raştamaye nimande amor",
|
||||
"TEXT_TEXT_HELPURL": "https://en.wikipedia.org/wiki/String_(computer_science)",
|
||||
"TEXT_TEXT_TOOLTIP": "Yu herfa, satır yana çekuya metini",
|
||||
"TEXT_JOIN_TITLE_CREATEWITH": "ya metin vıraz",
|
||||
"TEXT_CREATE_JOIN_TITLE_JOIN": "gıre de",
|
||||
"TEXT_APPEND_TO": "rê",
|
||||
"TEXT_APPEND_APPENDTEXT": "Metin dek",
|
||||
"TEXT_ISEMPTY_TITLE": "%1 vengo",
|
||||
"TEXT_INDEXOF_INPUT_INTEXT": "metın de",
|
||||
"TEXT_CHARAT_INPUT_INTEXT": "metın de",
|
||||
@@ -97,6 +122,9 @@
|
||||
"TEXT_GET_SUBSTRING_TOOLTIP": "Tay letey metini çerğ keno",
|
||||
"TEXT_GET_SUBSTRING_INPUT_IN_TEXT": "metın de",
|
||||
"TEXT_GET_SUBSTRING_START_FROM_START": "# ra substring gêno",
|
||||
"TEXT_CHANGECASE_OPERATOR_UPPERCASE": "HERFANÊ GIRDANA",
|
||||
"TEXT_CHANGECASE_OPERATOR_LOWERCASE": "Herfanê werdiyana",
|
||||
"TEXT_CHANGECASE_OPERATOR_TITLECASE": "Ser herf gırd",
|
||||
"LISTS_CREATE_EMPTY_TITLE": "lista venge vıraze",
|
||||
"LISTS_CREATE_WITH_CONTAINER_TITLE_ADD": "liste",
|
||||
"LISTS_ISEMPTY_TITLE": "%1 vengo",
|
||||
|
||||
+8
-1
@@ -9,7 +9,8 @@
|
||||
"Glavkos",
|
||||
"Gchr",
|
||||
"아라",
|
||||
"Geraki"
|
||||
"Geraki",
|
||||
"Ανώνυμος Βικιπαιδιστής"
|
||||
]
|
||||
},
|
||||
"VARIABLES_DEFAULT_NAME": "αντικείμενο",
|
||||
@@ -29,6 +30,8 @@
|
||||
"DISABLE_BLOCK": "Απενεργοποίησε Το Μπλοκ",
|
||||
"ENABLE_BLOCK": "Ενεργοποίησε Το Μπλοκ",
|
||||
"HELP": "Βοήθεια",
|
||||
"UNDO": "Αναίρεση",
|
||||
"REDO": "Ακύρωση αναίρεσης",
|
||||
"CHANGE_VALUE_TITLE": "Άλλαξε την τιμή:",
|
||||
"NEW_VARIABLE": "Νέα μεταβλητή...",
|
||||
"NEW_VARIABLE_TITLE": "Νέο όνομα μεταβλητής:",
|
||||
@@ -293,6 +296,10 @@
|
||||
"LISTS_GET_SUBLIST_END_LAST": "έως το τελευταίο",
|
||||
"LISTS_GET_SUBLIST_TOOLTIP": "Δημιουργεί ένα αντίγραφο του καθορισμένου τμήματος μιας λίστας.",
|
||||
"LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list",
|
||||
"LISTS_SORT_ORDER_ASCENDING": "Αύξουσα",
|
||||
"LISTS_SORT_ORDER_DESCENDING": "Φθίνουσα",
|
||||
"LISTS_SORT_TYPE_NUMERIC": "αριθμητικό",
|
||||
"LISTS_SORT_TYPE_TEXT": "Αλφαβητικά",
|
||||
"LISTS_SPLIT_LIST_FROM_TEXT": "κάνετε λίστα από το κείμενο",
|
||||
"LISTS_SPLIT_TEXT_FROM_LIST": "κάνετε κείμενο από τη λίστα",
|
||||
"LISTS_SPLIT_WITH_DELIMITER": "με διαχωριστικό",
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
{
|
||||
"@metadata": {
|
||||
"authors": [
|
||||
"Andibing",
|
||||
"Codynguyen1116",
|
||||
"Shirayuki"
|
||||
]
|
||||
},
|
||||
"VARIABLES_DEFAULT_NAME": "item",
|
||||
"TODAY": "Today",
|
||||
"DUPLICATE_BLOCK": "Duplicate",
|
||||
"ADD_COMMENT": "Add Comment",
|
||||
"REMOVE_COMMENT": "Remove Comment",
|
||||
"EXTERNAL_INPUTS": "External Inputs",
|
||||
"INLINE_INPUTS": "Inline Inputs",
|
||||
"DELETE_BLOCK": "Delete Block",
|
||||
"DELETE_X_BLOCKS": "Delete %1 Blocks",
|
||||
"DELETE_ALL_BLOCKS": "Delete all %1 blocks?",
|
||||
"CLEAN_UP": "Clean up Blocks",
|
||||
"COLLAPSE_BLOCK": "Collapse Block",
|
||||
"COLLAPSE_ALL": "Collapse Blocks",
|
||||
"EXPAND_BLOCK": "Expand Block",
|
||||
"EXPAND_ALL": "Expand Blocks",
|
||||
"DISABLE_BLOCK": "Disable Block",
|
||||
"ENABLE_BLOCK": "Enable Block",
|
||||
"HELP": "Help",
|
||||
"UNDO": "Undo",
|
||||
"REDO": "Redo",
|
||||
"CHANGE_VALUE_TITLE": "Change value:",
|
||||
"NEW_VARIABLE": "New variable...",
|
||||
"NEW_VARIABLE_TITLE": "New variable name:",
|
||||
"RENAME_VARIABLE": "Rename variable...",
|
||||
"RENAME_VARIABLE_TITLE": "Rename all '%1' variables to:",
|
||||
"COLOUR_PICKER_HELPURL": "https://en.wikipedia.org/wiki/Colour",
|
||||
"COLOUR_PICKER_TOOLTIP": "Choose a colour from the palette.",
|
||||
"COLOUR_RANDOM_TITLE": "random colour",
|
||||
"COLOUR_RANDOM_TOOLTIP": "Choose a colour at random.",
|
||||
"COLOUR_RGB_TITLE": "colour with",
|
||||
"COLOUR_RGB_RED": "red",
|
||||
"COLOUR_RGB_GREEN": "green",
|
||||
"COLOUR_RGB_BLUE": "blue",
|
||||
"COLOUR_RGB_TOOLTIP": "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100.",
|
||||
"COLOUR_BLEND_TITLE": "blend",
|
||||
"COLOUR_BLEND_COLOUR1": "colour 1",
|
||||
"COLOUR_BLEND_COLOUR2": "colour 2",
|
||||
"COLOUR_BLEND_RATIO": "ratio",
|
||||
"COLOUR_BLEND_TOOLTIP": "Blends two colours together with a given ratio (0.0 - 1.0).",
|
||||
"CONTROLS_REPEAT_HELPURL": "https://en.wikipedia.org/wiki/For_loop",
|
||||
"CONTROLS_REPEAT_TITLE": "repeat %1 times",
|
||||
"CONTROLS_REPEAT_INPUT_DO": "do",
|
||||
"CONTROLS_REPEAT_TOOLTIP": "Do some statements several times.",
|
||||
"CONTROLS_WHILEUNTIL_OPERATOR_WHILE": "repeat while",
|
||||
"CONTROLS_WHILEUNTIL_OPERATOR_UNTIL": "repeat until",
|
||||
"CONTROLS_WHILEUNTIL_TOOLTIP_WHILE": "While a value is true, then do some statements.",
|
||||
"CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL": "While a value is false, then do some statements.",
|
||||
"CONTROLS_FOR_TOOLTIP": "Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks.",
|
||||
"CONTROLS_FOR_TITLE": "count with %1 from %2 to %3 by %4",
|
||||
"CONTROLS_FOREACH_TITLE": "for each item %1 in list %2",
|
||||
"CONTROLS_FOREACH_TOOLTIP": "For each item in a list, set the variable '%1' to the item, and then do some statements.",
|
||||
"CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK": "break out of loop",
|
||||
"CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE": "continue with next iteration of loop",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "Break out of the containing loop.",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE": "Skip the rest of this loop, and continue with the next iteration.",
|
||||
"CONTROLS_FLOW_STATEMENTS_WARNING": "Warning: This block may only be used within a loop.",
|
||||
"CONTROLS_IF_TOOLTIP_1": "If a value is true, then do some statements.",
|
||||
"CONTROLS_IF_TOOLTIP_2": "If a value is true, then do the first block of statements. Otherwise, do the second block of statements.",
|
||||
"CONTROLS_IF_TOOLTIP_3": "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements.",
|
||||
"CONTROLS_IF_TOOLTIP_4": "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements.",
|
||||
"CONTROLS_IF_MSG_IF": "if",
|
||||
"CONTROLS_IF_MSG_ELSEIF": "else if",
|
||||
"CONTROLS_IF_MSG_ELSE": "else",
|
||||
"CONTROLS_IF_IF_TOOLTIP": "Add, remove, or reorder sections to reconfigure this if block.",
|
||||
"CONTROLS_IF_ELSEIF_TOOLTIP": "Add a condition to the if block.",
|
||||
"CONTROLS_IF_ELSE_TOOLTIP": "Add a final, catch-all condition to the if block.",
|
||||
"LOGIC_COMPARE_HELPURL": "https://en.wikipedia.org/wiki/Inequality_(mathematics)",
|
||||
"LOGIC_COMPARE_TOOLTIP_EQ": "Return true if both inputs equal each other.",
|
||||
"LOGIC_COMPARE_TOOLTIP_NEQ": "Return true if both inputs are not equal to each other.",
|
||||
"LOGIC_COMPARE_TOOLTIP_LT": "Return true if the first input is smaller than the second input.",
|
||||
"LOGIC_COMPARE_TOOLTIP_LTE": "Return true if the first input is smaller than or equal to the second input.",
|
||||
"LOGIC_COMPARE_TOOLTIP_GT": "Return true if the first input is greater than the second input.",
|
||||
"LOGIC_COMPARE_TOOLTIP_GTE": "Return true if the first input is greater than or equal to the second input.",
|
||||
"LOGIC_OPERATION_TOOLTIP_AND": "Return true if both inputs are true.",
|
||||
"LOGIC_OPERATION_AND": "and",
|
||||
"LOGIC_OPERATION_TOOLTIP_OR": "Return true if at least one of the inputs is true.",
|
||||
"LOGIC_OPERATION_OR": "or",
|
||||
"LOGIC_NEGATE_TITLE": "not %1",
|
||||
"LOGIC_NEGATE_TOOLTIP": "Returns true if the input is false. Returns false if the input is true.",
|
||||
"LOGIC_BOOLEAN_TRUE": "true",
|
||||
"LOGIC_BOOLEAN_FALSE": "false",
|
||||
"LOGIC_BOOLEAN_TOOLTIP": "Returns either true or false.",
|
||||
"LOGIC_NULL": "null",
|
||||
"LOGIC_NULL_TOOLTIP": "Returns null.",
|
||||
"LOGIC_TERNARY_CONDITION": "test",
|
||||
"LOGIC_TERNARY_IF_TRUE": "if true",
|
||||
"LOGIC_TERNARY_IF_FALSE": "if false",
|
||||
"LOGIC_TERNARY_TOOLTIP": "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value.",
|
||||
"MATH_NUMBER_HELPURL": "https://en.wikipedia.org/wiki/Number",
|
||||
"MATH_NUMBER_TOOLTIP": "A number.",
|
||||
"MATH_ARITHMETIC_HELPURL": "https://en.wikipedia.org/wiki/Arithmetic",
|
||||
"MATH_ARITHMETIC_TOOLTIP_ADD": "Return the sum of the two numbers.",
|
||||
"MATH_ARITHMETIC_TOOLTIP_MINUS": "Return the difference of the two numbers.",
|
||||
"MATH_ARITHMETIC_TOOLTIP_MULTIPLY": "Return the product of the two numbers.",
|
||||
"MATH_ARITHMETIC_TOOLTIP_DIVIDE": "Return the quotient of the two numbers.",
|
||||
"MATH_ARITHMETIC_TOOLTIP_POWER": "Return the first number raised to the power of the second number.",
|
||||
"MATH_SINGLE_HELPURL": "https://en.wikipedia.org/wiki/Square_root",
|
||||
"MATH_SINGLE_OP_ROOT": "square root",
|
||||
"MATH_SINGLE_TOOLTIP_ROOT": "Return the square root of a number.",
|
||||
"MATH_SINGLE_OP_ABSOLUTE": "absolute",
|
||||
"MATH_SINGLE_TOOLTIP_ABS": "Return the absolute value of a number.",
|
||||
"MATH_SINGLE_TOOLTIP_NEG": "Return the negation of a number.",
|
||||
"MATH_SINGLE_TOOLTIP_LN": "Return the natural logarithm of a number.",
|
||||
"MATH_SINGLE_TOOLTIP_LOG10": "Return the base 10 logarithm of a number.",
|
||||
"MATH_SINGLE_TOOLTIP_EXP": "Return e to the power of a number.",
|
||||
"MATH_SINGLE_TOOLTIP_POW10": "Return 10 to the power of a number.",
|
||||
"MATH_TRIG_HELPURL": "https://en.wikipedia.org/wiki/Trigonometric_functions",
|
||||
"MATH_TRIG_TOOLTIP_SIN": "Return the sine of a degree (not radian).",
|
||||
"MATH_TRIG_TOOLTIP_COS": "Return the cosine of a degree (not radian).",
|
||||
"MATH_TRIG_TOOLTIP_TAN": "Return the tangent of a degree (not radian).",
|
||||
"MATH_TRIG_TOOLTIP_ASIN": "Return the arcsine of a number.",
|
||||
"MATH_TRIG_TOOLTIP_ACOS": "Return the arccosine of a number.",
|
||||
"MATH_TRIG_TOOLTIP_ATAN": "Return the arctangent of a number.",
|
||||
"MATH_CONSTANT_HELPURL": "https://en.wikipedia.org/wiki/Mathematical_constant",
|
||||
"MATH_CONSTANT_TOOLTIP": "Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity).",
|
||||
"MATH_IS_EVEN": "is even",
|
||||
"MATH_IS_ODD": "is odd",
|
||||
"MATH_IS_PRIME": "is prime",
|
||||
"MATH_IS_WHOLE": "is whole",
|
||||
"MATH_IS_POSITIVE": "is positive",
|
||||
"MATH_IS_NEGATIVE": "is negative",
|
||||
"MATH_IS_DIVISIBLE_BY": "is divisible by",
|
||||
"MATH_IS_TOOLTIP": "Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false.",
|
||||
"MATH_CHANGE_HELPURL": "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter",
|
||||
"MATH_CHANGE_TITLE": "change %1 by %2",
|
||||
"MATH_CHANGE_TOOLTIP": "Add a number to variable '%1'.",
|
||||
"MATH_ROUND_HELPURL": "https://en.wikipedia.org/wiki/Rounding",
|
||||
"MATH_ROUND_TOOLTIP": "Round a number up or down.",
|
||||
"MATH_ROUND_OPERATOR_ROUND": "round",
|
||||
"LISTS_SORT_ORDER_DESCENDING": "descendente"
|
||||
}
|
||||
@@ -0,0 +1,310 @@
|
||||
{
|
||||
"@metadata": {
|
||||
"authors": [
|
||||
"Aivarannamaa",
|
||||
"Hasso"
|
||||
]
|
||||
},
|
||||
"VARIABLES_DEFAULT_NAME": "objekt",
|
||||
"TODAY": "Täna",
|
||||
"DUPLICATE_BLOCK": "Tekita duplikaat",
|
||||
"ADD_COMMENT": "Lisa kommentaar",
|
||||
"REMOVE_COMMENT": "Eemalda kommentaar",
|
||||
"EXTERNAL_INPUTS": "Sisendid ploki taga",
|
||||
"INLINE_INPUTS": "Sisendid ploki sees",
|
||||
"DELETE_BLOCK": "Kustuta plokk",
|
||||
"DELETE_X_BLOCKS": "Kustuta %1 plokki",
|
||||
"DELETE_ALL_BLOCKS": "Kas kustutada kõik %1 plokki?",
|
||||
"CLEAN_UP": "Korista plokid kokku",
|
||||
"COLLAPSE_BLOCK": "Tõmba plokk kokku",
|
||||
"COLLAPSE_ALL": "Tõmba plokid kokku",
|
||||
"EXPAND_BLOCK": "Laota plokk laiali",
|
||||
"EXPAND_ALL": "Laota plokid laiali",
|
||||
"DISABLE_BLOCK": "Keela ploki kasutamine",
|
||||
"ENABLE_BLOCK": "Luba ploki kasutamine",
|
||||
"HELP": "Abi",
|
||||
"UNDO": "Võta tagasi",
|
||||
"REDO": "Tee uuesti",
|
||||
"CHANGE_VALUE_TITLE": "Muuda väärtust:",
|
||||
"NEW_VARIABLE": "Uus muutuja ...",
|
||||
"NEW_VARIABLE_TITLE": "Uue muutuja nimi:",
|
||||
"RENAME_VARIABLE": "Nimeta muutuja ümber ...",
|
||||
"RENAME_VARIABLE_TITLE": "Muutuja „%1“ uus nimi:",
|
||||
"COLOUR_PICKER_HELPURL": "https://en.wikipedia.org/wiki/Color",
|
||||
"COLOUR_PICKER_TOOLTIP": "Valitud värv paletist.",
|
||||
"COLOUR_RANDOM_TITLE": "juhuslik värv",
|
||||
"COLOUR_RANDOM_TOOLTIP": "Juhuslikult valitud värv.",
|
||||
"COLOUR_RGB_TITLE": "segu",
|
||||
"COLOUR_RGB_RED": "punasest",
|
||||
"COLOUR_RGB_GREEN": "rohelisest",
|
||||
"COLOUR_RGB_BLUE": "sinisest",
|
||||
"COLOUR_RGB_TOOLTIP": "Tekitab värvi määratud hulgast punasest, rohelisest ja sinisest. Kõik väärtused peavad olema 0 ja 100 vahel.",
|
||||
"COLOUR_BLEND_TITLE": "segu",
|
||||
"COLOUR_BLEND_COLOUR1": "1. värvist",
|
||||
"COLOUR_BLEND_COLOUR2": "2. värvist",
|
||||
"COLOUR_BLEND_RATIO": "suhtega",
|
||||
"COLOUR_BLEND_TOOLTIP": "Segab kaks värvi määratud suhtega (0.0 - 1.0) kokku.",
|
||||
"CONTROLS_REPEAT_HELPURL": "https://en.wikipedia.org/wiki/For_loop",
|
||||
"CONTROLS_REPEAT_TITLE": "kordus %1 korda",
|
||||
"CONTROLS_REPEAT_INPUT_DO": "käivita",
|
||||
"CONTROLS_REPEAT_TOOLTIP": "Plokis olevate käskude käivitamine mitu korda.",
|
||||
"CONTROLS_WHILEUNTIL_OPERATOR_WHILE": "kordus kuni on",
|
||||
"CONTROLS_WHILEUNTIL_OPERATOR_UNTIL": "kordus kuni pole",
|
||||
"CONTROLS_WHILEUNTIL_TOOLTIP_WHILE": "Kuni avaldis on tõene, korda plokis olevaid käske.",
|
||||
"CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL": "Kuni avaldis pole tõene, korda plokis olevaid käske.",
|
||||
"CONTROLS_FOR_TOOLTIP": "Annab muutujale '%1' väärtused ühest numbrist teiseni, muutes seda intervalli kaupa ja käivitab igal muudatusel ploki sees oleva koodi.",
|
||||
"CONTROLS_FOR_TITLE": "loenda muutujaga %1 alates %2 kuni %3 %4 kaupa",
|
||||
"CONTROLS_FOREACH_TITLE": "iga elemendiga %1 loendis %2",
|
||||
"CONTROLS_FOREACH_TOOLTIP": "Iga elemendiga loendis anna muutujale '%1' elemendi väärtus ja kõivita plokis olevad käsud.",
|
||||
"CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK": "katkesta kordus",
|
||||
"CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE": "liigu järgmisele kordusele",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "Katkestab korduse ja liigub edasi korduse järel oleva koodi käivitamisele.",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE": "Katkestab korduse sees oleva koodi käivitamise ja käivitab järgmise korduse.",
|
||||
"CONTROLS_FLOW_STATEMENTS_WARNING": "Hoiatus: Seda plokki saab kasutada ainult korduse sees.",
|
||||
"CONTROLS_IF_TOOLTIP_1": "Kui avaldis on tõene, käivita ploki sees olevad käsud.",
|
||||
"CONTROLS_IF_TOOLTIP_2": "Kui avaldis on tõene, käivita käsud esimesest plokist. Vastasel juhul käivita käsud teisest plokist.",
|
||||
"CONTROLS_IF_TOOLTIP_3": "Kui esimene avaldis on tõene, käivita käsud esimesest plokist. Vastasel juhul, kui teine avaldis on tõene, käivita käsud teisest plokist.",
|
||||
"CONTROLS_IF_TOOLTIP_4": "Kui esimene avaldis on tõene, käivita käsud esimesest plokist. Vastasel juhul, kui teine avaldis on tõene, käivita käsud teisest plokist. Kui ükski avaldistest pole tõene, käivita käsud viimasest plokist.",
|
||||
"CONTROLS_IF_MSG_IF": "kui",
|
||||
"CONTROLS_IF_MSG_ELSEIF": "vastasel juhul, kui",
|
||||
"CONTROLS_IF_MSG_ELSE": "vastasel juhul",
|
||||
"CONTROLS_IF_IF_TOOLTIP": "Selle „kui“ ploki muutmine sektsioonide lisamise, eemaldamise ja järjestamisega.",
|
||||
"CONTROLS_IF_ELSEIF_TOOLTIP": "Lisab „kui“ plokile tingimuse.",
|
||||
"CONTROLS_IF_ELSE_TOOLTIP": "Lisab „kui“ plokile lõpliku tingimuseta koodiploki.",
|
||||
"LOGIC_COMPARE_HELPURL": "https://en.wikipedia.org/wiki/Inequality_(mathematics)",
|
||||
"LOGIC_COMPARE_TOOLTIP_EQ": "Tagastab „tõene“, kui avaldiste väärtused on võrdsed.",
|
||||
"LOGIC_COMPARE_TOOLTIP_NEQ": "Tagastab „tõene“, kui avaldiste väärtused pole võrdsed.",
|
||||
"LOGIC_COMPARE_TOOLTIP_LT": "Tagastab „tõene“, kui esimese avaldise väärtus on väiksem kui teise väärtus.",
|
||||
"LOGIC_COMPARE_TOOLTIP_LTE": "Tagastab „tõene“, kui esimese avaldise väärtus on väiksem või võrdne teise väärtusega.",
|
||||
"LOGIC_COMPARE_TOOLTIP_GT": "Tagastab „tõene“, kui esimese avaldise väärtus on suurem kui teise väärtus.",
|
||||
"LOGIC_COMPARE_TOOLTIP_GTE": "Tagastab „tõene“, kui esimese avaldise väärtus on suurem või võrdne teise väärtusega.",
|
||||
"LOGIC_OPERATION_TOOLTIP_AND": "Tagastab „tõene“, kui mõlemad avaldised on tõesed.",
|
||||
"LOGIC_OPERATION_AND": "ja",
|
||||
"LOGIC_OPERATION_TOOLTIP_OR": "Tagastab „tõene“, kui vähemalt üks avaldistest on tõene.",
|
||||
"LOGIC_OPERATION_OR": "või",
|
||||
"LOGIC_NEGATE_TITLE": "pole %1",
|
||||
"LOGIC_NEGATE_TOOLTIP": "Tagastab „tõene“, kui avaldis on väär. Tagastab „väär“, kui avaldis on tõene.",
|
||||
"LOGIC_BOOLEAN_TRUE": "tõene",
|
||||
"LOGIC_BOOLEAN_FALSE": "väär",
|
||||
"LOGIC_BOOLEAN_TOOLTIP": "Tagastab tõeväärtuse – kas „tõene“ või „väär“.",
|
||||
"LOGIC_NULL": "null",
|
||||
"LOGIC_NULL_TOOLTIP": "Tagastab nulli.",
|
||||
"LOGIC_TERNARY_CONDITION": "tingimus",
|
||||
"LOGIC_TERNARY_IF_TRUE": "kui tõene",
|
||||
"LOGIC_TERNARY_IF_FALSE": "kui väär",
|
||||
"LOGIC_TERNARY_TOOLTIP": "Kui tingimuse väärtus on tõene, tagastab „kui tõene“ väärtuse, vastasel juhul „kui väär“ väärtuse.",
|
||||
"MATH_NUMBER_HELPURL": "https://et.wikipedia.org/wiki/Arv",
|
||||
"MATH_NUMBER_TOOLTIP": "Arv.",
|
||||
"MATH_ARITHMETIC_HELPURL": "https://et.wikipedia.org/wiki/Aritmeetika",
|
||||
"MATH_ARITHMETIC_TOOLTIP_ADD": "Tagastab kahe arvu summa.",
|
||||
"MATH_ARITHMETIC_TOOLTIP_MINUS": "Tagastab kahe arvu vahe.",
|
||||
"MATH_ARITHMETIC_TOOLTIP_MULTIPLY": "Tagastab kahe arvu korrutise.",
|
||||
"MATH_ARITHMETIC_TOOLTIP_DIVIDE": "Tagastab kahe arvu jagatise.",
|
||||
"MATH_ARITHMETIC_TOOLTIP_POWER": "Tagastab esimese arvu teise arvu astmes.",
|
||||
"MATH_SINGLE_HELPURL": "https://et.wikipedia.org/wiki/Ruutjuur",
|
||||
"MATH_SINGLE_OP_ROOT": "ruutjuur",
|
||||
"MATH_SINGLE_TOOLTIP_ROOT": "Tagastab arvu ruutjuure.",
|
||||
"MATH_SINGLE_OP_ABSOLUTE": "absoluutväärtus",
|
||||
"MATH_SINGLE_TOOLTIP_ABS": "Tagastab arvu absoluutväärtuse.",
|
||||
"MATH_SINGLE_TOOLTIP_NEG": "Tagastab arvu vastandväärtuse.",
|
||||
"MATH_SINGLE_TOOLTIP_LN": "Tagastab arvu naturaallogaritmi.",
|
||||
"MATH_SINGLE_TOOLTIP_LOG10": "Tagastab arvu kümnendlogaritm.",
|
||||
"MATH_SINGLE_TOOLTIP_EXP": "Tagasta e arvu astmes.",
|
||||
"MATH_SINGLE_TOOLTIP_POW10": "Tagastab 10 arvu astmes.",
|
||||
"MATH_TRIG_HELPURL": "https://et.wikipedia.org/wiki/Trigonomeetrilised_funktsioonid",
|
||||
"MATH_TRIG_TOOLTIP_SIN": "Tagastab arvu (kraadid) siinuse.",
|
||||
"MATH_TRIG_TOOLTIP_COS": "Tagastab arvu (kraadid) kosiinuse.",
|
||||
"MATH_TRIG_TOOLTIP_TAN": "Tagastab arvu (kraadid) tangensi.",
|
||||
"MATH_TRIG_TOOLTIP_ASIN": "Tagastab arvu arkussiinuse.",
|
||||
"MATH_TRIG_TOOLTIP_ACOS": "Tagastab arvu arkuskoosiinuse.",
|
||||
"MATH_TRIG_TOOLTIP_ATAN": "Tagastab arvu arkustangensi.",
|
||||
"MATH_CONSTANT_HELPURL": "https://en.wikipedia.org/wiki/Mathematical_constant",
|
||||
"MATH_CONSTANT_TOOLTIP": "Tagastab ühe konstantidest: π (3,141…), e (2,718…), φ (1.618…), √2) (1,414…), √½ (0,707…), või ∞ (infinity).",
|
||||
"MATH_IS_EVEN": "on paarisarv",
|
||||
"MATH_IS_ODD": "on paaritu arv",
|
||||
"MATH_IS_PRIME": "on algarv",
|
||||
"MATH_IS_WHOLE": "on täisarv",
|
||||
"MATH_IS_POSITIVE": "on positiivne arv",
|
||||
"MATH_IS_NEGATIVE": "on negatiivne arv",
|
||||
"MATH_IS_DIVISIBLE_BY": "jagub arvuga",
|
||||
"MATH_IS_TOOLTIP": "Kontrollib kas arv on paarisarv, paaritu arv, algarv, täisarv, positiivne, negatiivne või jagub kindla arvuga. Tagastab „tõene“ või „väär“.",
|
||||
"MATH_CHANGE_HELPURL": "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter",
|
||||
"MATH_CHANGE_TITLE": "muuda %1 %2 võrra",
|
||||
"MATH_CHANGE_TOOLTIP": "Lisab arvu muutujale '%1'.",
|
||||
"MATH_ROUND_HELPURL": "https://en.wikipedia.org/wiki/Rounding",
|
||||
"MATH_ROUND_TOOLTIP": "Ümardab arvu üles või alla.",
|
||||
"MATH_ROUND_OPERATOR_ROUND": "ümarda",
|
||||
"MATH_ROUND_OPERATOR_ROUNDUP": "ümarda üles",
|
||||
"MATH_ROUND_OPERATOR_ROUNDDOWN": "ümarda alla",
|
||||
"MATH_ONLIST_OPERATOR_SUM": "loendi summa",
|
||||
"MATH_ONLIST_TOOLTIP_SUM": "Tagastab kõigi loendis olevate arvude summa.",
|
||||
"MATH_ONLIST_OPERATOR_MIN": "loendi miinimum",
|
||||
"MATH_ONLIST_TOOLTIP_MIN": "Tagastab väikseima loendis oleva arvu.",
|
||||
"MATH_ONLIST_OPERATOR_MAX": "loendi maksimum",
|
||||
"MATH_ONLIST_TOOLTIP_MAX": "Tagastab suurima loendis oleva arvu.",
|
||||
"MATH_ONLIST_OPERATOR_AVERAGE": "loendi keskmine",
|
||||
"MATH_ONLIST_TOOLTIP_AVERAGE": "Tagastab loendis olevate arvväärtuste aritmeetilise keskmise.",
|
||||
"MATH_ONLIST_OPERATOR_MEDIAN": "loendi mediaan",
|
||||
"MATH_ONLIST_TOOLTIP_MEDIAN": "Return the median number in the list.",
|
||||
"MATH_ONLIST_OPERATOR_MODE": "loendi moodid",
|
||||
"MATH_ONLIST_TOOLTIP_MODE": "Tagastab loendi kõige sagedamini esinevate loendi liikmetega.",
|
||||
"MATH_ONLIST_OPERATOR_STD_DEV": "loendi standardhälve",
|
||||
"MATH_ONLIST_TOOLTIP_STD_DEV": "Tagastab loendi standardhälbe.",
|
||||
"MATH_ONLIST_OPERATOR_RANDOM": "juhuslik element loendist",
|
||||
"MATH_ONLIST_TOOLTIP_RANDOM": "Tagastab juhusliku elemendi loendist.",
|
||||
"MATH_MODULO_HELPURL": "https://en.wikipedia.org/wiki/Modulo_operation",
|
||||
"MATH_MODULO_TITLE": "%1 ÷ %2 jääk",
|
||||
"MATH_MODULO_TOOLTIP": "Tagastab esimese numbri teisega jagamisel tekkiva jäägi.",
|
||||
"MATH_CONSTRAIN_TITLE": "%1 piirang %2 ja %3 vahele",
|
||||
"MATH_CONSTRAIN_TOOLTIP": "Piirab arvu väärtuse toodud piiridesse (piirarvud kaasa arvatud).",
|
||||
"MATH_RANDOM_INT_HELPURL": "https://en.wikipedia.org/wiki/Random_number_generation",
|
||||
"MATH_RANDOM_INT_TITLE": "juhuslik täisarv %1 ja %2 vahel",
|
||||
"MATH_RANDOM_INT_TOOLTIP": "Tagastab juhusliku täisarvu toodud piiride vahel (piirarvud kaasa arvatud).",
|
||||
"MATH_RANDOM_FLOAT_HELPURL": "https://en.wikipedia.org/wiki/Random_number_generation",
|
||||
"MATH_RANDOM_FLOAT_TITLE_RANDOM": "juhuslik murdosa",
|
||||
"MATH_RANDOM_FLOAT_TOOLTIP": "Tagastab juhusliku murdosa 0.0 (kaasa arvatud) and 1.0 (välja arvatud) vahel.",
|
||||
"TEXT_TEXT_HELPURL": "https://en.wikipedia.org/wiki/String_(computer_science)",
|
||||
"TEXT_TEXT_TOOLTIP": "Täht, sõna või rida teksti.",
|
||||
"TEXT_JOIN_TITLE_CREATEWITH": "tekita tekst",
|
||||
"TEXT_JOIN_TOOLTIP": "Tekitab teksti ühendades mistahes arvu elemente.",
|
||||
"TEXT_CREATE_JOIN_TITLE_JOIN": "ühenda",
|
||||
"TEXT_CREATE_JOIN_TOOLTIP": "Tekstiploki muutmine sektsioonide lisamise, eemaldamise või järjestuse muutmisega.",
|
||||
"TEXT_CREATE_JOIN_ITEM_TOOLTIP": "Objekti lisamine tekstile.",
|
||||
"TEXT_APPEND_TO": "lisa muutuja",
|
||||
"TEXT_APPEND_APPENDTEXT": "lõppu tekst",
|
||||
"TEXT_APPEND_TOOLTIP": "Lisab teksti muutuja „%1“ väärtuse lõppu.",
|
||||
"TEXT_LENGTH_TITLE": "%1 pikkus",
|
||||
"TEXT_LENGTH_TOOLTIP": "Tagastab sümbolite aru (ka tühikud) toodud tekstis.",
|
||||
"TEXT_ISEMPTY_TITLE": "%1 on tühi",
|
||||
"TEXT_ISEMPTY_TOOLTIP": "Tagastab „tõene“, kui tekstis pole ühtegi sümbolit.",
|
||||
"TEXT_INDEXOF_TOOLTIP": "Tagastab esimesest tekstist esimese/viimase leitud teise teksti asukoha (indeksi). Kui teksti ei leita, tagastab %1.",
|
||||
"TEXT_INDEXOF_INPUT_INTEXT": "tekstist",
|
||||
"TEXT_INDEXOF_OPERATOR_FIRST": "esimese leitud tekstitüki",
|
||||
"TEXT_INDEXOF_OPERATOR_LAST": "viimase leitud tekstitüki",
|
||||
"TEXT_INDEXOF_TAIL": "asukoht",
|
||||
"TEXT_CHARAT_INPUT_INTEXT": "tekstist",
|
||||
"TEXT_CHARAT_FROM_START": "sümbol #",
|
||||
"TEXT_CHARAT_FROM_END": "lõpust sümbol #",
|
||||
"TEXT_CHARAT_FIRST": "esimene sümbol",
|
||||
"TEXT_CHARAT_LAST": "viimane sümbol",
|
||||
"TEXT_CHARAT_RANDOM": "juhuslik sümbol",
|
||||
"TEXT_CHARAT_TOOLTIP": "Tagastab tekstis määratud asukohal oleva sümboli.",
|
||||
"TEXT_GET_SUBSTRING_TOOLTIP": "Tagastab määratud tüki tekstist.",
|
||||
"TEXT_GET_SUBSTRING_INPUT_IN_TEXT": "tekstist",
|
||||
"TEXT_GET_SUBSTRING_START_FROM_START": "alates sümbolist #",
|
||||
"TEXT_GET_SUBSTRING_START_FROM_END": "alates (lõpust) sümbolist #",
|
||||
"TEXT_GET_SUBSTRING_START_FIRST": "alates esimesest sümbolist",
|
||||
"TEXT_GET_SUBSTRING_END_FROM_START": "kuni sümbolini #",
|
||||
"TEXT_GET_SUBSTRING_END_FROM_END": "kuni (lõpust) sümbolini #",
|
||||
"TEXT_GET_SUBSTRING_END_LAST": "kuni viimase sümbolini",
|
||||
"TEXT_CHANGECASE_TOOLTIP": "Tagastab muudetud tähesuurusega teksti koopia.",
|
||||
"TEXT_CHANGECASE_OPERATOR_UPPERCASE": "SUURTE TÄHTEDEGA",
|
||||
"TEXT_CHANGECASE_OPERATOR_LOWERCASE": "väikeste tähtedega",
|
||||
"TEXT_CHANGECASE_OPERATOR_TITLECASE": "Suurte Esitähtedega",
|
||||
"TEXT_TRIM_TOOLTIP": "Tagastab koopia tekstist, millel on tühikud ühelt või mõlemalt poolt eemaldatud.",
|
||||
"TEXT_TRIM_OPERATOR_BOTH": "mõlemalt poolt eemaldatud tühikutega",
|
||||
"TEXT_TRIM_OPERATOR_LEFT": "algusest eemaldatud tühikutega",
|
||||
"TEXT_TRIM_OPERATOR_RIGHT": "lõpust eemaldatud tühikutega",
|
||||
"TEXT_PRINT_TITLE": "trüki %1",
|
||||
"TEXT_PRINT_TOOLTIP": "Trükib määratud teksti, numbri või mõne muu objekti väärtuse.",
|
||||
"TEXT_PROMPT_TYPE_TEXT": "kasutajalt küsitud tekst teatega",
|
||||
"TEXT_PROMPT_TYPE_NUMBER": "kasutajalt küsitud arv teatega",
|
||||
"TEXT_PROMPT_TOOLTIP_NUMBER": "Küsib kasutajalt teadet näidates mingit arvu.",
|
||||
"TEXT_PROMPT_TOOLTIP_TEXT": "Küsib kasutajalt teadet näidates mingit teksti.",
|
||||
"LISTS_CREATE_EMPTY_TITLE": "tühi loend",
|
||||
"LISTS_CREATE_EMPTY_TOOLTIP": "Tagastab loendi, mille pikkus on 0 ja milles pole ühtegi elementi.",
|
||||
"LISTS_CREATE_WITH_TOOLTIP": "Tekitab mistahes arvust elementidest loendi.",
|
||||
"LISTS_CREATE_WITH_INPUT_WITH": "loend elementidest",
|
||||
"LISTS_CREATE_WITH_CONTAINER_TITLE_ADD": "loend",
|
||||
"LISTS_CREATE_WITH_CONTAINER_TOOLTIP": "Loendiploki elementide lisamine, eemaldamine või järjestuse muutmine.",
|
||||
"LISTS_CREATE_WITH_ITEM_TOOLTIP": "Elemendi lisamine loendisse.",
|
||||
"LISTS_REPEAT_TOOLTIP": "Tekitab uue loendi, millesse lisatakse ühte elementi pikkusega määratud arv kordi.",
|
||||
"LISTS_REPEAT_TITLE": "loend pikkusega %2 elemendist %1",
|
||||
"LISTS_LENGTH_TITLE": "%1 pikkus",
|
||||
"LISTS_LENGTH_TOOLTIP": "Tagastab loendi pikkuse.",
|
||||
"LISTS_ISEMPTY_TITLE": "%1 on tühi",
|
||||
"LISTS_ISEMPTY_TOOLTIP": "Tagastab „tõene“ kui loend on tühi.",
|
||||
"LISTS_INLIST": "loendis",
|
||||
"LISTS_INDEX_OF_FIRST": "esimene leitud element",
|
||||
"LISTS_INDEX_OF_LAST": "viimane leitud element",
|
||||
"LISTS_INDEX_OF_TOOLTIP": "Tagastab esimese/viimase loendist leitud elemendi asukoha (järjekorranumbri). Kui elementi ei leita, tagastab %1.",
|
||||
"LISTS_GET_INDEX_GET": "võta",
|
||||
"LISTS_GET_INDEX_GET_REMOVE": "võta ja eemalda",
|
||||
"LISTS_GET_INDEX_REMOVE": "eemalda",
|
||||
"LISTS_GET_INDEX_FROM_END": "# lõpust",
|
||||
"LISTS_GET_INDEX_FIRST": "esimene element",
|
||||
"LISTS_GET_INDEX_LAST": "viimane element",
|
||||
"LISTS_GET_INDEX_RANDOM": "juhuslik element",
|
||||
"LISTS_INDEX_FROM_START_TOOLTIP": "Esimene element on %1.",
|
||||
"LISTS_INDEX_FROM_END_TOOLTIP": "Viimane element on %1.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_FROM": "Tagastab loendis määratud asukohal oleva elemendi.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_FIRST": "Tagastab loendi esimese elemendi.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_LAST": "Tagastab loendi viimase elemendi.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_RANDOM": "Tagastab loendi juhusliku elemendi.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM": "Tagastab ja eemaldab loendist määratud asukohal oleva elemendi.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST": "Tagastab ja eemaldab loendist esimese elemendi.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST": "Tagastab ja eemaldab loendist viimase elemendi.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM": "Tagastab ja eemaldab loendist juhusliku elemendi.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM": "Eemaldab loendist määratud asukohal oleva elemendi.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST": "Eemaldab loendist esimese elemendi.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST": "Eemaldab loendist viimase elemendi.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM": "Eemaldab loendist juhusliku elemendi.",
|
||||
"LISTS_SET_INDEX_SET": "asenda",
|
||||
"LISTS_SET_INDEX_INSERT": "lisa asukohale",
|
||||
"LISTS_SET_INDEX_INPUT_TO": "väärtus:",
|
||||
"LISTS_SET_INDEX_TOOLTIP_SET_FROM": "Asendab loendis määratud kohal oleva elemendi.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_SET_FIRST": "Asendab loendis esimese elemendi.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_SET_LAST": "Asendab loendis viimase elemendi.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_SET_RANDOM": "Asendab loendis juhusliku elemendi.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_INSERT_FROM": "Lisab määratud asukohale loendis uue elemendi.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST": "Lisab loendi algusesse uue elemendi.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_INSERT_LAST": "Lisab loendi lõppu uue elemendi.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM": "Lisab juhuslikule kohale loendis uue elemendi.",
|
||||
"LISTS_GET_SUBLIST_START_FROM_START": "alamloend elemendist #",
|
||||
"LISTS_GET_SUBLIST_START_FROM_END": "alamloend elemendist # (lõpust)",
|
||||
"LISTS_GET_SUBLIST_START_FIRST": "alamloend algusest",
|
||||
"LISTS_GET_SUBLIST_END_FROM_START": "elemendini #",
|
||||
"LISTS_GET_SUBLIST_END_FROM_END": "elemendini # (lõpust)",
|
||||
"LISTS_GET_SUBLIST_END_LAST": "lõpuni",
|
||||
"LISTS_GET_SUBLIST_TOOLTIP": "Tekitab loendi määratud osast koopia.",
|
||||
"LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list",
|
||||
"LISTS_SORT_TITLE": "%1 %2 sorteeritud %3",
|
||||
"LISTS_SORT_TOOLTIP": "Loendi koopia sorteerimine.",
|
||||
"LISTS_SORT_ORDER_ASCENDING": "kasvavalt",
|
||||
"LISTS_SORT_ORDER_DESCENDING": "kahanevalt",
|
||||
"LISTS_SORT_TYPE_NUMERIC": "arvväärtuste järgi",
|
||||
"LISTS_SORT_TYPE_TEXT": "tähestiku järgi",
|
||||
"LISTS_SORT_TYPE_IGNORECASE": "tähestiku järgi (tähesuurust eirates)",
|
||||
"LISTS_SPLIT_LIST_FROM_TEXT": "loend, tekitatud tekstist",
|
||||
"LISTS_SPLIT_TEXT_FROM_LIST": "tekst, tekitatud loendist",
|
||||
"LISTS_SPLIT_WITH_DELIMITER": "eraldajaga",
|
||||
"LISTS_SPLIT_TOOLTIP_SPLIT": "Tükeldab teksti eraldajade kohalt ja asetab tükid tekstide loendisse.",
|
||||
"LISTS_SPLIT_TOOLTIP_JOIN": "Ühendab tekstide loendis olevad tükid üheks tekstiks, asetades tükkide vahele eraldaja.",
|
||||
"VARIABLES_GET_TOOLTIP": "Tagastab selle muutuja väärtuse.",
|
||||
"VARIABLES_GET_CREATE_SET": "Tekita 'määra „%1“ väärtuseks' plokk",
|
||||
"VARIABLES_SET": "\"määra %1 väärtuseks %2",
|
||||
"VARIABLES_SET_TOOLTIP": "Määrab selle muutuja väärtuse võrdseks sisendi väärtusega.",
|
||||
"VARIABLES_SET_CREATE_GET": "Tekita '„%1“ väärtus' plokk",
|
||||
"PROCEDURES_DEFNORETURN_TITLE": "funktsioon",
|
||||
"PROCEDURES_DEFNORETURN_PROCEDURE": "teeme midagi",
|
||||
"PROCEDURES_BEFORE_PARAMS": "sisenditega:",
|
||||
"PROCEDURES_CALL_BEFORE_PARAMS": "sisenditega:",
|
||||
"PROCEDURES_DEFNORETURN_TOOLTIP": "Tekitab funktsiooni, mis ei tagasta midagi.",
|
||||
"PROCEDURES_DEFNORETURN_COMMENT": "Funktsiooni kirjeldus ...",
|
||||
"PROCEDURES_DEFRETURN_RETURN": "tagasta",
|
||||
"PROCEDURES_DEFRETURN_TOOLTIP": "Tekitab funktsiooni, mis tagastab midagi.",
|
||||
"PROCEDURES_ALLOW_STATEMENTS": "kood plokis",
|
||||
"PROCEDURES_DEF_DUPLICATE_WARNING": "Hoiatus: Sel funktsioonil on mitu sama nimega sisendit.",
|
||||
"PROCEDURES_CALLNORETURN_HELPURL": "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29",
|
||||
"PROCEDURES_CALLNORETURN_TOOLTIP": "Käivitab kasutaja defineeritud funktsiooni '%1'.",
|
||||
"PROCEDURES_CALLRETURN_HELPURL": "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29",
|
||||
"PROCEDURES_CALLRETURN_TOOLTIP": "Run the user-defined function '%1' and use its output.",
|
||||
"PROCEDURES_MUTATORCONTAINER_TITLE": "sisendid",
|
||||
"PROCEDURES_MUTATORCONTAINER_TOOLTIP": "Funktsiooni sisendite lisamine, eemaldamine või järjestuse muutmine.",
|
||||
"PROCEDURES_MUTATORARG_TITLE": "sisend nimega:",
|
||||
"PROCEDURES_MUTATORARG_TOOLTIP": "Lisab funktsioonile sisendi.",
|
||||
"PROCEDURES_HIGHLIGHT_DEF": "Tõsta funktsiooni definitsioon esile",
|
||||
"PROCEDURES_CREATE_DO": "Tekita '%1' plokk",
|
||||
"PROCEDURES_IFRETURN_TOOLTIP": "Kui väärtus on tõene, tagastatakse teine väärtus.",
|
||||
"PROCEDURES_IFRETURN_WARNING": "Hoiatus: Seda plokki saab kasutada ainult funktsiooni definitsioonis."
|
||||
}
|
||||
+5
-5
@@ -75,7 +75,7 @@
|
||||
"CONTROLS_IF_MSG_ELSE": "آنگاه",
|
||||
"CONTROLS_IF_IF_TOOLTIP": "افزودن، حذف یا بازمرتبسازی قسمتها برای پیکربندی دوبارهٔ این بلوک اگر.",
|
||||
"CONTROLS_IF_ELSEIF_TOOLTIP": "افزودن یک شرط به بلوک اگر.",
|
||||
"CONTROLS_IF_ELSE_TOOLTIP": "اضافهکردن نهایی، گرفتن همهٔ شرایط به بلوک اگر.",
|
||||
"CONTROLS_IF_ELSE_TOOLTIP": "اضافه کردن نهایی، گرفتن همهٔ شرایط به بلوک اگر.",
|
||||
"LOGIC_COMPARE_HELPURL": "https://fa.wikipedia.org/wiki/%D9%86%D8%A7%D8%A8%D8%B1%D8%A7%D8%A8%D8%B1%DB%8C",
|
||||
"LOGIC_COMPARE_TOOLTIP_EQ": "بازگشت صحیح اگر هر دو ورودی با یکدیگر برابر باشد.",
|
||||
"LOGIC_COMPARE_TOOLTIP_NEQ": "برگرداندن صحیح اگر هر دو ورودی با یکدیگر برابر نباشند.",
|
||||
@@ -173,7 +173,7 @@
|
||||
"TEXT_JOIN_TITLE_CREATEWITH": "ایجاد متن با",
|
||||
"TEXT_JOIN_TOOLTIP": "یک تکهای از متن را با چسپاندن همهٔ تعداد از موارد ایجاد میکند.",
|
||||
"TEXT_CREATE_JOIN_TITLE_JOIN": "عضویت",
|
||||
"TEXT_CREATE_JOIN_TOOLTIP": "اضافهکردن، حذف یا مرتبسازی بحشها برای تنظیم مجدد این بلوک متنی.",
|
||||
"TEXT_CREATE_JOIN_TOOLTIP": "اضافه کردن، حذف یا مرتبسازی بحشها برای تنظیم مجدد این بلوک متنی.",
|
||||
"TEXT_CREATE_JOIN_ITEM_TOOLTIP": "افزودن یک مورد به متن.",
|
||||
"TEXT_APPEND_TO": "به",
|
||||
"TEXT_APPEND_APPENDTEXT": "الحاق متن",
|
||||
@@ -181,7 +181,7 @@
|
||||
"TEXT_LENGTH_TITLE": "طول %1",
|
||||
"TEXT_LENGTH_TOOLTIP": "بازگرداندن عددی از حروف (شامل فاصلهها) در متن فراهمشده.",
|
||||
"TEXT_ISEMPTY_TITLE": "%1 خالی است",
|
||||
"TEXT_ISEMPTY_TOOLTIP": "اضافهکردن صحیح اگر متن فراهمشده خالی است.",
|
||||
"TEXT_ISEMPTY_TOOLTIP": "اضافه کردن صحیح اگر متن فراهمشده خالی است.",
|
||||
"TEXT_INDEXOF_TOOLTIP": "شاخصی از اولین آخرین رخداد متن اول در متن دوم بر میگرداند. اگر متن یافت نشد %1 باز میگرداند.",
|
||||
"TEXT_INDEXOF_INPUT_INTEXT": "در متن",
|
||||
"TEXT_INDEXOF_OPERATOR_FIRST": "اولین رخداد متن را بیاب",
|
||||
@@ -220,8 +220,8 @@
|
||||
"LISTS_CREATE_WITH_TOOLTIP": "فهرستی از هر عددی از موارد میسازد.",
|
||||
"LISTS_CREATE_WITH_INPUT_WITH": "ایجاد فهرست با",
|
||||
"LISTS_CREATE_WITH_CONTAINER_TITLE_ADD": "فهرست",
|
||||
"LISTS_CREATE_WITH_CONTAINER_TOOLTIP": "اضافهکردن، حذفکردن یا ترتیبسازی مجدد بخشها این بلوک فهرستی.",
|
||||
"LISTS_CREATE_WITH_ITEM_TOOLTIP": "اضافهکردن یک مورد به فهرست.",
|
||||
"LISTS_CREATE_WITH_CONTAINER_TOOLTIP": "اضافه کردن، حذف کردن یا ترتیبسازی مجدد بخشها این بلوک فهرستی.",
|
||||
"LISTS_CREATE_WITH_ITEM_TOOLTIP": "اضافه کردن یک مورد به فهرست.",
|
||||
"LISTS_REPEAT_TOOLTIP": "فهرستی شامل مقادیر دادهشدهٔ تکرار شده عدد مشخصشده میسازد.",
|
||||
"LISTS_REPEAT_TITLE": "فهرستی با %1 تکرارشده به اندازهٔ %2 میسازد",
|
||||
"LISTS_LENGTH_TITLE": "طول %1",
|
||||
|
||||
+9
-1
@@ -245,7 +245,7 @@
|
||||
"LISTS_INLIST": "listassa",
|
||||
"LISTS_INDEX_OF_FIRST": "etsi ensimmäinen esiintymä kohteelle",
|
||||
"LISTS_INDEX_OF_LAST": "etsi viimeinen esiintymä kohteelle",
|
||||
"LISTS_INDEX_OF_TOOLTIP": "Palauttaa kohteen ensimmäisen/viimeisen esiintymän kohdan. Palauttaa %1 jos tekstiä ei löydy.",
|
||||
"LISTS_INDEX_OF_TOOLTIP": "Palauttaa kohteen ensimmäisen/viimeisen esiintymän kohdan listassa. Palauttaa %1 jos kohdetta ei löydy.",
|
||||
"LISTS_GET_INDEX_GET": "hae",
|
||||
"LISTS_GET_INDEX_GET_REMOVE": "hae ja poista",
|
||||
"LISTS_GET_INDEX_REMOVE": "poista",
|
||||
@@ -286,6 +286,14 @@
|
||||
"LISTS_GET_SUBLIST_END_FROM_END": "päättyen kohtaan (lopusta laskien)",
|
||||
"LISTS_GET_SUBLIST_END_LAST": "viimeinen",
|
||||
"LISTS_GET_SUBLIST_TOOLTIP": "Luo kopio määrätystä kohden listaa.",
|
||||
"LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list",
|
||||
"LISTS_SORT_TITLE": "lajittele %1 %2 %3",
|
||||
"LISTS_SORT_TOOLTIP": "Lajittele kopio luettelosta.",
|
||||
"LISTS_SORT_ORDER_ASCENDING": "nouseva",
|
||||
"LISTS_SORT_ORDER_DESCENDING": "laskeva",
|
||||
"LISTS_SORT_TYPE_NUMERIC": "numeerinen",
|
||||
"LISTS_SORT_TYPE_TEXT": "aakkosjärjestys",
|
||||
"LISTS_SORT_TYPE_IGNORECASE": "aakkosjärjestyksessä, ohita kapitaalit",
|
||||
"LISTS_SPLIT_LIST_FROM_TEXT": "tee lista tekstistä",
|
||||
"LISTS_SPLIT_TEXT_FROM_LIST": "tee listasta teksti",
|
||||
"LISTS_SPLIT_WITH_DELIMITER": "erottimen kanssa",
|
||||
|
||||
+9
-1
@@ -164,7 +164,7 @@
|
||||
"MATH_MODULO_HELPURL": "https://hu.wikipedia.org/wiki/Eg%C3%A9szr%C3%A9sz#Als.C3.B3_eg.C3.A9szr.C3.A9sz",
|
||||
"MATH_MODULO_TITLE": "%1 ÷ %2 maradéka",
|
||||
"MATH_MODULO_TOOLTIP": "Az egész osztás maradékát adja eredméynül.",
|
||||
"MATH_CONSTRAIN_TITLE": "korlátozd %1 -t %2 és %3 közé",
|
||||
"MATH_CONSTRAIN_TITLE": "korlátozd %1-t %2 és %3 közé",
|
||||
"MATH_CONSTRAIN_TOOLTIP": "Egy változó értékének korlátozása a megadott zárt intervallumra.",
|
||||
"MATH_RANDOM_INT_HELPURL": "https://hu.wikipedia.org/wiki/V%C3%A9letlen",
|
||||
"MATH_RANDOM_INT_TITLE": "véletlen egész szám %1 között %2",
|
||||
@@ -281,6 +281,14 @@
|
||||
"LISTS_GET_SUBLIST_END_LAST": "és az utolsó",
|
||||
"LISTS_GET_SUBLIST_TAIL": "elem között",
|
||||
"LISTS_GET_SUBLIST_TOOLTIP": "A lista adott részéről másolat.",
|
||||
"LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list",
|
||||
"LISTS_SORT_TITLE": "%1 %2 %3 rendezés",
|
||||
"LISTS_SORT_TOOLTIP": "Egy lista egy másolatának rendezése.",
|
||||
"LISTS_SORT_ORDER_ASCENDING": "növekvő",
|
||||
"LISTS_SORT_ORDER_DESCENDING": "csökkenő",
|
||||
"LISTS_SORT_TYPE_NUMERIC": "numerikus",
|
||||
"LISTS_SORT_TYPE_TEXT": "betűrendben",
|
||||
"LISTS_SORT_TYPE_IGNORECASE": "betűrendben nagybetű figyelmen kívül hagyásával",
|
||||
"LISTS_SPLIT_LIST_FROM_TEXT": "lista készítése szövegből",
|
||||
"LISTS_SPLIT_TEXT_FROM_LIST": "sztring készítése listából",
|
||||
"LISTS_SPLIT_WITH_DELIMITER": "határoló karakter",
|
||||
|
||||
@@ -309,6 +309,14 @@
|
||||
"LISTS_GET_SUBLIST_END_FROM_END": "til # frá enda",
|
||||
"LISTS_GET_SUBLIST_END_LAST": "til síðasta",
|
||||
"LISTS_GET_SUBLIST_TOOLTIP": "Býr til afrit af tilteknum hluta lista.",
|
||||
"LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list",
|
||||
"LISTS_SORT_TITLE": "raða %1 %2 %3",
|
||||
"LISTS_SORT_TOOLTIP": "Raða afriti lista.",
|
||||
"LISTS_SORT_ORDER_ASCENDING": "hækkandi",
|
||||
"LISTS_SORT_ORDER_DESCENDING": "lækkandi",
|
||||
"LISTS_SORT_TYPE_NUMERIC": "í númeraröð",
|
||||
"LISTS_SORT_TYPE_TEXT": "í stafrófsröð",
|
||||
"LISTS_SORT_TYPE_IGNORECASE": "í stafrófsröð án tillits til stafstöðu",
|
||||
"LISTS_SPLIT_LIST_FROM_TEXT": "gera lista úr texta",
|
||||
"LISTS_SPLIT_TEXT_FROM_LIST": "gera texta úr lista",
|
||||
"LISTS_SPLIT_WITH_DELIMITER": "með skiltákni",
|
||||
|
||||
+3
-2
@@ -5,7 +5,8 @@
|
||||
"Oda",
|
||||
"아라",
|
||||
"Otokoume",
|
||||
"Sujiniku"
|
||||
"Sujiniku",
|
||||
"Sgk"
|
||||
]
|
||||
},
|
||||
"VARIABLES_DEFAULT_NAME": "項目",
|
||||
@@ -174,7 +175,7 @@
|
||||
"MATH_ONLIST_TOOLTIP_RANDOM": "リストからランダムに要素を返します。",
|
||||
"MATH_MODULO_HELPURL": "https://en.wikipedia.org/wiki/Modulo_operation",
|
||||
"MATH_MODULO_TITLE": "残りの %1 ÷ %2",
|
||||
"MATH_MODULO_TOOLTIP": "2 つの数値を除算した残りを返します。",
|
||||
"MATH_MODULO_TOOLTIP": "2つの数値を除算した余りを返します。",
|
||||
"MATH_CONSTRAIN_TITLE": "制限%1下リミット%2上限リミット%3",
|
||||
"MATH_CONSTRAIN_TOOLTIP": "値を、上限 x と下限 y のあいだに制限んする(上限と下限が、x と y とに同じ場合わ、上限の値は x, 下限の値はy)。",
|
||||
"MATH_RANDOM_INT_HELPURL": "https://en.wikipedia.org/wiki/Random_number_generation",
|
||||
|
||||
+8
-8
@@ -20,7 +20,7 @@
|
||||
"EXTERNAL_INPUTS": "외부 입력",
|
||||
"INLINE_INPUTS": "내부 입력",
|
||||
"DELETE_BLOCK": "블록 삭제",
|
||||
"DELETE_X_BLOCKS": "블록 %1 삭제",
|
||||
"DELETE_X_BLOCKS": "블록 %1개 삭제",
|
||||
"DELETE_ALL_BLOCKS": "모든 블록 %1개를 삭제하겠습니까?",
|
||||
"CLEAN_UP": "블록 정리",
|
||||
"COLLAPSE_BLOCK": "블록 축소",
|
||||
@@ -30,8 +30,8 @@
|
||||
"DISABLE_BLOCK": "블록 비활성화",
|
||||
"ENABLE_BLOCK": "블록 활성화",
|
||||
"HELP": "도움말",
|
||||
"UNDO": "끄르다",
|
||||
"REDO": "다시 시도",
|
||||
"UNDO": "실행 취소",
|
||||
"REDO": "다시 실행",
|
||||
"CHANGE_VALUE_TITLE": "값 바꾸기:",
|
||||
"NEW_VARIABLE": "새 변수",
|
||||
"NEW_VARIABLE_TITLE": "새 변수 이름:",
|
||||
@@ -42,7 +42,7 @@
|
||||
"COLOUR_RANDOM_TITLE": "임의 색상",
|
||||
"COLOUR_RANDOM_TOOLTIP": "무작위로 색을 고릅니다.",
|
||||
"COLOUR_RGB_HELPURL": "http://www.december.com/html/spec/colorper.html",
|
||||
"COLOUR_RGB_TITLE": "RGB 색",
|
||||
"COLOUR_RGB_TITLE": "색",
|
||||
"COLOUR_RGB_RED": "빨강",
|
||||
"COLOUR_RGB_GREEN": "초록",
|
||||
"COLOUR_RGB_BLUE": "파랑",
|
||||
@@ -252,10 +252,10 @@
|
||||
"TEXT_PRINT_TITLE": "다음 내용 출력 %1",
|
||||
"TEXT_PRINT_TOOLTIP": "원하는 문장, 수, 값 등을 출력합니다.",
|
||||
"TEXT_PROMPT_HELPURL": "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user",
|
||||
"TEXT_PROMPT_TYPE_TEXT": "다음 안내 멘트를 활용해 문장 입력",
|
||||
"TEXT_PROMPT_TYPE_NUMBER": "다음 안내 멘트를 활용해 수 입력",
|
||||
"TEXT_PROMPT_TOOLTIP_NUMBER": "수 입력 받음.",
|
||||
"TEXT_PROMPT_TOOLTIP_TEXT": "문장 입력 받음.",
|
||||
"TEXT_PROMPT_TYPE_TEXT": "메시지를 활용해 문장 입력",
|
||||
"TEXT_PROMPT_TYPE_NUMBER": "메시지를 활용해 수 입력",
|
||||
"TEXT_PROMPT_TOOLTIP_NUMBER": "수에 대해 사용자의 입력을 받습니다.",
|
||||
"TEXT_PROMPT_TOOLTIP_TEXT": "문장에 대해 사용자의 입력을 받습니다.",
|
||||
"LISTS_CREATE_EMPTY_HELPURL": "https://github.com/google/blockly/wiki/Lists#create-empty-list",
|
||||
"LISTS_CREATE_EMPTY_TITLE": "빈 리스트 생성",
|
||||
"LISTS_CREATE_EMPTY_TOOLTIP": "데이터 레코드가 없는, 길이가 0인 목록을 반환합니다.",
|
||||
|
||||
+9
-1
@@ -110,7 +110,7 @@
|
||||
"MATH_TRIG_TOOLTIP_ASIN": "Grąžinti skaičiaus arksinusą.",
|
||||
"MATH_TRIG_TOOLTIP_ACOS": "Grąžinti skaičiaus arkkosinusą.",
|
||||
"MATH_TRIG_TOOLTIP_ATAN": "Grąžinti skaičiaus arktangentą.",
|
||||
"MATH_CONSTANT_HELPURL": "https://lt.wikipedia.org/wiki/Matematin%C4%97_konstanta",
|
||||
"MATH_CONSTANT_HELPURL": "https://en.wikipedia.org/wiki/Mathematical_constant",
|
||||
"MATH_IS_EVEN": "yra lyginis",
|
||||
"MATH_IS_ODD": "yra nelyginis",
|
||||
"MATH_IS_PRIME": "yra pirminis",
|
||||
@@ -221,6 +221,14 @@
|
||||
"LISTS_GET_SUBLIST_END_FROM_START": "iki #",
|
||||
"LISTS_GET_SUBLIST_END_FROM_END": "iki # nuo galo",
|
||||
"LISTS_GET_SUBLIST_END_LAST": "iki galo",
|
||||
"LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list",
|
||||
"LISTS_SORT_TITLE": "rūšiuoti %1 %2 %3",
|
||||
"LISTS_SORT_TOOLTIP": "Rūšiuoti sąrašo kopiją.",
|
||||
"LISTS_SORT_ORDER_ASCENDING": "didėjančia tvarka",
|
||||
"LISTS_SORT_ORDER_DESCENDING": "mažėjančia tvarka",
|
||||
"LISTS_SORT_TYPE_NUMERIC": "skaitmeninis",
|
||||
"LISTS_SORT_TYPE_TEXT": "abėcėlės",
|
||||
"LISTS_SORT_TYPE_IGNORECASE": "abecėlės, ignoruoti raidžių dydį",
|
||||
"VARIABLES_GET_CREATE_SET": "Sukurk \"priskirk %1\"",
|
||||
"VARIABLES_SET": "priskirk %1 = %2",
|
||||
"VARIABLES_SET_CREATE_GET": "Sukurti 'kintamasis %1'",
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@
|
||||
"CONTROLS_FOREACH_TOOLTIP": "För varje objekt i en lista, ange variabeln '%1' till objektet, och utför sedan några kommandon.",
|
||||
"CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK": "bryt ut ur loop",
|
||||
"CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE": "fortsätta med nästa upprepning av loop",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "Bryta ut ur den innehållande upprepningen.",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "Bryt ut ur den innehållande upprepningen.",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE": "Hoppa över resten av denna loop och fortsätt med nästa loop.",
|
||||
"CONTROLS_FLOW_STATEMENTS_WARNING": "Varning: Detta block kan endast användas i en loop.",
|
||||
"CONTROLS_IF_TOOLTIP_1": "Om ett värde är sant, utför några kommandon.",
|
||||
|
||||
+29
-13
@@ -3,19 +3,21 @@
|
||||
"authors": [
|
||||
"Azpirin",
|
||||
"Octahedron80",
|
||||
"Horus"
|
||||
"Horus",
|
||||
"Roysheng"
|
||||
]
|
||||
},
|
||||
"VARIABLES_DEFAULT_NAME": "รายการ",
|
||||
"TODAY": "วันนี้",
|
||||
"DUPLICATE_BLOCK": "ทำซ้ำ",
|
||||
"DUPLICATE_BLOCK": "ทำสำเนา",
|
||||
"ADD_COMMENT": "ใส่คำอธิบาย",
|
||||
"REMOVE_COMMENT": "เอาคำอธิบายออก",
|
||||
"EXTERNAL_INPUTS": "อินพุตภายนอก",
|
||||
"INLINE_INPUTS": "อินพุตในบรรทัด",
|
||||
"DELETE_BLOCK": "ลบบล็อก",
|
||||
"DELETE_X_BLOCKS": "ลบ %1 บล็อก",
|
||||
"DELETE_ALL_BLOCKS": "ต้องการลบบล็อกทั้ง %1 บล็อกหรือไม่",
|
||||
"DELETE_ALL_BLOCKS": "ลบ %1 บล็อกทั้งหมด?",
|
||||
"CLEAN_UP": "จัดเรียงบล็อกให้เป็นแถว",
|
||||
"COLLAPSE_BLOCK": "ย่อบล็อก",
|
||||
"COLLAPSE_ALL": "ย่อบล็อก",
|
||||
"EXPAND_BLOCK": "ขยายบล็อก",
|
||||
@@ -23,6 +25,8 @@
|
||||
"DISABLE_BLOCK": "ปิดใช้งานบล็อก",
|
||||
"ENABLE_BLOCK": "เปิดใช้งานบล็อก",
|
||||
"HELP": "ช่วยเหลือ",
|
||||
"UNDO": "ย้อนกลับ",
|
||||
"REDO": "ทำซ้ำ",
|
||||
"CHANGE_VALUE_TITLE": "เปลี่ยนค่า:",
|
||||
"NEW_VARIABLE": "สร้างตัวแปร...",
|
||||
"NEW_VARIABLE_TITLE": "ชื่อตัวแปรใหม่:",
|
||||
@@ -46,19 +50,19 @@
|
||||
"CONTROLS_REPEAT_TITLE": "ทำซ้ำ %1 ครั้ง",
|
||||
"CONTROLS_REPEAT_INPUT_DO": "ทำ:",
|
||||
"CONTROLS_REPEAT_TOOLTIP": "ทำซ้ำบางคำสั่งหลายครั้ง",
|
||||
"CONTROLS_WHILEUNTIL_OPERATOR_WHILE": "ทำซ้ำตราบเท่าที่",
|
||||
"CONTROLS_WHILEUNTIL_OPERATOR_WHILE": "ทำซ้ำขณะที่",
|
||||
"CONTROLS_WHILEUNTIL_OPERATOR_UNTIL": "ทำซ้ำจนกระทั่ง",
|
||||
"CONTROLS_WHILEUNTIL_TOOLTIP_WHILE": "ตราบเท่าที่ค่าเป็นจริง ก็จะทำบางคำสั่ง",
|
||||
"CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL": "ตราบเท่าที่ค่าเป็นเท็จ ก็จะทำบางคำสั่ง",
|
||||
"CONTROLS_FOR_TOOLTIP": "ตัวแปร \"%1\" จะมีค่าตั้งแต่จำนวนเริ่มต้น ไปจนถึงจำนวนสิ้นสุด โดยมีการเปลี่ยนแปลงตามจำนวนที่กำหนด",
|
||||
"CONTROLS_FOR_TITLE": "นับ %1 จาก %2 จนถึง %3 เปลี่ยนค่าทีละ %4",
|
||||
"CONTROLS_FOREACH_TITLE": "วนซ้ำทุกรายการ %1 ในรายการ %2",
|
||||
"CONTROLS_FOREACH_TOOLTIP": "ทำซ้ำทุกรายการ กำหนดค่าตัวแปร \"%1\" ตามรายการ และทำตามคำสั่งที่กำหนดไว้",
|
||||
"CONTROLS_WHILEUNTIL_TOOLTIP_WHILE": "ขณะที่ค่าเป็นจริง ก็จะทำบางคำสั่ง",
|
||||
"CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL": "ขณะที่ค่าเป็นเท็จ ก็จะทำบางคำสั่ง",
|
||||
"CONTROLS_FOR_TOOLTIP": "ตัวแปร '%1' จะเริ่มจากจำนวนเริ่มต้น ไปจนถึงจำนวนสุดท้าย ตามระยะที่กำหนด และ ทำบล็อกที่กำหนดไว้",
|
||||
"CONTROLS_FOR_TITLE": "นับด้วย %1 จาก %2 จนถึง %3 เปลี่ยนค่าทีละ %4",
|
||||
"CONTROLS_FOREACH_TITLE": "จากทุกรายการ %1 ในรายชื่อ %2",
|
||||
"CONTROLS_FOREACH_TOOLTIP": "จากทุกรายการในรายชื่อ ตั้งค่าตัวแปร \"%1\" เป็นรายการ และทำตามคำสั่งที่กำหนดไว้",
|
||||
"CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK": "ออกจากการวนซ้ำ",
|
||||
"CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE": "เริ่มการวนซ้ำรอบต่อไป",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "ออกจากการวนซ้ำที่มีอยู่",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE": "ข้ามสิ่งที่เหลืออยู่ และไปเริ่มวนซ้ำรอบต่อไปทันที",
|
||||
"CONTROLS_FLOW_STATEMENTS_WARNING": "ระวัง: บล็อกชนิดนี้สามารถใช้งานได้เมื่ออยู่ภายในการวนซ้ำเท่านั้น",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "ออกจากการวนซ้ำที่อยู่",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE": "ข้ามคำสั่งที่เหลืออยู่ และเริ่มต้นวนซ้ำรอบต่อไป",
|
||||
"CONTROLS_FLOW_STATEMENTS_WARNING": "คำเตือน: บล็อกนี้ใช้งานได้ภายในการวนซ้ำเท่านั้น",
|
||||
"CONTROLS_IF_TOOLTIP_1": "ว่าเงื่อนไขเป็นจริง ก็จะ \"ทำ\" ตามที่กำหนด",
|
||||
"CONTROLS_IF_TOOLTIP_2": "ถ้าเงื่อนไขเป็นจริง ก็จะ \"ทำ\" ตามที่กำหนด แต่ถ้าเงื่อนไขเป็นเท็จก็จะทำ \"นอกเหนือจากนี้\"",
|
||||
"CONTROLS_IF_TOOLTIP_3": "ถ้าเงื่อนไขแรกเป็นจริง ก็จะทำตามคำสั่งในบล็อกแรก แต่ถ้าไม่ก็จะไปตรวจเงื่อนไขที่สอง ถ้าเงื่อนไขที่สองเป็นจริง ก็จะทำตามเงื่อนไขในบล็อกที่สองนี้",
|
||||
@@ -264,6 +268,14 @@
|
||||
"LISTS_GET_SUBLIST_END_FROM_END": "ถึง # จากท้ายสุด",
|
||||
"LISTS_GET_SUBLIST_END_LAST": "ถึง ท้ายสุด",
|
||||
"LISTS_GET_SUBLIST_TOOLTIP": "สร้างสำเนารายการในช่วงที่กำหนด",
|
||||
"LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list",
|
||||
"LISTS_SORT_TITLE": "เรียงลำดับ %1 %2 %3",
|
||||
"LISTS_SORT_TOOLTIP": "เรียงลำดับสำเนาของรายชื่อ",
|
||||
"LISTS_SORT_ORDER_ASCENDING": "น้อยไปหามาก",
|
||||
"LISTS_SORT_ORDER_DESCENDING": "มากไปหาน้อย",
|
||||
"LISTS_SORT_TYPE_NUMERIC": "ตัวเลข",
|
||||
"LISTS_SORT_TYPE_TEXT": "ตัวอักษร",
|
||||
"LISTS_SORT_TYPE_IGNORECASE": "ตัวอักษร",
|
||||
"LISTS_SPLIT_LIST_FROM_TEXT": "สร้างรายการจากข้อความ",
|
||||
"LISTS_SPLIT_TEXT_FROM_LIST": "สร้างข้อความจากรายการ",
|
||||
"LISTS_SPLIT_WITH_DELIMITER": "ด้วยตัวคั่น",
|
||||
@@ -279,15 +291,19 @@
|
||||
"PROCEDURES_BEFORE_PARAMS": "ด้วย:",
|
||||
"PROCEDURES_CALL_BEFORE_PARAMS": "ด้วย:",
|
||||
"PROCEDURES_DEFNORETURN_TOOLTIP": "สร้างฟังก์ชันที่ไม่มีผลลัพธ์",
|
||||
"PROCEDURES_DEFNORETURN_COMMENT": "อธิบายฟังก์ชันนี้",
|
||||
"PROCEDURES_DEFRETURN_RETURN": "คืนค่า",
|
||||
"PROCEDURES_DEFRETURN_TOOLTIP": "สร้างฟังก์ชันที่มีผลลัพธ์",
|
||||
"PROCEDURES_ALLOW_STATEMENTS": "ข้อความที่ใช้ได้",
|
||||
"PROCEDURES_DEF_DUPLICATE_WARNING": "ระวัง: ฟังก์ชันนี้มีพารามิเตอร์ที่มีชื่อซ้ำกัน",
|
||||
"PROCEDURES_CALLNORETURN_HELPURL": "https://en.wikipedia.org/wiki/Procedure_(computer_science)",
|
||||
"PROCEDURES_CALLNORETURN_TOOLTIP": "เรียกใช้ฟังก์ชันที่สร้างโดยผู้ใช้ \"%1\"",
|
||||
"PROCEDURES_CALLRETURN_HELPURL": "https://en.wikipedia.org/wiki/Procedure_(computer_science)",
|
||||
"PROCEDURES_CALLRETURN_TOOLTIP": "เรียกใช้ฟังก์ชันที่สร้างโดยผู้ใช้ \"%1\" และใช้ผลลัพธ์ของมัน",
|
||||
"PROCEDURES_MUTATORCONTAINER_TITLE": "นำเข้า",
|
||||
"PROCEDURES_MUTATORCONTAINER_TOOLTIP": "เพิ่ม, ลบ, หรือจัดเรียง ข้อมูลที่ป้อนเข้าฟังก์ชันนี้",
|
||||
"PROCEDURES_MUTATORARG_TITLE": "ชื่อนำเข้า:",
|
||||
"PROCEDURES_MUTATORARG_TOOLTIP": "เพิ่มค่าป้อนเข้าฟังก์ชัน",
|
||||
"PROCEDURES_HIGHLIGHT_DEF": "เน้นฟังก์ชันนิยาม",
|
||||
"PROCEDURES_CREATE_DO": "สร้าง \"%1\"",
|
||||
"PROCEDURES_IFRETURN_TOOLTIP": "ถ้ามีค่าเป็นจริง ให้คืนค่าที่สอง",
|
||||
|
||||
@@ -301,10 +301,12 @@
|
||||
"LISTS_GET_SUBLIST_TOOLTIP": "Listenin belirli bir kısmının kopyasını yaratır.",
|
||||
"LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list",
|
||||
"LISTS_SORT_TITLE": "kısa %1 %2 %3",
|
||||
"LISTS_SORT_TOOLTIP": "Listenin kısa bir kopyası.",
|
||||
"LISTS_SORT_ORDER_ASCENDING": "artan",
|
||||
"LISTS_SORT_ORDER_DESCENDING": "azalan",
|
||||
"LISTS_SORT_TYPE_NUMERIC": "sayısal",
|
||||
"LISTS_SORT_TYPE_TEXT": "alfabetik",
|
||||
"LISTS_SORT_TYPE_IGNORECASE": "alfabetik, gözardı et",
|
||||
"LISTS_SPLIT_LIST_FROM_TEXT": "metinden liste yap",
|
||||
"LISTS_SPLIT_TEXT_FROM_LIST": "listeden metin yap",
|
||||
"LISTS_SPLIT_WITH_DELIMITER": "sınırlayıcı ile",
|
||||
|
||||
Reference in New Issue
Block a user