conflict_resolution
stringlengths
27
16k
<<<<<<< ======= // update system information more often setInterval(()=>{ this.update(null); },1000*60*20); return false; >>>>>>> // update system information more often setInterval(()=>{ this.update(null); },1000*60*20);
<<<<<<< var { app, shell, BrowserWindow, Menu } = require('electron'); ======= var { app, dialog, BrowserWindow } = require('electron'); >>>>>>> var { app, dialog, shell, BrowserWindow, Menu } = require('electron');
<<<<<<< const PlatformLoader = require('../../platform/PlatformLoader.js') const platform = PlatformLoader.getPlatform() const DNSTool = require('../../net2/DNSTool.js') const dnsTool = new DNSTool() const fireRouter = require('../../net2/FireRouter.js') ======= const fc = require('../../net2/config.js') >>>>>>> const PlatformLoader = require('../../platform/PlatformLoader.js') const platform = PlatformLoader.getPlatform() const DNSTool = require('../../net2/DNSTool.js') const dnsTool = new DNSTool() const fireRouter = require('../../net2/FireRouter.js') const fc = require('../../net2/config.js')
<<<<<<< import FelEruption from './modules/talents/FelEruption'; import MasterOfTheGlaives from './modules/talents/MasterOfTheGlaives'; ======= import DarkSlash from './modules/talents/DarkSlash'; import CycleOfHatred from './modules/talents/CycleOfHatred'; >>>>>>> import FelEruption from './modules/talents/FelEruption'; import MasterOfTheGlaives from './modules/talents/MasterOfTheGlaives'; import DarkSlash from './modules/talents/DarkSlash'; import CycleOfHatred from './modules/talents/CycleOfHatred'; <<<<<<< felEruption: FelEruption, masterOfTheGlaives: MasterOfTheGlaives, ======= darkSlash: DarkSlash, cycleOfHatred: CycleOfHatred, >>>>>>> felEruption: FelEruption, masterOfTheGlaives: MasterOfTheGlaives, darkSlash: DarkSlash, cycleOfHatred: CycleOfHatred,
<<<<<<< domainCategory.getCategory(target).then(cat => __submitIntelFeedback(cat)); ======= __submitIntelFeedback(null); // domainCategory.getCategory(target, __submitIntelFeedback); >>>>>>> __submitIntelFeedback(null);
<<<<<<< let fConfig = require('../net2/config.js').getConfig(); ======= const extend = require('util')._extend; const fConfig = require('../net2/config.js').getConfig(); >>>>>>> const fConfig = require('../net2/config.js').getConfig();
<<<<<<< let count = await redis.hincrbyAsync('block:stats', 'porn', 1); let params = qs.stringify({hostname: req.hostname, url: req.originalUrl, count}); let location = `/${VIEW_PATH}/block`; res.status(303).location(`${location}?${params}`).send().end(); ======= let count = await rclient.hincrbyAsync('block:stats', 'porn', 1); res.status(303).location(`/${VIEW_PATH}/block?${qs.stringify({hostname: req.hostname, url: req.originalUrl, count})}`).send().end(); >>>>>>> let count = await rclient.hincrbyAsync('block:stats', 'porn', 1); let params = qs.stringify({hostname: req.hostname, url: req.originalUrl, count}); let location = `/${VIEW_PATH}/block`; res.status(303).location(`${location}?${params}`).send().end();
<<<<<<< self.server.delPromise('/branches', { name: branch.name, path: self.repoPath() }) .then(function() { programEvents.dispatch({ event: 'working-tree-changed' }); }) .catch((e) => this.server.unhandledRejection(e)); ======= var url = '/branches'; if (branch.isRemote) url = '/remote' + url; self.server.delPromise(url, { path: self.graph.repoPath(), remote: branch.isRemote ? branch.remote : null, name: branch.refName }) .then(function() { programEvents.dispatch({ event: 'working-tree-changed' }); }); >>>>>>> var url = '/branches'; if (branch.isRemote) url = '/remote' + url; self.server.delPromise(url, { path: self.graph.repoPath(), remote: branch.isRemote ? branch.remote : null, name: branch.refName }) .then(function() { programEvents.dispatch({ event: 'working-tree-changed' }); }) .catch((e) => this.server.unhandledRejection(e));
<<<<<<< switch (command) { case " -I ": case " -A ": return `bash -c '${checkRule} &>/dev/null || ${rule}'`; ======= command = " -D "; if(rule.indexOf(command) > -1) { checkRule = rule.replace(command, " -C "); return `bash -c '${checkRule} &>/dev/null && ${rule}; true'`; } >>>>>>> switch (command) { case " -I ": case " -A ": return `bash -c '${checkRule} &>/dev/null || ${rule}'`; <<<<<<< exports.dhcpSubnetChangeAsync = util.promisify(dhcpSubnetChange); exports.diagHttpChange = diagHttpChange; exports.diagHttpChangeAsync = util.promisify(diagHttpChange); ======= exports.dhcpSubnetChangeAsync = Promise.promisify(dhcpSubnetChange); >>>>>>> exports.dhcpSubnetChangeAsync = util.promisify(dhcpSubnetChange); <<<<<<< } else if (rule.type == "diag_http") { // install/uninstall diag http redirect rule in NAT table let state = rule.state; let ip = rule.ip; let action = "-A"; if (state == false || state == null) { action = "-D"; } let _dst = " -d " + ip; let cmdline = ""; let getCommand = function(action, dst) { return `sudo iptables -w -t nat ${action} PREROUTING ${dst} -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8835`; }; switch (action) { case "-A": cmdline = `${getCommand("-C", _dst)} || ${getCommand(action, _dst)}`; break; case "-D": cmdline = `(${getCommand("-C", _dst)} && ${getCommand(action, _dst)}); true`; break; default: cmdline = "sudo iptables -w -t nat " + action + " PREROUTING " + _dst + " -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8835"; break; } log.debug("IPTABLE:DIAG_HTTP:Running commandline: ", cmdline); cp.exec(cmdline, (err, stdout, stderr) => { if (err && action !== "-D") { log.error("IPTABLE:DIAG_HTTP:Error unable to set", cmdline, err); } if (callback) { callback(err, null); } running = false; newRule(null, null); }); ======= >>>>>>> <<<<<<< function diagHttpChange(ip, state, callback) { newRule({ type: 'diag_http', ip: ip, state: state }, callback); } function flush() { return execAsync( ======= function flush(callback) { this.process = require('child_process').exec( >>>>>>> function flush() { return execAsync(
<<<<<<< }, copy: { electron: { files: [ { expand: true, src: ['public/**'], dest: 'build/resource/' }, { expand: true, src: ['source/**'], dest: 'build/resource/' }, { expand: true, src: ['components/**'], dest: 'build/resource/' }, { expand: true, src: ['assets/**'], dest: 'build/resource/' }, { expand: true, src: ['node_modules/**'], dest: 'build/resource/' }, { expand: true, src: ['package.json'], dest: 'build/resource/'} ] } }, clean: { electron: ['./build'] }, electron: { package: { options: { name: 'ungit', dir: './build/resource', out: './build', version: '0.31.1', platform: 'all', arch: 'all', asar: true, prune: true } } } ======= }, copy: { main: { files: [ // includes files within path { expand: true, flatten: true, src: ['node_modules/octicons/octicons/octicons.ttf'], dest: 'public/css/' }, { expand: true, flatten: true, src: ['node_modules/octicons/octicons/octicons.woff'], dest: 'public/css/' } ] } } >>>>>>> }, copy: { main: { files: [ // includes files within path { expand: true, flatten: true, src: ['node_modules/octicons/octicons/octicons.ttf'], dest: 'public/css/' }, { expand: true, flatten: true, src: ['node_modules/octicons/octicons/octicons.woff'], dest: 'public/css/' } ] }, electron: { files: [ { expand: true, src: ['public/**'], dest: 'build/resource/' }, { expand: true, src: ['source/**'], dest: 'build/resource/' }, { expand: true, src: ['components/**'], dest: 'build/resource/' }, { expand: true, src: ['assets/**'], dest: 'build/resource/' }, { expand: true, src: ['node_modules/**'], dest: 'build/resource/' }, { expand: true, src: ['package.json'], dest: 'build/resource/'} ] } }, clean: { electron: ['./build'] }, electron: { package: { options: { name: 'ungit', dir: './build/resource', out: './build', version: '0.31.1', platform: 'all', arch: 'all', asar: true, prune: true } <<<<<<< grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-clean'); ======= grunt.loadNpmTasks('grunt-contrib-copy'); >>>>>>> grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-clean');
<<<<<<< //-----------------------sphere------------------------------ objProg = gl.createProgram(); gl.attachShader(objProg, getShader(gl, "obj-vs") ); gl.attachShader(objProg, getShader(gl, "obj-fs") ); gl.linkProgram(objProg); if (!gl.getProgramParameter(objProg, gl.LINK_STATUS)) { alert("Could not initialize obj shader."); } gl.useProgram(objProg); objProg.vertexPositionAttribute = gl.getAttribLocation(objProg, "aVertexPosition"); // objProg.textureCoordAttribute = gl.getAttribLocation(objProg, "aTextureCoord"); objProg.vertexNormalAttribute = gl.getAttribLocation(objProg, "aVertexNormal"); objProg.pMatrixUniform = gl.getUniformLocation(objProg, "uPMatrix"); objProg.mvMatrixUniform = gl.getUniformLocation(objProg, "uMVMatrix"); objProg.NmlMatrixUniform = gl.getUniformLocation(objProg, "uNmlMatrix"); objProg.CenterUniform = gl.getUniformLocation(objProg, "uCenter"); //objProg.RadiusUniform = gl.getUniformLocation(objProg, "uRadius"); // objProg.diffuseColorUniform = gl.getUniformLocation(objProg, "uDiffuseColor"); // objProg.samplerTileUniform = gl.getUniformLocation(objProg, "uSampler"); ======= poolProg.samplerHeightUniform = gl.getUniformLocation(poolProg, "uSamplerHeight"); poolProg.samplerCausticUniform = gl.getUniformLocation(poolProg, "uSamplerCaustic"); >>>>>>> poolProg.samplerHeightUniform = gl.getUniformLocation(poolProg, "uSamplerHeight"); poolProg.samplerCausticUniform = gl.getUniformLocation(poolProg, "uSamplerCaustic"); //-----------------------sphere------------------------------ objProg = gl.createProgram(); gl.attachShader(objProg, getShader(gl, "obj-vs") ); gl.attachShader(objProg, getShader(gl, "obj-fs") ); gl.linkProgram(objProg); if (!gl.getProgramParameter(objProg, gl.LINK_STATUS)) { alert("Could not initialize obj shader."); } gl.useProgram(objProg); objProg.vertexPositionAttribute = gl.getAttribLocation(objProg, "aVertexPosition"); // objProg.textureCoordAttribute = gl.getAttribLocation(objProg, "aTextureCoord"); objProg.vertexNormalAttribute = gl.getAttribLocation(objProg, "aVertexNormal"); objProg.pMatrixUniform = gl.getUniformLocation(objProg, "uPMatrix"); objProg.mvMatrixUniform = gl.getUniformLocation(objProg, "uMVMatrix"); objProg.NmlMatrixUniform = gl.getUniformLocation(objProg, "uNmlMatrix"); objProg.CenterUniform = gl.getUniformLocation(objProg, "uCenter"); //objProg.RadiusUniform = gl.getUniformLocation(objProg, "uRadius"); // objProg.diffuseColorUniform = gl.getUniformLocation(objProg, "uDiffuseColor"); // objProg.samplerTileUniform = gl.getUniformLocation(objProg, "uSampler");
<<<<<<< ======= >>>>>>> <<<<<<< initCustomeTexture(colorTexture, gl.RGBA, gl.NEAREST, gl.UNSIGNED_BYTE, textureSize1, textureSize1); initCustomeTexture(godrayTextureA, gl.RGBA, gl.NEAREST, gl.UNSIGNED_BYTE, textureSize1, textureSize1); initCustomeTexture(godrayTextureB, gl.RGBA, gl.NEAREST, gl.UNSIGNED_BYTE, textureSize1, textureSize1); ======= initCustomeTexture(colorTexture, gl.RGBA, gl.NEAREST, gl.UNSIGNED_BYTE, gl.viewportWidth, gl.viewportHeight); >>>>>>> initCustomeTexture(godrayTextureA, gl.RGBA, gl.NEAREST, gl.UNSIGNED_BYTE, textureSize1, textureSize1); initCustomeTexture(godrayTextureB, gl.RGBA, gl.NEAREST, gl.UNSIGNED_BYTE, textureSize1, textureSize1); initCustomeTexture(colorTexture, gl.RGBA, gl.NEAREST, gl.UNSIGNED_BYTE, gl.viewportWidth, gl.viewportHeight);
<<<<<<< var Promise = require("bluebird"); ======= var rootPath = ungit.config && ungit.config.rootPath || ''; >>>>>>> var Promise = require("bluebird"); var rootPath = ungit.config && ungit.config.rootPath || '';
<<<<<<< KCYShortener = { shorten : function(longUrl, useAcct, login, apiKey, callback) { var url = 'http://kcy.me/api/'; var params = { url: longUrl, u: login, key: apiKey }; $.ajax({ type: 'GET', url: url, data: params, dataType: 'text', success: function(data, status) { var errorCode = -1; if(data.match(/^http/i)) { errorCode = 0; } callback(errorCode, data); }, error: function (request, status, error) { callback(-1, chrome.i18n.getMessage("ajaxFailed")); } }); } } ======= YourlsShortener = { shorten: function(longUrl, useAcct, login, apiKey, serviceUrl, callback) { var params = { signature: apiKey, action: 'shorturl', format: 'json', url: longUrl, } $.ajax({ type: 'GET', url: serviceUrl, data: params, dataType: 'json', success: function(data, status) { if(data && data.status && data.shorturl) { callback(0, data.shorturl); } else { callback(-1, data.message); } }, error: function (request, status, error) { callback(-1,'AJAX request failed (bad connection?)'); } }); } } >>>>>>> KCYShortener = { shorten : function(longUrl, useAcct, login, apiKey, serviceUrl, callback) { var url = 'http://kcy.me/api/'; var params = { url: longUrl, u: login, key: apiKey }; $.ajax({ type: 'GET', url: url, data: params, dataType: 'text', success: function(data, status) { var errorCode = -1; if(data.match(/^http/i)) { errorCode = 0; } callback(errorCode, data); }, error: function (request, status, error) { callback(-1, chrome.i18n.getMessage("ajaxFailed")); } }); } } YourlsShortener = { shorten: function(longUrl, useAcct, login, apiKey, serviceUrl, callback) { var params = { signature: apiKey, action: 'shorturl', format: 'json', url: longUrl, }; $.ajax({ type: 'GET', url: serviceUrl, data: params, dataType: 'json', success: function(data, status) { if(data && data.status && data.shorturl) { callback(0, data.shorturl); } else { callback(-1, data.message); } }, error: function (request, status, error) { callback(-1,'AJAX request failed (bad connection?)'); } }); } } <<<<<<< }, karmacracy: { desc: 'karmacracy.com', baseUrl: '', backend: KCYShortener ======= }, yourls: { desc: 'yourls', baseUrl: '', backend: YourlsShortener >>>>>>> }, karmacracy: { desc: 'karmacracy.com', baseUrl: '', backend: KCYShortener }, yourls: { desc: 'yourls', baseUrl: '', backend: YourlsShortener
<<<<<<< grunt.registerTask('default', ['clean:babel', 'less:production', 'jshint', 'babel:prod', 'browserify-common', 'browserify-components', 'lineending:production', 'imageEmbed:default', 'copy:main', 'imagemin:default']); ======= grunt.registerTask('default', ['less:production', 'jshint', 'browserify-common', 'browserify-components', 'lineending:production', 'imageEmbed:default', 'copy:main']); >>>>>>> grunt.registerTask('default', ['clean:babel', 'less:production', 'jshint', 'babel:prod', 'browserify-common', 'browserify-components', 'lineending:production', 'imageEmbed:default', 'copy:main']);
<<<<<<< function MirrorCtrl(AnnyangService, GeolocationService, WeatherService, MapService, HueService, CalendarService, GiphyService, $scope, $timeout, $interval) { ======= function MirrorCtrl( AnnyangService, GeolocationService, WeatherService, MapService, HueService, CalendarService, XKCDService, $scope, $timeout, $interval) { >>>>>>> function MirrorCtrl( AnnyangService, GeolocationService, WeatherService, MapService, HueService, CalendarService, XKCDService, GiphyService, $scope, $timeout, $interval) { <<<<<<< //Get gif image AnnyangService.addCommand('giphy *img', function(img) { GiphyService.init(img).then(function(){ $scope.gifimg = GiphyService.giphyImg(); $scope.focus = "gif"; }); }); // Fallback for all commands AnnyangService.addCommand('*allSpeech', function(allSpeech) { console.debug(allSpeech); _this.addResult(allSpeech); ======= // Show xkcd comic AnnyangService.addCommand('Show xkcd', function(state, action) { console.debug("Fetching a comic for you."); XKCDService.getXKCD().then(function(data){ $scope.xkcd = data.img; $scope.focus = "xkcd"; }); >>>>>>> //Show giphy image AnnyangService.addCommand('giphy *img', function(img) { GiphyService.init(img).then(function(){ $scope.gifimg = GiphyService.giphyImg(); $scope.focus = "gif"; }); }); // Show xkcd comic AnnyangService.addCommand('Show xkcd', function(state, action) { console.debug("Fetching a comic for you."); XKCDService.getXKCD().then(function(data){ $scope.xkcd = data.img; $scope.focus = "xkcd"; });
<<<<<<< function MirrorCtrl(AnnyangService, GeolocationService, WeatherService, MapService, HueService, CalendarService, XKCDService, TrafficService, $scope, $timeout, $interval) { ======= function MirrorCtrl( AnnyangService, GeolocationService, WeatherService, MapService, HueService, CalendarService, XKCDService, GiphyService, $scope, $timeout, $interval) { >>>>>>> function MirrorCtrl( AnnyangService, GeolocationService, WeatherService, MapService, HueService, CalendarService, XKCDService, GiphyService, TrafficService, $scope, $timeout, $interval) { <<<<<<< //Initiate Hue communication HueService.init(); var refreshTrafficData = function() { TrafficService.getTravelDuration().then(function() { var information = TrafficService.getCurrentTime(); if (information.hasOwnProperty("error")) { $scope.trafficInformation = information.error; } else { var time = ""; if (information.hoursTraffic > 0) { time += information.hoursTraffic + "h "; } if (information.minsTraffic > 0) { time += information.minsTraffic + "mins "; } if (information.hoursTraffic > information.hours || information.minsTraffic > information.mins) { time += "("; if (information.hours > 0 && information.hoursTraffic > 0 && information.hoursTraffic > information.hours) { time += information.hoursTraffic - information.hours + "h "; } if (information.mins > 0 && information.minsTraffic > 0 && information.minsTraffic > information.mins) { time += information.minsTraffic - information.mins + "mins"; } time += " extra)"; } $scope.trafficInformation = time; } }); } refreshTrafficData(); $interval(refreshTrafficData, TRIP_REFRESH_INTERVAL * 60000); ======= >>>>>>> var refreshTrafficData = function() { TrafficService.getTravelDuration().then(function() { var information = TrafficService.getCurrentTime(); if (information.hasOwnProperty("error")) { $scope.trafficInformation = information.error; } else { var time = ""; if (information.hoursTraffic > 0) { time += information.hoursTraffic + "h "; } if (information.minsTraffic > 0) { time += information.minsTraffic + "mins "; } if (information.hoursTraffic > information.hours || information.minsTraffic > information.mins) { time += "("; if (information.hours > 0 && information.hoursTraffic > 0 && information.hoursTraffic > information.hours) { time += information.hoursTraffic - information.hours + "h "; } if (information.mins > 0 && information.minsTraffic > 0 && information.minsTraffic > information.mins) { time += information.minsTraffic - information.mins + "mins"; } time += " extra)"; } $scope.trafficInformation = time; } }); } refreshTrafficData(); $interval(refreshTrafficData, TRIP_REFRESH_INTERVAL * 60000);
<<<<<<< angular.module('SmartMirror', ['ngAnimate', 'tmh.dynamicLocale']).config(function(tmhDynamicLocaleProvider) { var locale = config.locale.toLowerCase(); console.debug("Locale : " + locale); tmhDynamicLocaleProvider.localeLocationPattern('https://code.angularjs.org/1.2.20/i18n/angular-locale_'+locale+'.js'); }); ======= angular.module('SmartMirror', ['ngAnimate', 'tmh.dynamicLocale']).config(function(tmhDynamicLocaleProvider) { tmhDynamicLocaleProvider.localeLocationPattern('https://code.angularjs.org/1.2.20/i18n/angular-locale_{{locale}}.js'); }); >>>>>>> angular.module('SmartMirror', ['ngAnimate', 'tmh.dynamicLocale']).config(function(tmhDynamicLocaleProvider) { var locale = config.locale.toLowerCase(); tmhDynamicLocaleProvider.localeLocationPattern('https://code.angularjs.org/1.2.20/i18n/angular-locale_'+locale+'.js'); });
<<<<<<< var topBlock = Blockly.Xml.domToBlockHeadless_(xmlBlock, workspace); if (workspace.rendered) { // Hide connections to speed up assembly. topBlock.setConnectionsHidden(true); // Generate list of all blocks. var blocks = topBlock.getDescendants(); // Render each block. for (var i = blocks.length - 1; i >= 0; i--) { blocks[i].initSvg(); } for (var i = blocks.length - 1; i >= 0; i--) { blocks[i].render(false); } // Populating the connection database may be defered until after the blocks // have rendered. if (!workspace.isFlyout) { setTimeout(function() { if (topBlock.workspace) { // Check that the block hasn't been deleted. topBlock.setConnectionsHidden(false); } }, 1); } topBlock.updateDisabled(); // Allow the scrollbars to resize and move based on the new contents. // TODO(@picklesrus): #387. Remove when domToBlock avoids resizing. Blockly.resizeSvgContents(workspace); ======= try { var topBlock = Blockly.Xml.domToBlockHeadless_(xmlBlock, workspace); if (workspace.rendered) { // Hide connections to speed up assembly. topBlock.setConnectionsHidden(true); // Generate list of all blocks. var blocks = topBlock.getDescendants(); // Render each block. for (var i = blocks.length - 1; i >= 0; i--) { blocks[i].initSvg(); } for (var i = blocks.length - 1; i >= 0; i--) { blocks[i].render(false); } // Populating the connection database may be defered until after the // blocks have rendered. setTimeout(function() { if (topBlock.workspace) { // Check that the block hasn't been deleted. topBlock.setConnectionsHidden(false); } }, 1); topBlock.updateDisabled(); // Allow the scrollbars to resize and move based on the new contents. // TODO(@picklesrus): #387. Remove when domToBlock avoids resizing. Blockly.resizeSvgContents(workspace); } } finally { Blockly.Events.enable(); >>>>>>> try { var topBlock = Blockly.Xml.domToBlockHeadless_(xmlBlock, workspace); if (workspace.rendered) { // Hide connections to speed up assembly. topBlock.setConnectionsHidden(true); // Generate list of all blocks. var blocks = topBlock.getDescendants(); // Render each block. for (var i = blocks.length - 1; i >= 0; i--) { blocks[i].initSvg(); } for (var i = blocks.length - 1; i >= 0; i--) { blocks[i].render(false); } // Populating the connection database may be defered until after the // blocks have rendered. if (!workspace.isFlyout) { setTimeout(function() { if (topBlock.workspace) { // Check that the block hasn't been deleted. topBlock.setConnectionsHidden(false); } }, 1); } } topBlock.updateDisabled(); // Allow the scrollbars to resize and move based on the new contents. // TODO(@picklesrus): #387. Remove when domToBlock avoids resizing. Blockly.resizeSvgContents(workspace); } finally { Blockly.Events.enable();
<<<<<<< Blockly.FlyoutButton.prototype.height = 40; // Can't be computed like the width /** * Opaque data that can be passed to Blockly.unbindEvent_. * @type {Array.<!Array>} * @private */ Blockly.FlyoutButton.prototype.onMouseUpWrapper_ = null; /** * Opaque data that can be passed to Blockly.unbindEvent_. * @type {Array.<!Array>} * @private */ Blockly.FlyoutButton.prototype.onMouseUpWrapper_ = null; ======= Blockly.FlyoutButton.prototype.height = 40; // Can't be computed like the width /** * Opaque data that can be passed to Blockly.unbindEvent_. * @type {Array.<!Array>} * @private */ Blockly.FlyoutButton.prototype.onMouseUpWrapper_ = null; >>>>>>> Blockly.FlyoutButton.prototype.height = 40; // Can't be computed like the width /** * Opaque data that can be passed to Blockly.unbindEvent_. * @type {Array.<!Array>} * @private */ Blockly.FlyoutButton.prototype.onMouseUpWrapper_ = null; <<<<<<< if (this.icon_ || this.iconClass_) { var svgIcon = Blockly.utils.createSvgElement('text', {'class': this.iconClass_ ? 'blocklyFlyoutLabelIcon ' + this.iconClass_ : 'blocklyFlyoutLabelIcon', 'x': 0, 'y': 0, 'text-anchor': 'middle'}, this.svgGroup_); if (this.icon_) svgIcon.textContent = this.icon_; if (this.iconColor_) svgIcon.setAttribute('style', 'fill: ' + this.iconColor_); this.width += svgIcon.getComputedTextLength(); svgIcon.setAttribute('text-anchor', 'end'); svgIcon.setAttribute('alignment-baseline', 'central'); svgIcon.setAttribute('x', Blockly.FlyoutButton.MARGIN); svgIcon.setAttribute('y', this.height / 2); } else if (this.isLabel_) { this.width = svgText.getComputedTextLength() + 2 * Blockly.BlockSvg.TAB_WIDTH; } if (this.line_) { var svgLine = Blockly.utils.createSvgElement('line', {'class': 'blocklyFlyoutLine', 'stroke-dasharray': this.line_, 'text-anchor': 'middle'}, this.svgGroup_); svgLine.setAttribute('x1', 0); svgLine.setAttribute('x2', this.lineWidth_ != null ? this.lineWidth_ : this.width); svgLine.setAttribute('y1', this.height); svgLine.setAttribute('y2', this.height); } ======= >>>>>>> if (this.icon_ || this.iconClass_) { var svgIcon = Blockly.utils.createSvgElement('text', {'class': this.iconClass_ ? 'blocklyFlyoutLabelIcon ' + this.iconClass_ : 'blocklyFlyoutLabelIcon', 'x': 0, 'y': 0, 'text-anchor': 'middle'}, this.svgGroup_); if (this.icon_) svgIcon.textContent = this.icon_; if (this.iconColor_) svgIcon.setAttribute('style', 'fill: ' + this.iconColor_); this.width += svgIcon.getComputedTextLength(); svgIcon.setAttribute('text-anchor', 'end'); svgIcon.setAttribute('alignment-baseline', 'central'); svgIcon.setAttribute('x', Blockly.FlyoutButton.MARGIN); svgIcon.setAttribute('y', this.height / 2); } else if (this.isLabel_) { this.width = svgText.getComputedTextLength() + 2 * Blockly.BlockSvg.TAB_WIDTH; } if (this.line_) { var svgLine = Blockly.utils.createSvgElement('line', {'class': 'blocklyFlyoutLine', 'stroke-dasharray': this.line_, 'text-anchor': 'middle'}, this.svgGroup_); svgLine.setAttribute('x1', 0); svgLine.setAttribute('x2', this.lineWidth_ != null ? this.lineWidth_ : this.width); svgLine.setAttribute('y1', this.height); svgLine.setAttribute('y2', this.height); }
<<<<<<< syncTrees(newTree, this.tree_, this.iconic_, this.workspace_.options.pathToMedia); this.hasColours_ = hasColours; if (rootOut.blocks.length) { throw 'Toolbox cannot have both blocks and categories in the root level.'; } // Fire a resize event since the toolbox may have changed width and height. Blockly.resizeSvgContents(this.workspace_); ======= >>>>>>>
<<<<<<< return Bluebird.all((files || []).map(function(file) { return fs.isExists(file).then(function(isExist) { ======= return Promise.all((files || []).map(function(file) { return fs.isExists(path.join(repoPath, file)).then(function(isExist) { >>>>>>> return Bluebird.all((files || []).map(function(file) { return fs.isExists(path.join(repoPath, file)).then(function(isExist) {
<<<<<<< var list = this.createTabList_(); var i = list.indexOf(start); if (i == -1) { // No start location, start at the beginning or end. i = forward ? -1 : list.length; } var target = list[forward ? i + 1 : i - 1]; if (!target) { // Ran off of list. var parent = this.getParent(); if (parent) { parent.tab(this, forward); } } else if (target instanceof Blockly.Field) { target.showEditor_(); } else { target.tab(null, forward); } ======= var list = this.createTabList_(); var i = list.indexOf(start); if (i == -1) { // No start location, start at the beginning or end. i = forward ? -1 : list.length; } var target = list[forward ? i + 1 : i - 1]; if (!target) { // Ran off of list. // If there is an output, tab up to that block. var outputBlock = this.outputConnection && this.outputConnection.targetBlock(); if (outputBlock) { outputBlock.tab(this, forward); } else { // Otherwise, go to next / previous block, depending on value of `forward` var block = forward ? this.getNextBlock() : this.getPreviousBlock(); if (block) { block.tab(this, forward); } } } else if (target instanceof Blockly.Field) { target.showEditor_(); } else { target.tab(null, forward); } }; /** * Create an ordered list of all text fields and connected inputs. * @return {!Array<!Blockly.FieldTextInput|!Blockly.Input>} The ordered list. * @private */ Blockly.BlockSvg.prototype.createTabList_ = function() { // This function need not be efficient since it runs once on a keypress. var list = []; for (var i = 0, input; input = this.inputList[i]; i++) { for (var j = 0, field; field = input.fieldRow[j]; j++) { if (field instanceof Blockly.FieldTextInput) { // TODO(# 1276): Also support dropdown fields. list.push(field); } } if (input.connection) { var block = input.connection.targetBlock(); if (block) { list.push(block); } } } return list; >>>>>>> var list = this.createTabList_(); var i = list.indexOf(start); if (i == -1) { // No start location, start at the beginning or end. i = forward ? -1 : list.length; } var target = list[forward ? i + 1 : i - 1]; if (!target) { // Ran off of list. // If there is an output, tab up to that block. var outputBlock = this.outputConnection && this.outputConnection.targetBlock(); if (outputBlock) { outputBlock.tab(this, forward); } else { // Otherwise, go to next / previous block, depending on value of `forward` var block = forward ? this.getNextBlock() : this.getPreviousBlock(); if (block) { block.tab(this, forward); } } } else if (target instanceof Blockly.Field) { target.showEditor_(); } else { target.tab(null, forward); }
<<<<<<< goog.require('Blockly.DropDownDiv'); ======= goog.require('Blockly.Events'); >>>>>>> goog.require('Blockly.DropDownDiv'); goog.require('Blockly.Events'); <<<<<<< //goog.require('Blockly.VerticalFlyout'); ======= goog.require('Blockly.utils'); goog.require('Blockly.utils.Coordinate'); goog.require('Blockly.utils.dom'); goog.require('Blockly.utils.Rect'); >>>>>>> goog.require('Blockly.utils'); goog.require('Blockly.utils.Coordinate'); goog.require('Blockly.utils.dom'); goog.require('Blockly.utils.Rect'); <<<<<<< goog.require('Blockly.WorkspaceComment'); goog.require('Blockly.WorkspaceCommentSvg'); ======= goog.require('Blockly.WorkspaceComment'); goog.require('Blockly.WorkspaceCommentSvg'); goog.require('Blockly.WorkspaceCommentSvg.render'); >>>>>>> goog.require('Blockly.WorkspaceComment'); goog.require('Blockly.WorkspaceCommentSvg'); goog.require('Blockly.WorkspaceCommentSvg.render'); <<<<<<< * Inverted screen CTM is dirty. * @type {Boolean} * @private */ Blockly.WorkspaceSvg.prototype.inverseScreenCTMDirty_ = true; /** ======= * Inverted screen CTM is dirty, recalculate it. * @type {boolean} * @private */ Blockly.WorkspaceSvg.prototype.inverseScreenCTMDirty_ = true; /** >>>>>>> * Inverted screen CTM is dirty, recalculate it. * @type {boolean} * @private */ Blockly.WorkspaceSvg.prototype.inverseScreenCTMDirty_ = true; /** <<<<<<< this.inverseScreenCTMDirty_ = true; ======= this.inverseScreenCTMDirty_ = true; }; /** * Getter for isVisible * @return {boolean} Whether the workspace is visible. * False if the workspace has been hidden by calling `setVisible(false)`. */ Blockly.WorkspaceSvg.prototype.isVisible = function() { return this.isVisible_; >>>>>>> this.inverseScreenCTMDirty_ = true; }; /** * Getter for isVisible * @return {boolean} Whether the workspace is visible. * False if the workspace has been hidden by calling `setVisible(false)`. */ Blockly.WorkspaceSvg.prototype.isVisible = function() { return this.isVisible_; <<<<<<< * Paste the provided comment onto the workspace. * @param {!Element} xmlComment XML workspace comment element. */ Blockly.WorkspaceSvg.prototype.pasteWorkspaceComment_ = function(xmlComment) { Blockly.Events.disable(); try { var comment = Blockly.WorkspaceCommentSvg.fromXml(xmlComment, this); // Move the duplicate to original position. var commentX = parseInt(xmlComment.getAttribute('x'), 10); var commentY = parseInt(xmlComment.getAttribute('y'), 10); if (!isNaN(commentX) && !isNaN(commentY)) { if (this.RTL) { commentX = -commentX; } // Offset workspace comment. // TODO: #1719 properly offset comment such that it's not interfereing with any blocks commentX += 50; commentY += 50; comment.moveBy(commentX, commentY); } } finally { Blockly.Events.enable(); } if (Blockly.Events.isEnabled()) { Blockly.WorkspaceComment.fireCreateEvent(comment); } comment.select(); }; /** ======= * Paste the provided comment onto the workspace. * @param {!Element} xmlComment XML workspace comment element. * @private */ Blockly.WorkspaceSvg.prototype.pasteWorkspaceComment_ = function(xmlComment) { Blockly.Events.disable(); try { var comment = Blockly.WorkspaceCommentSvg.fromXml(xmlComment, this); // Move the duplicate to original position. var commentX = parseInt(xmlComment.getAttribute('x'), 10); var commentY = parseInt(xmlComment.getAttribute('y'), 10); if (!isNaN(commentX) && !isNaN(commentY)) { if (this.RTL) { commentX = -commentX; } // Offset workspace comment. // TODO (#1719): Properly offset comment such that it's not interfering // with any blocks. commentX += 50; commentY += 50; comment.moveBy(commentX, commentY); } } finally { Blockly.Events.enable(); } if (Blockly.Events.isEnabled()) { // TODO: Fire a Workspace Comment Create event. } comment.select(); }; /** >>>>>>> * Paste the provided comment onto the workspace. * @param {!Element} xmlComment XML workspace comment element. * @private */ Blockly.WorkspaceSvg.prototype.pasteWorkspaceComment_ = function(xmlComment) { Blockly.Events.disable(); try { var comment = Blockly.WorkspaceCommentSvg.fromXml(xmlComment, this); // Move the duplicate to original position. var commentX = parseInt(xmlComment.getAttribute('x'), 10); var commentY = parseInt(xmlComment.getAttribute('y'), 10); if (!isNaN(commentX) && !isNaN(commentY)) { if (this.RTL) { commentX = -commentX; } // Offset workspace comment. // TODO (#1719): Properly offset comment such that it's not interfering // with any blocks. commentX += 50; commentY += 50; comment.moveBy(commentX, commentY); } } finally { Blockly.Events.enable(); } if (Blockly.Events.isEnabled()) { Blockly.WorkspaceComment.fireCreateEvent(comment); } comment.select(); }; /** <<<<<<< // pxtblockly: Blockly zoom with Ctrl / Cmd + mousewheel scroll, // and scroll workspace with just mousewheel scroll if (e.ctrlKey || e.metaKey) { // The vertical scroll distance that corresponds to a click of a zoom button. var PIXELS_PER_ZOOM_STEP = 50; var delta = -e.deltaY / PIXELS_PER_ZOOM_STEP; var position = Blockly.utils.mouseToSvg(e, this.getParentSvg(), this.getInverseScreenCTM()); this.zoom(position.x, position.y, delta); } else { // This is a regular mouse wheel event - scroll the workspace // First hide the WidgetDiv without animation // (mouse scroll makes field out of place with div) Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation(); var x = this.scrollX - e.deltaX; var y = this.scrollY - e.deltaY; this.startDragMetrics = this.getMetrics(); this.scroll(x, y); } ======= >>>>>>> // pxt-blockly: Blockly zoom with Ctrl / Cmd + mousewheel scroll, // and scroll workspace with just mousewheel scroll if (e.ctrlKey || e.metaKey) { // The vertical scroll distance that corresponds to a click of a zoom button. var PIXELS_PER_ZOOM_STEP = 50; var delta = -e.deltaY / PIXELS_PER_ZOOM_STEP; var position = Blockly.utils.mouseToSvg(e, this.getParentSvg(), this.getInverseScreenCTM()); this.zoom(position.x, position.y, delta); } else { // This is a regular mouse wheel event - scroll the workspace // First hide the WidgetDiv without animation // (mouse scroll makes field out of place with div) Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation(); var x = this.scrollX - e.deltaX; var y = this.scrollY - e.deltaY; this.startDragMetrics = this.getMetrics(); this.scroll(x, y); } <<<<<<< if (!topElements.length) { return {x: 0, y: 0, width: 0, height: 0}; ======= if (!topElements.length) { return new Blockly.utils.Rect(0, 0, 0, 0); >>>>>>> if (!topElements.length) { return new Blockly.utils.Rect(0, 0, 0, 0); <<<<<<< // Start at 1 since the 0th block was used for initialization for (var i = 1; i < topElements.length; i++) { var blockBoundary = topElements[i].getBoundingRectangle(); if (blockBoundary.topLeft.x < boundary.topLeft.x) { boundary.topLeft.x = blockBoundary.topLeft.x; ======= // Start at 1 since the 0th block was used for initialization. for (var i = 1; i < topElements.length; i++) { var blockBoundary = topElements[i].getBoundingRectangle(); if (blockBoundary.top < boundary.top) { boundary.top = blockBoundary.top; >>>>>>> // Start at 1 since the 0th block was used for initialization. for (var i = 1; i < topElements.length; i++) { var blockBoundary = topElements[i].getBoundingRectangle(); if (blockBoundary.top < boundary.top) { boundary.top = blockBoundary.top; <<<<<<< menuOptions.push(Blockly.ContextMenu.wsUndoOption(this)); menuOptions.push(Blockly.ContextMenu.wsRedoOption(this)); // Option to add a workspace comment. if (this.options.comments) { menuOptions.push(Blockly.ContextMenu.workspaceCommentOption(ws, e)); } ======= var undoOption = {}; undoOption.text = Blockly.Msg['UNDO']; undoOption.enabled = this.undoStack_.length > 0; undoOption.callback = this.undo.bind(this, false); menuOptions.push(undoOption); var redoOption = {}; redoOption.text = Blockly.Msg['REDO']; redoOption.enabled = this.redoStack_.length > 0; redoOption.callback = this.undo.bind(this, true); menuOptions.push(redoOption); >>>>>>> var undoOption = {}; undoOption.text = Blockly.Msg['UNDO']; undoOption.enabled = this.undoStack_.length > 0; undoOption.callback = this.undo.bind(this, false); menuOptions.push(undoOption); var redoOption = {}; redoOption.text = Blockly.Msg['REDO']; redoOption.enabled = this.redoStack_.length > 0; redoOption.callback = this.undo.bind(this, true); menuOptions.push(redoOption); // pxt-blockly: Option to add a workspace comment. // TODO shakao match style of other options if (this.options.comments) { menuOptions.push(Blockly.ContextMenu.workspaceCommentOption(ws, e)); } <<<<<<< if (this.scrollbar) { menuOptions.push( Blockly.ContextMenu.wsCleanupOption(this,topBlocks.length)); ======= if (this.isMovable()) { var cleanOption = {}; cleanOption.text = Blockly.Msg['CLEAN_UP']; cleanOption.enabled = topBlocks.length > 1; cleanOption.callback = this.cleanUp.bind(this); menuOptions.push(cleanOption); >>>>>>> if (this.isMovable()) { var cleanOption = {}; cleanOption.text = Blockly.Msg['CLEAN_UP']; cleanOption.enabled = topBlocks.length > 1; cleanOption.callback = this.cleanUp.bind(this); menuOptions.push(cleanOption); <<<<<<< text: deleteCount == 1 ? Blockly.Msg.DELETE_BLOCK : Blockly.Msg.DELETE_X_BLOCKS.replace('%1', String(deleteCount)), enabled: deleteCount > 0, ======= text: deleteList.length == 1 ? Blockly.Msg['DELETE_BLOCK'] : Blockly.Msg['DELETE_X_BLOCKS'].replace('%1', String(deleteList.length)), enabled: deleteList.length > 0, >>>>>>> text: deleteList.length == 1 ? Blockly.Msg['DELETE_BLOCK'] : Blockly.Msg['DELETE_X_BLOCKS'].replace('%1', String(deleteList.length)), enabled: deleteList.length > 0, <<<<<<< Blockly.Msg.DELETE_ALL_BLOCKS.replace('%1', deleteCount), ======= Blockly.Msg['DELETE_ALL_BLOCKS'].replace('%1', deleteList.length), >>>>>>> Blockly.Msg['DELETE_ALL_BLOCKS'].replace('%1', deleteList.length), <<<<<<< // pxtblockly: open expanded node when updating toolbox var openNode = this.toolbox_.populate_(tree); if (openNode) { this.toolbox_.tree_.setSelectedItem(openNode); } else { this.toolbox_.flyout_.hide(); } this.toolbox_.populate_(tree); //this.toolbox_.position(); ======= var openNode = this.toolbox_.populate_(tree); >>>>>>> // pxtblockly: open expanded node when updating toolbox var openNode = this.toolbox_.populate_(tree); if (openNode) { this.toolbox_.tree_.setSelectedItem(openNode); } else { this.toolbox_.flyout_.hide(); } var openNode = this.toolbox_.populate_(tree); //this.toolbox_.position(); <<<<<<< Blockly.WorkspaceSvg.prototype.centerOnBlock = function(id, animate) { if (!this.scrollbar) { console.warn('Tried to scroll a non-scrollable workspace.'); ======= Blockly.WorkspaceSvg.prototype.centerOnBlock = function(id) { if (!this.isMovable()) { console.warn('Tried to move a non-movable workspace. This could result' + ' in blocks becoming inaccessible.'); >>>>>>> Blockly.WorkspaceSvg.prototype.centerOnBlock = function(id, animate) { if (!this.isMovable()) { console.warn('Tried to move a non-movable workspace. This could result' + ' in blocks becoming inaccessible.'); <<<<<<< this.scrollbar.set(scrollToCenterX, scrollToCenterY); var blockCanvas = this.svgBlockCanvas_; setTimeout(function() { Blockly.utils.removeClass(blockCanvas, 'blocklyTransitioning'); }, Blockly.Colours.canvasTransitionLength); ======= this.scroll(x, y); >>>>>>> this.scroll(x, y); var blockCanvas = this.svgBlockCanvas_; setTimeout(function() { Blockly.utils.removeClass(blockCanvas, 'blocklyTransitioning'); }, Blockly.Colours.canvasTransitionLength);
<<<<<<< icon: null, ======= valueInput: null, imageField: null, >>>>>>> imageField: null, <<<<<<< // Always render icon at 40x40 px ======= for (var i = 0, child; child = this.childBlocks_[i]; i++) { if (child.isShadow()) { metrics.valueInput = child; } } // Always render image field at 40x40 px >>>>>>> // Always render image field at 40x40 px
<<<<<<< goog.require('Blockly.Events.EndBlockDrag'); ======= goog.require('Blockly.Events.Ui'); >>>>>>> goog.require('Blockly.Events.EndBlockDrag'); goog.require('Blockly.Events.Ui');
<<<<<<< // Dynamically replace colours in the CSS text, in case they have // been set at run-time injection. for (var colourProperty in Blockly.Colours) { if (Blockly.Colours.hasOwnProperty(colourProperty)) { // Replace all text = text.replace( new RegExp('\\$colour\\_' + colourProperty, 'g'), Blockly.Colours[colourProperty] ); } } ======= >>>>>>> // pxt-blockly: Scratch rendering. Dynamically replace colours in // the CSS text, in case they have been set at run-time injection. for (var colourProperty in Blockly.Colours) { if (Blockly.Colours.hasOwnProperty(colourProperty)) { // Replace all text = text.replace( new RegExp('\\$colour\\_' + colourProperty, 'g'), Blockly.Colours[colourProperty] ); } } <<<<<<< '.blocklyDropDownDiv {', 'position: fixed;', 'left: 0;', 'top: 0;', 'z-index: 1000;', 'display: none;', 'border: 1px solid;', 'border-radius: 4px;', 'box-shadow: 0px 0px 8px 1px ' + Blockly.Colours.dropDownShadow + ';', 'padding: 4px;', '-webkit-user-select: none;', '}', '.blocklyDropDownContent {', 'max-height: 300px;', // @todo: spec for maximum height. 'overflow: auto;', 'overflow-x: hidden;', '}', '.blocklyDropDownArrow {', 'position: absolute;', 'left: 0;', 'top: 0;', 'width: 16px;', 'height: 16px;', 'z-index: -1;', 'background-color: inherit;', 'border-color: inherit;', '}', '.blocklyDropDownButton {', 'display: inline-block;', 'float: left;', 'padding: 0;', 'margin: 4px;', 'border-radius: 4px;', 'outline: none;', 'border: 1px solid;', 'transition: box-shadow .1s;', 'cursor: pointer;', '}', '.blocklyDropDownButtonHover {', 'box-shadow: 0px 0px 0px 4px ' + Blockly.Colours.fieldShadow + ';', '}', '.blocklyDropDownButton:active {', 'box-shadow: 0px 0px 0px 6px ' + Blockly.Colours.fieldShadow + ';', '}', '.blocklyDropDownButton > img {', 'width: 80%;', 'height: 80%;', 'margin-top: 5%', '}', '.blocklyDropDownPlaceholder {', 'display: inline-block;', 'float: left;', 'padding: 0;', 'margin: 4px;', '}', '.blocklyNumPadButton {', 'display: inline-block;', 'float: left;', 'padding: 0;', 'width: 48px;', 'height: 48px;', 'margin: 4px;', 'border-radius: 4px;', 'background: $colour_numPadBackground;', 'color: $colour_numPadText;', 'outline: none;', 'border: 1px solid $colour_numPadBorder;', 'cursor: pointer;', 'font-weight: 600;', 'font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;', 'font-size: 12pt;', '-webkit-tap-highlight-color: rgba(0,0,0,0);', '}', '.blocklyNumPadButton > img {', 'margin-top: 10%;', 'width: 80%;', 'height: 80%;', '}', '.blocklyNumPadButton:active {', 'background: $colour_numPadActiveBackground;', '-webkit-tap-highlight-color: rgba(0,0,0,0);', '}', '.arrowTop {', 'border-top: 1px solid;', 'border-left: 1px solid;', 'border-top-left-radius: 4px;', 'border-color: inherit;', '}', '.arrowBottom {', 'border-bottom: 1px solid;', 'border-right: 1px solid;', 'border-bottom-right-radius: 4px;', 'border-color: inherit;', '}', '.valueReportBox {', 'min-width: 50px;', 'max-width: 300px;', 'max-height: 200px;', 'overflow: auto;', 'word-wrap: break-word;', 'text-align: center;', 'font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;', 'font-size: .8em;', '}', ======= '.blocklyDropDownDiv {', 'position: fixed;', 'left: 0;', 'top: 0;', 'z-index: 1000;', 'display: none;', 'border: 1px solid;', 'border-radius: 2px;', 'padding: 4px;', '-webkit-user-select: none;', '}', '.blocklyDropDownContent {', 'max-height: 300px;', // @todo: spec for maximum height. 'overflow: auto;', 'overflow-x: hidden;', '}', '.blocklyDropDownArrow {', 'position: absolute;', 'left: 0;', 'top: 0;', 'width: 16px;', 'height: 16px;', 'z-index: -1;', 'background-color: inherit;', 'border-color: inherit;', '}', '.blocklyDropDownButton {', 'display: inline-block;', 'float: left;', 'padding: 0;', 'margin: 4px;', 'border-radius: 4px;', 'outline: none;', 'border: 1px solid;', 'transition: box-shadow .1s;', 'cursor: pointer;', '}', '.arrowTop {', 'border-top: 1px solid;', 'border-left: 1px solid;', 'border-top-left-radius: 4px;', 'border-color: inherit;', '}', '.arrowBottom {', 'border-bottom: 1px solid;', 'border-right: 1px solid;', 'border-bottom-right-radius: 4px;', 'border-color: inherit;', '}', >>>>>>> '.blocklyDropDownDiv {', 'position: fixed;', 'left: 0;', 'top: 0;', 'z-index: 1000;', 'display: none;', 'border: 1px solid;', 'border-radius: 2px;', /* TODO shakao verify drop shadow removed ok */ 'padding: 4px;', '-webkit-user-select: none;', '}', '.blocklyDropDownContent {', 'max-height: 300px;', // @todo: spec for maximum height. 'overflow: auto;', 'overflow-x: hidden;', '}', '.blocklyDropDownArrow {', 'position: absolute;', 'left: 0;', 'top: 0;', 'width: 16px;', 'height: 16px;', 'z-index: -1;', 'background-color: inherit;', 'border-color: inherit;', '}', '.blocklyDropDownButton {', 'display: inline-block;', 'float: left;', 'padding: 0;', 'margin: 4px;', 'border-radius: 4px;', 'outline: none;', 'border: 1px solid;', 'transition: box-shadow .1s;', 'cursor: pointer;', '}', '.blocklyDropDownButtonHover {', 'box-shadow: 0px 0px 0px 4px ' + Blockly.Colours.fieldShadow + ';', '}', '.blocklyDropDownButton:active {', 'box-shadow: 0px 0px 0px 6px ' + Blockly.Colours.fieldShadow + ';', '}', '.blocklyDropDownButton > img {', 'width: 80%;', 'height: 80%;', 'margin-top: 5%', '}', '.blocklyDropDownPlaceholder {', 'display: inline-block;', 'float: left;', 'padding: 0;', 'margin: 4px;', '}', '.blocklyNumPadButton {', 'display: inline-block;', 'float: left;', 'padding: 0;', 'width: 48px;', 'height: 48px;', 'margin: 4px;', 'border-radius: 4px;', 'background: $colour_numPadBackground;', 'color: $colour_numPadText;', 'outline: none;', 'border: 1px solid $colour_numPadBorder;', 'cursor: pointer;', 'font-weight: 600;', 'font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;', 'font-size: 12pt;', '-webkit-tap-highlight-color: rgba(0,0,0,0);', '}', '.blocklyNumPadButton > img {', 'margin-top: 10%;', 'width: 80%;', 'height: 80%;', '}', '.blocklyNumPadButton:active {', 'background: $colour_numPadActiveBackground;', '-webkit-tap-highlight-color: rgba(0,0,0,0);', '}', '.arrowTop {', 'border-top: 1px solid;', 'border-left: 1px solid;', 'border-top-left-radius: 4px;', 'border-color: inherit;', '}', '.arrowBottom {', 'border-bottom: 1px solid;', 'border-right: 1px solid;', 'border-bottom-right-radius: 4px;', 'border-color: inherit;', '}', '.valueReportBox {', 'min-width: 50px;', 'max-width: 300px;', 'max-height: 200px;', 'overflow: auto;', 'word-wrap: break-word;', 'text-align: center;', 'font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;', 'font-size: .8em;', '}', <<<<<<< 'background-color: #FAF6BD;', ======= 'background-color: #fef49c;', >>>>>>> 'background-color: #FAF6BD;', <<<<<<< '.blocklyZoom>image {', 'opacity: 1;', ======= '.blocklyZoom>image, .blocklyZoom>svg>image {', 'opacity: .4;', '}', '.blocklyZoom>image:hover, .blocklyZoom>svg>image:hover {', 'opacity: .6;', '}', '.blocklyZoom>image:active, .blocklyZoom>svg>image:active {', 'opacity: .8;', >>>>>>> '.blocklyZoom>image {', 'opacity: 1;', <<<<<<< '.blocklyDropDownNumPad {', 'background-color: $colour_numPadBackground;', '}', /* Override the default Closure URL. */ ======= >>>>>>> '.blocklyDropDownNumPad {', 'background-color: $colour_numPadBackground;', '}', <<<<<<< /* Copied from: goog/css/colorpicker-simplegrid.css */ /* * Copyright 2007 The Closure Library Authors. All Rights Reserved. * * Use of this source code is governed by the Apache License, Version 2.0. * See the COPYING file for details. */ /* Author: [email protected] (Daniel Pupius) */ /* Styles to make the colorpicker look like the old gmail color picker NOTE: without CSS scoping this will override styles defined in palette.css */ '.blocklyDropDownDiv .goog-palette {', 'outline: none;', 'border-radius: 11px;', 'margin-bottom: 20px;', '}', '.blocklyDropDownDiv .goog-palette-table {', ======= /* Colour Picker Field */ '.blocklyColourTable {', >>>>>>> /* Colour Picker Field */ '.blocklyColourTable {', <<<<<<< /* If a menu doesn't have checkable items or items with icons, remove padding. */ '.blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,', '.blocklyWidgetDiv .goog-menu-noicon .goog-menuitem, ', '.blocklyDropDownDiv .goog-menu-nocheckbox .goog-menuitem,', '.blocklyDropDownDiv .goog-menu-noicon .goog-menuitem { ', ======= /* If a menu doesn't have checkable items or items with icons, * remove padding. */ '.blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem, ', '.blocklyWidgetDiv .goog-menu-noicon .goog-menuitem, ', '.blocklyDropDownDiv .goog-menu-nocheckbox .goog-menuitem, ', '.blocklyDropDownDiv .goog-menu-noicon .goog-menuitem { ', >>>>>>> /* If a menu doesn't have checkable items or items with icons, * remove padding. */ '.blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem, ', '.blocklyWidgetDiv .goog-menu-noicon .goog-menuitem, ', '.blocklyDropDownDiv .goog-menu-nocheckbox .goog-menuitem, ', '.blocklyDropDownDiv .goog-menu-noicon .goog-menuitem { ', <<<<<<< '.blocklyWidgetDiv .goog-menuitem-content ', '.blocklyDropDownDiv .goog-menuitem-content {', ======= '.blocklyWidgetDiv .goog-menuitem-content, ', '.blocklyDropDownDiv .goog-menuitem-content {', >>>>>>> '.blocklyWidgetDiv .goog-menuitem-content, ', '.blocklyDropDownDiv .goog-menuitem-content {', <<<<<<< '.blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,', '.blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content, ', '.blocklyDropDownDiv .goog-menuitem-disabled .goog-menuitem-accel,', '.blocklyDropDownDiv .goog-menuitem-disabled .goog-menuitem-content {', ======= '.blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel, ', '.blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content, ', '.blocklyDropDownDiv .goog-menuitem-disabled .goog-menuitem-accel, ', '.blocklyDropDownDiv .goog-menuitem-disabled .goog-menuitem-content {', >>>>>>> '.blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel, ', '.blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content, ', '.blocklyDropDownDiv .goog-menuitem-disabled .goog-menuitem-accel, ', '.blocklyDropDownDiv .goog-menuitem-disabled .goog-menuitem-content {', <<<<<<< 'padding-bottom: 4px;', 'padding-top: 4px;', '}', '.blocklyDropDownDiv .goog-menuitem-highlight,', '.blocklyDropDownDiv .goog-menuitem-hover {', 'background-color: rgba(0, 0, 0, 0.2);', ======= 'padding-bottom: 4px;', 'padding-top: 4px;', '}', '.blocklyDropDownDiv .goog-menuitem-highlight, ', '.blocklyDropDownDiv .goog-menuitem-hover {', 'background-color: rgba(0, 0, 0, 0.2);', >>>>>>> 'padding-bottom: 4px;', 'padding-top: 4px;', '}', '.blocklyDropDownDiv .goog-menuitem-highlight, ', '.blocklyDropDownDiv .goog-menuitem-hover {', 'background-color: rgba(0, 0, 0, 0.2);', <<<<<<< '.blocklyWidgetDiv .goog-menuitem-checkbox,', '.blocklyWidgetDiv .goog-menuitem-icon, ', '.blocklyDropDownDiv .goog-menuitem-checkbox,', '.blocklyDropDownDiv .goog-menuitem-icon {', ======= '.blocklyWidgetDiv .goog-menuitem-checkbox, ', '.blocklyWidgetDiv .goog-menuitem-icon, ', '.blocklyDropDownDiv .goog-menuitem-checkbox, ', '.blocklyDropDownDiv .goog-menuitem-icon {', >>>>>>> '.blocklyWidgetDiv .goog-menuitem-checkbox, ', '.blocklyWidgetDiv .goog-menuitem-icon, ', '.blocklyDropDownDiv .goog-menuitem-checkbox, ', '.blocklyDropDownDiv .goog-menuitem-icon {', <<<<<<< '.blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,', '.blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon,', '.blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-checkbox,', '.blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-icon {', ======= '.blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox, ', '.blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon, ', '.blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-checkbox, ', '.blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-icon {', >>>>>>> '.blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,', '.blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon,', '.blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-checkbox,', '.blocklyDropDownDiv .goog-menuitem-rtl .goog-menuitem-icon {', <<<<<<< 'float: right;', 'margin-left: 6px;', ======= 'left: auto;', 'right: 6px;', '}', '.blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox, ', '.blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon, ', '.blocklyDropDownDiv .goog-option-selected .goog-menuitem-checkbox, ', '.blocklyDropDownDiv .goog-option-selected .goog-menuitem-icon {', 'position: static;', /* Scroll with the menu. */ 'float: left;', 'margin-left: -24px;', >>>>>>> 'float: right;', 'margin-left: 6px;', <<<<<<< '.blocklyWidgetDiv .goog-menuseparator, ', '.blocklyDropDownDiv .goog-menuseparator {', 'border-top: 1px solid #ddd;', 'margin: 8px;', ======= '.blocklyWidgetDiv .goog-menuseparator, ', '.blocklyDropDownDiv .goog-menuseparator {', 'border-top: 1px solid #ccc;', 'margin: 4px 0;', >>>>>>> '.blocklyWidgetDiv .goog-menuseparator, ', '.blocklyDropDownDiv .goog-menuseparator {', 'border-top: 1px solid #ccc;', 'margin: 4px 0;',
<<<<<<< // Translate the workspace to avoid the fixed flyout. if (options.horizontalLayout) { mainWorkspace.scrollY = mainWorkspace.flyout_.height_; if (options.toolboxPosition == Blockly.TOOLBOX_AT_BOTTOM) { mainWorkspace.scrollY *= -1; } } else { mainWorkspace.scrollX = mainWorkspace.flyout_.width_; if (options.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT) { mainWorkspace.scrollX *= -1; } ======= mainWorkspace.flyout_.scrollToStart(); // Translate the workspace sideways to avoid the fixed flyout. mainWorkspace.scrollX = mainWorkspace.flyout_.width_; if (options.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT) { mainWorkspace.scrollX *= -1; >>>>>>> mainWorkspace.flyout_.scrollToStart(); // Translate the workspace to avoid the fixed flyout. if (options.horizontalLayout) { mainWorkspace.scrollY = mainWorkspace.flyout_.height_; if (options.toolboxPosition == Blockly.TOOLBOX_AT_BOTTOM) { mainWorkspace.scrollY *= -1; } } else { mainWorkspace.scrollX = mainWorkspace.flyout_.width_; if (options.toolboxPosition == Blockly.TOOLBOX_AT_RIGHT) { mainWorkspace.scrollX *= -1; }
<<<<<<< * Make a context menu option for undoing the most recent action on the * workspace. * @param {!Blockly.WorkspaceSvg} ws The workspace where the right-click * originated. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.wsUndoOption = function(ws) { return { text: Blockly.Msg.UNDO, enabled: ws.hasUndoStack(), callback: ws.undo.bind(ws, false) }; }; /** * Make a context menu option for redoing the most recent action on the * workspace. * @param {!Blockly.WorkspaceSvg} ws The workspace where the right-click * originated. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.wsRedoOption = function(ws) { return { text: Blockly.Msg.REDO, enabled: ws.hasRedoStack(), callback: ws.undo.bind(ws, true) }; }; /** * Make a context menu option for cleaning up blocks on the workspace, by * aligning them vertically. * @param {!Blockly.WorkspaceSvg} ws The workspace where the right-click * originated. * @param {number} numTopBlocks The number of top blocks on the workspace. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.wsCleanupOption = function(ws, numTopBlocks) { return { text: Blockly.Msg.CLEAN_UP, enabled: numTopBlocks > 1, callback: ws.cleanUp.bind(ws, true) }; }; /** * Helper function for toggling delete state on blocks on the workspace, to be * called from a right-click menu. * @param {!Array.<!Blockly.BlockSvg>} topBlocks The list of top blocks on the * the workspace. * @param {boolean} shouldCollapse True if the blocks should be collapsed, false * if they should be expanded. * @private */ Blockly.ContextMenu.toggleCollapseFn_ = function(topBlocks, shouldCollapse) { // Add a little animation to collapsing and expanding. var DELAY = 10; var ms = 0; for (var i = 0; i < topBlocks.length; i++) { var block = topBlocks[i]; while (block) { setTimeout(block.setCollapsed.bind(block, shouldCollapse), ms); block = block.getNextBlock(); ms += DELAY; } } }; /** * Make a context menu option for collapsing all block stacks on the workspace. * @param {boolean} hasExpandedBlocks Whether there are any non-collapsed blocks * on the workspace. * @param {!Array.<!Blockly.BlockSvg>} topBlocks The list of top blocks on the * the workspace. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.wsCollapseOption = function(hasExpandedBlocks, topBlocks) { return { enabled: hasExpandedBlocks, text: Blockly.Msg.COLLAPSE_ALL, callback: function() { Blockly.ContextMenu.toggleCollapseFn_(topBlocks, true); } }; }; /** * Make a context menu option for expanding all block stacks on the workspace. * @param {boolean} hasCollapsedBlocks Whether there are any collapsed blocks * on the workspace. * @param {!Array.<!Blockly.BlockSvg>} topBlocks The list of top blocks on the * the workspace. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.wsExpandOption = function(hasCollapsedBlocks, topBlocks) { return { enabled: hasCollapsedBlocks, text: Blockly.Msg.EXPAND_ALL, callback: function() { Blockly.ContextMenu.toggleCollapseFn_(topBlocks, false); } }; }; // End helper functions for creating context menu options. /* ======= * Make a context menu option for deleting the current workspace comment. * @param {!Blockly.WorkspaceCommentSvg} comment The workspace comment where the right-click originated. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.commentDeleteOption = function(comment) { var deleteOption = { text: Blockly.Msg.REMOVE_COMMENT, enabled: true, callback: function() { Blockly.Events.setGroup(true); comment.dispose(true, true); Blockly.Events.setGroup(false); } }; return deleteOption; }; /** * Make a context menu option for duplicating the current workspace comment. * @param {!Blockly.WorkspaceCommentSvg} comment The workspace comment where the right-click originated. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.commentDuplicateOption = function(comment) { var duplicateOption = { text: Blockly.Msg.DUPLICATE_COMMENT, enabled: true, callback: function() { Blockly.duplicate_(comment); } }; return duplicateOption; }; /** >>>>>>> * Make a context menu option for undoing the most recent action on the * workspace. * @param {!Blockly.WorkspaceSvg} ws The workspace where the right-click * originated. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.wsUndoOption = function(ws) { return { text: Blockly.Msg.UNDO, enabled: ws.hasUndoStack(), callback: ws.undo.bind(ws, false) }; }; /** * Make a context menu option for redoing the most recent action on the * workspace. * @param {!Blockly.WorkspaceSvg} ws The workspace where the right-click * originated. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.wsRedoOption = function(ws) { return { text: Blockly.Msg.REDO, enabled: ws.hasRedoStack(), callback: ws.undo.bind(ws, true) }; }; /** * Make a context menu option for cleaning up blocks on the workspace, by * aligning them vertically. * @param {!Blockly.WorkspaceSvg} ws The workspace where the right-click * originated. * @param {number} numTopBlocks The number of top blocks on the workspace. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.wsCleanupOption = function(ws, numTopBlocks) { return { text: Blockly.Msg.CLEAN_UP, enabled: numTopBlocks > 1, callback: ws.cleanUp.bind(ws, true) }; }; /** * Helper function for toggling delete state on blocks on the workspace, to be * called from a right-click menu. * @param {!Array.<!Blockly.BlockSvg>} topBlocks The list of top blocks on the * the workspace. * @param {boolean} shouldCollapse True if the blocks should be collapsed, false * if they should be expanded. * @private */ Blockly.ContextMenu.toggleCollapseFn_ = function(topBlocks, shouldCollapse) { // Add a little animation to collapsing and expanding. var DELAY = 10; var ms = 0; for (var i = 0; i < topBlocks.length; i++) { var block = topBlocks[i]; while (block) { setTimeout(block.setCollapsed.bind(block, shouldCollapse), ms); block = block.getNextBlock(); ms += DELAY; } } }; /** * Make a context menu option for collapsing all block stacks on the workspace. * @param {boolean} hasExpandedBlocks Whether there are any non-collapsed blocks * on the workspace. * @param {!Array.<!Blockly.BlockSvg>} topBlocks The list of top blocks on the * the workspace. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.wsCollapseOption = function(hasExpandedBlocks, topBlocks) { return { enabled: hasExpandedBlocks, text: Blockly.Msg.COLLAPSE_ALL, callback: function() { Blockly.ContextMenu.toggleCollapseFn_(topBlocks, true); } }; }; /** * Make a context menu option for expanding all block stacks on the workspace. * @param {boolean} hasCollapsedBlocks Whether there are any collapsed blocks * on the workspace. * @param {!Array.<!Blockly.BlockSvg>} topBlocks The list of top blocks on the * the workspace. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.wsExpandOption = function(hasCollapsedBlocks, topBlocks) { return { enabled: hasCollapsedBlocks, text: Blockly.Msg.EXPAND_ALL, callback: function() { Blockly.ContextMenu.toggleCollapseFn_(topBlocks, false); } }; }; // End helper functions for creating context menu options. /* * Make a context menu option for deleting the current workspace comment. * @param {!Blockly.WorkspaceCommentSvg} comment The workspace comment where the right-click originated. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.commentDeleteOption = function(comment) { var deleteOption = { text: Blockly.Msg.REMOVE_COMMENT, enabled: true, callback: function() { Blockly.Events.setGroup(true); comment.dispose(true, true); Blockly.Events.setGroup(false); } }; return deleteOption; }; /** * Make a context menu option for duplicating the current workspace comment. * @param {!Blockly.WorkspaceCommentSvg} comment The workspace comment where the right-click originated. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package */ Blockly.ContextMenu.commentDuplicateOption = function(comment) { var duplicateOption = { text: Blockly.Msg.DUPLICATE_COMMENT, enabled: true, callback: function() { Blockly.duplicate_(comment); } }; return duplicateOption; }; /**
<<<<<<< Blockly.FieldDate.superClass_.constructor.call(this, date, opt_validator); this.setValue(date); this.addArgType('date'); ======= Blockly.FieldDate.superClass_.constructor.call(this, opt_value, opt_validator); >>>>>>> Blockly.FieldDate.superClass_.constructor.call(this, opt_value, opt_validator); this.addArgType('date');
<<<<<<< "colour": "%{BKY_VARIABLES_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, ======= "style": "variable_blocks", >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "variable_blocks",
<<<<<<< date: new Date('2018-09-22'), changes: <React.Fragment>Updated <SpellLink id={SPELLS.IRONSKIN_BREW.id} /> and <SpellLink id={SPELLS.BREATH_OF_FIRE.id} /> suggestions to use hits mitigated instead of uptime.</React.Fragment>, contributors: [emallson], }, { ======= date: new Date('2018-09-22'), changes: <React.Fragment>Added support for <SpellLink id={SPELLS.FIT_TO_BURST.id} />.</React.Fragment>, contributors: [emallson], }, { >>>>>>> date: new Date('2018-09-22'), changes: <React.Fragment>Updated <SpellLink id={SPELLS.IRONSKIN_BREW.id} /> and <SpellLink id={SPELLS.BREATH_OF_FIRE.id} /> suggestions to use hits mitigated instead of uptime.</React.Fragment>, contributors: [emallson], }, { date: new Date('2018-09-22'), changes: <React.Fragment>Added support for <SpellLink id={SPELLS.FIT_TO_BURST.id} />.</React.Fragment>, contributors: [emallson], }, {
<<<<<<< // Renders ghost. localGhostConnection.connect(closestConnection); Blockly.localGhostConnection_ = localGhostConnection; ======= // Renders insertin marker. insertionMarkerConnection.connect(closestConnection); // Render dragging block so it appears on top. this.workspace.getCanvas().appendChild(this.getSvgRoot()); Blockly.insertionMarkerConnection_ = insertionMarkerConnection; >>>>>>> // Renders insertin marker. insertionMarkerConnection.connect(closestConnection); // Render dragging block so it appears on top. Blockly.insertionMarkerConnection_ = insertionMarkerConnection;
<<<<<<< goog.require('Blockly.PXTBlockly.Extensions'); ======= >>>>>>> goog.require('Blockly.PXTBlockly.Extensions'); <<<<<<< "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "colour": Blockly.Blocks.lists.HUE, ======= "colour": Blockly.Msg.LISTS_HUE, >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "colour": Blockly.Msg.LISTS_HUE,
<<<<<<< var blocks = ws.getAllBlocks().filter(block => !block.disabled); ======= var blocks = ws.getAllBlocks(false); >>>>>>> var blocks = ws.getAllBlocks(false).filter(block => !block.disabled); // TODO shakao verify filter needed <<<<<<< var button = goog.dom.createDom('button'); button.setAttribute('text', Blockly.Msg.NEW_VARIABLE); button.setAttribute('callbackKey', Blockly.CREATE_VARIABLE_ID); ======= var button = document.createElement('button'); button.setAttribute('text', '%{BKY_NEW_VARIABLE}'); button.setAttribute('callbackKey', 'CREATE_VARIABLE'); >>>>>>> var button = document.createElement('button'); button.setAttribute('text', '%{BKY_NEW_VARIABLE}'); button.setAttribute('callbackKey', 'CREATE_VARIABLE'); <<<<<<< var mostRecentVariable = variableModelList[variableModelList.length - 1]; ======= // New variables are added to the end of the variableModelList. var mostRecentVariable = variableModelList[variableModelList.length - 1]; >>>>>>> // New variables are added to the end of the variableModelList. var mostRecentVariable = variableModelList[variableModelList.length - 1]; <<<<<<< var gap = Blockly.Blocks['math_change'] ? 8 : 24; var blockText = '<xml>' + '<block type="variables_set" gap="' + gap + '">' + Blockly.Variables.generateVariableFieldXmlString(mostRecentVariable) + '</block>' + '</xml>'; var block = Blockly.Xml.textToDom(blockText).firstChild; ======= var block = Blockly.utils.xml.createElement('block'); block.setAttribute('type', 'variables_set'); block.setAttribute('gap', Blockly.Blocks['math_change'] ? 8 : 24); block.appendChild( Blockly.Variables.generateVariableFieldDom(mostRecentVariable)); >>>>>>> var block = Blockly.utils.xml.createElement('block'); block.setAttribute('type', 'variables_set'); block.setAttribute('gap', Blockly.Blocks['math_change'] ? 8 : 24); block.appendChild( Blockly.Variables.generateVariableFieldDom(mostRecentVariable)); <<<<<<< var gap = Blockly.Blocks['variables_get'] ? 20 : 8; var blockText = '<xml>' + '<block type="math_change" gap="' + gap + '">' + Blockly.Variables.generateVariableFieldXmlString(mostRecentVariable) + ======= var block = Blockly.utils.xml.createElement('block'); block.setAttribute('type', 'math_change'); block.setAttribute('gap', Blockly.Blocks['variables_get'] ? 20 : 8); block.appendChild( Blockly.Variables.generateVariableFieldDom(mostRecentVariable)); var value = Blockly.Xml.textToDom( >>>>>>> var block = Blockly.utils.xml.createElement('block'); block.setAttribute('type', 'math_change'); block.setAttribute('gap', Blockly.Blocks['variables_get'] ? 20 : 8); block.appendChild( Blockly.Variables.generateVariableFieldDom(mostRecentVariable)); var value = Blockly.Xml.textToDom( <<<<<<< variableModelList.sort(Blockly.VariableModel.compareByName); for (var i = 0, variable; variable = variableModelList[i]; i++) { if (Blockly.Blocks['variables_get']) { var blockText = '<xml>' + '<block type="variables_get" gap="8">' + Blockly.Variables.generateVariableFieldXmlString(variable) + '</block>' + '</xml>'; var block = Blockly.Xml.textToDom(blockText).firstChild; ======= if (Blockly.Blocks['variables_get']) { variableModelList.sort(Blockly.VariableModel.compareByName); for (var i = 0, variable; variable = variableModelList[i]; i++) { var block = Blockly.utils.xml.createElement('block'); block.setAttribute('type', 'variables_get'); block.setAttribute('gap', 8); block.appendChild(Blockly.Variables.generateVariableFieldDom(variable)); >>>>>>> if (Blockly.Blocks['variables_get']) { variableModelList.sort(Blockly.VariableModel.compareByName); for (var i = 0, variable; variable = variableModelList[i]; i++) { var block = Blockly.utils.xml.createElement('block'); block.setAttribute('type', 'variables_get'); block.setAttribute('gap', 8); block.appendChild(Blockly.Variables.generateVariableFieldDom(variable)); <<<<<<< if (existingFunction || existing.type == type) { var msg = Blockly.Msg.VARIABLE_ALREADY_EXISTS.replace( ======= if (existing.type == type) { var msg = Blockly.Msg['VARIABLE_ALREADY_EXISTS'].replace( >>>>>>> if (existingFunction || existing.type == type) { var msg = Blockly.Msg['VARIABLE_ALREADY_EXISTS'].replace(
<<<<<<< <Route path='testmodal' component={TestModal} /> ======= <Route path='glossary/project/:projectSlug' component={Glossary} /> >>>>>>> <Route path='glossary/project/:projectSlug' component={Glossary} /> <<<<<<< <Route path='glossary/project/:projectSlug' component={Glossary} /> <Route path='users' component={Users} /> <Route path='roles' component={Roles} /> <Route path='search' component={Search} /> ======= >>>>>>>
<<<<<<< * Thickness of the line connecting the bubble * to the block. * From https://github.com/LLK/scratch-blocks/blob/develop/core/scratch_bubble.js * @private */ Blockly.Bubble.LINE_THICKNESS = 1; /** * Wrapper function called when a mouseUp occurs during a drag operation. * @type {Array.<!Array>} ======= * Mouse up event data. * @type {?Blockly.EventData} >>>>>>> * Thickness of the line connecting the bubble * to the block. * From https://github.com/LLK/scratch-blocks/blob/develop/core/scratch_bubble.js * @private */ Blockly.Bubble.LINE_THICKNESS = 1; /** * Mouse up event data. * @type {?Blockly.EventData} <<<<<<< {'filter': 'url(#' + this.workspace_.options.embossFilterId + ')'}; if (Blockly.utils.userAgent.JAVA_FX || !this.useArrow_) { ======= {'filter': 'url(#' + this.workspace_.getRenderer().getConstants().embossFilterId + ')'}; if (Blockly.utils.userAgent.JAVA_FX) { >>>>>>> {'filter': 'url(#' + this.workspace_.getRenderer().getConstants().embossFilterId + ')'}; if (Blockly.utils.userAgent.JAVA_FX || !this.useArrow_) { // pxt-blockly <<<<<<< this.bubbleArrow_ = Blockly.utils.dom.createSvgElement(this.useArrow_ ? 'path' : 'line', {}, bubbleEmboss); ======= this.bubbleArrow_ = Blockly.utils.dom.createSvgElement('path', {}, bubbleEmboss); >>>>>>> this.bubbleArrow_ = Blockly.utils.dom.createSvgElement(this.useArrow_ ? 'path' : 'line', {}, // pxt-blockly bubbleEmboss); <<<<<<< ======= if (!this.workspace_.options.readOnly) { this.onMouseDownBubbleWrapper_ = Blockly.bindEventWithChecks_( this.bubbleBack_, 'mousedown', this, this.bubbleMouseDown_); if (this.resizeGroup_) { this.onMouseDownResizeWrapper_ = Blockly.bindEventWithChecks_( this.resizeGroup_, 'mousedown', this, this.resizeMouseDown_); } } this.bubbleGroup_.appendChild(content); >>>>>>> if (!this.workspace_.options.readOnly) { this.onMouseDownBubbleWrapper_ = Blockly.bindEventWithChecks_( this.bubbleBack_, 'mousedown', this, this.bubbleMouseDown_); if (this.resizeGroup_) { this.onMouseDownResizeWrapper_ = Blockly.bindEventWithChecks_( this.resizeGroup_, 'mousedown', this, this.resizeMouseDown_); } } this.bubbleGroup_.appendChild(content); <<<<<<< this.workspace_.RTL ? this.anchorXY_.x - this.relativeLeft_ : this.anchorXY_.x + this.relativeLeft_, this.anchorXY_.y + this.relativeTop_); ======= this.workspace_.RTL ? -this.relativeLeft_ + this.anchorXY_.x - this.width_ : this.anchorXY_.x + this.relativeLeft_, this.anchorXY_.y + this.relativeTop_); >>>>>>> this.workspace_.RTL ? -this.relativeLeft_ + this.anchorXY_.x - this.width_ : this.anchorXY_.x + this.relativeLeft_, this.anchorXY_.y + this.relativeTop_);
<<<<<<< this.svgKnob_.setAttribute(this.horizontal_ ? 'x' : 'y', this.constrainKnob_(knobValue)); // When the scrollbars are clicked, hide the WidgetDiv/DropDownDiv without animation // in anticipation of a workspace move. Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation(); ======= this.setHandlePosition(this.constrainHandle_(handlePosition)); >>>>>>> // When the scrollbars are clicked, hide the WidgetDiv/DropDownDiv without // animation in anticipation of a workspace move. Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation(); this.setHandlePosition(this.constrainHandle_(handlePosition)); <<<<<<< 'mousemove', this, this.onMouseMoveKnob_); // When the scrollbars are clicked, hide the WidgetDiv/DropDownDiv without animation // in anticipation of a workspace move. Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation(); ======= 'mousemove', this, this.onMouseMoveHandle_); >>>>>>> 'mousemove', this, this.onMouseMoveHandle_); // When the scrollbars are clicked, hide the WidgetDiv/DropDownDiv without // animation in anticipation of a workspace move. Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation();
<<<<<<< this.flyout_ = flyout; ======= this.flyout_ = null; if (workspace.horizontalLayout) { this.flyout_ = new Blockly.HorizontalFlyout(workspaceOptions); } else { this.flyout_ = new Blockly.VerticalFlyout(workspaceOptions); } // Insert the flyout after the workspace. Blockly.utils.dom.insertAfter(this.flyout_.createDom('svg'), this.workspace_.getParentSvg()); this.flyout_.init(workspace); >>>>>>> this.flyout_ = null; if (workspace.horizontalLayout) { this.flyout_ = new Blockly.HorizontalFlyout(workspaceOptions); } else { this.flyout_ = new Blockly.VerticalFlyout(workspaceOptions); } // Insert the flyout after the workspace. Blockly.utils.dom.insertAfter(this.flyout_.createDom('svg'), this.workspace_.getParentSvg()); this.flyout_.init(workspace); <<<<<<< // pxtblockly: support custom icons in toolbox var iconClass = childIn.getAttribute('iconclass'); if (goog.isString(iconClass)) { childOut.setIconClass(this.config_['cssTreeIcon'] + ' ' + iconClass); } var expandedClass = childIn.getAttribute('expandedclass'); if (goog.isString(expandedClass)) { childOut.setExpandedIconClass(this.config_['cssTreeIcon'] + ' ' + expandedClass); } // pxtblockly: support for disabling categories var disabled = childIn.getAttribute('disabled'); if (goog.isString(disabled)) { childOut.disabled = true; } ======= >>>>>>> // pxtblockly: support custom icons in toolbox var iconClass = childIn.getAttribute('iconclass'); if (goog.isString(iconClass)) { childOut.setIconClass(this.config_['cssTreeIcon'] + ' ' + iconClass); } var expandedClass = childIn.getAttribute('expandedclass'); if (goog.isString(expandedClass)) { childOut.setExpandedIconClass(this.config_['cssTreeIcon'] + ' ' + expandedClass); } // pxtblockly: support for disabling categories var disabled = childIn.getAttribute('disabled'); if (goog.isString(disabled)) { childOut.disabled = true; } <<<<<<< Blockly.Toolbox.TreeNode = function(toolbox, html, opt_config, opt_domHelper) { goog.ui.tree.TreeNode.call(this, html, opt_config, opt_domHelper); ======= Blockly.Toolbox.TreeNode = function(toolbox, html, config) { goog.ui.tree.TreeNode.call(this, html, config); if (toolbox) { var resize = function() { // Even though the div hasn't changed size, the visible workspace // surface of the workspace has, so we may need to reposition everything. Blockly.svgResize(toolbox.workspace_); }; // Fire a resize event since the toolbox may have changed width. goog.events.listen(toolbox.tree_, goog.ui.tree.BaseNode.EventType.EXPAND, resize); goog.events.listen(toolbox.tree_, goog.ui.tree.BaseNode.EventType.COLLAPSE, resize); } >>>>>>> Blockly.Toolbox.TreeNode = function(toolbox, html, config) { goog.ui.tree.TreeNode.call(this, html, config); if (toolbox) { var resize = function() { // Even though the div hasn't changed size, the visible workspace // surface of the workspace has, so we may need to reposition everything. Blockly.svgResize(toolbox.workspace_); }; // Fire a resize event since the toolbox may have changed width. goog.events.listen(toolbox.tree_, goog.ui.tree.BaseNode.EventType.EXPAND, resize); goog.events.listen(toolbox.tree_, goog.ui.tree.BaseNode.EventType.COLLAPSE, resize); }
<<<<<<< block.moveBy(moveX, cursorY); ======= block.moveBy((this.horizontalLayout_ && this.RTL) ? cursorX + blockHW.width - tab : cursorX, cursorY); >>>>>>> block.moveBy((this.horizontalLayout_ && this.RTL) ? cursorX + blockHW.width : cursorX, cursorY);
<<<<<<< Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "En variabel med navnet »%1« findes allerede for en anden variabel af typen »%2«."; ======= Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "En variabel med navnet »%1« findes allerede for en anden type: »%2«."; Blockly.Msg["WORKSPACE_ARIA_LABEL"] = "Blockly Workspace"; // untranslated >>>>>>> Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "En variabel med navnet »%1« findes allerede for en anden variabel af typen »%2«."; Blockly.Msg["WORKSPACE_ARIA_LABEL"] = "Blockly Workspace"; // untranslated
<<<<<<< // Add an attribute to cassify the type of field. if (this.getArgTypes() !== null) { if (this.sourceBlock_.isShadow()) { this.sourceBlock_.svgGroup_.setAttribute('data-argument-type', this.getArgTypes()); } else { // Fields without a shadow wrapper, like square dropdowns. this.fieldGroup_.setAttribute('data-argument-type', this.getArgTypes()); } } // Adjust X to be flipped for RTL. Position is relative to horizontal start of source block. var size = this.getSize(); var fieldX = (this.sourceBlock_.RTL) ? -size.width / 2 : size.width / 2; ======= this.borderRect_ = Blockly.utils.createSvgElement('rect', { 'rx': 4, 'ry': 4, 'x': -Blockly.BlockSvg.SEP_SPACE_X / 2, 'y': 0, 'height': 16 }, this.fieldGroup_); >>>>>>> // Add an attribute to cassify the type of field. if (this.getArgTypes() !== null) { if (this.sourceBlock_.isShadow()) { this.sourceBlock_.svgGroup_.setAttribute('data-argument-type', this.getArgTypes()); } else { // Fields without a shadow wrapper, like square dropdowns. this.fieldGroup_.setAttribute('data-argument-type', this.getArgTypes()); } } // Adjust X to be flipped for RTL. Position is relative to horizontal start of source block. var size = this.getSize(); var fieldX = (this.sourceBlock_.RTL) ? -size.width / 2 : size.width / 2; <<<<<<< ======= this.mouseDownWrapper_ = Blockly.bindEventWithChecks_( this.fieldGroup_, 'mousedown', this, this.onMouseDown_); >>>>>>> <<<<<<< // In other cases where we fail to get the computed text. Instead, use an ======= // In other cases where we fail to geth the computed text. Instead, use an >>>>>>> // In other cases where we fail to get the computed text. Instead, use an <<<<<<< var size = this.getSize(); var scaledHeight = size.height * this.sourceBlock_.workspace.scale; var scaledWidth = size.width * this.sourceBlock_.workspace.scale; var xy = this.getAbsoluteXY_(); return { top: xy.y, bottom: xy.y + scaledHeight, left: xy.x, right: xy.x + scaledWidth }; ======= var bBox = this.borderRect_.getBBox(); var scaledHeight = bBox.height * this.sourceBlock_.workspace.scale; var scaledWidth = bBox.width * this.sourceBlock_.workspace.scale; var xy = this.getAbsoluteXY_(); return { top: xy.y, bottom: xy.y + scaledHeight, left: xy.x, right: xy.x + scaledWidth }; >>>>>>> var size = this.getSize(); var scaledHeight = size.height * this.sourceBlock_.workspace.scale; var scaledWidth = size.width * this.sourceBlock_.workspace.scale; var xy = this.getAbsoluteXY_(); return { top: xy.y, bottom: xy.y + scaledHeight, left: xy.x, right: xy.x + scaledWidth }; <<<<<<< Blockly.Field.prototype.setTooltip = function(/*newTip*/) { ======= Blockly.Field.prototype.setTooltip = function( /* eslint-disable no-unused-vars */ newTip /* eslint-enable no-unused-vars */) { >>>>>>> Blockly.Field.prototype.setTooltip = function( /* eslint-disable no-unused-vars */ newTip /* eslint-enable no-unused-vars */) {
<<<<<<< SAVE_FAILED, SAVE_CONFLICT, SAVE_CONFLICT_RESOLVED_LATEST, SAVE_CONFLICT_RESOLVED_ORIGINAL, TOGGLE_CONCURRENT_MODAL ======= SAVE_FAILED, VALIDATION_ERRORS >>>>>>> SAVE_FAILED, SAVE_CONFLICT, SAVE_CONFLICT_RESOLVED_LATEST, SAVE_CONFLICT_RESOLVED_ORIGINAL, TOGGLE_CONCURRENT_MODAL, VALIDATION_ERRORS <<<<<<< const saveConflict = createAction(SAVE_CONFLICT, (phraseId, saveInfo, response) => ({ phraseId, saveInfo, response })) const saveConflictResolvedLatest = createAction(SAVE_CONFLICT_RESOLVED_LATEST, (phraseId, saveInfo, revision) => ({ phraseId, saveInfo, revision })) const saveConflictResolvedOriginal = createAction(SAVE_CONFLICT_RESOLVED_ORIGINAL, (phraseId, saveInfo, revision) => ({ phraseId, saveInfo, revision })) export const toggleConcurrentModal = createAction(TOGGLE_CONCURRENT_MODAL) export function saveResolveConflictLatest (latest, original) { return (dispatch, getState) => { const stateBefore = getState() dispatch(saveConflictResolvedLatest( latest.id, latest, latest.revision)).then( dispatch(fetchTransUnitHistory( original.localeId, latest.id, stateBefore.context.projectSlug, stateBefore.context.versionSlug )).then( fetchStatisticsInfo(dispatch, getState().context.projectSlug, getState().context.versionSlug, getState().context.docId, getState().context.lang) ) ) } } export function saveResolveConflictOriginal (latest, original) { return (dispatch, getState) => { const stateBefore = getState() savePhrase(latest, original) .then(response => { if (isErrorResponse(response)) { console.error('Failed to save phrase') dispatch(saveFailed(latest.id, original, response)) } else { response.json().then(({ revision, status }) => { dispatch(saveConflictResolvedOriginal( latest.id, original, revision)).then( dispatch(fetchTransUnitHistory( original.localeId, latest.id, stateBefore.context.projectSlug, stateBefore.context.versionSlug )).then( fetchStatisticsInfo(dispatch, getState().context.projectSlug, getState().context.versionSlug, getState().context.docId, getState().context.lang) ) ) }) } }) } } ======= export const validationError = createAction(VALIDATION_ERRORS, (phraseId, hasValidationError) => ({ phraseId, hasValidationError })) >>>>>>> const saveConflict = createAction(SAVE_CONFLICT, (phraseId, saveInfo, response) => ({ phraseId, saveInfo, response })) const saveConflictResolvedLatest = createAction(SAVE_CONFLICT_RESOLVED_LATEST, (phraseId, saveInfo, revision) => ({ phraseId, saveInfo, revision })) const saveConflictResolvedOriginal = createAction(SAVE_CONFLICT_RESOLVED_ORIGINAL, (phraseId, saveInfo, revision) => ({ phraseId, saveInfo, revision })) export const validationError = createAction(VALIDATION_ERRORS, (phraseId, hasValidationError) => ({ phraseId, hasValidationError })) export const toggleConcurrentModal = createAction(TOGGLE_CONCURRENT_MODAL) export function saveResolveConflictLatest (latest, original) { return (dispatch, getState) => { const stateBefore = getState() dispatch(saveConflictResolvedLatest( latest.id, latest, latest.revision)).then( dispatch(fetchTransUnitHistory( original.localeId, latest.id, stateBefore.context.projectSlug, stateBefore.context.versionSlug )).then( fetchStatisticsInfo(dispatch, getState().context.projectSlug, getState().context.versionSlug, getState().context.docId, getState().context.lang) ) ) } } export function saveResolveConflictOriginal (latest, original) { return (dispatch, getState) => { const stateBefore = getState() savePhrase(latest, original) .then(response => { if (isErrorResponse(response)) { console.error('Failed to save phrase') dispatch(saveFailed(latest.id, original, response)) } else { response.json().then(({ revision, status }) => { dispatch(saveConflictResolvedOriginal( latest.id, original, revision)).then( dispatch(fetchTransUnitHistory( original.localeId, latest.id, stateBefore.context.projectSlug, stateBefore.context.versionSlug )).then( fetchStatisticsInfo(dispatch, getState().context.projectSlug, getState().context.versionSlug, getState().context.docId, getState().context.lang) ) ) }) } }) } }
<<<<<<< Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "'%1' 변수는 '%2' 유형의 다른 변수에 대해 이미 존재합니다."; ======= Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "'%1' 변수는 다른 유형에 대해 이미 존재합니다: '%2'."; Blockly.Msg["WORKSPACE_ARIA_LABEL"] = "Blockly Workspace"; // untranslated >>>>>>> Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "'%1' 변수는 '%2' 유형의 다른 변수에 대해 이미 존재합니다."; Blockly.Msg["WORKSPACE_ARIA_LABEL"] = "Blockly Workspace"; // untranslated
<<<<<<< goog.require('Blockly.RenderedConnection'); goog.require('Blockly.utils.Coordinate'); ======= >>>>>>> <<<<<<< // pxt-blockly: Unfade the dragging block. this.workspace_.getBlockDragSurface().setOpacity(1); this.topBlock_ = null; this.workspace_ = null; ======= >>>>>>> // pxt-blockly: Unfade the dragging block. this.workspace_.getBlockDragSurface().setOpacity(1); <<<<<<< /** * Remove highlighting from the currently highlighted connection, if it exists. * @private */ Blockly.InsertionMarkerManager.prototype.removeHighlighting_ = function() { if (this.closestConnection_) { this.closestConnection_.unhighlight(); } }; /** * Add highlighting to the closest connection, if it exists. * @private */ Blockly.InsertionMarkerManager.prototype.addHighlighting_ = function() { if (this.closestConnection_) { this.closestConnection_.highlight(); } }; /**** Begin initialization functions ****/ ======= >>>>>>> /** * TODO shakao: check if replicated in blockly renderer * Remove highlighting from the currently highlighted connection, if it exists. * @private */ Blockly.InsertionMarkerManager.prototype.removeHighlighting_ = function() { if (this.closestConnection_) { this.closestConnection_.unhighlight(); } }; /** * TODO shakao: check if replicated in blockly renderer * Add highlighting to the closest connection, if it exists. * @private */ Blockly.InsertionMarkerManager.prototype.addHighlighting_ = function() { if (this.closestConnection_) { this.closestConnection_.highlight(); } }; /**** Begin initialization functions ****/ <<<<<<< ======= // Insert the dragged block into the stack if possible. if (closest && this.workspace_.getRenderer() .shouldInsertDraggedBlock(this.topBlock_, closest)) { return false; // Insert. } // Otherwise replace the existing block and bump it out. >>>>>>> // Insert the dragged block into the stack if possible. if (closest && this.workspace_.getRenderer() .shouldInsertDraggedBlock(this.topBlock_, closest)) { return false; // Insert. } // Otherwise replace the existing block and bump it out. <<<<<<< ======= // Also highlight the actual connection, as a nod to previous behaviour. if (this.closestConnection_ && this.closestConnection_.targetBlock() && this.workspace_.getRenderer() .shouldHighlightConnection(this.closestConnection_)) { this.closestConnection_.highlight(); } >>>>>>> // Also highlight the actual connection, as a nod to previous behaviour. if (this.closestConnection_ && this.closestConnection_.targetBlock() && this.workspace_.getRenderer() .shouldHighlightConnection(this.closestConnection_)) { this.closestConnection_.highlight(); } <<<<<<< /**** End preview visibility functions ****/ /**** Begin block highlighting functions ****/ // TODO shakao check if still necessary ======= >>>>>>> <<<<<<< * Scratch-specific code, where "highlighting" applies to a block rather than * a connection. ======= * @private >>>>>>> * @private <<<<<<< * Scratch-specific code, where "highlighting" applies to a block rather than * a connection. ======= * @private >>>>>>> * @private
<<<<<<< this.size_ = new goog.math.Size(Blockly.BlockSvg.FIELD_WIDTH, Blockly.BlockSvg.FIELD_HEIGHT); this.setValidator(opt_validator); this.defaultVariableName = (varname || ''); ======= >>>>>>> <<<<<<< this.workspace_, null, variableName, variableType); ======= this.sourceBlock_.workspace, id, variableName, variableType); >>>>>>> this.sourceBlock_.workspace, null, variableName, variableType);
<<<<<<< * Whether the block glows as if running. * @type {boolean} * @private */ Blockly.BlockSvg.prototype.isGlowingBlock_ = false; /** * Whether the block's whole stack glows as if running. * @type {boolean} * @private */ Blockly.BlockSvg.prototype.isGlowingStack_ = false; /** * Whether the block's highlighting as if running. * @type {boolean} * @private */ Blockly.BlockSvg.prototype.isHighlightingBlock_ = false; /** * Map from IDs for warnings text to PIDs of functions to apply them. * Used to be able to maintain multiple warnings. * @type {Object<string, number>} * @private */ Blockly.BlockSvg.prototype.warningTextDb_ = null; /** ======= * Map from IDs for warnings text to PIDs of functions to apply them. * Used to be able to maintain multiple warnings. * @type {Object.<string, number>} * @private */ Blockly.BlockSvg.prototype.warningTextDb_ = null; /** >>>>>>> * Whether the block glows as if running. * @type {boolean} * @private */ Blockly.BlockSvg.prototype.isGlowingBlock_ = false; /** * Whether the block's whole stack glows as if running. * @type {boolean} * @private */ Blockly.BlockSvg.prototype.isGlowingStack_ = false; /** * Whether the block's highlighting as if running. * @type {boolean} * @private */ Blockly.BlockSvg.prototype.isHighlightingBlock_ = false; /** * Map from IDs for warnings text to PIDs of functions to apply them. * Used to be able to maintain multiple warnings. * @type {Object.<string, number>} * @private */ Blockly.BlockSvg.prototype.warningTextDb_ = null; /** <<<<<<< var list = this.createTabList_(); var i = list.indexOf(start); if (i == -1) { // No start location, start at the beginning or end. i = forward ? -1 : list.length; } var target = list[forward ? i + 1 : i - 1]; if (!target) { // Ran off of list. // If there is an output, tab up to that block. var outputBlock = this.outputConnection && this.outputConnection.targetBlock(); if (outputBlock) { outputBlock.tab(this, forward); } else { // Otherwise, go to next / previous block, depending on value of `forward` var block = forward ? this.getNextBlock() : this.getPreviousBlock(); if (block) { block.tab(this, forward); } } } else if (target instanceof Blockly.Field) { target.showEditor_(); } else { target.tab(null, forward); } }; /** * Create an ordered list of all text fields and connected inputs. * @return {!Array<!Blockly.FieldTextInput|!Blockly.Input>} The ordered list. * @private */ Blockly.BlockSvg.prototype.createTabList_ = function() { // This function need not be efficient since it runs once on a keypress. var list = []; for (var i = 0, input; input = this.inputList[i]; i++) { for (var j = 0, field; field = input.fieldRow[j]; j++) { if (field instanceof Blockly.FieldTextInput) { // TODO(# 1276): Also support dropdown fields. list.push(field); } } if (input.connection) { var block = input.connection.targetBlock(); if (block) { list.push(block); } } } return list; ======= var list = this.createTabList_(); var i = list.indexOf(start); if (i == -1) { // No start location, start at the beginning or end. i = forward ? -1 : list.length; } var target = list[forward ? i + 1 : i - 1]; if (!target) { // Ran off of list. var parent = this.getParent(); if (parent) { parent.tab(this, forward); } } else if (target instanceof Blockly.Field) { target.showEditor_(); } else { target.tab(null, forward); } >>>>>>> var list = this.createTabList_(); var i = list.indexOf(start); if (i == -1) { // No start location, start at the beginning or end. i = forward ? -1 : list.length; } var target = list[forward ? i + 1 : i - 1]; if (!target) { // Ran off of list. // If there is an output, tab up to that block. var outputBlock = this.outputConnection && this.outputConnection.targetBlock(); if (outputBlock) { outputBlock.tab(this, forward); } else { // Otherwise, go to next / previous block, depending on value of `forward` var block = forward ? this.getNextBlock() : this.getPreviousBlock(); if (block) { block.tab(this, forward); } } } else if (target instanceof Blockly.Field) { target.showEditor_(); } else { target.tab(null, forward); } <<<<<<< setTimeout(Blockly.BlockSvg.disposeUiStep_, 10, clone, rtl, start, workspaceScale); ======= setTimeout( Blockly.BlockSvg.disposeUiStep_, 10, clone, rtl, start, workspaceScale); >>>>>>> setTimeout( Blockly.BlockSvg.disposeUiStep_, 10, clone, rtl, start, workspaceScale); <<<<<<< Blockly.BlockSvg.disconnectUiStop_.pid = setTimeout(Blockly.BlockSvg.disconnectUiStep_, 10, group, magnitude, start); ======= Blockly.BlockSvg.disconnectUiStop_.pid = setTimeout( Blockly.BlockSvg.disconnectUiStep_, 10, group, magnitude, start); >>>>>>> Blockly.BlockSvg.disconnectUiStop_.pid = setTimeout( Blockly.BlockSvg.disconnectUiStep_, 10, group, magnitude, start); <<<<<<< ======= * Change the colour of a block. */ Blockly.BlockSvg.prototype.updateColour = function() { if (this.disabled) { // Disabled blocks don't have colour. return; } var hexColour = this.getColour(); var rgb = goog.color.hexToRgb(hexColour); if (this.isShadow()) { rgb = goog.color.lighten(rgb, 0.6); hexColour = goog.color.rgbArrayToHex(rgb); this.svgPathLight_.style.display = 'none'; this.svgPathDark_.setAttribute('fill', hexColour); } else { this.svgPathLight_.style.display = ''; var hexLight = goog.color.rgbArrayToHex(goog.color.lighten(rgb, 0.3)); var hexDark = goog.color.rgbArrayToHex(goog.color.darken(rgb, 0.2)); this.svgPathLight_.setAttribute('stroke', hexLight); this.svgPathDark_.setAttribute('fill', hexDark); } this.svgPath_.setAttribute('fill', hexColour); var icons = this.getIcons(); for (var i = 0; i < icons.length; i++) { icons[i].updateColour(); } // Bump every dropdown to change its colour. // TODO (#1456) for (var x = 0, input; input = this.inputList[x]; x++) { for (var y = 0, field; field = input.fieldRow[y]; y++) { field.forceRerender(); } } }; /** >>>>>>> * Change the colour of a block. */ Blockly.BlockSvg.prototype.updateColour = function() { if (this.disabled) { // Disabled blocks don't have colour. return; } var hexColour = this.getColour(); var rgb = goog.color.hexToRgb(hexColour); if (this.isShadow()) { rgb = goog.color.lighten(rgb, 0.6); hexColour = goog.color.rgbArrayToHex(rgb); this.svgPathLight_.style.display = 'none'; this.svgPathDark_.setAttribute('fill', hexColour); } else { this.svgPathLight_.style.display = ''; var hexLight = goog.color.rgbArrayToHex(goog.color.lighten(rgb, 0.3)); var hexDark = goog.color.rgbArrayToHex(goog.color.darken(rgb, 0.2)); this.svgPathLight_.setAttribute('stroke', hexLight); this.svgPathDark_.setAttribute('fill', hexDark); } this.svgPath_.setAttribute('fill', hexColour); var icons = this.getIcons(); for (var i = 0; i < icons.length; i++) { icons[i].updateColour(); } // Bump every dropdown to change its colour. // TODO (#1456) for (var x = 0, input; input = this.inputList[x]; x++) { for (var y = 0, field; field = input.fieldRow[y]; y++) { field.forceRerender(); } } }; /** <<<<<<< Blockly.utils.addClass(/** @type {!Element} */ (this.svgGroup_), 'blocklySelected'); if (!this.disabled) this.setGlowBlock(true); ======= Blockly.utils.addClass( /** @type {!Element} */ (this.svgGroup_), 'blocklySelected'); >>>>>>> Blockly.utils.addClass( /** @type {!Element} */ (this.svgGroup_), 'blocklySelected'); if (!this.disabled) this.setGlowBlock(true); <<<<<<< Blockly.utils.removeClass(/** @type {!Element} */ (this.svgGroup_), 'blocklySelected'); if (!this.disabled) this.setGlowBlock(false); ======= Blockly.utils.removeClass( /** @type {!Element} */ (this.svgGroup_), 'blocklySelected'); >>>>>>> Blockly.utils.removeClass( /** @type {!Element} */ (this.svgGroup_), 'blocklySelected'); if (!this.disabled) this.setGlowBlock(false); <<<<<<< if (Blockly.dragMode_ != undefined && Blockly.dragMode_ != Blockly.DRAG_NONE) { ======= if (this.workspace.isDragging()) { >>>>>>> if (this.workspace.isDragging()) {
<<<<<<< goog.require('Blockly.Breakpoint'); goog.require('Blockly.Colours'); goog.require('Blockly.Comment'); ======= >>>>>>> goog.require('Blockly.Breakpoint'); goog.require('Blockly.Colours'); <<<<<<< goog.require('Blockly.FieldLabelHover'); goog.require('Blockly.FieldVariableGetter'); ======= goog.require('Blockly.fieldRegistry'); >>>>>>> goog.require('Blockly.FieldLabelHover'); goog.require('Blockly.FieldVariableGetter'); goog.require('Blockly.fieldRegistry'); <<<<<<< * @type {?number} * @private */ this.outputShape_ = null; /** * @type {?string} * @private */ this.category_ = null; /** ======= * A model of the comment attached to this block. * @type {!Blockly.Block.CommentModel} * @package */ this.commentModel = { text: null, pinned: false, size: new Blockly.utils.Size(160, 80) }; /** >>>>>>> * A model of the comment attached to this block. * @type {!Blockly.Block.CommentModel} * @package */ this.commentModel = { text: null, pinned: false, size: new Blockly.utils.Size(160, 80) }; /** <<<<<<< Blockly.Block.prototype.colourSecondary_ = '#000000'; ======= Blockly.Block.prototype.styleName_ = null; >>>>>>> Blockly.Block.prototype.styleName_ = null; <<<<<<< Blockly.Block.prototype.colourTertiary_ = '#000000'; /** * Fill colour used to override default shadow colour behaviour. * @type {string} * @private */ Blockly.Block.prototype.shadowColour_ = null; ======= Blockly.Block.prototype.init; >>>>>>> Blockly.Block.prototype.init; <<<<<<< for (var child, i = 0; child = childBlocks[i]; i++) { if (!opt_ignoreShadows || !child.isShadow_) { blocks.push.apply(blocks, child.getDescendants(ordered, opt_ignoreShadows)); } ======= for (var child, i = 0; (child = childBlocks[i]); i++) { blocks.push.apply(blocks, child.getDescendants(ordered)); >>>>>>> for (var child, i = 0; (child = childBlocks[i]); i++) { if (!opt_ignoreShadows || !child.isShadow()) { // pxt-blockly blocks.push.apply(blocks, child.getDescendants(ordered)); } <<<<<<< Blockly.Block.prototype.getColourSecondary = function() { return this.colourSecondary_; }; /** * Get the tertiary colour of a block. * @return {string} #RRGGBB string. */ Blockly.Block.prototype.getColourTertiary = function() { return this.colourTertiary_; }; /** * Get the shadow colour of a block. * @return {string} #RRGGBB string. */ Blockly.Block.prototype.getShadowColour = function() { return this.shadowColour_; }; /** * Set the shadow colour of a block. * @param {number|string} colour HSV hue value, or #RRGGBB string. */ Blockly.Block.prototype.setShadowColour = function(colour) { this.shadowColour_ = this.makeColour_(colour); if (this.rendered) { this.updateColour(); } }; /** * Clear the shadow colour of a block. */ Blockly.Block.prototype.clearShadowColour = function() { this.shadowColour_ = null; if (this.rendered) { this.updateColour(); } }; /** * Create an #RRGGBB string from an HSV hue value (0 to 360), #RRGGBB string, * or a message reference string pointing to one of those two values. * @return {string} #RRGGBB string. * @private */ Blockly.Block.prototype.makeColour_ = function(colour) { var dereferenced = (typeof colour == 'string') ? Blockly.utils.replaceMessageReferences(colour) : colour; var hue = Number(dereferenced); if (!isNaN(hue) && 0 <= hue && hue <= 360) { return Blockly.hueToHex(hue); } else { var hex = Blockly.utils.colour.parse(dereferenced); if (hex) { return hex; } else { var errorMsg = 'Invalid colour: "' + dereferenced + '"'; if (colour != dereferenced) { errorMsg += ' (from "' + colour + '")'; } throw Error(errorMsg); } } ======= Blockly.Block.prototype.setColour = function(colour) { var parsed = Blockly.utils.parseBlockColour(colour); this.hue_ = parsed.hue; this.colour_ = parsed.hex; >>>>>>> Blockly.Block.prototype.setColour = function(colour) { var parsed = Blockly.utils.parseBlockColour(colour); this.hue_ = parsed.hue; this.colour_ = parsed.hex; <<<<<<< if (blockStyle) { this.hat = blockStyle.hat; // Set colour will trigger an updateColour() on a block_svg this.setColour(blockStyle['colourPrimary'], blockStyle['colourSecondary'], blockStyle['colourTertiary']); } else { throw Error('Invalid style name: ' + blockStyleName); } ======= >>>>>>> <<<<<<< * Set whether value statements have a start hat or not. * @param {boolean} newBoolean True if statement should have a start hat. */ Blockly.Block.prototype.setStartHat = function(newBoolean) { if (this.startHat != newBoolean) { this.startHat = newBoolean; } }; /** * Get whether value inputs are arranged horizontally or vertically. * @return {boolean} True if inputs are horizontal. */ Blockly.Block.prototype.getStartHat = function() { return this.startHat; }; /** ======= * Set the block's output shape. * @param {?number} outputShape Value representing an output shape. */ Blockly.Block.prototype.setOutputShape = function(outputShape) { this.outputShape_ = outputShape; }; /** * Get the block's output shape. * @return {?number} Value representing output shape if one exists. */ Blockly.Block.prototype.getOutputShape = function() { return this.outputShape_; }; /** >>>>>>> * Set whether value statements have a start hat or not. * @param {boolean} newBoolean True if statement should have a start hat. */ Blockly.Block.prototype.setStartHat = function(newBoolean) { if (this.startHat != newBoolean) { this.startHat = newBoolean; } }; /** * Get whether value inputs are arranged horizontally or vertically. * @return {boolean} True if inputs are horizontal. */ Blockly.Block.prototype.getStartHat = function() { return this.startHat; }; /** * Set the block's output shape. * @param {?number} outputShape Value representing an output shape. */ Blockly.Block.prototype.setOutputShape = function(outputShape) { this.outputShape_ = outputShape; }; /** * Get the block's output shape. * @return {?number} Value representing output shape if one exists. */ Blockly.Block.prototype.getOutputShape = function() { return this.outputShape_; }; /** <<<<<<< * @return {!Blockly.Connection|!Blockly.RenderedConnection} A new connection of the specified type. * @private ======= * @return {!Blockly.Connection} A new connection of the specified type. * @protected >>>>>>> * @return {!Blockly.Connection} A new connection of the specified type. * @protected
<<<<<<< if (typeof block.comment == 'object') { commentElement.setAttribute('id', block.comment.id); commentElement.setAttribute('pinned', block.comment.isVisible()); var hw = block.comment.getBubbleSize(); commentElement.setAttribute('h', hw.height); commentElement.setAttribute('w', hw.width); } ======= commentElement.setAttribute('pinned', pinned); commentElement.setAttribute('h', size.height); commentElement.setAttribute('w', size.width); >>>>>>> if (typeof block.comment == 'object') { commentElement.setAttribute('id', block.comment.id); commentElement.setAttribute('pinned', block.comment.isVisible()); var hw = block.comment.getBubbleSize(); commentElement.setAttribute('h', hw.height); commentElement.setAttribute('w', hw.width); } <<<<<<< // pxt-blockly: allow non-shadow children and variables in shadow blocks // var children = block.getChildren(false); // for (var i = 0, child; child = children[i]; i++) { // if (!child.isShadow()) { // throw TypeError('Shadow block not allowed non-shadow child.'); // } // } ======= var children = block.getChildren(false); for (var i = 0, child; (child = children[i]); i++) { if (!child.isShadow()) { throw TypeError('Shadow block not allowed non-shadow child.'); } } >>>>>>> // pxt-blockly: allow non-shadow children and variables in shadow blocks // var children = block.getChildren(false); // for (var i = 0, child; (child = children[i]); i++) { // if (!child.isShadow()) { // throw TypeError('Shadow block not allowed non-shadow child.'); // } // }
<<<<<<< // Re-enable workspace resizing. selected.workspace.setResizesEnabled(true); // Ensure that any stap and bump are part of this move's event group. ======= selected.workspace.setResizesEnabled(true); // Ensure that any snap and bump are part of this move's event group. >>>>>>> // Re-enable workspace resizing. selected.workspace.setResizesEnabled(true); // Ensure that any snap and bump are part of this move's event group. <<<<<<< this.addDragging(); ======= var group = this.getSvgRoot(); group.translate_ = ''; group.skew_ = ''; >>>>>>> var group = this.getSvgRoot(); group.translate_ = ''; group.skew_ = ''; <<<<<<< // Must move to drag surface before unplug(), // or else connections will calculate the wrong relative to surface XY // in tighten_(). Then blocks connected to this block move around on the // drag surface. By moving to the drag surface before unplug, connection // positions will be calculated correctly. this.moveToDragSurface_(); // Disable workspace resizing as an optimization. this.workspace.setResizesEnabled(false); // Clear WidgetDiv/DropDownDiv without animating, in case blocks are moved // around Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation(); ======= this.workspace.setResizesEnabled(false); >>>>>>> // Must move to drag surface before unplug(), // or else connections will calculate the wrong relative to surface XY // in tighten_(). Then blocks connected to this block move around on the // drag surface. By moving to the drag surface before unplug, connection // positions will be calculated correctly. this.moveToDragSurface_(); // Disable workspace resizing as an optimization. this.workspace.setResizesEnabled(false); // Clear WidgetDiv/DropDownDiv without animating, in case blocks are moved // around Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation(); <<<<<<< ======= * Set whether the block is disabled or not. * @param {boolean} disabled True if disabled. */ Blockly.BlockSvg.prototype.setDisabled = function(disabled) { if (this.disabled != disabled) { Blockly.BlockSvg.superClass_.setDisabled.call(this, disabled); if (this.rendered) { this.updateDisabled(); } } }; /** * Set whether the block is highlighted or not. * @param {boolean} highlighted True if highlighted. */ Blockly.BlockSvg.prototype.setHighlighted = function(highlighted) { if (highlighted) { this.svgPath_.setAttribute('filter', 'url(#' + this.workspace.options.embossFilterId + ')'); this.svgPathLight_.style.display = 'none'; } else { this.svgPath_.removeAttribute('filter'); this.svgPathLight_.style.display = 'block'; } }; /** >>>>>>> <<<<<<< /** * Adds the dragging class to this block. */ Blockly.BlockSvg.prototype.addDragging = function() { Blockly.addClass_(/** @type {!Element} */ (this.svgGroup_), 'blocklyDragging'); }; /** * Removes the dragging class from this block. */ Blockly.BlockSvg.prototype.removeDragging = function() { Blockly.removeClass_(/** @type {!Element} */ (this.svgGroup_), 'blocklyDragging'); }; ======= >>>>>>>
<<<<<<< goog.require('Blockly.FieldIconMenu'); ======= goog.require('Blockly.FieldLabelSerializable'); >>>>>>> goog.require('Blockly.FieldIconMenu'); goog.require('Blockly.FieldLabelSerializable'); <<<<<<< ======= Blockly.WidgetDiv.hide(); Blockly.DropDownDiv.hideWithoutAnimation(); // For now the trashcan flyout always autocloses because it overlays the // trashcan UI (no trashcan to click to close it) var workspace = Blockly.getMainWorkspace(); if (workspace.trashcan && workspace.trashcan.flyout_) { workspace.trashcan.flyout_.hide(); } >>>>>>> Blockly.WidgetDiv.hide(); Blockly.DropDownDiv.hideWithoutAnimation(); // For now the trashcan flyout always autocloses because it overlays the // trashcan UI (no trashcan to click to close it) var workspace = Blockly.getMainWorkspace(); if (workspace.trashcan && workspace.trashcan.flyout_) { workspace.trashcan.flyout_.hide(); }
<<<<<<< * Play some UI effects (sound, animation) when disposing of a block. */ Blockly.BlockSvg.prototype.disposeUiEffect = function() { this.workspace.getAudioManager().play('delete'); var xy = this.workspace.getSvgXY(/** @type {!Element} */ (this.svgGroup_)); // Deeply clone the current block. var clone = this.svgGroup_.cloneNode(true); clone.translateX_ = xy.x; clone.translateY_ = xy.y; clone.setAttribute('transform', 'translate(' + clone.translateX_ + ',' + clone.translateY_ + ')'); this.workspace.getParentSvg().appendChild(clone); clone.bBox_ = clone.getBBox(); // Start the animation. Blockly.BlockSvg.disposeUiStep_(clone, this.RTL, new Date, this.workspace.scale); }; /** * Play some UI effects (sound) after a connection has been established. */ Blockly.BlockSvg.prototype.connectionUiEffect = function() { this.workspace.getAudioManager().play('click'); }; /** * Animate a cloned block and eventually dispose of it. * This is a class method, not an instance method since the original block has * been destroyed and is no longer accessible. * @param {!Element} clone SVG element to animate and dispose of. * @param {boolean} rtl True if RTL, false if LTR. * @param {!Date} start Date of animation's start. * @param {number} workspaceScale Scale of workspace. * @private */ Blockly.BlockSvg.disposeUiStep_ = function(clone, rtl, start, workspaceScale) { var ms = new Date - start; var percent = ms / 150; if (percent > 1) { goog.dom.removeNode(clone); } else { var x = clone.translateX_ + (rtl ? -1 : 1) * clone.bBox_.width * workspaceScale / 2 * percent; var y = clone.translateY_ + clone.bBox_.height * workspaceScale * percent; var scale = (1 - percent) * workspaceScale; clone.setAttribute('transform', 'translate(' + x + ',' + y + ')' + ' scale(' + scale + ')'); setTimeout( Blockly.BlockSvg.disposeUiStep_, 10, clone, rtl, start, workspaceScale); } }; /** * Play some UI effects (sound, ripple) after a connection has been established. */ Blockly.BlockSvg.prototype.connectionUiEffect = function() { this.workspace.getAudioManager().play('click'); if (this.workspace.scale < 1) { return; // Too small to care about visual effects. } // Determine the absolute coordinates of the inferior block. var xy = this.workspace.getSvgXY(/** @type {!Element} */ (this.svgGroup_)); // Offset the coordinates based on the two connection types, fix scale. if (this.outputConnection) { xy.x += (this.RTL ? 3 : -3) * this.workspace.scale; xy.y += 13 * this.workspace.scale; } else if (this.previousConnection) { xy.x += (this.RTL ? -23 : 23) * this.workspace.scale; xy.y += 3 * this.workspace.scale; } var ripple = Blockly.utils.createSvgElement('circle', { 'cx': xy.x, 'cy': xy.y, 'r': 0, 'fill': 'none', 'stroke': '#888', 'stroke-width': 10 }, this.workspace.getParentSvg()); // Start the animation. Blockly.BlockSvg.connectionUiStep_(ripple, new Date, this.workspace.scale); }; /** * Expand a ripple around a connection. * @param {!Element} ripple Element to animate. * @param {!Date} start Date of animation's start. * @param {number} workspaceScale Scale of workspace. * @private */ Blockly.BlockSvg.connectionUiStep_ = function(ripple, start, workspaceScale) { var ms = new Date - start; var percent = ms / 150; if (percent > 1) { goog.dom.removeNode(ripple); } else { ripple.setAttribute('r', percent * 25 * workspaceScale); ripple.style.opacity = 1 - percent; Blockly.BlockSvg.disconnectUiStop_.pid_ = setTimeout( Blockly.BlockSvg.connectionUiStep_, 10, ripple, start, workspaceScale); } }; /** * Play some UI effects (sound, animation) when disconnecting a block. */ Blockly.BlockSvg.prototype.disconnectUiEffect = function() { this.workspace.getAudioManager().play('disconnect'); if (this.workspace.scale < 1) { return; // Too small to care about visual effects. } // Horizontal distance for bottom of block to wiggle. var DISPLACEMENT = 10; // Scale magnitude of skew to height of block. var height = this.getHeightWidth().height; var magnitude = Math.atan(DISPLACEMENT / height) / Math.PI * 180; if (!this.RTL) { magnitude *= -1; } // Start the animation. Blockly.BlockSvg.disconnectUiStep_(this.svgGroup_, magnitude, new Date); }; /** * Animate a brief wiggle of a disconnected block. * @param {!Element} group SVG element to animate. * @param {number} magnitude Maximum degrees skew (reversed for RTL). * @param {!Date} start Date of animation's start. * @private */ Blockly.BlockSvg.disconnectUiStep_ = function(group, magnitude, start) { var DURATION = 200; // Milliseconds. var WIGGLES = 3; // Half oscillations. var ms = new Date - start; var percent = ms / DURATION; if (percent > 1) { group.skew_ = ''; } else { var skew = Math.round( Math.sin(percent * Math.PI * WIGGLES) * (1 - percent) * magnitude); group.skew_ = 'skewX(' + skew + ')'; Blockly.BlockSvg.disconnectUiStop_.group = group; Blockly.BlockSvg.disconnectUiStop_.pid = setTimeout( Blockly.BlockSvg.disconnectUiStep_, 10, group, magnitude, start); } if (!group.translate_) group.translate_ = ''; group.setAttribute('transform', group.translate_ + group.skew_); }; /** * Stop the disconnect UI animation immediately. * @private */ Blockly.BlockSvg.disconnectUiStop_ = function() { if (Blockly.BlockSvg.disconnectUiStop_.group) { clearTimeout(Blockly.BlockSvg.disconnectUiStop_.pid); var group = Blockly.BlockSvg.disconnectUiStop_.group; group.skew_ = ''; group.setAttribute('transform', group.translate_); Blockly.BlockSvg.disconnectUiStop_.group = null; } }; /** * PID of disconnect UI animation. There can only be one at a time. * @type {number} */ Blockly.BlockSvg.disconnectUiStop_.pid = 0; /** * SVG group of wobbling block. There can only be one at a time. * @type {Element} */ Blockly.BlockSvg.disconnectUiStop_.group = null; /** ======= >>>>>>>
<<<<<<< import { Icon } from '../../components' ======= import { Grid, Col, ListGroup, ListGroupItem } from 'react-bootstrap' import { Link, Icon } from '../../components' >>>>>>> import { Link, Icon } from '../../components' <<<<<<< </Card> </a> ======= </Link> </ListGroup> >>>>>>> </Link>
<<<<<<< var flyoutWorkspace = workspace && workspace.getFlyout && workspace.getFlyout() ? workspace.getFlyout().getWorkspace() : null; ======= if (typeof Blockly.Generator.prototype[prototypeName] !== 'undefined') { console.warn('FUTURE ERROR: Block prototypeName "' + prototypeName + '" conflicts with Blockly.Generator members. Registering Generators ' + 'for this block type will incur errors.' + '\nThis name will be DISALLOWED (throwing an error) in future ' + 'versions of Blockly.'); } >>>>>>> if (typeof Blockly.Generator.prototype[prototypeName] !== 'undefined') { console.warn('FUTURE ERROR: Block prototypeName "' + prototypeName + '" conflicts with Blockly.Generator members. Registering Generators ' + 'for this block type will incur errors.' + '\nThis name will be DISALLOWED (throwing an error) in future ' + 'versions of Blockly.'); } var flyoutWorkspace = workspace && workspace.getFlyout && workspace.getFlyout() ? workspace.getFlyout().getWorkspace() : null; <<<<<<< * Get the secondary colour of a block. * @return {string} #RRGGBB string. ======= * Get the HSV hue value of a block. Null if hue not set. * @return {?number} Hue value (0-360) */ Blockly.Block.prototype.getHue = function() { return this.hue_; }; /** * Change the colour of a block. * @param {number|string} colour HSV hue value, or #RRGGBB string. >>>>>>> * Get the HSV hue value of a block. Null if hue not set. * @return {?number} Hue value (0-360) */ Blockly.Block.prototype.getHue = function() { return this.hue_; }; /** * Get the secondary colour of a block. * @return {string} #RRGGBB string. <<<<<<< if (!isNaN(hue)) { return Blockly.hueToRgb(hue); } else if (goog.isString(colour) && colour.match(/^#[0-9a-fA-F]{6}$/)) { return colour; ======= if (!isNaN(hue) && 0 <= hue && hue <= 360) { this.hue_ = hue; this.colour_ = Blockly.hueToRgb(hue); } else if (goog.isString(colour) && /^#[0-9a-fA-F]{6}$/.test(colour)) { this.colour_ = colour; // Only store hue if colour is set as a hue. this.hue_ = null; >>>>>>> if (!isNaN(hue)) { return Blockly.hueToRgb(hue); } else if (goog.isString(colour) && colour.match(/^#[0-9a-fA-F]{6}$/)) { return colour; <<<<<<< this.setColourFromJson_(json); ======= var rawValue = json['colour']; try { var colour = goog.isString(rawValue) ? Blockly.utils.replaceMessageReferences(rawValue) : rawValue; this.setColour(colour); } catch (colorError) { console.warn( 'Block "' + blockTypeName + '": Illegal color value: ', rawValue); } >>>>>>> this.setColourFromJson_(json); <<<<<<< case 'field_label': field = Blockly.Block.newFieldLabelFromJson_(element); break; case 'field_label_serializable': field = Blockly.Block.newFieldLabelSerializableFromJson_(element); break; case 'field_input': field = Blockly.Block.newFieldTextInputFromJson_(element); break; case 'field_string': field = Blockly.Block.newFieldStringFromJson_(element); break; case 'field_textdropdown': field = new Blockly.FieldTextDropdown(element['text'], element['options']); if (typeof element['spellcheck'] == 'boolean') { field.setSpellcheck(element['spellcheck']); } break; case 'field_numberdropdown': field = new Blockly.FieldNumberDropdown( element['value'], element['options'], element['min'], element['max'], element['precision'] ); break; case 'field_angle': field = new Blockly.FieldAngle(element['angle']); break; case 'field_checkbox': field = new Blockly.FieldCheckbox( element['checked'] ? 'TRUE' : 'FALSE'); break; case 'field_colour': field = new Blockly.FieldColour(element['colour']); break; case 'field_colour_slider': field = new Blockly.FieldColourSlider(element['colour']); break; case 'field_variable': field = Blockly.Block.newFieldVariableFromJson_(element); break; case 'field_dropdown': field = new Blockly.FieldDropdown(element['options']); break; case 'field_iconmenu': field = new Blockly.FieldIconMenu(element['options']); break; case 'field_image': field = Blockly.Block.newFieldImageFromJson_(element); break; case 'field_number': field = new Blockly.FieldNumber(element['value'], element['min'], element['max'], element['precision']); break; case 'field_slider': field = new Blockly.FieldSlider(element['value'], element['min'], element['max'], element['precision'], element['step'], element['labelText']); break; case 'field_date': if (Blockly.FieldDate) { field = new Blockly.FieldDate(element['date']); break; } // Fall through if FieldDate is not compiled in. ======= >>>>>>> <<<<<<< * Helper function to construct a FieldImage from a JSON arg object, * dereferencing any string table references. * @param {!Object} options A JSON object with options (src, width, height, and alt). * @returns {!Blockly.FieldImage} The new image. * @private */ Blockly.Block.newFieldImageFromJson_ = function(options) { var src = Blockly.utils.replaceMessageReferences(options['src']); var width = Number(Blockly.utils.replaceMessageReferences(options['width'])); var height = Number(Blockly.utils.replaceMessageReferences(options['height'])); var alt = Blockly.utils.replaceMessageReferences(options['alt']); var flip_rtl = !!options['flip_rtl']; return new Blockly.FieldImage(src, width, height, alt, flip_rtl); }; /** * Helper function to construct a FieldLabel from a JSON arg object, * dereferencing any string table references. * @param {!Object} options A JSON object with options (text, and class). * @returns {!Blockly.FieldLabel} The new label. * @private */ Blockly.Block.newFieldLabelFromJson_ = function(options) { var text = Blockly.utils.replaceMessageReferences(options['text']); return new Blockly.FieldLabel(text, options['class']); }; /** * Helper function to construct a FieldLabelSerializable from a JSON arg object, * dereferencing any string table references. * @param {!Object} options A JSON object with options (text, and class). * @returns {!Blockly.FieldLabelSerializable} The new label. * @private */ Blockly.Block.newFieldLabelSerializableFromJson_ = function(options) { var text = Blockly.utils.replaceMessageReferences(options['text']); return new Blockly.FieldLabelSerializable(text, options['class']); }; /** * Helper function to construct a FieldTextInput from a JSON arg object, * dereferencing any string table references. * @param {!Object} options A JSON object with options (text, class, and * spellcheck). * @returns {!Blockly.FieldTextInput} The new text input. * @private */ Blockly.Block.newFieldTextInputFromJson_ = function(options) { var text = Blockly.utils.replaceMessageReferences(options['text']); var field = new Blockly.FieldTextInput(text, options['class']); if (typeof options['spellcheck'] == 'boolean') { field.setSpellcheck(options['spellcheck']); } return field; }; /** * Helper function to construct a FieldString from a JSON arg object, * dereferencing any string table references. * @param {!Object} options A JSON object with options (text, class, and * spellcheck). * @returns {!Blockly.FieldString} The new text input. * @private */ Blockly.Block.newFieldStringFromJson_ = function(options) { var text = Blockly.utils.replaceMessageReferences(options['text']); var field = new Blockly.FieldString(text, options['class']); if (typeof options['spellcheck'] == 'boolean') { field.setSpellcheck(options['spellcheck']); } return field; }; /** * Helper function to construct a FieldVariable from a JSON arg object, * dereferencing any string table references. * @param {!Object} options A JSON object with options (variable). * @returns {!Blockly.FieldVariable} The variable field. * @private */ Blockly.Block.newFieldVariableFromJson_ = function(options) { var varname = Blockly.utils.replaceMessageReferences(options['variable']); var variableTypes = options['variableTypes']; return new Blockly.FieldVariable(varname, null, variableTypes); }; /** ======= >>>>>>> <<<<<<< * @abstract ======= * @param {string=} opt_id An optional ID for the warning text to be able to * maintain multiple warnings. >>>>>>> * @param {string=} opt_id An optional ID for the warning text to be able to * maintain multiple warnings.
<<<<<<< goog.require('Blockly.Blocks'); goog.require('Blockly.Colours'); goog.require('Blockly.constants'); ======= >>>>>>>
<<<<<<< 'touch-action: none;', ======= >>>>>>> 'touch-action: none;', <<<<<<< 'touch-action: none;', ======= >>>>>>> 'touch-action: none;', <<<<<<< 'display: block;', 'overflow: none;', ======= 'display: block;', 'overflow: hidden;', >>>>>>> 'display: block;', 'overflow: hidden;', <<<<<<< 'font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;', 'user-select: none;', '-moz-user-select: none;', '-ms-user-select: none;', '-webkit-user-select: none;', 'z-index: 40;', /* so blocks go over toolbox when dragging */ //'z-index: 70;', /* so blocks go under toolbox when dragging */ '-webkit-tap-highlight-color: transparent;', /* issue #1345 */ ======= 'user-select: none;', '-moz-user-select: none;', '-ms-user-select: none;', '-webkit-user-select: none;', 'z-index: 70;', /* so blocks go under toolbox when dragging */ '-webkit-tap-highlight-color: transparent;', /* issue #1345 */ >>>>>>> 'font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;', 'user-select: none;', '-moz-user-select: none;', '-ms-user-select: none;', '-webkit-user-select: none;', 'z-index: 40;', /* so blocks go over toolbox when dragging */ //'z-index: 70;', /* so blocks go under toolbox when dragging */ '-webkit-tap-highlight-color: transparent;', /* issue #1345 */
<<<<<<< // pxt-blockly: also check function names var existingFunction = Blockly.Functions.getDefinition(text, workspace); if (existing || existingFunction) { var lowerCase = text.toLowerCase(); if (existingFunction || existing.type == type) { ======= if (existing) { if (existing.type == type) { >>>>>>> // pxt-blockly: also check function names var existingFunction = Blockly.Functions.getDefinition(text, workspace); if (existing || existingFunction) { if (existingFunction || existing.type == type) {
<<<<<<< "colour": Blockly.Colours.textField, "colourSecondary": Blockly.Colours.textField, "colourTertiary": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "helpUrl": "%{BKY_MATH_NUMBER_HELPURL}", "tooltip": "%{BKY_MATH_NUMBER_TOOLTIP}", "extensions": ["parent_tooltip_when_inline"] }, // Block for integer numeric value. { "type": "math_integer", "message0": "%1", "args0": [{ "type": "field_number", "name": "NUM", "precision": 1 }], "output": "Number", "colour": Blockly.Colours.textField, "colourSecondary": Blockly.Colours.textField, "colourTertiary": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "helpUrl": "%{BKY_MATH_NUMBER_HELPURL}", "tooltip": "%{BKY_MATH_NUMBER_TOOLTIP}", "extensions": ["parent_tooltip_when_inline"] }, // Block for whole numeric value. { "type": "math_whole_number", "message0": "%1", "args0": [{ "type": "field_number", "name": "NUM", "min": 0, "precision": 1 }], "output": "Number", "colour": Blockly.Colours.textField, "colourSecondary": Blockly.Colours.textField, "colourTertiary": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "helpUrl": "%{BKY_MATH_NUMBER_HELPURL}", "tooltip": "%{BKY_MATH_NUMBER_TOOLTIP}", "extensions": ["parent_tooltip_when_inline"] }, // Block for positive numeric value. { "type": "math_positive_number", "message0": "%1", "args0": [{ "type": "field_number", "name": "NUM", "min": 0 }], "output": "Number", "colour": Blockly.Colours.textField, "colourSecondary": Blockly.Colours.textField, "colourTertiary": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "helpUrl": "%{BKY_MATH_NUMBER_HELPURL}", "tooltip": "%{BKY_MATH_NUMBER_TOOLTIP}", "extensions": ["parent_tooltip_when_inline"] }, // Block for numeric value with min and max. { "type": "math_number_minmax", "message0": "%1", "args0": [{ "type": "field_slider", "name": "SLIDER", "value": 0, "step": 1, "labelText": "Number" }], "output": "Number", "colour": Blockly.Colours.textField, "colourSecondary": Blockly.Colours.textField, "colourTertiary": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, ======= >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", "helpUrl": "%{BKY_MATH_NUMBER_HELPURL}", "tooltip": "%{BKY_MATH_NUMBER_TOOLTIP}", "extensions": ["parent_tooltip_when_inline"] }, // Block for integer numeric value. // TODO shakao fill in colourSecondary/tertiary on math blocks { "type": "math_integer", "message0": "%1", "args0": [{ "type": "field_number", "name": "NUM", "precision": 1 }], "output": "Number", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", "helpUrl": "%{BKY_MATH_NUMBER_HELPURL}", "tooltip": "%{BKY_MATH_NUMBER_TOOLTIP}", "extensions": ["parent_tooltip_when_inline"] }, // Block for whole numeric value. { "type": "math_whole_number", "message0": "%1", "args0": [{ "type": "field_number", "name": "NUM", "min": 0, "precision": 1 }], "output": "Number", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", "helpUrl": "%{BKY_MATH_NUMBER_HELPURL}", "tooltip": "%{BKY_MATH_NUMBER_TOOLTIP}", "extensions": ["parent_tooltip_when_inline"] }, // Block for positive numeric value. { "type": "math_positive_number", "message0": "%1", "args0": [{ "type": "field_number", "name": "NUM", "min": 0 }], "output": "Number", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", "helpUrl": "%{BKY_MATH_NUMBER_HELPURL}", "tooltip": "%{BKY_MATH_NUMBER_TOOLTIP}", "extensions": ["parent_tooltip_when_inline"] }, // Block for numeric value with min and max. { "type": "math_number_minmax", "message0": "%1", "args0": [{ "type": "field_slider", "name": "SLIDER", "value": 0, "step": 1, "labelText": "Number" }], "output": "Number", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", <<<<<<< "colour": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, ======= "style": "math_blocks", >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", <<<<<<< "colour": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, ======= "style": "math_blocks", >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", <<<<<<< "colour": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, ======= "style": "math_blocks", >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", <<<<<<< "colour": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, ======= "style": "math_blocks", >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", <<<<<<< "colour": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_HEXAGONAL, ======= "style": "math_blocks", >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_HEXAGONAL, "style": "math_blocks", <<<<<<< "colour": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, ======= "style": "math_blocks", >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", <<<<<<< "colour": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, ======= "style": "math_blocks", >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", <<<<<<< "colour": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, ======= "style": "math_blocks", >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", <<<<<<< "colour": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, ======= "style": "math_blocks", >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", <<<<<<< "colour": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, ======= "style": "math_blocks", >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks", <<<<<<< "colour": "%{BKY_MATH_HUE}", "outputShape": Blockly.OUTPUT_SHAPE_ROUND, ======= "style": "math_blocks", >>>>>>> "outputShape": Blockly.OUTPUT_SHAPE_ROUND, "style": "math_blocks",
<<<<<<< Blockly.FieldLabel = function(opt_value, opt_class) { this.size_ = new goog.math.Size(0, 0); // pxt-blockly: Scratch rendering this.class_ = opt_class; opt_value = this.doClassValidation_(opt_value); if (opt_value === null) { ======= Blockly.FieldLabel = function(opt_value, opt_class, opt_config) { /** * The html class name to use for this field. * @type {?string} * @private */ this.class_ = null; if (opt_value == null) { >>>>>>> Blockly.FieldLabel = function(opt_value, opt_class, opt_config) { /** * The html class name to use for this field. * @type {?string} * @private */ this.class_ = null; if (opt_value == null) { <<<<<<< * pxt-blockly: labels do not bind events, to allow blocks with one * field to bind the event to the entire block. * @protected */ Blockly.FieldLabel.prototype.bindEvents_ = function() { return; }; /** ======= * @override */ Blockly.FieldLabel.prototype.configure_ = function(config) { Blockly.FieldLabel.superClass_.configure_.call(this, config); this.class_ = config['class']; }; /** >>>>>>> * pxt-blockly: labels do not bind events, to allow blocks with one * field to bind the event to the entire block. * @protected */ Blockly.FieldLabel.prototype.bindEvents_ = function() { return; }; /** * @override */ Blockly.FieldLabel.prototype.configure_ = function(config) { Blockly.FieldLabel.superClass_.configure_.call(this, config); this.class_ = config['class']; }; /** <<<<<<< this.textElement_.setAttribute('y', Blockly.BlockSvg.FIELD_TOP_PADDING); ======= >>>>>>>
<<<<<<< * @param {Array.<string>} opt_variableTypes A list of the types of variables to * include in the dropdown. ======= * @param {Array.<string>=} opt_variableTypes A list of the types of variables * to include in the dropdown. * @param {string=} opt_defaultType The type of variable to create if this * field's value is not explicitly set. Defaults to ''. >>>>>>> * @param {Array.<string>} opt_variableTypes A list of the types of variables to * include in the dropdown. <<<<<<< Blockly.FieldVariable = function(varname, opt_validator, opt_variableTypes) { Blockly.FieldVariable.superClass_.constructor.call(this, Blockly.FieldVariable.dropdownCreate, opt_validator); this.setValue(varname || ''); this.addArgType('variable'); this.variableTypes = opt_variableTypes; ======= Blockly.FieldVariable = function(varname, opt_validator, opt_variableTypes, opt_defaultType) { // The FieldDropdown constructor would call setValue, which might create a // spurious variable. Just do the relevant parts of the constructor. this.menuGenerator_ = Blockly.FieldVariable.dropdownCreate; this.size_ = new goog.math.Size(0, Blockly.BlockSvg.MIN_BLOCK_Y); this.setValidator(opt_validator); this.defaultVariableName = (varname || ''); this.setTypes_(opt_variableTypes, opt_defaultType); this.value_ = null; >>>>>>> Blockly.FieldVariable = function(varname, opt_validator, opt_variableTypes) { // The FieldDropdown constructor would call setValue, which might create a // spurious variable. Just do the relevant parts of the constructor. this.menuGenerator_ = Blockly.FieldVariable.dropdownCreate; this.size_ = new goog.math.Size(Blockly.BlockSvg.FIELD_WIDTH, Blockly.BlockSvg.FIELD_HEIGHT); this.setValidator(opt_validator); // TODO (blockly #1499): Add opt_default_type to match default value. // If not set, ''. this.defaultVariableName = (varname || ''); var hasSingleVarType = opt_variableTypes && (opt_variableTypes.length == 1); this.defaultType_ = hasSingleVarType ? opt_variableTypes[0] : ''; this.variableTypes = opt_variableTypes; this.value_ = null; <<<<<<< ======= var variableModelList = []; >>>>>>> <<<<<<< var variableTypes = this.getVariableTypes_(); var variableModelList = []; ======= var variableTypes = this.getVariableTypes_(); >>>>>>> var variableTypes = this.getVariableTypes_(); var variableModelList = []; <<<<<<< for (var i = 0; i < variableTypes.length; i++) { var variableType = variableTypes[i]; var variables = workspace.getVariablesOfType(variableType); variableModelList = variableModelList.concat(variables); } for (var i = 0; i < variableModelList.length; i++){ if (createSelectedVariable && goog.string.caseInsensitiveEquals(variableModelList[i].name, name)) { createSelectedVariable = false; break; } ======= for (var i = 0; i < variableTypes.length; i++) { var variableType = variableTypes[i]; var variables = workspace.getVariablesOfType(variableType); variableModelList = variableModelList.concat(variables); >>>>>>> for (var i = 0; i < variableTypes.length; i++) { var variableType = variableTypes[i]; var variables = workspace.getVariablesOfType(variableType); variableModelList = variableModelList.concat(variables); var potentialVarMap = workspace.getPotentialVariableMap(); if (potentialVarMap) { var potentialVars = potentialVarMap.getVariablesOfType(variableType); variableModelList = variableModelList.concat(potentialVars); } <<<<<<< options.push([Blockly.Msg.DELETE_VARIABLE.replace('%1', name), Blockly.DELETE_VARIABLE_ID]); ======= options.push( [ Blockly.Msg.DELETE_VARIABLE.replace('%1', name), Blockly.DELETE_VARIABLE_ID ] ); >>>>>>> options.push([Blockly.Msg.DELETE_VARIABLE.replace('%1', name), Blockly.DELETE_VARIABLE_ID]); } <<<<<<< var currentName = this.getText(); variable = workspace.getVariable(currentName); Blockly.Variables.renameVariable(workspace, variable); ======= Blockly.Variables.renameVariable(workspace, this.variable_); >>>>>>> Blockly.Variables.renameVariable(workspace, this.variable_); <<<<<<< /** * Whether or not to show a box around the dropdown menu. * @return {boolean} True if we should show a box (rect) around the dropdown menu. Otherwise false. * @private */ Blockly.FieldVariable.prototype.shouldShowRect_ = function () { //pxtblockly: don't show a rect around the variable dropdown when in a shadow block return !this.sourceBlock_.isShadow() && this.sourceBlock_.type != 'variables_get'; } ======= Blockly.Field.register('field_variable', Blockly.FieldVariable); >>>>>>> /** * Whether or not to show a box around the dropdown menu. * @return {boolean} True if we should show a box (rect) around the dropdown menu. Otherwise false. * @private */ Blockly.FieldVariable.prototype.shouldShowRect_ = function () { //pxtblockly: don't show a rect around the variable dropdown when in a shadow block return !this.sourceBlock_.isShadow() && this.sourceBlock_.type != 'variables_get'; }; Blockly.Field.register('field_variable', Blockly.FieldVariable);
<<<<<<< <div className="TransUnit-panelFooter u-cf TransUnit-panelFooter--translation"> <div className="TransUnit-panelFooterLeftNav u-floatLeft u-sizeHeight-1_1-2"> <ul className="u-listHorizontal"> {/* don't think this was ever displayed <li class="u-gtemd-hidden" ng-show="appCtrl.PRODUCTION"> <button class="Link Link--neutral u-sizeHeight-1_1-2" title="{{::'Details'|translate}}"> <icon name="info" title="{{::'Details'|translate}}" class="u-sizeWidth-1_1-2"></icon> </button> </li> */} {suggestionsIcon} {glossaryIcon} </ul> </div> <div className="u-floatRight" ref="saveTransDropdown" tabIndex={0} > {typeof phrase.conflict === 'undefined' ? saveAsLabel : null} {typeof phrase.conflict === 'undefined' ? <SplitDropdown onToggle={this.toggleDropdown} isOpen={dropdownIsOpen} actionButton={actionButton} toggleButton={dropdownToggleButton} content={otherActionButtonList} /> : <Button className={cx('EditorButton u-sizeHeight-1_1-4 u-textCapitalize u-rounded Button--warning')} disabled={false} // @ts-ignore title={'Resolve Conflict'} onClick={toggleConcurrentModal}> {'Resolve Conflict'} </Button>} ======= <React.Fragment> {validationMessages && validationMessages.errorCount > 0 && <ValidationErrorsModal phrase={phrase} savePhraseWithStatus={savePhraseWithStatus} selectedButtonStatus={selectedButtonStatus} showErrorModal={showErrorModal} validationMessages={validationMessages} />} <div className="TransUnit-panelFooter u-cf TransUnit-panelFooter--translation"> <div className="TransUnit-panelFooterLeftNav u-floatLeft u-sizeHeight-1_1-2"> <ul className="u-listHorizontal"> {suggestionsIcon} {glossaryIcon} </ul> </div> <div className="u-floatRight" ref="saveTransDropdown" tabIndex={0} > {saveAsLabel} <SplitDropdown onToggle={this.toggleDropdown} isOpen={dropdownIsOpen} actionButton={actionButton} toggleButton={dropdownToggleButton} content={otherActionButtonList} /> </div> >>>>>>> <React.Fragment> {validationMessages && validationMessages.errorCount > 0 && <ValidationErrorsModal phrase={phrase} savePhraseWithStatus={savePhraseWithStatus} selectedButtonStatus={selectedButtonStatus} showErrorModal={showErrorModal} validationMessages={validationMessages} />} <div className="TransUnit-panelFooter u-cf TransUnit-panelFooter--translation"> <div className="TransUnit-panelFooterLeftNav u-floatLeft u-sizeHeight-1_1-2"> <ul className="u-listHorizontal"> {suggestionsIcon} {glossaryIcon} </ul> </div> <div className="u-floatRight" ref="saveTransDropdown" tabIndex={0} > {typeof phrase.conflict === 'undefined' ? saveAsLabel : null} {typeof phrase.conflict === 'undefined' ? <SplitDropdown onToggle={this.toggleDropdown} isOpen={dropdownIsOpen} actionButton={actionButton} toggleButton={dropdownToggleButton} content={otherActionButtonList} /> : <Button className={cx('EditorButton u-sizeHeight-1_1-4 u-textCapitalize u-rounded Button--warning')} // @ts-ignore title={'Resolve Conflict'} onClick={toggleConcurrentModal}> {'Resolve Conflict'} </Button>} </div>
<<<<<<< Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "A variable or function named '%1' already exists."; // untranslated Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "A variable named '%1' already exists for another type: '%2'."; // untranslated ======= Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "'%1' নামের চলক পূর্ব থেকে অাছে।"; Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "'%1' নামের চলক '%2' ধরনের চলকের জন্য পূর্ব থেকেই অাছে।"; Blockly.Msg["WORKSPACE_ARIA_LABEL"] = "Blockly Workspace"; // untranslated >>>>>>> Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "A variable named '%1' already exists."; // untranslated Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "A variable named '%1' already exists for another type: '%2'."; // untranslated Blockly.Msg["WORKSPACE_ARIA_LABEL"] = "Blockly Workspace"; // untranslated
<<<<<<< this.syncTrees_(newTree, this.tree_, this.iconic_, this.workspace_.options.pathToMedia); ======= var openNode = this.syncTrees_(newTree, this.tree_, this.workspace_.options.pathToMedia); >>>>>>> var openNode = this.syncTrees_(newTree, this.tree_, this.iconic_, this.workspace_.options.pathToMedia); <<<<<<< this.syncTrees_(childIn, childOut, iconic, pathToMedia); ======= var newOpenNode = this.syncTrees_(childIn, childOut, pathToMedia); if (newOpenNode) { openNode = newOpenNode; } >>>>>>> var newOpenNode = this.syncTrees_(childIn, childOut, iconic, pathToMedia); if (newOpenNode) { openNode = newOpenNode; }
<<<<<<< Blockly.DropDownDiv.hideWithoutAnimation(); Blockly.DropDownDiv.clearContent(); var div = Blockly.DropDownDiv.getContentDiv(); // Create the palette using Closure. this.colorPicker_ = new goog.ui.ColorPicker(); this.colorPicker_.setSize(this.columns_ || Blockly.FieldColour.COLUMNS); this.colorPicker_.setColors(this.colours_ || Blockly.FieldColour.COLOURS); this.colorPicker_.render(div); this.colorPicker_.setSelectedColor(this.getValue(true)); Blockly.DropDownDiv.setColour('#ffffff', '#dddddd'); if (this.sourceBlock_.parentBlock_) Blockly.DropDownDiv.setCategory(this.sourceBlock_.parentBlock_.getCategory()); Blockly.DropDownDiv.showPositionedByBlock(this, this.sourceBlock_); this.setValue(this.getValue()); ======= Blockly.WidgetDiv.show(this, this.sourceBlock_.RTL, Blockly.FieldColour.widgetDispose_); // Record viewport dimensions before adding the widget. var viewportBBox = Blockly.utils.getViewportBBox(); var anchorBBox = this.getScaledBBox_(); // Create and add the colour picker, then record the size. var picker = this.createWidget_(); var paletteSize = goog.style.getSize(picker.getElement()); // Position the picker to line up with the field. Blockly.WidgetDiv.positionWithAnchor(viewportBBox, anchorBBox, paletteSize, this.sourceBlock_.RTL); >>>>>>> Blockly.DropDownDiv.hideWithoutAnimation(); Blockly.DropDownDiv.clearContent(); Blockly.DropDownDiv.showPositionedByBlock(this, this.sourceBlock_); this.colorPicker_ = this.createWidget_(); Blockly.DropDownDiv.setColour('#ffffff', '#dddddd'); if (this.sourceBlock_.parentBlock_) Blockly.DropDownDiv.setCategory(this.sourceBlock_.parentBlock_.getCategory()); this.setValue(this.getValue()); <<<<<<< Blockly.FieldColour.superClass_.dispose.call(this); }; ======= }; Blockly.Field.register('field_colour', Blockly.FieldColour); >>>>>>> Blockly.FieldColour.superClass_.dispose.call(this); }; Blockly.Field.register('field_colour', Blockly.FieldColour);
<<<<<<< goog.require('Blockly.Flyout'); goog.require('Blockly.Touch'); ======= goog.require('Blockly.VerticalFlyout'); goog.require('Blockly.HorizontalFlyout'); >>>>>>> goog.require('Blockly.HorizontalFlyout'); goog.require('Blockly.Touch'); goog.require('Blockly.VerticalFlyout'); <<<<<<< this.flyout_.hide(); this.config_['cleardotPath'] = workspace.options.pathToMedia + '1x1.gif'; this.config_['cssCollapsedFolderIcon'] = 'blocklyTreeIconClosed' + (workspace.RTL ? 'Rtl' : 'Ltr'); var tree = new Blockly.Toolbox.TreeControl(this, this.config_); this.tree_ = tree; tree.setShowRootNode(false); tree.setShowLines(false); tree.setShowExpandIcons(false); tree.setSelectedItem(null); var openNode = this.populate_(workspace.options.languageTree); tree.render(this.HtmlDiv); if (openNode) { tree.setSelectedItem(openNode); } this.addColour_(); ======= this.populate_(workspace.options.languageTree); >>>>>>> this.populate_(workspace.options.languageTree); <<<<<<< this.tree_.removeChildren(); // Delete any existing content. this.tree_.blocks = []; this.hasColours_ = false; var openNode = this.syncTrees_(newTree, this.tree_, this.iconic_, this.workspace_.options.pathToMedia); if (this.tree_.blocks.length) { throw 'Toolbox cannot have both blocks and categories in the root level.'; } ======= this.categoryMenu_.populate(newTree); this.setSelectedItem(this.categoryMenu_.categories_[0]); // this.tree_.blocks = []; // this.hasColours_ = false; // this.syncTrees_(newTree, this.tree_, this.iconic_, // this.workspace_.options.pathToMedia); // if (this.tree_.blocks.length) { // throw 'Toolbox cannot have both blocks and categories in the root level.'; // } >>>>>>> this.categoryMenu_.populate(newTree); this.setSelectedItem(this.categoryMenu_.categories_[0]); // this.tree_.blocks = []; // this.hasColours_ = false; // this.syncTrees_(newTree, this.tree_, this.iconic_, // 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 openNode; ======= // Blockly.resizeSvgContents(this.workspace_); >>>>>>> // Blockly.resizeSvgContents(this.workspace_); <<<<<<< * @param {Blockly.Toolbox.TreeControl} treeOut Blockly toolbox tree to sync. * @param {boolean} iconic Whether the toolbox uses icons. * @param {string} pathToMedia Media path for the toolbox. * @return {Node} Tree node to open at startup (or null). ======= * @param {Blockly.Toolbox.Contents} treeOut * @param {string} pathToMedia >>>>>>> * @param {Blockly.Toolbox.TreeControl} treeOut Blockly toolbox tree to sync. * @param {boolean} iconic Whether the toolbox uses icons. * @param {string} pathToMedia Media path for the toolbox. * @return {Node} Tree node to open at startup (or null). * @param {Blockly.Toolbox.Contents} treeOut * @param {string} pathToMedia <<<<<<< /** * Adds touch handling to TreeControl. * @override */ Blockly.Toolbox.TreeControl.prototype.enterDocument = function() { Blockly.Toolbox.TreeControl.superClass_.enterDocument.call(this); var el = this.getElement(); // Add touch handler. if (goog.events.BrowserFeature.TOUCH_ENABLED) { Blockly.bindEvent_(el, goog.events.EventType.TOUCHSTART, this, this.handleTouchEvent_); ======= Blockly.Toolbox.prototype.setSelectedItem = function(item) { // item is a category this.selectedItem_ = item; if (this.selectedItem_ != null) { this.flyout_.show(item.getContents()); >>>>>>> Blockly.Toolbox.prototype.setSelectedItem = function(item) { // item is a category this.selectedItem_ = item; if (this.selectedItem_ != null) { this.flyout_.show(item.getContents()); <<<<<<< /** * Expand or collapse the node on mouse click. * @param {!goog.events.BrowserEvent} e The browser event. * @override */ Blockly.Toolbox.TreeNode.prototype.onMouseDown = function(/*e*/) { // Expand icon. if (this.hasChildren() && this.isUserCollapsible_) { this.toggle(); this.select(); } else if (this.isSelected()) { this.getTree().setSelectedItem(null); } else { this.select(); ======= Blockly.Toolbox.Category = function(parent, parentHtml, domTree) { this.parent_ = parent; this.parentHtml_ = parentHtml; this.name_ = domTree.getAttribute('name'); this.setColour(domTree); this.custom_ = domTree.getAttribute('custom'); this.contents_ = []; if (!this.custom_) { this.parseContents_(domTree); >>>>>>> Blockly.Toolbox.Category = function(parent, parentHtml, domTree) { this.parent_ = parent; this.parentHtml_ = parentHtml; this.name_ = domTree.getAttribute('name'); this.setColour(domTree); this.custom_ = domTree.getAttribute('custom'); this.contents_ = []; if (!this.custom_) { this.parseContents_(domTree); <<<<<<< /** * Supress the inherited double-click behaviour. * @param {!goog.events.BrowserEvent} e The browser event. * @override * @private */ Blockly.Toolbox.TreeNode.prototype.onDoubleClick_ = function(/*e*/) { // NOP. ======= Blockly.Toolbox.Category.prototype.createDom = function() { // this.row_ = goog.dom.createDom('tr', 'scratchCategoryMenuRow'); // this.parentHtml_.appendChild(this.row_); this.item_ = goog.dom.createDom('td', {'class': 'scratchCategoryMenuItem', 'style': 'background-color:' + this.colour_ }, this.name_); this.parentHtml_.appendChild(this.item_); // this.parent_.parent_ should be the toolbox. Don't leave this line in this // state. Blockly.bindEvent_(this.item_, 'mouseup', this.parent_.parent_, this.parent_.parent_.setSelectedItemFactory(this)); >>>>>>> Blockly.Toolbox.Category.prototype.createDom = function() { // this.row_ = goog.dom.createDom('tr', 'scratchCategoryMenuRow'); // this.parentHtml_.appendChild(this.row_); this.item_ = goog.dom.createDom('td', {'class': 'scratchCategoryMenuItem', 'style': 'background-color:' + this.colour_ }, this.name_); this.parentHtml_.appendChild(this.item_); // this.parent_.parent_ should be the toolbox. Don't leave this line in this // state. Blockly.bindEvent_(this.item_, 'mousedown', this.parent_.parent_, this.parent_.parent_.setSelectedItemFactory(this)); <<<<<<< /** * A blank separator node in the tree. * @param {Object=} config The configuration for the tree. See * goog.ui.tree.TreeControl.DefaultConfig. If not specified, a default config * will be used. * @constructor * @extends {Blockly.Toolbox.TreeNode} */ Blockly.Toolbox.TreeSeparator = function(config) { Blockly.Toolbox.TreeNode.call(this, null, '', config); ======= Blockly.Toolbox.Category.prototype.getContents = function() { return this.custom_ ? this.custom_ : this.contents_; >>>>>>> Blockly.Toolbox.Category.prototype.getContents = function() { return this.custom_ ? this.custom_ : this.contents_;
<<<<<<< goog.require('Blockly.Events'); ======= goog.require('Blockly.Options'); >>>>>>> goog.require('Blockly.Events'); goog.require('Blockly.Options'); <<<<<<< 'blocklySelectChange', this, function() {this.traceOn_ = false; }); ======= 'blocklySelectChange', this, function() {this.traceOn_ = false;}); >>>>>>> 'blocklySelectChange', this, function() {this.traceOn_ = false; }); <<<<<<< this.scrollbar.resize(); } else { this.translate(0, 0); } // Hide the WidgetDiv without animation (zoom makes field out of place with div) Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation(); Blockly.hideChaff(false); if (this.flyout_) { // No toolbox, resize flyout. this.flyout_.reflow(); } ======= var matrix = canvas.getCTM() .translate(x * (1 - scaleChange), y * (1 - scaleChange)) .scale(scaleChange); // newScale and matrix.a should be identical (within a rounding error). this.scrollX = matrix.e - metrics.absoluteLeft; this.scrollY = matrix.f - metrics.absoluteTop; } this.setScale(newScale); >>>>>>> var matrix = canvas.getCTM() .translate(x * (1 - scaleChange), y * (1 - scaleChange)) .scale(scaleChange); // newScale and matrix.a should be identical (within a rounding error). this.scrollX = matrix.e - metrics.absoluteLeft; this.scrollY = matrix.f - metrics.absoluteTop; } this.setScale(newScale); // Hide the WidgetDiv without animation (zoom makes field out of place with div) Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation(); <<<<<<< this.scale = newScale; this.updateGridPattern_(); this.scrollbar.resize(); // Hide the WidgetDiv without animation (zoom makes field out of place with div) Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation(); Blockly.hideChaff(false); ======= var metrics = this.getMetrics(); var x = (metrics.contentWidth - metrics.viewWidth) / 2; >>>>>>> this.scale = newScale; this.updateGridPattern_(); this.scrollbar.resize(); // Hide the WidgetDiv without animation (zoom makes field out of place with div) Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation(); Blockly.hideChaff(false); var metrics = this.getMetrics(); var x = (metrics.contentWidth - metrics.viewWidth) / 2; <<<<<<< // Hide the WidgetDiv without animation (zoom makes field out of place with div) Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation(); ======= if (this.scrollbar) { this.scrollbar.resize(); } else { this.translate(this.scrollX, this.scrollY); } >>>>>>> // Hide the WidgetDiv without animation (zoom makes field out of place with div) Blockly.WidgetDiv.hide(true); Blockly.DropDownDiv.hideWithoutAnimation(); if (this.scrollbar) { this.scrollbar.resize(); } else { this.translate(this.scrollX, this.scrollY); }
<<<<<<< ======= var variableModelList = workspace.getVariablesOfType(''); variableModelList.sort(Blockly.VariableModel.compareByName); >>>>>>> <<<<<<< } else if (!Blockly.Procedures.isLegalName_(text, workspace)) { Blockly.alert(Blockly.Msg.PROCEDURE_ALREADY_EXISTS.replace('%1', text.toLowerCase()), function() { promptAndCheckWithAlert(text); // Recurse }); } else { workspace.createVariable(text); ======= } else if (!Blockly.Procedures.isLegalName_(text, workspace)) { Blockly.alert(Blockly.Msg.PROCEDURE_ALREADY_EXISTS.replace('%1', text.toLowerCase()), function() { promptAndCheckWithAlert(text); // Recurse }); } else { var variable = workspace.createVariable(text); var flyout = workspace.getFlyout(); var variableBlockId = variable.getId(); if (flyout.setCheckboxState) { flyout.setCheckboxState(variableBlockId, true); } >>>>>>> } else if (!Blockly.Procedures.isLegalName_(text, workspace)) { Blockly.alert(Blockly.Msg.PROCEDURE_ALREADY_EXISTS.replace('%1', text.toLowerCase()), function() { promptAndCheckWithAlert(text); // Recurse }); } else { workspace.createVariable(text);
<<<<<<< { 'sourceBlock_': {'workspace': workspace}, 'getText': function(){return 'name1';}, 'getVariableTypes_': function(){return [''];} }); ======= fieldVariable); >>>>>>> fieldVariable); <<<<<<< workspace.createVariable('name1', '', 'id1'); workspace.createVariable('name2', '', 'id2'); var result_options = Blockly.FieldVariable.dropdownCreate.call( { 'sourceBlock_': {'workspace': workspace}, 'getText': function(){return 'name1';}, 'getVariableTypes_': function(){return [''];} }); assertEquals(result_options.length, 3); isEqualArrays(result_options[0], ['name1', 'id1']); isEqualArrays(result_options[1], ['name2', 'id2']); ======= workspace.createVariable('name1', 'type1'); workspace.createVariable('name2', 'type2'); >>>>>>> workspace.createVariable('name1', 'type1'); workspace.createVariable('name2', 'type2'); <<<<<<< var result_options = Blockly.FieldVariable.dropdownCreate.call( { 'sourceBlock_': {'workspace': workspace}, 'getText': function(){return 'name1';}, 'getVariableTypes_': function(){return [''];} }); ======= function test_fieldVariable_getVariableTypes_nullVariableTypes() { // Expect all variable types to be returned. // The variable does not need to be initialized to do this--it just needs a // pointer to the workspace. workspace = new Blockly.Workspace(); workspace.createVariable('name1', 'type1'); workspace.createVariable('name2', 'type2'); >>>>>>> function test_fieldVariable_getVariableTypes_nullVariableTypes() { // Expect all variable types to be returned. // The variable does not need to be initialized to do this--it just needs a // pointer to the workspace. workspace = new Blockly.Workspace(); workspace.createVariable('name1', 'type1'); workspace.createVariable('name2', 'type2'); <<<<<<< var result_options = Blockly.FieldVariable.dropdownCreate.call( { 'sourceBlock_': {'workspace': workspace}, 'getText': function(){return 'name2';}, 'getVariableTypes_': function(){return [''];} }); ======= var fieldVariable = new Blockly.FieldVariable('name1'); var mockBlock = fieldVariable_mockBlock(workspace); fieldVariable.setSourceBlock(mockBlock); fieldVariable.variableTypes = []; try { fieldVariable.getVariableTypes_(); fail(); } catch (e) { //expected } finally { workspace.dispose(); } } >>>>>>> var fieldVariable = new Blockly.FieldVariable('name1'); var mockBlock = fieldVariable_mockBlock(workspace); fieldVariable.setSourceBlock(mockBlock); fieldVariable.variableTypes = []; try { fieldVariable.getVariableTypes_(); fail(); } catch (e) { //expected } finally { workspace.dispose(); } } <<<<<<< fieldVariableTestWithMocks_tearDown(); } function test_fieldVariable_getVariableTypes_undefinedVariableTypes() { // Expect that since variableTypes is undefined, only type empty string // will be returned. workspace = new Blockly.Workspace(); workspace.createVariable('name1', 'type1'); workspace.createVariable('name2', 'type2'); var fieldVariable = new Blockly.FieldVariable('name1'); var resultTypes = fieldVariable.getVariableTypes_(); isEqualArrays(resultTypes, ['']); workspace.dispose(); } function test_fieldVariable_getVariableTypes_givenVariableTypes() { // Expect that since variableTypes is undefined, only type empty string // will be returned. workspace = new Blockly.Workspace(); workspace.createVariable('name1', 'type1'); workspace.createVariable('name2', 'type2'); var fieldVariable = new Blockly.FieldVariable('name1', null, ['type1', 'type2']); var resultTypes = fieldVariable.getVariableTypes_(); isEqualArrays(resultTypes, ['type1', 'type2']); workspace.dispose(); } function test_fieldVariable_getVariableTypes_nullVariableTypes() { // Expect all variable types to be returned. workspace = new Blockly.Workspace(); workspace.createVariable('name1', 'type1'); workspace.createVariable('name2', 'type2'); var fieldVariable = new Blockly.FieldVariable('name1'); var mockBlock = fieldVariable_mockBlock(workspace); fieldVariable.setSourceBlock(mockBlock); fieldVariable.variableTypes = null; var resultTypes = fieldVariable.getVariableTypes_(); isEqualArrays(resultTypes, ['type1', 'type2']); workspace.dispose(); } function test_fieldVariable_getVariableTypes_emptyListVariableTypes() { // Expect an error to be thrown. workspace = new Blockly.Workspace(); workspace.createVariable('name1', 'type1'); workspace.createVariable('name2', 'type2'); var fieldVariable = new Blockly.FieldVariable('name1'); var mockBlock = fieldVariable_mockBlock(workspace); fieldVariable.setSourceBlock(mockBlock); fieldVariable.variableTypes = []; try { fieldVariable.getVariableTypes_(); } catch (e) { //expected } finally { workspace.dispose(); } ======= function test_fieldVariable_noDefaultType() { var fieldVariable = new Blockly.FieldVariable(null); assertEquals('The variable field\'s default type should be the empty string', '', fieldVariable.defaultType_); assertNull('The variable field\'s allowed types should be null', fieldVariable.variableTypes); } function test_fieldVariable_defaultTypeMismatch() { try { var fieldVariable = new Blockly.FieldVariable(null, null, ['a'], 'b'); fail('Variable field creation should have failed due to an invalid ' + 'default type'); } catch (e) { // expected } } function test_fieldVariable_defaultTypeMismatch_empty() { try { var fieldVariable = new Blockly.FieldVariable(null, null, ['a']); fail('Variable field creation should have failed due to an invalid ' + 'default type'); } catch (e) { // expected } >>>>>>> function test_fieldVariable_noDefaultType() { var fieldVariable = new Blockly.FieldVariable(null); assertEquals('The variable field\'s default type should be the empty string', '', fieldVariable.defaultType_); assertNull('The variable field\'s allowed types should be null', fieldVariable.variableTypes); } function test_fieldVariable_defaultTypeMismatch() { try { var fieldVariable = new Blockly.FieldVariable(null, null, ['a'], 'b'); fail('Variable field creation should have failed due to an invalid ' + 'default type'); } catch (e) { // expected } } function test_fieldVariable_defaultTypeMismatch_empty() { try { var fieldVariable = new Blockly.FieldVariable(null, null, ['a']); fail('Variable field creation should have failed due to an invalid ' + 'default type'); } catch (e) { // expected } } function test_fieldVariable_getVariableTypes_undefinedVariableTypes() { // Expect that since variableTypes is undefined, only type empty string // will be returned. workspace = new Blockly.Workspace(); workspace.createVariable('name1', 'type1'); workspace.createVariable('name2', 'type2'); var fieldVariable = new Blockly.FieldVariable('name1'); var resultTypes = fieldVariable.getVariableTypes_(); isEqualArrays(resultTypes, ['']); workspace.dispose(); } function test_fieldVariable_getVariableTypes_givenVariableTypes() { // Expect that since variableTypes is undefined, only type empty string // will be returned. workspace = new Blockly.Workspace(); workspace.createVariable('name1', 'type1'); workspace.createVariable('name2', 'type2'); var fieldVariable = new Blockly.FieldVariable('name1', null, ['type1', 'type2']); var resultTypes = fieldVariable.getVariableTypes_(); isEqualArrays(resultTypes, ['type1', 'type2']); workspace.dispose(); } function test_fieldVariable_getVariableTypes_nullVariableTypes() { // Expect all variable types to be returned. workspace = new Blockly.Workspace(); workspace.createVariable('name1', 'type1'); workspace.createVariable('name2', 'type2'); var fieldVariable = new Blockly.FieldVariable('name1'); var mockBlock = fieldVariable_mockBlock(workspace); fieldVariable.setSourceBlock(mockBlock); fieldVariable.variableTypes = null; var resultTypes = fieldVariable.getVariableTypes_(); isEqualArrays(resultTypes, ['type1', 'type2']); workspace.dispose(); } function test_fieldVariable_getVariableTypes_emptyListVariableTypes() { // Expect an error to be thrown. workspace = new Blockly.Workspace(); workspace.createVariable('name1', 'type1'); workspace.createVariable('name2', 'type2'); var fieldVariable = new Blockly.FieldVariable('name1'); var mockBlock = fieldVariable_mockBlock(workspace); fieldVariable.setSourceBlock(mockBlock); fieldVariable.variableTypes = []; try { fieldVariable.getVariableTypes_(); } catch (e) { //expected } finally { workspace.dispose(); }
<<<<<<< * pxt-blockly: Name of event that ends a block drag * @const */ Blockly.Events.END_DRAG = 'end_drag'; /** ======= * Name of event that creates a comment. * @const */ Blockly.Events.COMMENT_CREATE = 'comment_create'; /** * Name of event that deletes a comment. * @const */ Blockly.Events.COMMENT_DELETE = 'comment_delete'; /** * Name of event that changes a comment. * @const */ Blockly.Events.COMMENT_CHANGE = 'comment_change'; /** * Name of event that moves a comment. * @const */ Blockly.Events.COMMENT_MOVE = 'comment_move'; /** * Name of event that records a workspace load. */ Blockly.Events.FINISHED_LOADING = 'finished_loading'; /** * List of events that cause objects to be bumped back into the visible * portion of the workspace (only used for non-movable workspaces). * * Not to be confused with bumping so that disconnected connections to do * not appear connected. * @const */ Blockly.Events.BUMP_EVENTS = [ Blockly.Events.BLOCK_CREATE, Blockly.Events.BLOCK_MOVE, Blockly.Events.COMMENT_CREATE, Blockly.Events.COMMENT_MOVE ]; /** >>>>>>> * pxt-blockly: Name of event that ends a block drag * @const */ Blockly.Events.END_DRAG = 'end_drag'; /** * Name of event that creates a comment. * @const */ Blockly.Events.COMMENT_CREATE = 'comment_create'; /** * Name of event that deletes a comment. * @const */ Blockly.Events.COMMENT_DELETE = 'comment_delete'; /** * Name of event that changes a comment. * @const */ Blockly.Events.COMMENT_CHANGE = 'comment_change'; /** * Name of event that moves a comment. * @const */ Blockly.Events.COMMENT_MOVE = 'comment_move'; /** * Name of event that records a workspace load. */ Blockly.Events.FINISHED_LOADING = 'finished_loading'; /** * List of events that cause objects to be bumped back into the visible * portion of the workspace (only used for non-movable workspaces). * * Not to be confused with bumping so that disconnected connections to do * not appear connected. * @const */ Blockly.Events.BUMP_EVENTS = [ Blockly.Events.BLOCK_CREATE, Blockly.Events.BLOCK_MOVE, Blockly.Events.COMMENT_CREATE, Blockly.Events.COMMENT_MOVE ]; /** <<<<<<< lastEvent.element == 'warningOpen' || lastEvent.element == 'breakpointSet')) { // Merge click events. lastEvent.newValue = event.newValue; ======= lastEvent.element == 'warningOpen')) { // Drop click events caused by opening/closing bubbles. >>>>>>> lastEvent.element == 'warningOpen' || lastEvent.element == 'breakpointSet')) { // pxt-blockly: breakpoint icon in blocks // Drop click events caused by opening/closing bubbles. <<<<<<< case Blockly.Events.COMMENT_CREATE: event = new Blockly.Events.CommentCreate(null); break; case Blockly.Events.COMMENT_DELETE: event = new Blockly.Events.CommentDelete(null); break; case Blockly.Events.COMMENT_CHANGE: event = new Blockly.Events.CommentChange(null, ''); break; case Blockly.Events.COMMENT_MOVE: event = new Blockly.Events.CommentMove(null, ''); break; // pxt-blockly: end_drag event case Blockly.Events.END_DRAG: event = new Blockly.Events.EndBlockDrag(null, false); break; ======= case Blockly.Events.COMMENT_CREATE: event = new Blockly.Events.CommentCreate(null); break; case Blockly.Events.COMMENT_CHANGE: event = new Blockly.Events.CommentChange(null); break; case Blockly.Events.COMMENT_MOVE: event = new Blockly.Events.CommentMove(null); break; case Blockly.Events.COMMENT_DELETE: event = new Blockly.Events.CommentDelete(null); break; >>>>>>> case Blockly.Events.COMMENT_CREATE: event = new Blockly.Events.CommentCreate(null); break; case Blockly.Events.COMMENT_CHANGE: event = new Blockly.Events.CommentChange(null); break; case Blockly.Events.COMMENT_MOVE: event = new Blockly.Events.CommentMove(null); break; case Blockly.Events.COMMENT_DELETE: event = new Blockly.Events.CommentDelete(null); // pxt-blockly: end_drag event case Blockly.Events.END_DRAG: event = new Blockly.Events.EndBlockDrag(null, false); break;
<<<<<<< if (validateTimeLock) if (timeLock === undefined) ======= if(validateTimeLock) if ( !timeLock ) >>>>>>> if (validateTimeLock) if ( !timeLock ) <<<<<<< if (validateVersion) if (version === undefined){ ======= if(validateVersion) if ( !version ){ >>>>>>> if (validateVersion) if ( !version ){ <<<<<<< this.from.transaction = undefined; this.to.transaction = undefined; delete this._serializated; delete this.from.addresses; delete this.to.addresses; delete this._txId; ======= delete this._serializated; delete this.from.addresses; delete this.from.currencyTokenId; delete this.to.addresses; delete this.txId; >>>>>>> delete this._serializated; delete this.from.addresses; delete this.from.currencyTokenId; delete this.to.addresses; delete this.txId; <<<<<<< recalculateTxId(){ this._txId = this._computeTxId(); ======= get txId(){ return this._computeTxId(); >>>>>>> get txId(){ return this._computeTxId(); <<<<<<< return this._serializeTransaction(); ======= // return this._serializeTransaction(); >>>>>>> // return this._serializeTransaction();
<<<<<<< import NodesWaitlist from 'node/lists/waitlist/Nodes-Waitlist' import NodesList from 'node/lists/Nodes-List'; import PoolsUtils from "common/mining-pools/common/Pools-Utils" ======= import WebDollarCrypto from "common/crypto/WebDollar-Crypto"; >>>>>>> import NodesWaitlist from 'node/lists/waitlist/Nodes-Waitlist' import NodesList from 'node/lists/Nodes-List'; import PoolsUtils from "common/mining-pools/common/Pools-Utils" import WebDollarCrypto from "common/crypto/WebDollar-Crypto"; <<<<<<< this.NodesList = NodesList; this.NodesWaitlist = NodesWaitlist; ======= this.WebDollarCrypto = WebDollarCrypto; >>>>>>> this.NodesList = NodesList; this.NodesWaitlist = NodesWaitlist; this.WebDollarCrypto = WebDollarCrypto;
<<<<<<< if (data === undefined || data === null) ======= if ( !data ) >>>>>>> if ( !data ) <<<<<<< ======= >>>>>>> <<<<<<< async destroyBlock(){ ======= get difficultyTargetPrev(){ if (this._difficultyTargetPrev !== undefined) return this._difficultyTargetPrev; if (this.blockValidation === undefined) return this.blockchain.getDifficultyTarget(this.height); return this.blockValidation.getDifficultyCallback(this.height); } get hashPrev(){ if (this._hashPrev !== undefined) return this._hashPrev; if (this.blockValidation === undefined) return this.blockchain.getHashPrev(this.height); return this.blockValidation.getHashPrevCallback(this.height); } destroyBlock(){ >>>>>>> get difficultyTargetPrev(){ if (this._difficultyTargetPrev !== undefined) return this._difficultyTargetPrev; if (this.blockValidation === undefined) return this.blockchain.getDifficultyTarget(this.height); return this.blockValidation.getDifficultyCallback(this.height); } get hashPrev(){ if (this._hashPrev !== undefined) return this._hashPrev; if (this.blockValidation === undefined) return this.blockchain.getHashPrev(this.height); return this.blockValidation.getHashPrevCallback(this.height); } destroyBlock(){ <<<<<<< if ( this.blockValidation.blockValidationType['validation-timestamp-adjusted-time'] === true ) { if (this.timeStamp > this.blockchain.timestamp.networkAdjustedTime - BlockchainGenesis.timeStampOffset + consts.BLOCKCHAIN.TIMESTAMP.NETWORK_ADJUSTED_TIME_MAXIMUM_BLOCK_OFFSET) throw { message: "Timestamp of block is less than the network-adjusted time", timeStamp: this.timeStamp, " > ": this.blockchain.timestamp.networkAdjustedTime - BlockchainGenesis.timeStampOffset + consts.BLOCKCHAIN.TIMESTAMP.NETWORK_ADJUSTED_TIME_MAXIMUM_BLOCK_OFFSET, networkAdjustedTime: this.blockchain.timestamp.networkAdjustedTime, NETWORK_ADJUSTED_TIME_MAXIMUM_BLOCK_OFFSET: consts.BLOCKCHAIN.TIMESTAMP.NETWORK_ADJUSTED_TIME_MAXIMUM_BLOCK_OFFSET } } ======= if (!this.blockValidation.blockValidationType["skip-validation-timestamp-network-adjusted-time"]) this.blockchain.blocks.timestampBlocks.validateNetworkAdjustedTime(this.timeStamp, this.height); >>>>>>> if (!this.blockValidation.blockValidationType["skip-validation-timestamp-network-adjusted-time"]) this.blockchain.blocks.timestampBlocks.validateNetworkAdjustedTime(this.timeStamp, this.height); <<<<<<< ======= return answer; >>>>>>> return answer; <<<<<<< this.deserializeBlock(buffer, this.height, undefined, await this.blockValidation.getDifficultyCallback(this.height) ); ======= this.deserializeBlock(buffer, this.height ); >>>>>>> this.deserializeBlock(buffer, this.height );
<<<<<<< 30-09-2017 - Added Kazzak's Final Curse and Wilfred's Sigil of Superior Summoning modules. (by Chizu) ======= 30-09-2017 - Added Wakener's Loyalty, Recurrent Ritual, Sin'dorei Spite modules. (by Chizu) >>>>>>> 30-09-2017 - Added Kazzak's Final Curse and Wilfred's Sigil of Superior Summoning modules. (by Chizu) 30-09-2017 - Added Wakener's Loyalty, Recurrent Ritual, Sin'dorei Spite modules. (by Chizu)
<<<<<<< ======= textState: PropTypes.oneOf([ 'u-textIinfo', 'u-textWarning', 'u-textDanger' ]).isRequired, >>>>>>> <<<<<<< <Form className='rejections' inline> <FormGroup className='flex-grow1' controlId='formInlineCriteria'> <ControlLabel>Criteria</ControlLabel><br /> <TextInput multiline editable={isAdminMode || editable} type='text' numberOfLines={2} onChange={this.onTextChange} placeholder={criteriaPlaceholder} value={this.state.description} /> </FormGroup> <FormGroup controlId='formInlinePriority'> <ControlLabel>Priority</ControlLabel><br /> <SelectableDropdown id={criterionId + 'review-criteria-dropdown-basic'} onSelectDropdownItem={this.onPriorityChange} selectedValue={this.state.priority} title={title} valueToDisplay={priorityToDisplay} values={[MINOR, MAJOR, CRITICAL]} disabled={priorityDisabled} /> </FormGroup> {editableToggle} {formBtn} </Form> ======= <Form className='rejectionsForm' inline> <FormGroup className='flexGrow1' controlId='formInlineCriteria'> <ControlLabel>Criteria</ControlLabel><br/> <TextInput multiline={true} editable={this.props.editable} type='text' numberOfLines={2} placeholder={this.props.criteriaPlaceholder}/> </FormGroup> <FormGroup controlId='formInlinePriority'> <ControlLabel>Priority</ControlLabel><br/> <DropdownButton bsStyle='default' title={title} id='dropdown-basic'> <MenuItem><span className='u-textInfo'>Minor</span></MenuItem> <MenuItem><span className='u-textWarning'>Major</span></MenuItem> <MenuItem><span className='u-textDanger'>Critical</span></MenuItem> </DropdownButton> </FormGroup> <FormGroup controlId='formInlineButtonEdit'> <ControlLabel>&nbsp;</ControlLabel><br/> <Button bsStyle='primary' className={this.props.className}> <Icon name='edit' className='s0 iconEdit'/> </Button> <Button bsStyle='danger' className={this.props.className}> <Icon name='trash' className='s0 iconEdit'/> </Button> </FormGroup> </Form> >>>>>>> <Form className='rejectionsForm' inline> <FormGroup className='flexGrow1' controlId='formInlineCriteria'> <ControlLabel>Criteria</ControlLabel><br /> <TextInput multiline editable={isAdminMode || editable} type='text' numberOfLines={2} onChange={this.onTextChange} placeholder={criteriaPlaceholder} value={this.state.description} /> </FormGroup> <FormGroup controlId='formInlinePriority'> <ControlLabel>Priority</ControlLabel><br /> <SelectableDropdown id={criterionId + 'review-criteria-dropdown-basic'} onSelectDropdownItem={this.onPriorityChange} selectedValue={this.state.priority} title={title} valueToDisplay={priorityToDisplay} values={[MINOR, MAJOR, CRITICAL]} disabled={priorityDisabled} /> </FormGroup> {editableToggle} {formBtn} </Form>
<<<<<<< DOMAIN: "'" + process.env.DOMAIN + "'", WALLET_SECRET_URL: "'" + process.env.WALLET_SECRET_URL + "'", JSON_RPC_SERVER_HOST : process.env.JSON_RPC_SERVER_HOST ? "'" + process.env.JSON_RPC_SERVER_HOST + "'" : undefined, JSON_RPC_SERVER_PORT : process.env.JSON_RPC_SERVER_PORT, JSON_RPC_BASIC_AUTH_ENABLE: process.env.JSON_RPC_BASIC_AUTH_ENABLE, JSON_RPC_BASIC_AUTH_USER: process.env.JSON_RPC_BASIC_AUTH_USER ? "'" + process.env.JSON_RPC_BASIC_AUTH_USER + "'" : undefined, JSON_RPC_BASIC_AUTH_PASS: process.env.JSON_RPC_BASIC_AUTH_PASS ? "'" + process.env.JSON_RPC_BASIC_AUTH_PASS + "'" : undefined, JSON_RPC_RATE_LIMIT_WINDOW : process.env.JSON_RPC_RATE_LIMIT_WINDOW, JSON_RPC_RATE_LIMIT_MAX_REQUESTS: process.env.JSON_RPC_RATE_LIMIT_MAX_REQUESTS, JSON_RPC_RATE_LIMIT_ENABLE : process.env.JSON_RPC_RATE_LIMIT_ENABLE, NETWORK: "'" + (process.env.NETWORK||'') + "'", TERMINAL_WORKERS_TYPE: "'" + (process.env.TERMINAL_WORKERS_TYPE || '') + "'", TERMINAL_WORKERS_CPU_MAX: "'" + (process.env.TERMINAL_WORKERS_CPU_MAX || '') + "'", COLLECT_STATS: process.env.COLLECT_STATS, GH_COMMIT: "'" + (process.env.GH_COMMIT || '') + "'", ======= DOMAIN: "'" + (process.env.DOMAIN||'') + "'", WALLET_SECRET_URL: "'" + (process.env.WALLET_SECRET_URL||'') + "'", NETWORK: "'" + (process.env.NETWORK||'') + "'", TERMINAL_WORKERS_TYPE: "'" + (process.env.TERMINAL_WORKERS_TYPE || '') + "'", TERMINAL_WORKERS_CPU_MAX: "'" + (process.env.TERMINAL_WORKERS_CPU_MAX || '') + "'", COLLECT_STATS: process.env.COLLECT_STATS, GH_COMMIT: "'" + (process.env.GH_COMMIT || '') + "'", >>>>>>> DOMAIN: "'" + (process.env.DOMAIN||'') + "'", WALLET_SECRET_URL: "'" + (process.env.WALLET_SECRET_URL||'') + "'", JSON_RPC_SERVER_HOST : process.env.JSON_RPC_SERVER_HOST ? "'" + process.env.JSON_RPC_SERVER_HOST + "'" : undefined, JSON_RPC_SERVER_PORT : process.env.JSON_RPC_SERVER_PORT, JSON_RPC_BASIC_AUTH_ENABLE: process.env.JSON_RPC_BASIC_AUTH_ENABLE, JSON_RPC_BASIC_AUTH_USER: process.env.JSON_RPC_BASIC_AUTH_USER ? "'" + process.env.JSON_RPC_BASIC_AUTH_USER + "'" : undefined, JSON_RPC_BASIC_AUTH_PASS: process.env.JSON_RPC_BASIC_AUTH_PASS ? "'" + process.env.JSON_RPC_BASIC_AUTH_PASS + "'" : undefined, JSON_RPC_RATE_LIMIT_WINDOW : process.env.JSON_RPC_RATE_LIMIT_WINDOW, JSON_RPC_RATE_LIMIT_MAX_REQUESTS: process.env.JSON_RPC_RATE_LIMIT_MAX_REQUESTS, JSON_RPC_RATE_LIMIT_ENABLE : process.env.JSON_RPC_RATE_LIMIT_ENABLE, NETWORK: "'" + (process.env.NETWORK||'') + "'", TERMINAL_WORKERS_TYPE: "'" + (process.env.TERMINAL_WORKERS_TYPE || '') + "'", TERMINAL_WORKERS_CPU_MAX: "'" + (process.env.TERMINAL_WORKERS_CPU_MAX || '') + "'", COLLECT_STATS: process.env.COLLECT_STATS, GH_COMMIT: "'" + (process.env.GH_COMMIT || '') + "'",
<<<<<<< this.hashPrev = hashPrev||null; // 256-bit hash sha256 l - 32 bytes, sha256 this.hashChain = hashChain||null; // 256-bit hash sha256 l - 32 bytes, sha256 ======= //this._hashPrev; >>>>>>> //this._hashPrev; this.hashChain = hashChain||null; // 256-bit hash sha256 l - 32 bytes, sha256 <<<<<<< timeStamp = Math.ceil( timeStamp ); ======= timeStamp = Math.floor( timeStamp ); >>>>>>> timeStamp = Math.ceil( timeStamp ); <<<<<<< this.computedSerialization = undefined; ======= this.computedBlockPrefix = undefined; >>>>>>> this.computedSerialization = undefined; <<<<<<< ======= if (this.computedBlockPrefix === undefined) this._computeBlockHeaderPrefix(); let buffer = Buffer.concat([ Serialization.serializeBufferRemovingLeadingZeros(Serialization.serializeNumber4Bytes(this.height)), Serialization.serializeBufferRemovingLeadingZeros(this.difficultyTargetPrev), this.computedBlockPrefix, Serialization.serializeNumber4Bytes(newNonce || this.nonce), ]); >>>>>>> <<<<<<< ]); } serializeBlock( requestHeader = false ){ // serialize block is ( hash + nonce + header ) ======= this._computeBlockHeaderPrefix(true, requestHeader); >>>>>>> ]); } serializeBlock( requestHeader = false ){ // serialize block is ( hash + nonce + header ) <<<<<<< let data = this._calculateSerializedBlock(requestHeader); ======= let data = Buffer.concat( [ this.hash, Serialization.serializeNumber4Bytes( this.nonce ), this.computedBlockPrefix, ]); >>>>>>> let data = this._calculateSerializedBlock(requestHeader); <<<<<<< _deserializeBlock(buffer, offset = 0){ ======= deserializeBlock(buffer, height, reward, difficultyTargetPrev, offset = 0, blockLengthValidation = true, usePrevHash = false){ >>>>>>> _deserializeBlock(buffer, offset = 0){ <<<<<<< this.hashPrev = json.hashPrev; this.hashChain = json.hashChain; ======= >>>>>>>
<<<<<<< angular.module( 'treeControl', ['contextMenu'] ) ======= function createPath(startScope) { return function path() { var _path = []; var scope = startScope; var prevNode; while (scope && scope.node !== startScope.synteticRoot) { if (prevNode !== scope.node) _path.push(scope.node); prevNode = scope.node; scope = scope.$parent; } return _path; } } function ensureDefault(obj, prop, value) { if (!obj.hasOwnProperty(prop)) obj[prop] = value; } function defaultIsLeaf(node, $scope) { return !node[$scope.options.nodeChildren] || node[$scope.options.nodeChildren].length === 0; } function shallowCopy(src, dst) { if (angular.isArray(src)) { dst = dst || []; for (var i = 0; i < src.length; i++) { dst[i] = src[i]; } } else if (angular.isObject(src)) { dst = dst || {}; for (var key in src) { if (hasOwnProperty.call(src, key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) { dst[key] = src[key]; } } } return dst || src; } function defaultEquality(a, b,$scope) { if (!a || !b) return false; a = shallowCopy(a); a[$scope.options.nodeChildren] = []; b = shallowCopy(b); b[$scope.options.nodeChildren] = []; return angular.equals(a, b); } function defaultIsSelectable() { return true; } function ensureAllDefaultOptions($scope) { ensureDefault($scope.options, "multiSelection", false); ensureDefault($scope.options, "nodeChildren", "children"); ensureDefault($scope.options, "dirSelectable", "true"); ensureDefault($scope.options, "injectClasses", {}); ensureDefault($scope.options.injectClasses, "ul", ""); ensureDefault($scope.options.injectClasses, "li", ""); ensureDefault($scope.options.injectClasses, "liSelected", ""); ensureDefault($scope.options.injectClasses, "iExpanded", ""); ensureDefault($scope.options.injectClasses, "iCollapsed", ""); ensureDefault($scope.options.injectClasses, "iLeaf", ""); ensureDefault($scope.options.injectClasses, "label", ""); ensureDefault($scope.options.injectClasses, "labelSelected", ""); ensureDefault($scope.options, "equality", defaultEquality); ensureDefault($scope.options, "isLeaf", defaultIsLeaf); ensureDefault($scope.options, "allowDeselect", true); ensureDefault($scope.options, "isSelectable", defaultIsSelectable); } angular.module( 'treeControl', [] ) .constant('treeConfig', { templateUrl: null }) >>>>>>> function createPath(startScope) { return function path() { var _path = []; var scope = startScope; var prevNode; while (scope && scope.node !== startScope.synteticRoot) { if (prevNode !== scope.node) _path.push(scope.node); prevNode = scope.node; scope = scope.$parent; } return _path; } } function ensureDefault(obj, prop, value) { if (!obj.hasOwnProperty(prop)) obj[prop] = value; } function defaultIsLeaf(node, $scope) { return !node[$scope.options.nodeChildren] || node[$scope.options.nodeChildren].length === 0; } function shallowCopy(src, dst) { if (angular.isArray(src)) { dst = dst || []; for (var i = 0; i < src.length; i++) { dst[i] = src[i]; } } else if (angular.isObject(src)) { dst = dst || {}; for (var key in src) { if (hasOwnProperty.call(src, key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) { dst[key] = src[key]; } } } return dst || src; } function defaultEquality(a, b,$scope) { if (!a || !b) return false; a = shallowCopy(a); a[$scope.options.nodeChildren] = []; b = shallowCopy(b); b[$scope.options.nodeChildren] = []; return angular.equals(a, b); } function defaultIsSelectable() { return true; } function ensureAllDefaultOptions($scope) { ensureDefault($scope.options, "multiSelection", false); ensureDefault($scope.options, "nodeChildren", "children"); ensureDefault($scope.options, "dirSelectable", "true"); ensureDefault($scope.options, "injectClasses", {}); ensureDefault($scope.options.injectClasses, "ul", ""); ensureDefault($scope.options.injectClasses, "li", ""); ensureDefault($scope.options.injectClasses, "liSelected", ""); ensureDefault($scope.options.injectClasses, "iExpanded", ""); ensureDefault($scope.options.injectClasses, "iCollapsed", ""); ensureDefault($scope.options.injectClasses, "iLeaf", ""); ensureDefault($scope.options.injectClasses, "label", ""); ensureDefault($scope.options.injectClasses, "labelSelected", ""); ensureDefault($scope.options, "equality", defaultEquality); ensureDefault($scope.options, "isLeaf", defaultIsLeaf); ensureDefault($scope.options, "allowDeselect", true); ensureDefault($scope.options, "isSelectable", defaultIsSelectable); } angular.module( 'treeControl', ['contextMenu'] ) .constant('treeConfig', { templateUrl: null }) <<<<<<< function ensureDefault(obj, prop, value) { if (!obj.hasOwnProperty(prop)) obj[prop] = value; } ======= >>>>>>> <<<<<<< orderBy: "@", orderByExpression: "@?", ======= orderBy: "=?", >>>>>>> orderBy: "=?", <<<<<<< ensureDefault($scope.options, "multiSelection", false); ensureDefault($scope.options, "nodeChildren", "children"); ensureDefault($scope.options, "dirSelectable", "true"); ensureDefault($scope.options, "injectClasses", {}); ensureDefault($scope.options.injectClasses, "ul", ""); ensureDefault($scope.options.injectClasses, "li", ""); ensureDefault($scope.options.injectClasses, "liSelected", ""); ensureDefault($scope.options.injectClasses, "iExpanded", ""); ensureDefault($scope.options.injectClasses, "iCollapsed", ""); ensureDefault($scope.options.injectClasses, "iLeaf", ""); ensureDefault($scope.options.injectClasses, "label", ""); ensureDefault($scope.options.injectClasses, "labelSelected", ""); ensureDefault($scope.options, "equality", defaultEquality); ensureDefault($scope.options, "isLeaf", defaultIsLeaf); ensureDefault($scope.options, "allowDeselect", true); ensureDefault($scope.options, "isSelectable", defaultIsSelectable); ======= ensureAllDefaultOptions($scope); >>>>>>> ensureAllDefaultOptions($scope); <<<<<<< var orderBy = ''; if ($scope.orderByExpression) { orderBy = ' | orderBy:' + $scope.orderByExpression + ':reverseOrder'; } else if ($scope.orderBy) { orderBy = ' | orderBy:orderBy:reverseOrder'; } var rcLabel = $scope.onRightClick ? ' tree-right-click="rightClickNodeLabel(node)"' : ''; var ctxMenuId = $scope.menuId ? ' context-menu-id="'+ $scope.menuId+'"' : ''; var template = '<ul '+classIfDefined($scope.options.injectClasses.ul, true)+'>' + '<li ng-repeat="node in node.' + $scope.options.nodeChildren + ' | filter:filterExpression:filterComparator ' + orderBy + '" ng-class="headClass(node)" '+classIfDefined($scope.options.injectClasses.li, true)+'>' + ======= $scope.isReverse = function() { return !($scope.reverseOrder === 'false' || $scope.reverseOrder === 'False' || $scope.reverseOrder === '' || $scope.reverseOrder === false); }; $scope.orderByFunc = function() { return $scope.orderBy; }; // return "" + $scope.orderBy; var templateOptions = { orderBy: $scope.orderBy ? " | orderBy:orderByFunc():isReverse()" : '', ulClass: classIfDefined($scope.options.injectClasses.ul, true), nodeChildren: $scope.options.nodeChildren, liClass: classIfDefined($scope.options.injectClasses.li, true), iLeafClass: classIfDefined($scope.options.injectClasses.iLeaf, false), labelClass: classIfDefined($scope.options.injectClasses.label, false) }; var template; var templateUrl = $scope.options.templateUrl || treeConfig.templateUrl; if(templateUrl) { template = $templateCache.get(templateUrl); } if(!template) { template = '<ul {{options.ulClass}} >' + '<li ng-repeat="node in node.{{options.nodeChildren}} | filter:filterExpression:filterComparator {{options.orderBy}}" ng-class="headClass(node)" {{options.liClass}}' + 'set-node-to-data>' + >>>>>>> var rcLabel = $scope.onRightClick ? ' tree-right-click="rightClickNodeLabel(node)"' : ''; var ctxMenuId = $scope.menuId ? ' context-menu-id="'+ $scope.menuId+'"' : ''; $scope.isReverse = function() { return !($scope.reverseOrder === 'false' || $scope.reverseOrder === 'False' || $scope.reverseOrder === '' || $scope.reverseOrder === false); }; $scope.orderByFunc = function() { return $scope.orderBy; }; var templateOptions = { orderBy: $scope.orderBy ? " | orderBy:orderByFunc():isReverse()" : '', ulClass: classIfDefined($scope.options.injectClasses.ul, true), nodeChildren: $scope.options.nodeChildren, liClass: classIfDefined($scope.options.injectClasses.li, true), iLeafClass: classIfDefined($scope.options.injectClasses.iLeaf, false), labelClass: classIfDefined($scope.options.injectClasses.label, false) }; var template; var templateUrl = $scope.options.templateUrl || treeConfig.templateUrl; if(templateUrl) { template = $templateCache.get(templateUrl); } if(!template) { template = '<ul {{options.ulClass}} >' + '<li ng-repeat="node in node.{{options.nodeChildren}} | filter:filterExpression:filterComparator {{options.orderBy}}" ng-class="headClass(node)" {{options.liClass}}' + 'set-node-to-data>' + <<<<<<< '<i class="tree-leaf-head '+classIfDefined($scope.options.injectClasses.iLeaf, false)+'"></i>' + '<div class="tree-label '+classIfDefined($scope.options.injectClasses.label, false)+'" ng-class="[selectedClass(), unselectableClass()]" ng-click="selectNodeLabel(node)" ' + rcLabel + ctxMenuId + ' tree-transclude></div>' + ======= '<i class="tree-leaf-head {{options.iLeafClass}}"></i>' + '<div class="tree-label {{options.labelClass}}" ng-class="[selectedClass(), unselectableClass()]" ng-click="selectNodeLabel(node)" tree-transclude></div>' + >>>>>>> '<i class="tree-leaf-head {{options.iLeafClass}}"></i>' + '<div class="tree-label {{options.labelClass}}" ng-class="[selectedClass(), unselectableClass()]" ng-click="selectNodeLabel(node)" ' + rcLabel + ctxMenuId + ' tree-transclude></div>' + <<<<<<< }; ======= }; } }; }]) .directive("setNodeToData", ['$parse', function($parse) { return { restrict: 'A', link: function($scope, $element, $attrs) { $element.data('node', $scope.node); $element.data('scope-id', $scope.$id); >>>>>>> }; } }; }]) .directive("setNodeToData", ['$parse', function($parse) { return { restrict: 'A', link: function($scope, $element, $attrs) { $element.data('node', $scope.node); $element.data('scope-id', $scope.$id); <<<<<<< .directive("treeTransclude", function() { ======= .directive("treeTransclude", function () { >>>>>>> .directive("treeTransclude", function () {
<<<<<<< ======= if(!navigator.standalone){ alert(app.ui.messages.standalone); } >>>>>>> if(!navigator.standalone){ alert(app.ui.messages.standalone); } <<<<<<< lmx = mx; lmy = my; } var gestureBegin_scalex=1; var gestureBegin_scaley=1; function gesturestart(e){ gestureBegin_scalex=scalex; gestureBegin_scaley=scaley; e.preventDefault(); return false; } function gestureend(e){ e.preventDefault(); return false; } function gesturechange(e){ var ex=e.scale; scalex=gestureBegin_scalex*ex; scaley=gestureBegin_scaley*ex; /* var mx = ?; var my = ?; var dx=mx+cx; var dy=my-cy; if((dx*dx+dy*dy)>1000){ //Move camera towards the point if //the squared distance to the origin is more than 1000. cx=ex*(mx+cx)-mx; cy+=my+ex*(cy-my)-cy; } */ updatePTD(mx,my); draw(); e.preventDefault(); return false; } function touchmove(e){ if(e.touches.length!=1){ return; } var s=e.touches[0]; mousemove({x:s.screenX,y:s.screenY,button:0}); e.preventDefault(); return false; } function touchstart(e){ if(e.touches.length!=1){ return; } drag=true; if (!drawwhiledrag_c) { setTimeout(drawwhiledrag, 1000); drawwhiledrag_c++; } var s=e.touches[0]; lmx=s.screenX; lmy=s.screenY; } function touchend(e){ if(e.touches.length!=1){ return; } drag=false; perform_translation(); draw(); e.preventDefault(); return false; } var scaleconst = 0.001; if (/AppleWebKit/.test(navigator.userAgent)) { scaleconst = 0.0001; } ======= lmx = mx; lmy = my; } var scaleconst = 0.001; if (/AppleWebKit/.test(navigator.userAgent)) { scaleconst = 0.0001; } >>>>>>> lmx = mx; lmy = my; } var gestureBegin_scalex=1; var gestureBegin_scaley=1; function gesturestart(e){ gestureBegin_scalex=scalex; gestureBegin_scaley=scaley; e.preventDefault(); return false; } function gestureend(e){ e.preventDefault(); return false; } function gesturechange(e){ var ex=e.scale; scalex=gestureBegin_scalex*ex; scaley=gestureBegin_scaley*ex; /* var mx = ?; var my = ?; var dx=mx+cx; var dy=my-cy; if((dx*dx+dy*dy)>1000){ //Move camera towards the point if //the squared distance to the origin is more than 1000. cx=ex*(mx+cx)-mx; cy+=my+ex*(cy-my)-cy; } */ updatePTD(mx,my); draw(); e.preventDefault(); return false; } function touchmove(e){ if(e.touches.length!=1){ return; } var s=e.touches[0]; mousemove({x:s.screenX,y:s.screenY,button:0}); e.preventDefault(); return false; } function touchstart(e){ if(e.touches.length!=1){ return; } drag=true; if (!drawwhiledrag_c) { setTimeout(drawwhiledrag, 1000); drawwhiledrag_c++; } var s=e.touches[0]; lmx=s.screenX; lmy=s.screenY; } function touchend(e){ if(e.touches.length!=1){ return; } drag=false; perform_translation(); draw(); e.preventDefault(); return false; } var scaleconst = 0.001; if (/AppleWebKit/.test(navigator.userAgent)) { scaleconst = 0.0001; }
<<<<<<< import { BaseScraper, LOGIN_RESULT } from './base-scraper'; import { waitForRedirect } from '../helpers/navigation'; import { NORMAL_TXN_TYPE, TRANSACTION_STATUS } from '../constants'; ======= import { BaseScraperWithBrowser, LOGIN_RESULT } from './base-scraper-with-browser'; import { waitForRedirect, getCurrentUrl } from '../helpers/navigation'; import { NORMAL_TXN_TYPE } from '../constants'; >>>>>>> import { BaseScraperWithBrowser, LOGIN_RESULT } from './base-scraper-with-browser'; import { waitForRedirect, getCurrentUrl } from '../helpers/navigation'; import { NORMAL_TXN_TYPE, TRANSACTION_STATUS } from '../constants';
<<<<<<< case SERVICES_REFUND_TYPE_CODE: ======= case MEMBERSHIP_FEE_TYPE_CODE: case SERVICES_TYPE_CODE: >>>>>>> case SERVICES_REFUND_TYPE_CODE: case MEMBERSHIP_FEE_TYPE_CODE: case SERVICES_TYPE_CODE:
<<<<<<< // If there is already an instance, activate the window in the existing instance and quit this one if (app.makeSingleInstance((commandLine/*, workingDirectory*/) => { ======= // If there is already an instance, activate the window in the existing instace and quit this one const gotTheLock = app.requestSingleInstanceLock(); if (!gotTheLock) { app.exit(); global.willAppQuit = true; } app.on('second-instance', (event, secondArgv) => { >>>>>>> // If there is already an instance, activate the window in the existing instance and quit this one const gotTheLock = app.requestSingleInstanceLock(); if (!gotTheLock) { app.exit(); global.willAppQuit = true; } app.on('second-instance', (event, secondArgv) => {
<<<<<<< // unreadCount in sidebar ======= // count in sidebar // Note: the active channel doesn't have '.unread-title'. >>>>>>> // unreadCount in sidebar // Note: the active channel doesn't have '.unread-title'. <<<<<<< // mentionCount in sidebar var elem = document.getElementsByClassName('badge') var mentionCount = 0; for (var i = 0; i < elem.length; i++) { if (elem[i].offsetHeight != 0) { mentionCount++; } } // unreadCount for active channel var newSeparators = document.getElementsByClassName('new-separator'); var post; for (var i = 0; i < newSeparators.length; i++) { if (newSeparators[i].offsetParent !== null) { unreadCount += 1; post = newSeparators[i]; } } // mentionCount for active channel if (post != null) { while (post = post.nextSibling) { var highlight = post.getElementsByClassName('mention-highlight'); if (highlight.length != 0 && highlight[0].offsetHeight != null) { mentionCount++; break; } } } if (this.unreadCount != unreadCount || this.mentionCount != mentionCount) { ipc.sendToHost('onUnreadCountChange', unreadCount, mentionCount); ======= if (this.count != unreadCount) { ipc.sendToHost('onUnreadCountChange', unreadCount); >>>>>>> // mentionCount in sidebar var elem = document.getElementsByClassName('badge') var mentionCount = 0; for (var i = 0; i < elem.length; i++) { if (elem[i].offsetHeight != 0) { mentionCount++; } } // unreadCount for active channel var newSeparators = document.getElementsByClassName('new-separator'); var post; for (var i = 0; i < newSeparators.length; i++) { if (newSeparators[i].offsetParent !== null) { post = newSeparators[i]; } } // mentionCount for active channel if (post != null) { while (post = post.nextSibling) { var highlight = post.getElementsByClassName('mention-highlight'); if (highlight.length != 0 && highlight[0].offsetHeight != null) { mentionCount++; break; } } } if (this.unreadCount != unreadCount || this.mentionCount != mentionCount) { ipc.sendToHost('onUnreadCountChange', unreadCount, mentionCount);
<<<<<<< const open = require('open'); const openIdClient = require('openid-client'); const superagent = require('superagent'); const { promisify } = require('util'); ======= const mkdirp = require('mkdirp'); const Handlebars = require('handlebars'); >>>>>>> const open = require('open'); const openIdClient = require('openid-client'); const superagent = require('superagent'); const { promisify } = require('util'); const pkg = require('../package.json'); const applicationTokenDeserializer = require('../deserializers/application-token'); const applicationTokenSerializer = require('../serializers/application-token'); const Api = require('../services/api'); const ApplicationTokenService = require('../services/application-token'); const mkdirp = require('mkdirp'); const Handlebars = require('handlebars'); <<<<<<< const pkg = require('../package.json'); const applicationTokenDeserializer = require('../deserializers/application-token'); const applicationTokenSerializer = require('../serializers/application-token'); const Api = require('../services/api'); const ApplicationTokenService = require('../services/application-token'); ======= const Dumper = require('../services/dumper'); >>>>>>> const Dumper = require('../services/dumper'); <<<<<<< * superagent: import('superagent'); * fsAsync: fsAsync; ======= * Handlebars: import('handlebars'); >>>>>>> * superagent: import('superagent'); * fsAsync: fsAsync; * Handlebars: import('handlebars'); <<<<<<< context.addInstance('superagent', superagent); context.addInstance('fsAsync', fsAsync); ======= context.addInstance('Handlebars', Handlebars); >>>>>>> context.addInstance('superagent', superagent); context.addInstance('fsAsync', fsAsync); context.addInstance('Handlebars', Handlebars);
<<<<<<< }, itemsBindings:{ custom:function (context) { glu.provider.itemsHelper.bindItems(context); } ======= }, isChildArray : function(propName, value){ return propName==='editors' || propName==='items'; }, itemsBindings : { custom : function(context) { glu.provider.itemsHelper.bindItems(context, true); } >>>>>>> }, itemsBindings:{ custom:function (context) { glu.provider.itemsHelper.bindItems(context); } }, isChildArray : function(propName, value){ return propName==='editors' || propName==='items';
<<<<<<< var delta = 0; // screenDelta without the scale var screenDelta = 0; ======= var deltaX = 0; var deltaY = 0; >>>>>>> var deltaX = 0; var deltaY = 0; // screenDelta without the scale var screenDelta = 0; <<<<<<< // Compute move distance delta = x - this.startX; screenDelta = pointer.screenX - this.screenX; // It`s a fast tap not move if ( this.now - this.beginTime < this.thresholdOfTapTime && Math.abs(screenDelta) < this.thresholdOfTapDistance ) { return; } if (delta !== 0) { this.dragging = true; } ======= deltaX = x - this.startX; //Compute move distance if (deltaX !== 0) this.dragging = true; >>>>>>> // It`s a fast tap not move screenDelta = pointer.screenX - this.screenX; if ( this.now - this.beginTime < this.thresholdOfTapTime && Math.abs(screenDelta) < this.thresholdOfTapDistance ) { return; } deltaX = x - this.startX; if (deltaX !== 0) { this.dragging = true; } <<<<<<< // Compute move distance delta = y - this.startY; screenDelta = pointer.screenY - this.screenY; // It`s a fast tap not move if ( this.now - this.beginTime < this.thresholdOfTapTime && Math.abs(screenDelta) < this.thresholdOfTapDistance ) { return; } if (delta !== 0) { this.dragging = true; } ======= deltaY = y - this.startY; //Compute move distance if (deltaY !== 0) this.dragging = true; >>>>>>> // It`s a fast tap not move screenDelta = pointer.screenY - this.screenY; if ( this.now - this.beginTime < this.thresholdOfTapTime && Math.abs(screenDelta) < this.thresholdOfTapDistance ) { return; } deltaY = y - this.startY; if (deltaY !== 0) { this.dragging = true; }
<<<<<<< deltaWheel: 40, button: "", ======= deltaWheel: 40, onUpdate: null >>>>>>> deltaWheel: 40, onUpdate: null, button: "" <<<<<<< Phaser.Plugin.KineticScrolling.prototype.beginMove = function (context, pointer) { if (this.settings.button && pointer.button !== Phaser.Mouse[this.settings.button]) { return; } ======= Phaser.Plugin.KineticScrolling.prototype.beginMove = function (pointer) { >>>>>>> Phaser.Plugin.KineticScrolling.prototype.beginMove = function (pointer) { if (this.settings.button && pointer.button !== Phaser.Mouse[this.settings.button]) { return; } <<<<<<< ======= clearTimeout(this.clearMovementTimer); this.pointerId = null; >>>>>>> clearTimeout(this.clearMovementTimer); this.pointerId = null; <<<<<<< if (this.settings.horizontalWheel && this.velocityWheelXAbs > 0.1) { ======= if (this.settings.horizontalWheel && this.velocityWheelXAbs > 0.1) { >>>>>>> if (this.settings.horizontalWheel && this.velocityWheelXAbs > 0.1) {
<<<<<<< }; $scope.$watch('pageSettings.currentPage', function (newPage) { $scope.blade.refresh(); }); $scope.selectNode = function (node) { selectedNode = node; $scope.selectedNodeId = selectedNode.id; var newBlade = { id: 'operationDetail', title: selectedNode.customer + '\'s Customer Order', subtitle: 'Edit order details and related documents', customerOrder: selectedNode, controller: 'virtoCommerce.orderModule.operationDetailController', template: 'Modules/$(VirtoCommerce.Orders)/Scripts/blades/customerOrder-detail.tpl.html' }; bladeNavigationService.showBlade(newBlade, $scope.blade); }; $scope.checkAll = function (selected) { angular.forEach($scope.objects, function (item) { item.selected = selected; }); }; function deleteChecked() { var dialog = { id: "confirmDeleteItem", title: "Delete confirmation", message: "Are you sure you want to delete selected customer orders?", callback: function (remove) { if (remove) { closeChildrenBlades(); var selection = $scope.gridApi.selection.getSelectedRows(); var itemIds = _.pluck(selection, 'id'); order_res_customerOrders.remove({ ids: itemIds }, function (data, headers) { $scope.blade.refresh(); }, ======= }; $scope.$watch('pageSettings.currentPage', function (newPage) { $scope.blade.refresh(); }); $scope.selectNode = function (node) { selectedNode = node; $scope.selectedNodeId = selectedNode.id; var newBlade = { id: 'operationDetail', title: 'orders.blades.customerOrder-detail.title', titleValues: { customer: selectedNode.customerName }, subtitle: 'orders.blades.customerOrder-detail.subtitle', customerOrder: selectedNode, controller: 'virtoCommerce.orderModule.operationDetailController', template: 'Modules/$(VirtoCommerce.Orders)/Scripts/blades/customerOrder-detail.tpl.html' }; bladeNavigationService.showBlade(newBlade, $scope.blade); }; $scope.checkAll = function (selected) { angular.forEach($scope.objects, function (item) { item.selected = selected; }); }; function isItemsChecked() { return $scope.objects && _.any($scope.objects, function (x) { return x.selected; }); } function deleteChecked() { var dialog = { id: "confirmDeleteItem", title: "orders.dialogs.orders-delete.title", message: "orders.dialogs.orders-delete.message", callback: function (remove) { if (remove) { closeChildrenBlades(); var selection = _.where($scope.objects, { selected: true }); var itemIds = _.pluck(selection, 'id'); order_res_customerOrders.remove({ ids: itemIds }, function (data, headers) { $scope.blade.refresh(); }, >>>>>>> }; $scope.$watch('pageSettings.currentPage', function (newPage) { $scope.blade.refresh(); }); $scope.selectNode = function (node) { selectedNode = node; $scope.selectedNodeId = selectedNode.id; var newBlade = { id: 'operationDetail', title: 'orders.blades.customerOrder-detail.title', titleValues: { customer: selectedNode.customerName }, subtitle: 'orders.blades.customerOrder-detail.subtitle', customerOrder: selectedNode, controller: 'virtoCommerce.orderModule.operationDetailController', template: 'Modules/$(VirtoCommerce.Orders)/Scripts/blades/customerOrder-detail.tpl.html' }; bladeNavigationService.showBlade(newBlade, $scope.blade); }; $scope.checkAll = function (selected) { angular.forEach($scope.objects, function (item) { item.selected = selected; }); }; function deleteChecked() { var dialog = { id: "confirmDeleteItem", title: "orders.dialogs.orders-delete.title", message: "orders.dialogs.orders-delete.message", callback: function (remove) { if (remove) { closeChildrenBlades(); var selection = $scope.gridApi.selection.getSelectedRows(); var itemIds = _.pluck(selection, 'id'); order_res_customerOrders.remove({ ids: itemIds }, function (data, headers) { $scope.blade.refresh(); }, <<<<<<< name: "Refresh", icon: 'fa fa-refresh', executeMethod: function () { $scope.blade.refresh(); }, canExecuteMethod: function () { return true; } ======= name: "platform.commands.refresh", icon: 'fa fa-refresh', executeMethod: function () { $scope.blade.refresh(); }, canExecuteMethod: function () { return true; } >>>>>>> name: "platform.commands.refresh", icon: 'fa fa-refresh', executeMethod: function () { $scope.blade.refresh(); }, canExecuteMethod: function () { return true; } <<<<<<< name: "Delete", icon: 'fa fa-trash-o', executeMethod: function () { deleteChecked(); }, canExecuteMethod: function () { return $scope.gridApi && _.any($scope.gridApi.selection.getSelectedRows()); }, permission: 'order:delete' ======= name: "platform.commands.delete", icon: 'fa fa-trash-o', executeMethod: function () { deleteChecked(); }, canExecuteMethod: function () { return isItemsChecked(); }, permission: 'order:delete' >>>>>>> name: "platform.commands.delete", icon: 'fa fa-trash-o', executeMethod: function () { deleteChecked(); }, canExecuteMethod: function () { return $scope.gridApi && _.any($scope.gridApi.selection.getSelectedRows()); }, permission: 'order:delete'
<<<<<<< ['$stateProvider', '$httpProvider', 'uiSelectConfig', 'datepickerConfig', '$provide', 'uiGridConstants', function ($stateProvider, $httpProvider, uiSelectConfig, datepickerConfig, $provide, uiGridConstants) { ======= ['$stateProvider', '$httpProvider', 'uiSelectConfig', 'datepickerConfig', '$translateProvider', function ($stateProvider, $httpProvider, uiSelectConfig, datepickerConfig, $translateProvider) { >>>>>>> ['$stateProvider', '$httpProvider', 'uiSelectConfig', 'datepickerConfig', '$provide', 'uiGridConstants', '$translateProvider', function ($stateProvider, $httpProvider, uiSelectConfig, datepickerConfig, $provide, uiGridConstants, $translateProvider) { <<<<<<< $provide.decorator('GridOptions', function ($delegate) { var gridOptions = angular.copy($delegate); gridOptions.initialize = function (options) { var initOptions = $delegate.initialize(options); angular.extend(initOptions, { data: _.any(initOptions.data) ? initOptions.data : 'blade.currentEntities', rowHeight: initOptions.rowHeight === 30 ? 40 : initOptions.rowHeight, enableGridMenu: true, enableVerticalScrollbar: uiGridConstants.scrollbars.NEVER, //enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER, //selectionRowHeaderWidth: 35, saveFocus: false, saveFilter: false, savePinning: false, saveSelection: false }); return initOptions; }; return gridOptions; }); ======= //Localization $translateProvider.useUrlLoader('api/platform/localization') .useLoaderCache(true) .useSanitizeValueStrategy('escapeParameters') .preferredLanguage('en') .fallbackLanguage('en'); >>>>>>> $provide.decorator('GridOptions', function ($delegate) { var gridOptions = angular.copy($delegate); gridOptions.initialize = function (options) { var initOptions = $delegate.initialize(options); angular.extend(initOptions, { data: _.any(initOptions.data) ? initOptions.data : 'blade.currentEntities', rowHeight: initOptions.rowHeight === 30 ? 40 : initOptions.rowHeight, enableGridMenu: true, enableVerticalScrollbar: uiGridConstants.scrollbars.NEVER, //enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER, //selectionRowHeaderWidth: 35, saveFocus: false, saveFilter: false, savePinning: false, saveSelection: false }); return initOptions; }; return gridOptions; }); //Localization $translateProvider.useUrlLoader('api/platform/localization') .useLoaderCache(true) .useSanitizeValueStrategy('escapeParameters') .preferredLanguage('en') .fallbackLanguage('en');
<<<<<<< controller('platformWebApp.appCtrl', ['$rootScope', '$scope', '$window', 'platformWebApp.pushNotificationService', '$translate', '$timeout', 'platformWebApp.modules', '$state', 'platformWebApp.bladeNavigationService', 'platformWebApp.settings', 'platformWebApp.settings.helper', function ($rootScope, $scope, $window, pushNotificationService, $translate, $timeout, modules, $state, bladeNavigationService, settings, settingsHelper) { ======= controller('platformWebApp.appCtrl', ['$scope', '$window', 'platformWebApp.mainMenuService', 'platformWebApp.pushNotificationService', '$translate', '$timeout', 'platformWebApp.modules', '$state', 'platformWebApp.bladeNavigationService', 'platformWebApp.settings', 'platformWebApp.settings.helper', function ($scope, $window, mainMenuService, pushNotificationService, $translate, $timeout, modules, $state, bladeNavigationService, settings, settingsHelper) { >>>>>>> controller('platformWebApp.appCtrl', ['$rootScope', '$scope', '$window', 'platformWebApp.mainMenuService', 'platformWebApp.pushNotificationService', '$translate', '$timeout', 'platformWebApp.modules', '$state', 'platformWebApp.bladeNavigationService', 'platformWebApp.settings', 'platformWebApp.settings.helper', function ($rootScope, $scope, $window, mainMenuService, pushNotificationService, $translate, $timeout, modules, $state, bladeNavigationService, settings, settingsHelper) {
<<<<<<< var objectAssign = require('object-assign'); var PluginError = require('plugin-error'); ======= var gutil = require('gulp-util'); >>>>>>> var PluginError = require('plugin-error'); <<<<<<< options = objectAssign({}, options, {fileName: file.path}); done(new PluginError('gulp-htmlmin', err, options)); ======= options = Object.assign({}, options, {fileName: file.path}); done(new gutil.PluginError('gulp-htmlmin', err, options)); >>>>>>> options = Object.assign({}, options, {fileName: file.path}); done(new PluginError('gulp-htmlmin', err, options));
<<<<<<< // Bind UI WinStats.onRequestUpdate = onRequestStatUpdate; Equipment.onUnEquip = onUnEquip; Equipment.onConfigUpdate = onConfigUpdate; Equipment.onEquipItem = onEquipItem; Equipment.onRemoveOption = onRemoveOption; Inventory.onUseItem = onUseItem; Inventory.onEquipItem = onEquipItem; Escape.onExitRequest = onExitRequest; Escape.onCharSelectionRequest = onRestartRequest; Escape.onReturnSavePointRequest = onReturnSavePointRequest; Escape.onResurectionRequest = onResurectionRequest; ChatBox.onRequestTalk = onRequestTalk; ======= Guild.prepare(); >>>>>>> Guild.prepare(); // Bind UI WinStats.onRequestUpdate = onRequestStatUpdate; Equipment.onUnEquip = onUnEquip; Equipment.onConfigUpdate = onConfigUpdate; Equipment.onEquipItem = onEquipItem; Equipment.onRemoveOption = onRemoveOption; Inventory.onUseItem = onUseItem; Inventory.onEquipItem = onEquipItem; Escape.onExitRequest = onExitRequest; Escape.onCharSelectionRequest = onRestartRequest; Escape.onReturnSavePointRequest = onReturnSavePointRequest; Escape.onResurectionRequest = onResurectionRequest; ChatBox.onRequestTalk = onRequestTalk;
<<<<<<< pattern.originalArrayText = pattern.arrayText.slice( 0 ) ======= pattern.originalArrayText = pattern.arrayText.slice( 0 ) >>>>>>> pattern.originalArrayText = pattern.arrayText.slice( 0 ) <<<<<<< console.log("PROPERTY NAME", propertyName, "VD", valuesOrDurations ) ======= >>>>>>> <<<<<<< markArray( values, caller, object.name, patternName, pos, cm ) pattern.cm = cm pattern.update = createUpdateFunction( caller, patternName, 'rgba(255,255,255,1)' ) Notation.add( pattern, false ) ======= markArray( values, object, caller, object.name, patternName, pos, cm, src ) >>>>>>> markArray( values, object, caller, object.name, patternName, pos, cm, src ) <<<<<<< changed:[], clear: function() { for( var i = 0; i < this.changed.length; i++ ) { this.changed[i].arrayText = this.changed[i].originalArrayText var mark = this.changed[i].arrayMark.find() this.changed[i].cm.replaceRange( this.changed[i].arrayText, mark.from, mark.to ) } this.changed.length = 0 this.dirty.length = 0 }, ======= changed:[], clear: function() { for( var i = 0; i < this.changed.length; i++ ) { this.changed[i].arrayText = this.changed[i].originalArrayText var mark = !this.changed[i].arrayMark ? this.changed[i].values[0].arrayMark.find() : this.changed[i].arrayMark.find() this.changed[i].cm.replaceRange( this.changed[i].arrayText, mark.from, mark.to ) } this.changed.length = 0 this.dirty.length = 0 }, >>>>>>> changed:[], clear: function() { for( var i = 0; i < this.changed.length; i++ ) { this.changed[i].arrayText = this.changed[i].originalArrayText var mark = !this.changed[i].arrayMark ? this.changed[i].values[0].arrayMark.find() : this.changed[i].arrayMark.find() this.changed[i].cm.replaceRange( this.changed[i].arrayText, mark.from, mark.to ) } this.changed.length = 0 this.dirty.length = 0 },
<<<<<<< listeners.onMessage.forEach(l => l(message, sender, callback)); store.dispatch.notCalled.should.eql(true); }, ); it( 'should send a safety message to all tabs once initialized', function () { const tabs = [123,456,789,1011,1213]; const tabResponders = []; const store = { dispatch: sinon.spy(), }; global.chrome = { runtime: { onMessage: { addListener: () => {}, }, onMessageExternal: { addListener: () => {}, }, onConnect: { addListener: () => {}, }, onConnectExternal: { addListener: () => {}, }, }, tabs: { query: (tabObject, cb) => { cb(tabs); }, sendMessage: (tabId) => { tabResponders.push(tabId); } } }; wrapStore(store, {portName}); tabResponders.length.should.equal(5); }, ); ======= sinon.stub(store, 'getState') .onFirstCall().returns(firstState) .onSecondCall().returns(secondState); // Mock the port object for onConnect and spy on postMessage const port = { name: portName, postMessage: sinon.spy(), onDisconnect: { addListener: () => ({}) } }; // Create a fake diff strategy const diffStrategy = (oldObj, newObj) => ([{ type: 'FAKE_DIFF', oldObj, newObj }]); wrapStore(store, {portName, diffStrategy}); // Simulate a port connection with the mocked port listeners.onConnect.forEach(l => l(port)); // Simulate a state update by calling subscribers subscribers.forEach(subscriber => subscriber()); const expectedPatchMessage = { type: PATCH_STATE_TYPE, payload: diffStrategy(firstState, secondState) }; port.postMessage.calledTwice.should.eql(true); port.postMessage.secondCall.args[0].should.eql(expectedPatchMessage); }); describe("when validating options", function () { const store = { dispatch: sinon.spy(), }; it('should throw an error if portName is not present', function () { should.throws(() => { wrapStore(store, {}); }, Error); }); it('should throw an error if serializer is not a function', function () { should.throws(() => { wrapStore(store, { portName, serializer: "abc" }); }, Error); }); it('should throw an error if deserializer is not a function', function () { should.throws(() => { wrapStore(store, {portName, deserializer: "abc"}); }, Error); }); it('should throw an error if diffStrategy is not a function', function () { should.throws(() => { wrapStore(store, {portName, diffStrategy: "abc"}); }, Error); }); }); >>>>>>> listeners.onMessage.forEach(l => l(message, sender, callback)); store.dispatch.notCalled.should.eql(true); }, ); it( 'should send a safety message to all tabs once initialized', function () { const tabs = [123,456,789,1011,1213]; const tabResponders = []; const store = { dispatch: sinon.spy(), }; global.chrome = { runtime: { onMessage: { addListener: () => {}, }, onMessageExternal: { addListener: () => {}, }, onConnect: { addListener: () => {}, }, onConnectExternal: { addListener: () => {}, }, }, tabs: { query: (tabObject, cb) => { cb(tabs); }, sendMessage: (tabId) => { tabResponders.push(tabId); } } }; wrapStore(store, {portName}); tabResponders.length.should.equal(5); }, ); sinon.stub(store, 'getState') .onFirstCall().returns(firstState) .onSecondCall().returns(secondState); // Mock the port object for onConnect and spy on postMessage const port = { name: portName, postMessage: sinon.spy(), onDisconnect: { addListener: () => ({}) } }; // Create a fake diff strategy const diffStrategy = (oldObj, newObj) => ([{ type: 'FAKE_DIFF', oldObj, newObj }]); wrapStore(store, {portName, diffStrategy}); // Simulate a port connection with the mocked port listeners.onConnect.forEach(l => l(port)); // Simulate a state update by calling subscribers subscribers.forEach(subscriber => subscriber()); const expectedPatchMessage = { type: PATCH_STATE_TYPE, payload: diffStrategy(firstState, secondState) }; port.postMessage.calledTwice.should.eql(true); port.postMessage.secondCall.args[0].should.eql(expectedPatchMessage); }); describe("when validating options", function () { const store = { dispatch: sinon.spy(), }; it('should throw an error if portName is not present', function () { should.throws(() => { wrapStore(store, {}); }, Error); }); it('should throw an error if serializer is not a function', function () { should.throws(() => { wrapStore(store, { portName, serializer: "abc" }); }, Error); }); it('should throw an error if deserializer is not a function', function () { should.throws(() => { wrapStore(store, {portName, deserializer: "abc"}); }, Error); }); it('should throw an error if diffStrategy is not a function', function () { should.throws(() => { wrapStore(store, {portName, diffStrategy: "abc"}); }, Error); }); });
<<<<<<< async getLimit(limit) { let result = 25 if (!isNaN(limit) && limit > 0) result = limit return result }, async getOffset(page, limit) { let result = 0 if (!isNaN(page) && page > 0) result = (page - 1) * limit return result }, async getOrder(orderBy) { let result if (!isEmpty(orderBy)) { result = [] let fields = orderBy.split(',') fields.forEach(field => { if (field.trim().charAt(0) !== '-') { result.push([field.trim(), 'ASC']) } else { result.push([field.trim().substr(1), 'DESC']) } }) } return result ======= async setLimit(limit) { let result = 25 if (!isNaN(limit) && limit > 0) result = limit return result }, async setOffset(page, limit) { let result = 0 if (!isNaN(page) && page > 0) result = (page - 1) * limit return result }, async parseOrder(orderBy) { let result = [['createdAt', 'DESC']] if (!isEmpty(orderBy)) { result = [] const fields = orderBy.split(',') fields.forEach(field => { if (field.trim().charAt(0) !== '-') { result.push([field.trim(), 'ASC']) } else { result.push([field.trim().substr(1), 'DESC']) } }) >>>>>>> async getLimit(limit) { let result = 25 if (!isNaN(limit) && limit > 0) result = limit return result }, async getOffset(page, limit) { let result = 0 if (!isNaN(page) && page > 0) result = (page - 1) * limit return result }, async getOrder(orderBy) { let result if (!isEmpty(orderBy)) { result = [] const fields = orderBy.split(',') fields.forEach(field => { if (field.trim().charAt(0) !== '-') { result.push([field.trim(), 'ASC']) } else { result.push([field.trim().substr(1), 'DESC']) } })
<<<<<<< // Payment URLS stripePay: '/orders/completeCheckoutUsingCard', ======= // Categories List categoriesUrl: '/ui/productCategoryList', >>>>>>> // Payment URLS stripePay: '/orders/completeCheckoutUsingCard', // Categories List categoriesUrl: '/ui/productCategoryList',
<<<<<<< //console.log("html:" + element.attr('html')); ======= // console.log("html:" + element.attr('html')); >>>>>>> <<<<<<< ======= >>>>>>>
<<<<<<< return RepositoryUrl + "resource"; ======= var segment = repoPathUrl() + "/resource"; return encodeURI(Saiku.session.username + segment); >>>>>>> var segment = repoPathUrl() + "/resource"; return segment; <<<<<<< return RepositoryUrl + "/resource/acl"; ======= var segment = repoPathUrl() + "/resource/acl"; return encodeURI(Saiku.session.username + segment); >>>>>>> var segment = repoPathUrl() + "/resource/acl"; return segment; <<<<<<< return RepositoryUrl + "/zip"; ======= var segment = repoPathUrl() + "/resource/zip"; return encodeURI(Saiku.session.username) + segment; >>>>>>> var segment = repoPathUrl() + "/resource/zip"; return segment; <<<<<<< return RepositoryUrl + "/resource"; ======= var u = encodeURI(Saiku.session.username) + repoPathUrl() + "/resource"; return u; >>>>>>> var u = repoPathUrl() + "/resource"; return u; <<<<<<< return RepositoryUrl + "?type=saiku"; ======= var segment = repoPathUrl() + "?type=saiku"; return encodeURI(Saiku.session.username + segment); >>>>>>> var segment = repoPathUrl() + "?type=saiku"; return segment;
<<<<<<< ======= const JSONStream = require("JSONStream"); const { Transform } = require("stream"); const { spawn } = require("child_process"); const { logMemory } = require(path.resolve(__dirname, "utils")); >>>>>>> const JSONStream = require("JSONStream"); const { Transform } = require("stream"); const { spawn } = require("child_process"); const { logMemory } = require(path.resolve(__dirname, "utils")); <<<<<<< class Prefixy { constructor() {} static extractPrefixes(completion) { const prefixes = []; completion = completion.toLowerCase(); for (let i = 1; i <= completion.length; i++) { prefixes.push(completion.slice(0, i)); } return prefixes; } async invoke(cb) { this.client = redis.createClient(); const result = await cb(); this.client.quit(); return result; } importFile(filePath) { let json; let data; try { json = fs.readFileSync(path.resolve(process.cwd(), filePath), "utf-8"); data = JSON.parse(json); } catch (e) { return e.message; ======= const byteSize = (str) => { return String(Buffer.byteLength(String(str), "utf8")); }; const toRedisProtocol = (command) => { let protocol = ""; protocol += "*" + String(command.length) + "\r\n" command.forEach(arg => { protocol += "$" + byteSize(arg) + "\r\n"; protocol += String(arg) + "\r\n"; }); // console.log(protocol); return protocol; }; const translator = new Transform({ objectMode: true, transform(item, encoding, callback) { const completion = item.completion || item; const score = item.score || 0; const prefixes = this.extractPrefixes(completion); let chunk = ""; // logging fn here prefixes.forEach(prefix => chunk += toRedisProtocol(['zadd', prefix, -score, completion]) ); callback(null, chunk); } }); // exported functions module.exports = { client: client, extractPrefixes: function(completion) { const prefixes = []; completion = completion.toLowerCase(); for (let i = 1; i <= completion.length; i++) { prefixes.push(completion.slice(0, i)); >>>>>>> const byteSize = (str) => { return String(Buffer.byteLength(String(str), "utf8")); }; const toRedisProtocol = (command) => { let protocol = ""; protocol += "*" + String(command.length) + "\r\n" command.forEach(arg => { protocol += "$" + byteSize(arg) + "\r\n"; protocol += String(arg) + "\r\n"; }); // console.log(protocol); return protocol; }; const translator = new Transform({ objectMode: true, transform(item, encoding, callback) { const completion = item.completion || item; const score = item.score || 0; const prefixes = Prefixy.extractPrefixes(completion); let chunk = ""; // logging fn here prefixes.forEach(prefix => chunk += toRedisProtocol(['zadd', prefix, -score, completion]) ); callback(null, chunk); } }); class Prefixy { constructor() {} static extractPrefixes(completion) { const prefixes = []; completion = completion.toLowerCase(); for (let i = 1; i <= completion.length; i++) { prefixes.push(completion.slice(0, i)); <<<<<<< this.insertCompletions(data); } ======= json.pipe(parser).pipe(translator).pipe(redis.stdin); }, >>>>>>> json.pipe(parser).pipe(translator).pipe(redis.stdin); } <<<<<<< insertCompletions(array) { validateInputIsArray(array, "insertCompletions"); ======= insertCompletions: function(array) { // validateInputIsArray(array, "insertCompletions"); >>>>>>> insertCompletions(array) { validateInputIsArray(array, "insertCompletions"); <<<<<<< } search(prefixQuery, opts={}) { ======= }, search: function(prefixQuery, opts={}) { >>>>>>> } search(prefixQuery, opts={}) { <<<<<<< dynamicIncrementScore(completion) { const prefixes = Prefixy.extractPrefixes(completion); ======= dynamicIncrementScore: function(completion, limit) { if (limit >= 0) { return this.dynamicBucketIncrementScore(completion, limit); } const prefixes = this.extractPrefixes(completion); >>>>>>> dynamicIncrementScore(completion, limit) { if (limit >= 0) { return this.dynamicBucketIncrementScore(completion, limit); } const prefixes = Prefixy.extractPrefixes(completion); <<<<<<< } } module.exports = new Prefixy(); ======= }, dynamicBucketIncrementScore: async function(completion, limit) { const prefixes = this.extractPrefixes(completion); const commands = []; let count; let last; for (var i = 0; i < prefixes.length; i++) { count = await this.client.zcountAsync(prefixes[i], '-inf', '+inf'); if (count >= limit) { last = await this.client.zrangeAsync(prefixes[i], limit - 1, limit - 1, 'WITHSCORES'); newScore = last[1] - 1; commands.push(['zremrangebyrank', prefixes[i], limit - 1, -1]); commands.push(['zadd', prefixes[i], newScore, completion]); } else { commands.push(['zincrby', prefixes[i], -1, completion]); } } return this.client.batch(commands).execAsync(); }, }; >>>>>>> } async dynamicBucketIncrementScore(completion, limit) { const prefixes = Prefixy.extractPrefixes(completion); const commands = []; let count; let last; for (var i = 0; i < prefixes.length; i++) { count = await this.client.zcountAsync(prefixes[i], '-inf', '+inf'); if (count >= limit) { last = await this.client.zrangeAsync(prefixes[i], limit - 1, limit - 1, 'WITHSCORES'); newScore = last[1] - 1; commands.push(['zremrangebyrank', prefixes[i], limit - 1, -1]); commands.push(['zadd', prefixes[i], newScore, completion]); } else { commands.push(['zincrby', prefixes[i], -1, completion]); } } return this.client.batch(commands).execAsync(); } } module.exports = new Prefixy();
<<<<<<< componentWillReceiveProps (nextProps) { if (this.props.inputFocus !== nextProps.inputFocus) { this.input.focus() } ======= componentWillReceiveProps(nextProps) { >>>>>>> componentWillReceiveProps(nextProps) { if (this.props.inputFocus !== nextProps.inputFocus) { this.input.focus() } <<<<<<< onChange: PropTypes.func, caseSensitive: PropTypes.bool, sortResults: PropTypes.bool, fuzzy: PropTypes.bool, throttle: PropTypes.number, filterKeys: PropTypes.oneOf([ PropTypes.string, PropTypes.arrayOf(PropTypes.string) ]), value: PropTypes.string, inputClearIcon: PropTypes.node, textInputViewStyles: PropTypes.object, onSubmitEditing: PropTypes.func, inputFocus: PropTypes.bool, } ======= onChange: PropTypes.func, caseSensitive: PropTypes.bool, sortResults: PropTypes.bool, fuzzy: PropTypes.bool, throttle: PropTypes.number, filterKeys: PropTypes.oneOf([ PropTypes.string, PropTypes.arrayOf(PropTypes.string) ]), value: PropTypes.string, clearIcon: PropTypes.node, clearIconViewStyles: PropTypes.object, inputViewStyles: PropTypes.object } >>>>>>> onChange: PropTypes.func, caseSensitive: PropTypes.bool, sortResults: PropTypes.bool, fuzzy: PropTypes.bool, throttle: PropTypes.number, filterKeys: PropTypes.oneOf([ PropTypes.string, PropTypes.arrayOf(PropTypes.string) ]), value: PropTypes.string, clearIcon: PropTypes.node, inputViewStyles: PropTypes.object, onSubmitEditing: PropTypes.func, inputFocus: PropTypes.bool, clearIconViewStyles: PropTypes.object, }
<<<<<<< drag: function(event) { this.sendAction('dragMoveAction', event); }, dragOver: function(event) { ======= dragOver(event) { >>>>>>> drag: function(event) { this.sendAction('dragMoveAction', event); }, dragOver(event) {