conflict_resolution
stringlengths
27
16k
<<<<<<< ======= this.refreshRate = options.refreshRate || 10; this.interval = options.interval || 30; this.invert = options.invert || false; >>>>>>> this.refreshRate = options.refreshRate || 10; this.interval = options.interval || 30; this.invert = options.invert || false; <<<<<<< ======= var drawInterval = Math.max(1 / this.refreshRate * 1000, this.interval); /** * A function to draw the image onto the canvas. */ >>>>>>> var drawInterval = Math.max(1 / this.refreshRate * 1000, this.interval); /** * A function to draw the image onto the canvas. */ <<<<<<< // silly firefox... if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { that.image.src = that.image.src; } ======= // silly firefox... if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { var aux = that.image.src.split('?killcache='); that.image.src = aux[0] + '?killcache=' + Math.random(42); } >>>>>>> // silly firefox... if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { var aux = that.image.src.split('?killcache='); that.image.src = aux[0] + '?killcache=' + Math.random(42); } <<<<<<< // redraw the image every 30ms setInterval(draw, 30); ======= // call draw with the given interval or rate setInterval(draw, drawInterval); >>>>>>> // call draw with the given interval or rate setInterval(draw, drawInterval);
<<<<<<< 'backbone' : 'JsLibraries/backbone', 'moment' : 'JsLibraries/moment', 'filesize' : 'JsLibraries/filesize', 'handlebars' : 'JsLibraries/handlebars.runtime', 'handlebars.helpers' : 'JsLibraries/handlebars.helpers', 'bootstrap' : 'JsLibraries/bootstrap', 'backbone.deepmodel' : 'JsLibraries/backbone.deep.model', 'backbone.pageable' : 'JsLibraries/backbone.pageable', 'backbone.validation' : 'JsLibraries/backbone.validation', 'backbone.modelbinder': 'JsLibraries/backbone.modelbinder', 'backgrid' : 'JsLibraries/backbone.backgrid', 'backgrid.paginator' : 'JsLibraries/backbone.backgrid.paginator', 'backgrid.selectall' : 'JsLibraries/backbone.backgrid.selectall', 'fullcalendar' : 'JsLibraries/fullcalendar', 'backstrech' : 'JsLibraries/jquery.backstretch', 'underscore' : 'JsLibraries/lodash.underscore', 'marionette' : 'JsLibraries/backbone.marionette', 'signalR' : 'JsLibraries/jquery.signalR', 'jquery.knob' : 'JsLibraries/jquery.knob', 'jquery.easypiechart' : 'JsLibraries/jquery.easypiechart', 'jquery.dotdotdot' : 'JsLibraries/jquery.dotdotdot', 'messenger' : 'JsLibraries/messenger', 'jquery' : 'JsLibraries/jquery', 'libs' : 'JsLibraries/', ======= 'backbone' : 'JsLibraries/backbone', 'moment' : 'JsLibraries/moment', 'filesize' : 'JsLibraries/filesize', 'handlebars' : 'JsLibraries/handlebars.runtime', 'handlebars.helpers' : 'JsLibraries/handlebars.helpers', 'bootstrap' : 'JsLibraries/bootstrap', 'backbone.deepmodel' : 'JsLibraries/backbone.deep.model', 'backbone.pageable' : 'JsLibraries/backbone.pageable', 'backbone.validation' : 'JsLibraries/backbone.validation', 'backbone.modelbinder' : 'JsLibraries/backbone.modelbinder', 'backbone.collectionview' : 'JsLibraries/backbone.collectionview', 'backgrid' : 'JsLibraries/backbone.backgrid', 'backgrid.paginator' : 'JsLibraries/backbone.backgrid.paginator', 'backgrid.selectall' : 'JsLibraries/backbone.backgrid.selectall', 'fullcalendar' : 'JsLibraries/fullcalendar', 'backstrech' : 'JsLibraries/jquery.backstretch', 'underscore' : 'JsLibraries/lodash.underscore', 'marionette' : 'JsLibraries/backbone.marionette', 'signalR' : 'JsLibraries/jquery.signalR', 'jquery-ui' : 'JsLibraries/jquery-ui', 'jquery.knob' : 'JsLibraries/jquery.knob', 'jquery.dotdotdot' : 'JsLibraries/jquery.dotdotdot', 'messenger' : 'JsLibraries/messenger', 'jquery' : 'JsLibraries/jquery', 'libs' : 'JsLibraries/', >>>>>>> 'backbone' : 'JsLibraries/backbone', 'moment' : 'JsLibraries/moment', 'filesize' : 'JsLibraries/filesize', 'handlebars' : 'JsLibraries/handlebars.runtime', 'handlebars.helpers' : 'JsLibraries/handlebars.helpers', 'bootstrap' : 'JsLibraries/bootstrap', 'backbone.deepmodel' : 'JsLibraries/backbone.deep.model', 'backbone.pageable' : 'JsLibraries/backbone.pageable', 'backbone.validation' : 'JsLibraries/backbone.validation', 'backbone.modelbinder' : 'JsLibraries/backbone.modelbinder', 'backbone.collectionview' : 'JsLibraries/backbone.collectionview', 'backgrid' : 'JsLibraries/backbone.backgrid', 'backgrid.paginator' : 'JsLibraries/backbone.backgrid.paginator', 'backgrid.selectall' : 'JsLibraries/backbone.backgrid.selectall', 'fullcalendar' : 'JsLibraries/fullcalendar', 'backstrech' : 'JsLibraries/jquery.backstretch', 'underscore' : 'JsLibraries/lodash.underscore', 'marionette' : 'JsLibraries/backbone.marionette', 'signalR' : 'JsLibraries/jquery.signalR', 'jquery-ui' : 'JsLibraries/jquery-ui', 'jquery.knob' : 'JsLibraries/jquery.knob', 'jquery.easypiechart' : 'JsLibraries/jquery.easypiechart', 'jquery.dotdotdot' : 'JsLibraries/jquery.dotdotdot', 'messenger' : 'JsLibraries/messenger', 'jquery' : 'JsLibraries/jquery', 'libs' : 'JsLibraries/',
<<<<<<< bower = require('gulp-bower'), babel = require('gulp-babel') ======= bower = require('gulp-bower'), browserSync = require('browser-sync').create(); >>>>>>> bower = require('gulp-bower'), babel = require('gulp-babel') browserSync = require('browser-sync').create(); <<<<<<< .pipe(babel({ presets: ['es2015'] })) ======= .pipe(sourcemaps.init()) >>>>>>> .pipe(babel({ presets: ['es2015'] })) .pipe(sourcemaps.init())
<<<<<<< } export const UserPasswordAgreementLink = 'https://google.com' ======= } export default { EPOCH, Transactions } >>>>>>> } export default { EPOCH, Transactions } export const UserPasswordAgreementLink = 'https://google.com'
<<<<<<< if ( statement.start > lastEnd ) code.remove( lastEnd, statement.start ); if ( nextSeparator ) { code.appendLeft( lastStatement ? lastStatement.getRightHandSide().end : lastEnd, nextSeparator ); ======= if ( !statement.collapsed ) { if ( nextSeparator === '' ) { if ( statement.start > lastEnd ) code.remove( lastEnd, statement.start ); } else { if ( statement.start === lastEnd ) { code.appendLeft( lastEnd, separator ); } else { if ( code.original.slice( lastEnd, statement.start ) !== nextSeparator ) { code.overwrite( lastEnd, statement.start, nextSeparator ); } } } if ( statement.removed ) { nextSeparator = ''; } else { nextSeparator = endsWithCurlyBrace( statement ) ? '' : separator; } >>>>>>> if ( !statement.collapsed ) { if ( statement.start > lastEnd ) code.remove( lastEnd, statement.start ); if ( nextSeparator ) { code.appendLeft( lastStatement ? lastStatement.getRightHandSide().end : lastEnd, nextSeparator ); } if ( statement.removed ) { nextSeparator = ''; } else { nextSeparator = endsWithCurlyBrace( statement ) ? '' : separator; } <<<<<<< if ( statement.removed ) { nextSeparator = ''; } else { nextSeparator = endsWithCurlyBrace( statement ) ? '' : separator; } lastStatement = statement; ======= >>>>>>> if ( statement.removed ) { nextSeparator = ''; } else { nextSeparator = endsWithCurlyBrace( statement ) ? '' : separator; } lastStatement = statement; <<<<<<< // combine adjacent var declarations lastStatement = null; for ( let statement of statements ) { if ( lastStatement && lastStatement.type === 'VariableDeclaration' && statement.type === 'VariableDeclaration' ) { // are they compatible? if ( compatibleDeclarations( lastStatement.kind, statement.kind ) ) { const lastDeclarator = lastStatement.declarations[ lastStatement.declarations.length - 1 ]; code.overwrite( lastDeclarator.end, statement.declarations[0].start, ',' ); statement.collapsed = true; } } if ( !statement.collapsed && statement.kind === 'const' && ( !lastStatement || lastStatement.kind !== 'VariableDeclaration' ) ) { code.overwrite( statement.start, statement.start + 5, 'let' ); } lastStatement = statement; } ======= >>>>>>>
<<<<<<< ======= // Create and Save a new sneaker >>>>>>> <<<<<<< ======= // Retrieve and return all sneaker from the database. /* exports.findAll = (req, res) => { >>>>>>> <<<<<<< var findSneakerById = function(sneakerId, done) { Sneaker.find({styleID:sneakerId},(err,data)=>{ if(err) return done(err) return done(null,data) }) }; /* // Update a note identified by the noteId in the request ======= /* // Update a sneaker identified by the sneaker in the request >>>>>>> var findSneakerById = function(sneakerId, done) { Sneaker.find({styleID:sneakerId},(err,data)=>{ if(err) return done(err) return done(null,data) }) }; /* // Update a note identified by the noteId in the request
<<<<<<< function createClient(channelName, lastEditSeen) { ======= function createClient(channelName) { >>>>>>> function createClient(channelName, lastEditSeen) { <<<<<<< chan.lastEditSeen = lastEditSeen ======= >>>>>>> chan.lastEditSeen = lastEditSeen
<<<<<<< if (m.kind === 'kicked') { E2.app.growl('You have been disconnected by the server: '+ m.reason,'disconnected', '', 30000) ======= if (m.kind === 'kicked') { // kicked by server E2.app.growl('You have been disconnected by the server: '+ m.reason, 30000) >>>>>>> if (m.kind === 'kicked') { // kicked by server E2.app.growl('You have been disconnected by the server: '+ m.reason,'disconnected', '', 30000)
<<<<<<< this.connectEditorChannel(function() { ======= this.channel = new EditorChannel(this) this.channel.on('ready', function() { that.channel.join(that.path) that.peopleStore.initialize() that.setupMouseMirroring() that.setupStoreListeners() >>>>>>> this.connectEditorChannel(function() { that.peopleStore.initialize() that.setupMouseMirroring() that.setupStoreListeners()
<<<<<<< function returnErrors(errors) { if (wantJson) return res.status(400).json(errors) req.flash('errors', errors) return res.redirect('/login') ======= if (errors) { req.flash('errors', parseErrors(errors)) return res.redirect('/login') >>>>>>> function returnErrors(errors, status) { if (wantJson) return res.status(status || 400).json(errors) req.flash('errors', errors) return res.redirect('/login') <<<<<<< if (err) return returnErrors([{ message: err.toString() }]) req.flash('success', { message: 'Success! You are logged in.' }) ======= if (err) return next(err) req.flash('success', { message: 'Success! You are logged in.' }) >>>>>>> if (err) return returnErrors([{ message: err.toString() }]) req.flash('success', { message: 'Success! You are logged in.' }) <<<<<<< res.redirect(req.session.returnTo || '/account') }) })(req, res, next) } ======= res.redirect(req.session.returnTo || '/account') }) })(req, res, next) } >>>>>>> res.redirect(req.session.returnTo || '/account') }) })(req, res, next) } <<<<<<< req.flash('errors', parseErrors(errors)); return res.redirect('/account'); ======= req.flash('errors', parseErrors(errors)) console.log(errors) return res.redirect('/account') >>>>>>> req.flash('errors', parseErrors(errors)) return res.redirect('/account')
<<<<<<< if (THREEx.FullScreen.activated()) { E2.core.emit('resize') ======= console.log('onWindowResize', THREEx.FullScreen.activated()) if (THREEx.FullScreen.activated()) { E2.core.emit('resize') >>>>>>> if (THREEx.FullScreen.activated()) { E2.core.emit('resize') <<<<<<< Application.prototype.toggleFullscreen = function() { console.log('E2.app.toggleFullscreen') if (!THREEx.FullScreen.activated()) { THREEx.FullScreen.request(E2.dom.webgl_canvas[0]) E2.core.emit('fullScreenChanged') } else { THREEx.FullScreen.cancel() E2.core.emit('fullScreenChanged') } } Application.prototype.onFullScreenChanged = function() { var $canvas = E2.dom.webgl_canvas if (THREEx.FullScreen.activated()) { $canvas.removeClass('webgl-canvas-normal') $canvas.addClass('webgl-canvas-fs') } else { $canvas.removeClass('webgl-canvas-fs') $canvas.addClass('webgl-canvas-normal') } E2.app.onWindowResize() } ======= Application.prototype.toggleFullscreen = function() { if (!THREEx.FullScreen.activated()) THREEx.FullScreen.request(E2.dom.webgl_canvas[0]) else THREEx.FullScreen.cancel() } Application.prototype.onFullScreenChanged = function() { var $canvas = E2.dom.webgl_canvas if (THREEx.FullScreen.activated()) { $canvas.removeClass('webgl-canvas-normal') $canvas.addClass('webgl-canvas-fs') } else { $canvas.removeClass('webgl-canvas-fs') $canvas.addClass('webgl-canvas-normal') } E2.app.onWindowResize() } >>>>>>> Application.prototype.toggleFullscreen = function() { if (!THREEx.FullScreen.activated()) { THREEx.FullScreen.request(E2.dom.webgl_canvas[0]) } else { THREEx.FullScreen.cancel() } } Application.prototype.onFullScreenChanged = function() { var $canvas = E2.dom.webgl_canvas if (THREEx.FullScreen.activated()) { $canvas.removeClass('webgl-canvas-normal') $canvas.addClass('webgl-canvas-fs') } else { $canvas.removeClass('webgl-canvas-fs') $canvas.addClass('webgl-canvas-normal') } E2.app.onWindowResize() }
<<<<<<< return kuzzle.repositories.role.searchRole(request.input.body && request.input.body.controllers, request.input.args) ======= checkSearchPageLimit(request, kuzzle.config.limits.documentsFetchCount); return kuzzle.repositories.role.searchRole(request) >>>>>>> checkSearchPageLimit(request, kuzzle.config.limits.documentsFetchCount); return kuzzle.repositories.role.searchRole(request.input.body && request.input.body.controllers, request.input.args)
<<<<<<< const SolidityCoder = require("web3/lib/solidity/coder.js"); const Web3 = require("web3"); ======= import Web3 from 'web3'; let web3 = new Web3(); let sha3 = web3.utils.sha3; let BN = web3.utils.BN; >>>>>>> const Web3 = require("web3"); let web3 = new Web3(); let sha3 = web3.utils.sha3; let BN = web3.utils.BN; <<<<<<< savedABIs : [], methodIDs: {} }; ======= savedABIs: [], methodIDs: {}, }; >>>>>>> savedABIs: [], methodIDs: {}, }; <<<<<<< return "0x" + formatted; } ======= retData.params.push({ name: abiItem.inputs[i].name, value: parsedParam, type: abiItem.inputs[i].type, }); } return retData; } } >>>>>>> retData.params.push({ name: abiItem.inputs[i].name, value: parsedParam, type: abiItem.inputs[i].type, }); } return retData; } }
<<<<<<< constructor(props) { super(props); this.setAssetUploadReference = this.setAssetUploadReference.bind(this); } ======= >>>>>>> <<<<<<< setAssetUploadReference(ref) { if (ref === null) { this.assetUpload = null; return; } this.assetUpload = ref.getWrappedInstance(); ======= setDropDownRef = ref => { this.dropzone = ref; >>>>>>> setAssetUploadReference = ref => { if (ref === null) { this.assetUpload = null; return; } this.assetUpload = ref.getWrappedInstance();
<<<<<<< toggled: new Set(), ======= uncollapsed: new Set([$get('cr.nodes.siteNode', state)]), hidden: new Set(), intermediate: new Set(), >>>>>>> toggled: new Set(), hidden: new Set(), intermediate: new Set(),
<<<<<<< import Float from './Float/index'; ======= import Count from './Count/index'; >>>>>>> import Float from './Float/index'; import Count from './Count/index'; <<<<<<< validatorRegistry.add('Neos.Neos/Validation/FloatValidator', Float); ======= validatorRegistry.add('Neos.Neos/Validation/CountValidator', Count); >>>>>>> validatorRegistry.add('Neos.Neos/Validation/FloatValidator', Float); validatorRegistry.add('Neos.Neos/Validation/CountValidator', Count);
<<<<<<< execute: sinon.stub().returns(Promise.resolve(foo)), initHttpRouter: sinon.spy(), newConnection: sinon.stub().returns(Promise.resolve(foo)), ======= execute: sinon.stub().resolves(foo), init: sinon.spy(), newConnection: sinon.stub().resolves(foo), >>>>>>> execute: sinon.stub().returns(Promise.resolve(foo)), init: sinon.spy(), newConnection: sinon.stub().returns(Promise.resolve(foo)),
<<<<<<< import React from 'react'; import SelectBox from '@neos-project/react-ui-components/lib/SelectBox/'; ======= import React, {PropTypes} from 'react'; import {SelectBox} from 'Components'; >>>>>>> import React, {PropTypes} from 'react'; import SelectBox from '@neos-project/react-ui-components/lib/SelectBox/';
<<<<<<< <Icon icon="power-off" aria-hidden="true" className={style.dropDown__itemIcon}/> <I18n id="logout" fallback="Logout"/> ======= <Icon icon="power-off" className={style.dropDown__itemIcon}/> <I18n id="logout" sourceName="Main" packageKey="Neos.Neos" fallback="Logout"/> >>>>>>> <Icon icon="power-off" aria-hidden="true" className={style.dropDown__itemIcon}/> <I18n id="logout" sourceName="Main" packageKey="Neos.Neos" fallback="Logout"/> <<<<<<< <Icon icon="wrench" aria-hidden="true" className={style.dropDown__itemIcon}/> <I18n id="userSettings_label" sourceName="Modules" fallback="User Settings"/> ======= <Icon icon="wrench" className={style.dropDown__itemIcon}/> <I18n id="userSettings.label" sourceName="Modules" packageKey="Neos.Neos" fallback="User Settings"/> >>>>>>> <Icon icon="wrench" aria-hidden="true" className={style.dropDown__itemIcon}/> <I18n id="userSettings.label" sourceName="Modules" packageKey="Neos.Neos" fallback="User Settings"/>
<<<<<<< import Label from './Label/index'; ======= import EmailAddress from './EmailAddress/index'; import Integer from './Integer/index'; import Alphanumeric from './Alphanumeric/index'; import Float from './Float/index'; import Count from './Count/index'; >>>>>>> import Label from './Label/index'; import EmailAddress from './EmailAddress/index'; import Integer from './Integer/index'; import Alphanumeric from './Alphanumeric/index'; import Float from './Float/index'; import Count from './Count/index'; <<<<<<< validatorRegistry.add('Neos.Neos/Validation/LabelValidator', Label); ======= validatorRegistry.add('Neos.Neos/Validation/EmailAddressValidator', EmailAddress); validatorRegistry.add('Neos.Neos/Validation/IntegerValidator', Integer); validatorRegistry.add('Neos.Neos/Validation/AlphanumericValidator', Alphanumeric); >>>>>>> validatorRegistry.add('Neos.Neos/Validation/LabelValidator', Label); validatorRegistry.add('Neos.Neos/Validation/EmailAddressValidator', EmailAddress); validatorRegistry.add('Neos.Neos/Validation/IntegerValidator', Integer); validatorRegistry.add('Neos.Neos/Validation/AlphanumericValidator', Alphanumeric);
<<<<<<< const MediaSelectionScreen = (props) => { const {SecondaryInspector} = window['@Neos:HostPluginAPI']; ======= const MediaSelectionScreen = props => { >>>>>>> const MediaSelectionScreen = props => { const {SecondaryInspector} = window['@Neos:HostPluginAPI'];
<<<<<<< import String from './String/index'; import StringLength from './StringLength/index'; ======= import Text from './Text/index'; >>>>>>> import String from './String/index'; import StringLength from './StringLength/index'; import Text from './Text/index'; <<<<<<< validatorRegistry.add('Neos.Neos/Validation/StringValidator', String); validatorRegistry.add('Neos.Neos/Validation/StringLengthValidator', StringLength); ======= validatorRegistry.add('Neos.Neos/Validation/FloatValidator', Float); validatorRegistry.add('Neos.Neos/Validation/CountValidator', Count); validatorRegistry.add('Neos.Neos/Validation/NotEmptyValidator', NotEmpty); validatorRegistry.add('Neos.Neos/Validation/NumberRangeValidator', NumberRange); validatorRegistry.add('Neos.Neos/Validation/TextValidator', Text); >>>>>>> validatorRegistry.add('Neos.Neos/Validation/StringValidator', String); validatorRegistry.add('Neos.Neos/Validation/StringLengthValidator', StringLength); validatorRegistry.add('Neos.Neos/Validation/FloatValidator', Float); validatorRegistry.add('Neos.Neos/Validation/CountValidator', Count); validatorRegistry.add('Neos.Neos/Validation/NotEmptyValidator', NotEmpty); validatorRegistry.add('Neos.Neos/Validation/NumberRangeValidator', NumberRange); validatorRegistry.add('Neos.Neos/Validation/TextValidator', Text);
<<<<<<< ======= import shallowCompare from 'react-addons-shallow-compare'; import SecondaryInspector from 'Host/Extensibility/API/SecondaryInspector'; >>>>>>> import shallowCompare from 'react-addons-shallow-compare';
<<<<<<< VM.runInThisContext(FS.readFileSync(bemhtmlFile, 'utf-8')); return BEMHTML.apply(VM.runInThisContext(FS.readFileSync(bemjsonFile, 'utf-8'))); }; exports.getDependencies = function() { return ['bemjson.js', 'bemhtml.js']; ======= vm.runInThisContext(fs.readFileSync(bemhtmlFile, 'utf-8')); return BEMHTML.apply(vm.runInThisContext(fs.readFileSync(bemjsonFile, 'utf-8'))); }; exports.getDependencies = function() { return ['bemjson.js', 'bemhtml.js']; >>>>>>> VM.runInThisContext(FS.readFileSync(bemhtmlFile, 'utf-8')); return BEMHTML.apply(VM.runInThisContext(FS.readFileSync(bemjsonFile, 'utf-8'))); }; exports.getDependencies = function() { return ['bemjson.js', 'bemhtml.js']; }; exports.getDependencies = function() { return ['bemjson.js', 'bemhtml.js'];
<<<<<<< var mkdirp = require('mkdirp'); ======= var _ = require('underscore'); >>>>>>> var mkdirp = require('mkdirp'); var _ = require('underscore'); <<<<<<< checkOutputDir(); if (options.sync) { if (!syncFinished) { throw new Error('Problem attempting synchronous examine.'); } else { origCb(syncError, syncResult); } ======= ], function (err, result) { if (err) { return cb(err); >>>>>>> checkOutputDir(); if (options.sync) { if (!syncFinished) { throw new Error('Problem attempting synchronous examine.'); } else { origCb(syncError, syncResult); }
<<<<<<< ======= this.friction = 0.05; // velocity lost per milisecond >>>>>>> this.friction = 0.05; // velocity lost per milisecond <<<<<<< var eye = this.camera.position.clone().sub(this.target); var right = eye.clone().cross( this.camera.up ); var up = right.clone().cross(eye); var pan = (new THREE.Vector3()).addVectors( right.setLength( this.panSpeed*mouseChange.x ), up.setLength( this.panSpeed*mouseChange.y )); this.camera.position.add( pan ); this.target.add( pan ); ======= this.panxvel_init = this.panSpeed * mouseChange.x; this.panyvel_init = this.panSpeed * mouseChange.y; this.setpan( this.panSpeed * mouseChange.x, this.panSpeed * mouseChange.y ); }, setpan: function( x, y ) { var eye = this.camera.position.clone().subSelf(this.target); var right = eye.clone().crossSelf( this.camera.up ); var up = right.clone().crossSelf(eye); var pan = (new THREE.Vector3()).add( right.setLength( x ), up.setLength( y )); this.camera.position.addSelf( pan ); this.target.addSelf( pan ); >>>>>>> var eye = this.camera.position.clone().sub(this.target); var right = eye.clone().cross( this.camera.up ); var up = right.clone().cross(eye); var pan = (new THREE.Vector3()).addVectors( right.setLength( this.panSpeed*mouseChange.x ), up.setLength( this.panSpeed*mouseChange.y )); this.camera.position.add( pan ); this.target.add( pan ); this.panxvel_init = this.panSpeed * mouseChange.x; this.panyvel_init = this.panSpeed * mouseChange.y; this.pan( this.panSpeed * mouseChange.x, this.panSpeed * mouseChange.y );
<<<<<<< /** * Defines utilities that are used throughout the spotcheck pages */ angular.module('open.spotcheck', ['open.core', 'smart-table', 'diff-match-patch']) .factory('SpotcheckMismatchIgnoreAPI', ['$resource', mismatchIgnoreApi]) .factory('SpotcheckMismatchTrackingAPI', ['$resource', mismatchTrackingApi]) .factory('SpotcheckMismatchDeleteAllAPI', ['$resource', mismatchDeleteAllApi]) .filter('contentType', contentTypefilter) .filter('dataSourceRef', dataSourceRefFilter) .filter('dataSourceData', dataSourceDataFilter) .filter('contentUrl', contentUrlFilter) .filter('referenceUrl', referenceUrlFilter) .filter('isOLRef', isOLRefFilter) .directive('mismatchDiff', ['$timeout', mismatchDiffDirective]) ; /* --- Constants --- */ /** * Maps datasource to relevant labels * todo integrate into spotcheck-report-page.js * todo add labels to datasource java enum and pull from there */ var dataSourceMap = { LBDC: { comparisonLabel: 'LBDC - OpenLegislation', refLabel: 'LBDC', dataLabel: 'Open Legislation' }, NYSENATE: { comparisonLabel: 'OpenLegislation - NYSenate.gov', refLabel: 'Open Legislation', dataLabel: 'NYSenate.gov', olRef: true }, OPENLEG: { comparisonLabel: 'Openlegislation Ref - Openlegislaton Source', refLabel: 'Open Legislation Ref', dataLabel: 'Open Legislation Source' } }; ======= (function () { /** * Defines utilities that are used throughout the spotcheck pages */ angular.module('open.spotcheck', ['open.core', 'smart-table', 'diff-match-patch']) .factory('SpotcheckMismatchIgnoreAPI', ['$resource', mismatchIgnoreApi]) .factory('SpotcheckMismatchTrackingAPI', ['$resource', mismatchTrackingApi]) .factory('SpotcheckMismatchDeleteAllAPI', ['$resource', mismatchDeleteAllApi]) .filter('contentType', contentTypefilter) .filter('mismatchType', mismatchTypeFilter) .filter('dataSourceRef', dataSourceRefFilter) .filter('dataSourceData', dataSourceDataFilter) .filter('contentUrl', contentUrlFilter) .filter('referenceUrl', referenceUrlFilter) .filter('isOLRef', isOLRefFilter) .directive('mismatchDiff', ['$timeout', mismatchDiffDirective]) ; /* --- Constants --- */ /** * Maps datasource to relevant labels * todo integrate into spotcheck-report-page.js * todo add labels to datasource java enum and pull from there */ var dataSourceMap = { LBDC: { comparisonLabel: 'LBDC - OpenLegislation', refLabel: 'LBDC', dataLabel: 'OpenLeg' }, NYSENATE: { comparisonLabel: 'OpenLegislation - NYSenate.gov', refLabel: 'OpenLeg', dataLabel: 'NYSenate.gov', olRef: true } }; >>>>>>> (function () { /** * Defines utilities that are used throughout the spotcheck pages */ angular.module('open.spotcheck', ['open.core', 'smart-table', 'diff-match-patch']) .factory('SpotcheckMismatchIgnoreAPI', ['$resource', mismatchIgnoreApi]) .factory('SpotcheckMismatchTrackingAPI', ['$resource', mismatchTrackingApi]) .factory('SpotcheckMismatchDeleteAllAPI', ['$resource', mismatchDeleteAllApi]) .filter('contentType', contentTypefilter) .filter('mismatchType', mismatchTypeFilter) .filter('dataSourceRef', dataSourceRefFilter) .filter('dataSourceData', dataSourceDataFilter) .filter('contentUrl', contentUrlFilter) .filter('referenceUrl', referenceUrlFilter) .filter('isOLRef', isOLRefFilter) .directive('mismatchDiff', ['$timeout', mismatchDiffDirective]) ; /* --- Constants --- */ /** * Maps datasource to relevant labels * todo integrate into spotcheck-report-page.js * todo add labels to datasource java enum and pull from there */ var dataSourceMap = { LBDC: { comparisonLabel: 'LBDC - OpenLegislation', refLabel: 'LBDC', dataLabel: 'OpenLeg' }, NYSENATE: { comparisonLabel: 'OpenLegislation - NYSenate.gov', refLabel: 'OpenLeg', dataLabel: 'NYSenate.gov', olRef: true }, OPENLEG: { comparisonLabel: 'Openlegislation Ref - Openlegislaton Source', refLabel: 'Open Legislation Ref', dataLabel: 'Open Legislation Source' } }; <<<<<<< function mismatchDeleteAllApi($resource) { return $resource(adminApiPath + "/spotcheck/mismatch/:mismatchId/delete", { mismatchId: '@mismatchId' }); } /* --- Filters --- */ function contentTypefilter() { var contentTypeMap = { LBDC_AGENDA_ALERT: "Agenda", LBDC_DAYBREAK: "Bill", LBDC_CALENDAR_ALERT: "Floor Cal", LBDC_SCRAPED_BILL: "Bill", SENATE_SITE_BILLS: "Bill", SENATE_SITE_CALENDAR: "Calendar", OPENLEG_BILL: "Bill", OPENLEG_CAL: "Calendar", OPENLEG_AGENDA: "Agenda" }; return function(reportType) { if (contentTypeMap.hasOwnProperty(reportType)) { return contentTypeMap[reportType]; ======= function mismatchDeleteAllApi($resource) { return $resource(adminApiPath + "/spotcheck/mismatch/:mismatchId/delete", { mismatchId: '@mismatchId' }); } /* --- Filters --- */ function contentTypefilter() { var contentTypeMap = { LBDC_AGENDA_ALERT: "Agenda", LBDC_DAYBREAK: "Bill", LBDC_CALENDAR_ALERT: "Floor Cal", LBDC_SCRAPED_BILL: "Bill", SENATE_SITE_BILLS: "Bill", SENATE_SITE_CALENDAR: "Calendar" }; return function (reportType) { if (contentTypeMap.hasOwnProperty(reportType)) { return contentTypeMap[reportType]; } return "Content"; }; } function mismatchTypeFilter() { var mismatchTypeMap = angular.copy(window.mismatchMap); // Map of mismatch type to data source property containing proper label var missingTypes = { 'REFERENCE_DATA_MISSING': 'refLabel', 'OBSERVE_DATA_MISSING': 'dataLabel' }; return function (mismatchType, dataSource) { if (!mismatchTypeMap.hasOwnProperty(mismatchType)) { console.error('Unknown mismatch type:', mismatchType); return "Unknown MM Type!"; } // If mismatch is for data missing, display the data source from which it was missing if (dataSource && missingTypes.hasOwnProperty(mismatchType)) { return "Missing: " + dataSourceMap[dataSource][missingTypes[mismatchType]]; } return mismatchTypeMap[mismatchType]; >>>>>>> function mismatchDeleteAllApi($resource) { return $resource(adminApiPath + "/spotcheck/mismatch/:mismatchId/delete", { mismatchId: '@mismatchId' }); } /* --- Filters --- */ function contentTypefilter() { var contentTypeMap = { LBDC_AGENDA_ALERT: "Agenda", LBDC_DAYBREAK: "Bill", LBDC_CALENDAR_ALERT: "Floor Cal", LBDC_SCRAPED_BILL: "Bill", SENATE_SITE_BILLS: "Bill", SENATE_SITE_CALENDAR: "Calendar", OPENLEG_BILL: "Bill", OPENLEG_CAL: "Calendar", OPENLEG_AGENDA: "Agenda" }; return function(reportType) { if (contentTypeMap.hasOwnProperty(reportType)) { return contentTypeMap[reportType]; } return "Content"; }; } function mismatchTypeFilter() { var mismatchTypeMap = angular.copy(window.mismatchMap); // Map of mismatch type to data source property containing proper label var missingTypes = { 'REFERENCE_DATA_MISSING': 'refLabel', 'OBSERVE_DATA_MISSING': 'dataLabel' }; return function (mismatchType, dataSource) { if (!mismatchTypeMap.hasOwnProperty(mismatchType)) { console.error('Unknown mismatch type:', mismatchType); return "Unknown MM Type!"; } // If mismatch is for data missing, display the data source from which it was missing if (dataSource && missingTypes.hasOwnProperty(mismatchType)) { return "Missing: " + dataSourceMap[dataSource][missingTypes[mismatchType]]; } return mismatchTypeMap[mismatchType]; <<<<<<< function contentUrlFilter() { var contentTypeUrlFns = { LBDC: openlegLocalUrlFns, NYSENATE: senateSiteUrlFns, OPENLEG: openlegLocalUrlFns }; ======= function contentUrlFilter() { var contentTypeUrlFns = { LBDC: localOpenlegUrlFns, NYSENATE: senateSiteUrlFns }; >>>>>>> function contentUrlFilter() { var contentTypeUrlFns = { LBDC: openlegLocalUrlFns, NYSENATE: senateSiteUrlFns, OPENLEG: openlegLocalUrlFns }; <<<<<<< function referenceUrlFilter() { // multi-map of url generating functions by datasource and content type var refUrlFns = { LBDC: lbdcUrlFns, NYSENATE: openlegLocalUrlFns, OPENLEG: openlegRefUrlFns }; ======= function referenceUrlFilter() { // multi-map of url generating functions by datasource and content type var refUrlFns = { LBDC: lbdcUrlFns, NYSENATE: localOpenlegUrlFns }; return function (key, datasource, contentType) { // Get a url function for the given datasource and content type, if it exists var refUrlFn = (refUrlFns[datasource] || {})[contentType]; if (refUrlFn) { return refUrlFn(key); } return null; }; } >>>>>>> function referenceUrlFilter() { // multi-map of url generating functions by datasource and content type var refUrlFns = { LBDC: lbdcUrlFns, NYSENATE: openlegLocalUrlFns, OPENLEG: openlegRefUrlFns }; return function (key, datasource, contentType) { // Get a url function for the given datasource and content type, if it exists var refUrlFn = (refUrlFns[datasource] || {})[contentType]; if (refUrlFn) { return refUrlFn(key); } return null; }; } <<<<<<< var openlegLocalUrlFns = { 'AGENDA': getLocalAgendaUrl, 'BILL': getLocalBillUrl, 'CALENDAR': getLocalCalendarUrl }; ======= function getLocalAgendaUrl(key) { if (key.agendaId.year > 0) { return ctxPath + "/agendas/" + key.agendaId.year + "/" + key.agendaId.number + "?comm=" + key.committeeId.name; } return ""; } >>>>>>> var openlegRefUrlFns = { AGENDA: getOpenlegRefAgendaUrl, BILL: getOpenlegRefBillUrl, CALENDAR: getOpenlegRefCalendarUrl }; function getLocalAgendaUrl(key) { if (key.agendaId.year > 0) { return ctxPath + "/agendas/" + key.agendaId.year + "/" + key.agendaId.number + "?comm=" + key.committeeId.name; } return ""; } <<<<<<< var openlegRefUrlFns = { AGENDA: getOpenlegRefAgendaUrl, BILL: getOpenlegRefBillUrl, CALENDAR: getOpenlegRefCalendarUrl }; function getLocalAgendaUrl(key) { if (key.agendaId.year > 0) { return ctxPath + "/agendas/" + key.agendaId.year + "/" + key.agendaId.number + "?comm=" + key.committeeId.name; ======= function getLrsBillUrl(key) { return "http://public.leginfo.state.ny.us/navigate.cgi" + "?NVDTO:=&QUERYTYPE=BILLNO&CBTEXT=Y&CBSPONMEMO=Y" + "&SESSYR=" + key.session.year + "&QUERYDATA=" + key.printNo; >>>>>>> function getLrsBillUrl(key) { return "http://public.leginfo.state.ny.us/navigate.cgi" + "?NVDTO:=&QUERYTYPE=BILLNO&CBTEXT=Y&CBSPONMEMO=Y" + "&SESSYR=" + key.session.year + "&QUERYDATA=" + key.printNo; <<<<<<< var amendment = key.version === "DEFAULT" ? "original" : key.version; return senSitePath + "/legislation/" + billType + "/" + key.session.year + "/" + key.basePrintNo + "/amendment/" + amendment; } function getSenSiteCalendarUrl(key) { // TODO Need session date time to create link. // Example: https://www.nysenate.gov/calendar/sessions/june-05-2017/session-6-5-17 return null; } function getOpenlegRefBillUrl(key) { var url = openlegRefPath + "/bills/" + key.session.year + "/" + key.basePrintNo; if (key.hasOwnProperty('version')) { url += '?version=' + key.version; } return url; } function getOpenlegRefCalendarUrl(key) { var url = openlegRefPath + "/calendars/" + key.year + "/" + key.calNo; if (key.hasOwnProperty('type')) { switch (key.type) { case 'ACTIVE_LIST': url += '?view=active-list'; break; case 'FLOOR_CALENDAR': case 'SUPPLEMENTAL_CALENDAR': url += '?view=floor'; break; } } return url; } function getOpenlegRefAgendaUrl(key) { if (key.agendaId.year > 0) { return openlegRefPath + "/agendas/" + key.agendaId.year + "/" + key.agendaId.number + "?comm=" + key.committeeId.name; } return ""; } ======= })(); >>>>>>> function getOpenlegRefBillUrl(key) { var url = openlegRefPath + "/bills/" + key.session.year + "/" + key.basePrintNo; if (key.hasOwnProperty('version')) { url += '?version=' + key.version; } return url; } function getOpenlegRefCalendarUrl(key) { var url = openlegRefPath + "/calendars/" + key.year + "/" + key.calNo; if (key.hasOwnProperty('type')) { switch (key.type) { case 'ACTIVE_LIST': url += '?view=active-list'; break; case 'FLOOR_CALENDAR': case 'SUPPLEMENTAL_CALENDAR': url += '?view=floor'; break; } } return url; } function getOpenlegRefAgendaUrl(key) { if (key.agendaId.year > 0) { return openlegRefPath + "/agendas/" + key.agendaId.year + "/" + key.agendaId.number + "?comm=" + key.committeeId.name; } return ""; } })();
<<<<<<< 'data:listIndexes': [], 'data:createIndex': ['write:add'], 'data:deleteIndex': ['write:add'], 'data:deleteIndexes': ['write:add'], 'data:putRole': [] }; ======= 'data:putRole': [], 'data:publish': [] }; >>>>>>> 'data:publish': [], 'data:listIndexes': [], 'data:createIndex': ['write:add'], 'data:deleteIndex': ['write:add'], 'data:deleteIndexes': ['write:add'], 'data:putRole': [] };
<<<<<<< should(kuzzle.validation).be.an.Object(); should(kuzzle.start).be.a.Function(); ======= sinon.assert.callOrder( kuzzle.pluginsManager.trigger, kuzzle.internalEngine.deleteIndex, kuzzle.services.list.internalCache.flushdb, kuzzle.services.list.memoryStorage.flushdb, kuzzle.indexCache.remove, kuzzle.internalEngine.bootstrap.all ); }); }); >>>>>>> should(kuzzle.validation).be.an.Object(); should(kuzzle.start).be.a.Function(); sinon.assert.callOrder( kuzzle.pluginsManager.trigger, kuzzle.internalEngine.deleteIndex, kuzzle.services.list.internalCache.flushdb, kuzzle.services.list.memoryStorage.flushdb, kuzzle.indexCache.remove, kuzzle.internalEngine.bootstrap.all ); }); });
<<<<<<< GatewayTimeoutError = require('kuzzle-common-objects').errors.GatewayTimeoutError, PluginImplementationError = require('kuzzle-common-objects').errors.PluginImplementationError, KuzzleError = require('kuzzle-common-objects').errors.KuzzleError, getRequestRoute = require('../../../util/string').getRequestRoute, ======= >>>>>>> KuzzleError = require('kuzzle-common-objects').errors.KuzzleError, <<<<<<< this.getPluginsFeatures = function pluginGetPluginsFeatures () { let pluginConfiguration = {}; ======= >>>>>>> <<<<<<< if (plugin.object.strategies) { injectAuthentication(kuzzle, this.authentications, plugin.object, pluginName); ======= if (plugin.object.scope) { injectScope(plugin.object.scope, this.kuzzle.passport); >>>>>>> if (plugin.object.strategies) { injectAuthentication(this.kuzzle, this.authentications, plugin.object, pluginName); <<<<<<< this.listStrategies = function pluginListStrategies () { return this.registeredStrategies; }; ======= listStrategies () { return Bluebird.resolve(this.registeredStrategies); } >>>>>>> listStrategies () { return this.registeredStrategies; } <<<<<<< /** * Registers an authentication strategy * * @param {Kuzzle} kuzzle * @param {object} plugin * @param {AuthenticationStrategy} strategy * @param {string} name - strategy name */ function registerStrategy(kuzzle, plugin, strategy, name) { const opts = Object.assign(strategy.config.strategyOptions || {}, {passReqToCallback: true}), verifyAdapter = (...args) => { const callback = args[args.length - 1]; return plugin[strategy.config.verify](...args.slice(0, -1)) .then(result => { if (result) { kuzzle.repositories.user.load(result) .then(user => { callback(null, user); }) .catch(error => callback(error)); } else { callback(null, false); } }) .catch(error => callback(error)); }; try { kuzzle.passport.use(name, new strategy.config.constructor(opts, verifyAdapter)); kuzzle.pluginsManager.registeredStrategies.push(name); } catch (e) { // There might not be any logger active when an authentication plugin registers its strategy // eslint-disable-next-line no-console console.error(new PluginImplementationError(`[Plugin Manager] Unable to register authentication strategy: ${e.message}.`)); } } /** * @param {object|*} object * @returns {boolean} */ function isObject(object) { return object && typeof object === 'object' && !Array.isArray(object); } /** * * @param {function|*} func * @returns {boolean} */ function isFunction(func) { return func && typeof func === 'function'; } /** * @param {string|*} string * @returns {boolean} */ function isString(string) { return string && typeof string === 'string'; } /** * @typedef {{ * config: { * constructor: function, * strategyOptions: object?, * authenticateOptions: object?, * verify: string, * fields: string[] * }, * methods: { * exists: string, * create: string, * update: string, * delete: string, * getInfo: string, * validate: string * } * }} AuthenticationStrategy */ module.exports = PluginsManager; ======= module.exports = PluginsManager; >>>>>>> /** * Registers an authentication strategy * * @param {Kuzzle} kuzzle * @param {object} plugin * @param {AuthenticationStrategy} strategy * @param {string} name - strategy name */ function registerStrategy(kuzzle, plugin, strategy, name) { const opts = Object.assign(strategy.config.strategyOptions || {}, {passReqToCallback: true}), verifyAdapter = (...args) => { const callback = args[args.length - 1]; return plugin[strategy.config.verify](...args.slice(0, -1)) .then(result => { if (result) { kuzzle.repositories.user.load(result) .then(user => { callback(null, user); }) .catch(error => callback(error)); } else { callback(null, false); } }) .catch(error => callback(error)); }; try { kuzzle.passport.use(name, new strategy.config.constructor(opts, verifyAdapter)); kuzzle.pluginsManager.registeredStrategies.push(name); } catch (e) { // There might not be any logger active when an authentication plugin registers its strategy // eslint-disable-next-line no-console console.error(new PluginImplementationError(`[Plugin Manager] Unable to register authentication strategy: ${e.message}.`)); } } /** * @param {object|*} object * @returns {boolean} */ function isObject(object) { return object && typeof object === 'object' && !Array.isArray(object); } /** * * @param {function|*} func * @returns {boolean} */ function isFunction(func) { return func && typeof func === 'function'; } /** * @param {string|*} string * @returns {boolean} */ function isString(string) { return string && typeof string === 'string'; } /** * @typedef {{ * config: { * constructor: function, * strategyOptions: object?, * authenticateOptions: object?, * verify: string, * fields: string[] * }, * methods: { * exists: string, * create: string, * update: string, * delete: string, * getInfo: string, * validate: string * } * }} AuthenticationStrategy */ module.exports = PluginsManager;
<<<<<<< ======= queryParams, additionalData, isError, match, >>>>>>> queryParams, additionalData,
<<<<<<< curvAlpha: { type:'f', value:1.}, curvScale: { type:'f', value:2.0},//0.5 TEMP FIX!! curvLim: { type:'f', value:.2}, curvMean: { type:'f', value:0.5}, dataAlpha: { type:'f', value:1.0}, hatchAlpha: { type:'f', value:1.}, hatchColor: { type:'v3', value:new THREE.Vector3( 0,0,0 )}, voxlineColor:{type:'v3', value:new THREE.Vector3( 0,0,0 )}, voxlineWidth:{type:'f', value:viewopts.voxline_width}, ======= this.surfs = []; this.dataviews = {}; this.active = null; >>>>>>> this.surfs = []; this.dataviews = {}; this.active = null; <<<<<<< this.postsvg = $.Deferred(); this.cmapload = $.Deferred(); this.labelshow = true; this._pivot = 0; this.planes = [new sliceplane.Plane(this, 0), new sliceplane.Plane(this, 1), new sliceplane.Plane(this, 2)] this.planes[0].mesh.visible = false; this.planes[1].mesh.visible = false; this.planes[2].mesh.visible = false; ======= >>>>>>> <<<<<<< //var geom = splitverts(geometries[right], name == "right" ? leftlen : 0); var meshpiv = this._makeMesh(geometries[right], this.shader); this.meshes[name] = meshpiv.mesh; this.pivot[name] = meshpiv.pivots; this.scene.add(meshpiv.pivots.front); } //Load in whole SVG file (if we are going to add a sulcal layer, we need to then //choose which elements within ROIpack to display.) $.get(loader.extractUrlBase(ctminfo)+json.rois, null, function(svgdoc) { this.roipack = new ROIpack(svgdoc, this.renderer, posdata); this.addEventListener("mix", function(evt) { this.roipack.labels.setMix(evt.mix); }.bind(this)); this.addEventListener("resize", function(event) { this.roipack.resize(event.width, event.height); }.bind(this)); this.roipack.update(this.renderer).done(function(tex) { this.uniforms.map.texture = tex; // New texture gotten here. this.postsvg.resolve(); this.schedule(); }.bind(this)); }.bind(this)); } else { for (var name in names) { var right = names[name]; var len = geometries[right].attributes.position.array.length / 3; geometries[right].reorderVertices(); geometries[right].dynamic = true; var meshpiv = this._makeMesh(geometries[right], this.shader); this.meshes[name] = meshpiv.mesh; this.pivot[name] = meshpiv.pivots; this.scene.add(meshpiv.pivots.front); } } this.picker = new FacePick(this, this.meshes.left.geometry.attributes.position.array, this.meshes.right.geometry.attributes.position.array); this.addEventListener("mix", this.picker.setMix.bind(this.picker)); this.addEventListener("resize", function(event) { this.picker.resize(event.width, event.height); }.bind(this)); this.controls.addEventListener("change", function() { this.picker._valid = false; }.bind(this)); this.controls.addEventListener("pick", function(event) { this.picker.pick(event.x, event.y, event.keep); }.bind(this)); this.controls.addEventListener("dblpick", function(event) { this.picker.dblpick(event.x, event.y, event.keep); }.bind(this)); this.controls.addEventListener("undblpick", function(event) { this.picker.undblpick(); }.bind(this)); ======= for (var i = 0; i < this.surfs.length; i++) this.surfs[i].apply(this.active); if (this.oculus) this.oculus.render(scene, this.camera); else this.renderer.render(scene, this.camera); } >>>>>>> for (var i = 0; i < this.surfs.length; i++) this.surfs[i].apply(this.active); if (this.oculus) this.oculus.render(scene, this.camera); else this.renderer.render(scene, this.camera); } <<<<<<< $(this.object).find("#overlay_fieldset").tabs(); $(this.object).find("#layer_curvalpha").slider({ min:0, max:1, step:.001, value:1, slide:function(event, ui) { this.uniforms.curvAlpha.value = ui.value; this.schedule(); }.bind(this)}) $(this.object).find("#layer_curvmult").slider({ min:.001, max:2, step:.001, value:1, slide:function(event, ui) { this.uniforms.curvScale.value = ui.value; this.schedule(); }.bind(this)}) $(this.object).find("#layer_curvlim").slider({ min:0, max:.5, step:.001, value:.2, slide:function(event, ui) { this.uniforms.curvLim.value = ui.value; this.schedule(); }.bind(this)}) $(this.object).find("#layer_curvmean").slider({ min:0, max:1.0, step:.001, value:.5, slide:function(event, ui) { this.uniforms.curvMean.value = ui.value; this.schedule(); }.bind(this)}) $(this.object).find("#layer_dataalpha").slider({ min:0, max:1, step:.001, value:1.0, slide:function(event, ui) { this.uniforms.dataAlpha.value = ui.value; this.schedule(); }.bind(this)}) $(this.object).find("#layer_specularity").slider({ min:0, max:1, step:.001, value:this.specular, slide:function(event, ui) { this.specular = ui.value; this.update_spec(); this.schedule(); }.bind(this)}) $(this.object).find("#layer_hatchalpha").slider({ min:0, max:1, step:.001, value:1, slide:function(event, ui) { this.uniforms.hatchAlpha.value = ui.value; this.schedule(); }.bind(this)}) $(this.object).find("#layer_hatchcolor").minicolors({close: function(hex, rgb) { this.uniforms.hatchColor.value.set(rgb.r / 255, rgb.g / 255, rgb.b / 255); this.schedule(); }.bind(this)}); $(this.object).find("#volvis").change(this.update_volvis.bind(this)); $(this.object).find("#leftvis").change(this.update_leftvis.bind(this)); $(this.object).find("#rightvis").change(this.update_rightvis.bind(this)); $(this.object).find("#projpersp").change(this.update_projection.bind(this)); $(this.object).find("#projortho").change(this.update_projection.bind(this)); $(this.object).find("#voxline_show").change(function() { viewopts.voxlines = $(this.object).find("#voxline_show")[0].checked; this.setVoxView(this.active.filter, viewopts.voxlines); this.schedule(); }.bind(this)); $(this.object).find("#voxline_color").minicolors({ close: function(hex, rgb) { this.uniforms.voxlineColor.value.set(rgb.r / 255, rgb.g / 255, rgb.b/255); this.schedule(); }.bind(this)}); $(this.object).find("#voxline_width").slider({ min:.001, max:.1, step:.001, value:viewopts.voxline_width, slide:function(event, ui) { this.uniforms.voxlineWidth.value = ui.value; this.schedule(); }.bind(this)}); $(this.object).find("#datainterp").change(function() { this.setVoxView($(this.object).find("#datainterp").val(), viewopts.voxlines); this.schedule(); }.bind(this)); $(this.object).find("#thicklayers").slider({ min:1, max:32, step:1, value:1, slide:function(event, ui) { if (ui.value == 1) $(this.object).find("#thickmix_row").show(); else $(this.object).find("#thickmix_row").hide(); this.uniforms.nsamples.value = ui.value; this.active.init(this.uniforms, this.meshes, this.flatlims !== undefined, this.frames); this.schedule(); }.bind(this)}); $(this.object).find("#thickmix").slider({ min:0, max:1, step:.001, value:0.5, slide:function(event, ui) { this.figure.notify("setdepth", this, [ui.value]); this.uniforms.thickmix.value = ui.value; this.schedule(); }.bind(this)}) $(this.object).find("#resetflat").click(function() { this.reset_view(); }.bind(this)); ======= >>>>>>>
<<<<<<< Button, useColorContext ======= colors >>>>>>> useColorContext <<<<<<< let isUnkownType = false let title = t.first( [`notifications/${type}/${context}/title`, `notifications/${type}/title`], undefined, '' ) if (!title && !knownTypes.includes(type)) { title = t('notifications/unkown/title') isUnkownType = true } let logoTarget let content if (type === 'token-authorization') { logoTarget = '_blank' content = ( <TokenAuthorization email={email} token={token} tokenType={tokenType || DEFAULT_TOKEN_TYPE} noAutoAuthorize={noAutoAuthorize} context={context} /> ) } else if ( [ // Deprecated (superseeded by "newsletter") 'newsletter-subscription', // Deprecated (superseeded by "newsletter") // Workaround to handle "script" replacements in email clients 'newsletter-subscript-disabledion', 'newsletter' ].includes(type) ) { logoTarget = '_blank' content = ( <MacNewsletterSubscription name={query.name} subscribed={!!query.subscribed} mac={query.mac} email={email} context={context} /> ) } else { const afterTokenAuth = type === 'email-confirmed' || type === 'session-denied' const displayCloseNote = !me || ['claim', 'preview', 'access'].includes(context) content = ( <Fragment> <P> <RawHtmlTranslation first={[ `notifications/${type}/${context}/text`, `notifications/${type}/text` ]} replacements={query} missingValue={isUnkownType ? t('notifications/unkown/text') : ''} /> </P> {afterTokenAuth && displayCloseNote ? ( <P>{t('notifications/closeNote')}</P> ) : ( ((!hasCurtain && !isUnkownType) || inNativeApp) && ( <div {...styles.button}> <Link route='index' passHref> <Button block primary> {t(`notifications/closeButton${inNativeApp ? '/app' : ''}`)} </Button> </Link> </div> ) )} </Fragment> ) } const displayMe = type === 'invalid-email' && ['signIn', 'pledge'].indexOf(context) !== -1 ======= >>>>>>>
<<<<<<< import {maxLogicalDepth, countNodes, withData, downvoteComment, upvoteComment, submitComment} from './enhancers' ======= import {countNodes, withData, downvoteComment, upvoteComment, submitComment} from './enhancers' import DiscussionPreferences from './DiscussionPreferences' >>>>>>> import {maxLogicalDepth, countNodes, withData, downvoteComment, upvoteComment, submitComment} from './enhancers' import DiscussionPreferences from './DiscussionPreferences'
<<<<<<< className={!cover && inNativeApp ? styles.coverless : undefined} ======= className={!cover ? me ? styles.coverlessWithMe : styles.coverless : undefined} >>>>>>> className={!cover ? me ? styles.coverlessWithMe : styles.coverless : undefined} <<<<<<< inNativeApp={inNativeApp} ======= onNavBarChange={onNavBarChange} >>>>>>> inNativeApp={inNativeApp} onNavBarChange={onNavBarChange} <<<<<<< export default compose( withT, withInNativeApp )(Index) ======= export default compose(withMe, withT)(Index) >>>>>>> export default compose( withMe, withT, withInNativeApp )(Index)
<<<<<<< audioCloseHandler, inNativeApp ======= audioCloseHandler, onNavBarChange >>>>>>> audioCloseHandler, inNativeApp, onNavBarChange <<<<<<< const borderBottom = !inNativeApp && formatColor && !expand ? `3px solid ${formatColor}` : `1px solid ${colors.divider}` // The logo acts as a toggle between front and feed page when user's logged in. const logoRoute = url.pathname === '/' && me ? 'feed' : 'index' const logoLinkPath = logoRoute === 'feed' ? '/feed' : '/' const logoAriaLabel = logoRoute === 'feed' ? t('header/logo/feed/aria') : t('header/logo/magazine/aria') ======= >>>>>>>
<<<<<<< <Popover expanded={!!expand} inNativeApp={inNativeApp} me={me} isMobile={mobile}> <NavPopover me={me} url={url} closeHandler={this.close} /> </Popover> ======= >>>>>>>
<<<<<<< // the repositories need to be instanciated after the services are initialized this.repositories = require('./core/models/repositories')(this); ======= // Start a single set of workers if (this.isWorker === undefined || this.isWorker === true) { this.workers.init(); } // The remote actions controller listen to remotes actions from other processes (like the CLI) and pass them to the internal brocker this.remoteActionsController = new RemoteActionsController(this); this.remoteActionsController.init(); >>>>>>> // the repositories need to be instanciated after the services are initialized this.repositories = require('./core/models/repositories')(this); // The remote actions controller listen to remotes actions from other processes (like the CLI) and pass them to the internal brocker this.remoteActionsController = new RemoteActionsController(this); this.remoteActionsController.init();
<<<<<<< if (SVG.config.mtextFontInherit || this.Parent().type === "merror") { this.SVGgetStyles(); var svg = this.SVG(), scale = this.SVGgetScale(); this.SVGhandleSpace(svg); ======= this.SVGgetStyles(); var svg, text, scale; if (this.Parent().type === "merror") { svg = this.SVG(); scale = this.SVGgetScale(svg); this.SVGhandleSpace(svg); // *** FIXME: Make color, style, scale configurable text = BBOX.G(); text.Add(BBOX.TEXT(.9*scale,this.data.join(""),{fill:"#C00",direction:this.Get("dir")})); svg.Add(BBOX.RECT(text.h+100,text.d+100,text.w+200,{fill:"#FF8",stroke:"#C00","stroke-width":50}),0,0); svg.Add(text,150,0); svg.H += 150; svg.D += 50; svg.Clean(); this.SVGsaveData(svg); return svg; } else if (SVG.config.mtextFontInherit) { svg = this.SVG(); scale = this.SVGgetScale(svg); this.SVGhandleSpace(svg); >>>>>>> if (SVG.config.mtextFontInherit || this.Parent().type === "merror") { this.SVGgetStyles(); var svg = this.SVG(), scale = this.SVGgetScale(svg); this.SVGhandleSpace(svg);
<<<<<<< mrow.Append( MML.mo(open).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.OPEN}), mml, MML.mo(close).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.CLOSE}) ); ======= mrow.Append(MML.mo(open).With({fence:true, stretchy:true, symmetric:true, texClass:MML.TEXCLASS.OPEN})); if (mml.type === "mrow") {mrow.Append.apply(mrow,mml.data)} else {mrow.Append(mml)} mrow.Append(MML.mo(close).With({fence:true, stretchy:true, symmetric:true, texClass:MML.TEXCLASS.CLOSE})); >>>>>>> mrow.Append( MML.mo(open).With({fence:true, stretchy:true, symmetric:true, texClass:MML.TEXCLASS.OPEN}), mml, MML.mo(close).With({fence:true, stretchy:true, symmetric:true, texClass:MML.TEXCLASS.CLOSE}) );
<<<<<<< onkeydown: MENU.About.Keydown, tabIndex: 0, "aria-label": "Close", "aria-describedby": _("CloseWindow","Close window")}, ======= onkeydown: MENU.About.Keydown, tabIndex: 0, role: "button", "aria-label": "Close window"}, >>>>>>> onkeydown: MENU.About.Keydown, tabIndex: 0, role: "button", "aria-label": _("CloseWindow","Close window")},
<<<<<<< if (['write', 'admin', 'bulk'].indexOf(requestObject.controller) !== -1) { kuzzle.services.list.broker.listen(requestObject.uniqueRoom, function (writeResponse) { kuzzle.notifier.notify(requestObject.requestId, writeResponse, connection); }); ======= if (['write', 'admin', 'bulk'].indexOf(data.controller) !== -1) { // Add an internal ID into data in order to notify later the same user with the response from writeEngine data.internalId = uuid.v1(); kuzzle.services.list.broker.listen('write_response_' + data.internalId, function (writeResponse) { kuzzle.notifier.notify(requestId, cleanProperties(writeResponse), connection); }, true); >>>>>>> if (['write', 'admin', 'bulk'].indexOf(requestObject.controller) !== -1) { kuzzle.services.list.broker.listen(requestObject.uniqueRoom, function (writeResponse) { kuzzle.notifier.notify(requestObject.requestId, writeResponse, connection); }, true); <<<<<<< data = JSON.parse(msg.content.toString()), requestObject, ======= data, >>>>>>> data = JSON.parse(msg.content.toString()), requestObject, <<<<<<< if (['write', 'admin', 'bulk'].indexOf(requestObject.controller) !== -1) { kuzzle.services.list.broker.listen(requestObject.uniqueRoom, function (writeResponse) { kuzzle.notifier.notify(requestObject.requestId, writeResponse, connection); }); ======= if (['write', 'admin', 'bulk'].indexOf(data.controller) !== -1) { // Add an action ID into data in order to notify later the same user with the response from writeEngine data.internalId = uuid.v1(); kuzzle.services.list.broker.listen('write_response_' + data.internalId, function (writeResponse) { kuzzle.notifier.notify(requestId, cleanProperties(writeResponse), connection); }, true); >>>>>>> if (['write', 'admin', 'bulk'].indexOf(requestObject.controller) !== -1) { kuzzle.services.list.broker.listen(requestObject.uniqueRoom, function (writeResponse) { kuzzle.notifier.notify(requestObject.requestId, writeResponse, connection); }, true); <<<<<<< if (['write', 'admin', 'bulk'].indexOf(requestObject.controller) !== -1) { this.services.list.broker.listen(requestObject.uniqueRoom, function (writeResponse) { response.end(stringify(writeResponse)); }.bind(this)); ======= if (['write', 'admin', 'bulk'].indexOf(data.controller) !== -1) { // Add an internal ID into data in order to notify later the same user with the response from writeEngine data.internalId = uuid.v1(); this.kuzzle.services.list.broker.listen('write_response_' + data.internalId , function (writeResponse) { response.end(stringify(cleanProperties(writeResponse))); }, true); >>>>>>> if (['write', 'admin', 'bulk'].indexOf(requestObject.controller) !== -1) { this.services.list.broker.listen(requestObject.uniqueRoom, function (writeResponse) { response.end(stringify(writeResponse)); }.bind(this), true); <<<<<<< ======= } function wrapObject (requestBody, data) { // if the action or controller are directly in request sent by client (for websocket) if (requestBody.action || requestBody.controller) { data = _.extend(data, requestBody); } if (data.body === undefined) { data.body = requestBody.body || requestBody; } if (data.body._id !== undefined) { data._id = data.body._id; delete data.body._id; } else if (!data._id && requestBody._id) { data._id = requestBody._id; } if (requestBody.persist !== undefined) { data.persist = requestBody.persist; } if (data.persist === undefined) { data.persist = true; } // The request Id is optional, but we have to generate it if the user // not provide it. We need to return this id for let the user know // how to get real time information about his data if (!data.requestId) { var stringifyObject = stringify(data); data.requestId = crypto.createHash('md5').update(stringifyObject).digest('hex'); } return data; } function cleanProperties (writeResponse) { if (writeResponse.result) { delete writeResponse.result.internalId; } return writeResponse; >>>>>>>
<<<<<<< {verb: 'post', url: '/_login/:strategy', controller: 'auth', action: 'login'}, ======= {verb: 'post', url: '/_checkToken', controller: 'auth', action: 'checkToken'}, >>>>>>> {verb: 'post', url: '/_checkToken', controller: 'auth', action: 'checkToken'}, {verb: 'post', url: '/_login/:strategy', controller: 'auth', action: 'login'},
<<<<<<< rgb = rgb.replace(/^\s+/,"").replace(/\s+$/,"").split(/\s*,\s*/); var RGB = "#"; if (rgb.length !== 3) {this.TEX.Error("rgb colors require 3 decimal numbers")} ======= rgb = rgb.split(/,/); var RGB = "#"; if (rgb.length !== 3) {this.TEX.Error(["ModelArg1","Color values for the %1 model require 3 numbers","rgb"])} >>>>>>> rgb = rgb.replace(/^\s+/,"").replace(/\s+$/,"").split(/\s*,\s*/); var RGB = "#"; if (rgb.length !== 3) {this.TEX.Error(["ModelArg1","Color values for the %1 model require 3 numbers","rgb"])} <<<<<<< rgb = rgb.replace(/^\s+/,"").replace(/\s+$/,"").split(/\s*,\s*/); var RGB = "#"; if (rgb.length !== 3) {this.TEX.Error("RGB colors require 3 numbers")} ======= rgb = rgb.split(/,/); var RGB = "#"; if (rgb.length !== 3) {this.TEX.Error(["ModelArg1","Color values for the %1 model require 3 numbers","RGB"])} >>>>>>> rgb = rgb.replace(/^\s+/,"").replace(/\s+$/,"").split(/\s*,\s*/); var RGB = "#"; if (rgb.length !== 3) {this.TEX.Error(["ModelArg1","Color values for the %1 model require 3 numbers","RGB"])} <<<<<<< if (!gray.match(/^\s*(\d+(\.\d*)?|\.\d+)\s*$/)) {this.TEX.Error("Invalid decimal number")} ======= if (!gray.match(/^(\d+(\.\d*)?|\.\d+)$/)) {this.TEX.Error(["InvalidDecimalNumber","Invalid decimal number"])} >>>>>>> if (!gray.match(/^\s*(\d+(\.\d*)?|\.\d+)\s*$/)) {this.TEX.Error(["InvalidDecimalNumber","Invalid decimal number"])}
<<<<<<< version: "1.1.3", ======= version: "1.1.2", >>>>>>> version: "1.1.4", <<<<<<< noInheritAttribute: { texClass: true }, ======= linebreakContainer: FALSE, >>>>>>> noInheritAttribute: { texClass: true }, linebreakContainer: FALSE,
<<<<<<< if (alttext && !svg.element.getAttribute("aria-label")) span.setAttribute("aria-label",alttext); if (!svg.element.getAttribute("role")) span.setAttribute("role","math"); // span.setAttribute("tabindex",0); // causes focus outline, so disable for now svg.element.setAttribute("focusable","false"); ======= if (alttext && !svg.element.getAttribute("aria-label")) svg.element.setAttribute("aria-label",alttext); if (!svg.element.getAttribute("role")) svg.element.setAttribute("role","img"); >>>>>>> if (alttext && !svg.element.getAttribute("aria-label")) svg.element.setAttribute("aria-label",alttext); if (!svg.element.getAttribute("role")) svg.element.setAttribute("role","img"); svg.element.setAttribute("focusable","false");
<<<<<<< MathJax.fileversion = "1.1.13"; ======= MathJax.fileversion = "1.1.8"; >>>>>>> MathJax.fileversion = "1.1.14"; <<<<<<< showMathMenu: true, // attach math context menu to mathml? showMathMenuMSIE: true, // separtely determine if MSIE should have math menu // (since the code for that is a bit delicate) preProcessors: [], // list of callbacks for preprocessing (initialized by extensions) inputJax: {}, // mime-type mapped to input jax (by registration) outputJax: {order:{}}, // mime-type mapped to output jax list (by registration) ======= >>>>>>> showMathMenu: true, // attach math context menu to mathml? showMathMenuMSIE: true, // separtely determine if MSIE should have math menu // (since the code for that is a bit delicate) <<<<<<< if (script.type && this.config.inputJax[script.type.replace(/ *;(.|\n)*/,"")]) { if (script.MathJax) { if (script.MathJax.elementJax && script.MathJax.elementJax.hover) { MathJax.Extension.MathEvents.Hover.ClearHover(script.MathJax.elementJax); } if (script.MathJax.state !== STATE.PENDING) {this.scriptAction[action](script)} } ======= if (script.type && this.inputJax[script.type.replace(/ *;(.|\n)*/,"")]) { if (script.MathJax && script.MathJax.state !== STATE.PENDING) {this.scriptAction[action](script)} >>>>>>> if (script.type && this.inputJax[script.type.replace(/ *;(.|\n)*/,"")]) { if (script.MathJax) { if (script.MathJax.elementJax && script.MathJax.elementJax.hover) { MathJax.Extension.MathEvents.Hover.ClearHover(script.MathJax.elementJax); } if (script.MathJax.state !== STATE.PENDING) {this.scriptAction[action](script)} } <<<<<<< Remove: function () { if (this.hover) {this.hover.clear(this)} this.outputJax.Remove(this); HUB.signal.Post(["Remove Math",this.inputID]); // wait for this to finish? this.Detach(); ======= Remove: function (keep) { BASE.OutputJax[this.outputJax].Remove(this); if (!keep) { HUB.signal.Post(["Remove Math",this.inputID]); // wait for this to finish? this.Detach(); } }, needsUpdate: function () { return BASE.InputJax[this.inputJax].needsUpdate(this); >>>>>>> Remove: function (keep) { if (this.hover) {this.hover.clear(this)} BASE.OutputJax[this.outputJax].Remove(this); if (!keep) { HUB.signal.Post(["Remove Math",this.inputID]); // wait for this to finish? this.Detach(); } }, needsUpdate: function () { return BASE.InputJax[this.inputJax].needsUpdate(this);
<<<<<<< EndEntry: function () { var mtd = MML.mtd.apply(MML,this.data); if (this.hfill.length) { if (this.hfill[0] === 0) mtd.columnalign = "right"; if (this.hfill[this.hfill.length-1] === this.data.length) mtd.columnalign = (mtd.columnalign ? "center" : "left"); } this.row.push(mtd); this.data = []; this.hfill = []; }, EndRow: function () {this.table.push(MML.mtr.apply(MML,this.row)); this.row = []}, ======= EndEntry: function () {this.row.push(MML.mtd.apply(MML,this.data)); this.data = []}, EndRow: function () { var mtr = MML.mtr; if (this.isNumbered && this.row.length === 3) { this.row.unshift(this.row.pop()); // move equation number to first position mtr = MML.mlabeledtr; } this.table.push(mtr.apply(MML,this.row)); this.row = []; }, >>>>>>> EndEntry: function () { var mtd = MML.mtd.apply(MML,this.data); if (this.hfill.length) { if (this.hfill[0] === 0) mtd.columnalign = "right"; if (this.hfill[this.hfill.length-1] === this.data.length) mtd.columnalign = (mtd.columnalign ? "center" : "left"); } this.row.push(mtd); this.data = []; this.hfill = []; }, EndRow: function () { var mtr = MML.mtr; if (this.isNumbered && this.row.length === 3) { this.row.unshift(this.row.pop()); // move equation number to first position mtr = MML.mlabeledtr; } this.table.push(mtr.apply(MML,this.row)); this.row = []; }, <<<<<<< eqalignno: ['Matrix',null,null,"right left right",MML.LENGTH.THICKMATHSPACE+" 3em",".5em",'D'], leqalignno: ['Matrix',null,null,"right left right",MML.LENGTH.THICKMATHSPACE+" 3em",".5em",'D'], hfill: 'HFill', hfil: 'HFill', // \hfil treated as \hfill for now hfilll: 'HFill', // \hfilll treated as \hfill for now ======= eqalignno: ['Matrix',null,null,"right left",MML.LENGTH.THICKMATHSPACE,".5em",'D',null,"right"], leqalignno: ['Matrix',null,null,"right left",MML.LENGTH.THICKMATHSPACE,".5em",'D',null,"left"], >>>>>>> eqalignno: ['Matrix',null,null,"right left",MML.LENGTH.THICKMATHSPACE,".5em",'D',null,"right"], leqalignno: ['Matrix',null,null,"right left",MML.LENGTH.THICKMATHSPACE,".5em",'D',null,"left"], hfill: 'HFill', hfil: 'HFill', // \hfil treated as \hfill for now hfilll: 'HFill', // \hfilll treated as \hfill for now
<<<<<<< MathJax.fileversion = "1.1.12"; ======= MathJax.fileversion = "1.1.13"; >>>>>>> MathJax.fileversion = "1.1.13"; <<<<<<< id: "OutputJax", version: "1.1", ======= version: "1.1.1", >>>>>>> id: "OutputJax", version: "1.1.1", <<<<<<< id: "ElementJax", version: "1.1", ======= version: "1.1.1", >>>>>>> id: "ElementJax", version: "1.1.1",
<<<<<<< ======= hideProcessedMath: true, // use display:none until all math is processed LEFTBUTTON: (HUB.Browser.isMSIE ? 1 : 0), // the event.button value for left button MENUKEY: "altKey", // the event value for alternate context menu >>>>>>> hideProcessedMath: true, // use display:none until all math is processed <<<<<<< // Set up event handling EVENT = MathJax.Extension.MathEvents.Event; TOUCH = MathJax.Extension.MathEvents.Touch; HOVER = MathJax.Extension.MathEvents.Hover; this.ContextMenu = EVENT.ContextMenu; this.Mousedown = EVENT.AltContextMenu; this.Mouseover = HOVER.Mouseover; this.Mouseout = HOVER.Mouseout; this.Mousemove = HOVER.Mousemove; // Set up default fonts var family = [], fonts = this.FONTDATA.VARIANT.normal.fonts; if (!(fonts instanceof Array)) {fonts = [fonts]} for (var i = 0, m = fonts.length; i < m; i++) { family[i] = this.FONTDATA.FONTS[fonts[i]].family; if (!family[i]) {family[i] = fonts[i]} } this.config.styles[".MathJax .math span"] = this.config.styles["#MathJax_getScales"] = {"font-family": family.join(',')}; ======= >>>>>>> // Set up event handling EVENT = MathJax.Extension.MathEvents.Event; TOUCH = MathJax.Extension.MathEvents.Touch; HOVER = MathJax.Extension.MathEvents.Hover; this.ContextMenu = EVENT.ContextMenu; this.Mousedown = EVENT.AltContextMenu; this.Mouseover = HOVER.Mouseover; this.Mouseout = HOVER.Mouseout; this.Mousemove = HOVER.Mousemove; <<<<<<< // Used for computing factor to fix margin width in MSIE this.marginCheck = HTMLCSS.Element("span",null, [["span",{style: {display:"inline-block", width:"5em"}}]]); this.marginMove = HTMLCSS.addElement(this.marginCheck,"span", {style: {display:"inline-block", width:"5em", marginLeft:"-5em"}}); // Used in getLinebreakWidth this.linebreakSpan = HTMLCSS.Element("span",null, [["hr",{style: {width:"100%", size:1, padding:0, border:0, margin:0}}]]); ======= >>>>>>> // Used in getLinebreakWidth this.linebreakSpan = HTMLCSS.Element("span",null, [["hr",{style: {width:"100%", size:1, padding:0, border:0, margin:0}}]]); <<<<<<< var prev = script.previousSibling; if (prev && String(prev.className).match(/^MathJax(_MathML|_Display)?$/)) {prev.parentNode.removeChild(prev)} var jax = script.MathJax.elementJax, math = jax.root, span, div, frame; span = div = frame = this.Element("span",{ className:"MathJax", isMathJax:true, jaxID:this.id, id:jax.inputID+"-Span", oncontextmenu:EVENT.Menu, onmousedown: EVENT.Mousedown, onmouseover:EVENT.Mouseover, onmouseout: EVENT.Mouseout, onmousemove: EVENT.Mousemove, onclick:EVENT.Click, ondblclick:EVENT.DblClick }); if (MathJax.Hub.Browser.noContextMenu) { span.ontouchstart = TOUCH.start; span.ontouchend = TOUCH.end; } var blockMode = (math.Get("display") === "block"); if (blockMode) { div = frame = this.Element("div",{className:"MathJax_Display", style:{width:"100%", position:"relative"}}); div.appendChild(span); } // (screen readers don't know about role="math" yet, so use "textbox" instead) div.setAttribute("role","textbox"); div.setAttribute("aria-readonly","true"); if (this.useProcessingFrame) { frame = this.Element((blockMode ? "div" : "span"),{className:"MathJax_Processing"}); frame.appendChild(div); } script.parentNode.insertBefore(frame,script); var isHidden; try {this.getScales(span); isHidden = (this.em === 0 || String(this.em) === "NaN")} catch (err) {isHidden = true} if (isHidden) {this.hiddenDiv.appendChild(frame); this.getScales(span)} jax.em = this.em; jax.outerEm = this.outerEm; jax.scale = this.scale; this.getLinebreakWidth(frame); ======= // // Get the data about the math // var jax = script.MathJax.elementJax, math = jax.root, span = document.getElementById(jax.inputID+"-Frame"), div = (jax.HTMLCSS.display ? span.parentNode : span); // // Set the font metrics // this.em = MML.mbase.prototype.em = jax.HTMLCSS.em * jax.HTMLCSS.scale; this.outerEm = jax.HTMLCSS.em; this.msieMarginScale = jax.HTMLCSS.marginScale; span.style.fontSize = jax.HTMLCSS.fontSize; // // Typeset the math // >>>>>>> // // Get the data about the math // var jax = script.MathJax.elementJax, math = jax.root, span = document.getElementById(jax.inputID+"-Frame"), div = (jax.HTMLCSS.display ? span.parentNode : span); // // Set the font metrics // this.em = MML.mbase.prototype.em = jax.HTMLCSS.em * jax.HTMLCSS.scale; this.outerEm = jax.HTMLCSS.em; this.msieMarginScale = jax.HTMLCSS.marginScale; span.style.fontSize = jax.HTMLCSS.fontSize; this.getLinebreakWidth(div); // // Typeset the math // <<<<<<< getScales: function (span) { span.parentNode.insertBefore(this.HDMspan,span); this.HDMspan.className = ""; this.HDMspan.id = ""; this.HDMspan.style.fontSize = ""; this.HDMimg.style.height = "1px"; this.HDMimg.style.width = "60ex"; var ex = this.HDMspan.offsetWidth/60; this.HDMspan.className = "MathJax"; this.HDMspan.id = "MathJax_getScales"; this.HDMimg.style.width = "60em"; var em = this.outerEm = this.HDMspan.offsetWidth/60; this.scale = Math.floor(Math.max(this.config.minScaleAdjust/100,(ex/this.TeX.x_height)/em) * this.config.scale); span.style.fontSize = this.HDMspan.style.fontSize = this.scale+"%"; this.em = MML.mbase.prototype.em = this.HDMspan.offsetWidth/60; if (this.operaFontSizeBug && em === this.em && this.scale !== 100) { // Opera 10.61 doesn't seem to process the fontSize setting above, so adjust manually this.em = MML.mbase.prototype.em = em * this.scale/100; } span.parentNode.removeChild(this.HDMspan); this.msieMarginScale = this.getMarginScale(span); }, getMarginScale: function (span) {return 1}, getMSIEmarginScale: function (span) { span.appendChild(this.marginCheck); var W = this.marginCheck.offsetWidth, w = this.marginMove.offsetWidth; var scale = (2*w - W ? w/(2*w - W) : 1); span.removeChild(this.marginCheck); return scale; }, ======= >>>>>>> <<<<<<< var W = span.offsetWidth, w = (span.bbox ? span.bbox.w: -1), start = span; if ((w < 0 || this.negativeSkipBug) && W >= 0 && !span.style.width) { ======= var W, H, w = (span.bbox||{}).w, start = span; if (span.bbox && span.bbox.exactW) {return w} if ((span.bbox && w >= 0 && !this.initialSkipBug) || this.negativeBBoxes || !span.firstChild) { W = span.offsetWidth; H = span.parentNode.offsetHeight; } else if (span.bbox && w < 0 && this.msieNegativeBBoxBug) { W = -span.offsetWidth, H = span.parentNode.offsetHeight; } else { >>>>>>> var W, H, w = (span.bbox||{}).w, start = span; if (span.bbox && span.bbox.exactW) {return w} if ((span.bbox && w >= 0 && !this.initialSkipBug) || this.negativeBBoxes || !span.firstChild) { W = span.offsetWidth; H = span.parentNode.offsetHeight; } else if (span.bbox && w < 0 && this.msieNegativeBBoxBug) { W = -span.offsetWidth, H = span.parentNode.offsetHeight; } else { <<<<<<< bbox: {h:h, d:d, w:w, rw:w, lw:0}, noAdjust: true, isMathJax: true ======= bbox: {h:h, d:d, w:w, rw:w, lw:0, exactW: true}, noAdjust: true, HH:h+d >>>>>>> bbox: {h:h, d:d, w:w, rw:w, lw:0, exactW:true}, noAdjust:true, HH:h+d, isMathJax:true <<<<<<< bbox: {h:h, d:d, w:w, rw:w, lw:0}, noAdjust: true, isMathJax: true ======= bbox: {h:h, d:d, w:w, rw:w, lw:0, exactW: true}, noAdjust: true, HH:h+d >>>>>>> bbox: {h:h, d:d, w:w, rw:w, lw:0, exactW:true}, noAdjust: true, HH:h+d, isMathJax:true <<<<<<< noAdjust: true, isMathJax: true, ======= noAdjust: true, HH: 0, >>>>>>> noAdjust: true, HH: 0, isMathJax: true, <<<<<<< var values = this.getValues("height","depth","width","lspace","voffset"), x = 0, y = 0, mu = this.HTMLgetMu(span); if (values.lspace) {x = this.HTMLlength2em(box,values.lspace,mu)} if (values.voffset) {y = this.HTMLlength2em(box,values.voffset,mu)} ======= else {HTMLCSS.Measured(child,box)} var values = this.getValues("height","depth","width","lspace","voffset"), x = 0, y = 0; if (values.lspace) {x = this.HTMLlength2em(box,values.lspace)} if (values.voffset) {y = this.HTMLlength2em(box,values.voffset)} >>>>>>> else {HTMLCSS.Measured(child,box)} var values = this.getValues("height","depth","width","lspace","voffset"), x = 0, y = 0, mu = this.HTMLgetMu(span); if (values.lspace) {x = this.HTMLlength2em(box,values.lspace,mu)} if (values.voffset) {y = this.HTMLlength2em(box,values.voffset,mu)} <<<<<<< H = base.bbox.h + q + t; q = H*HTMLCSS.rfuzz; if (surd.isMultiChar) {q = HTMLCSS.rfuzz} ======= H = BASE.bbox.h + q + t; >>>>>>> H = BASE.bbox.h + q + t; q = H*HTMLCSS.rfuzz; if (surd.isMultiChar) {q = HTMLCSS.rfuzz} <<<<<<< span = this.HTMLcreateSpan(span); var scale = this.HTMLgetScale(), mu = this.HTMLgetMu(span); var stack = HTMLCSS.createStack(span), values; ======= span = this.HTMLcreateSpan(span); var scale = this.HTMLgetScale(); var stack = HTMLCSS.createStack(span), values, children = []; >>>>>>> span = this.HTMLcreateSpan(span); var scale = this.HTMLgetScale(), mu = this.HTMLgetMu(span); var stack = HTMLCSS.createStack(span), values, children = []; <<<<<<< msieCloneNodeBug: (isIE8 && browser.version === "8.0"), negativeSkipBug: true, ======= initialSkipBug: (mode < 8), // confused by initial negative margin msieNegativeBBoxBug: (mode >= 8), // negative bboxes have positive widths >>>>>>> msieCloneNodeBug: (isIE8 && browser.version === "8.0"), initialSkipBug: (mode < 8), // confused by initial left-margin values msieNegativeBBoxBug: (mode >= 8), // negative bboxes have positive widths <<<<<<< useProcessingFrame: true, rfuzz: .011, ======= rfuzz: .05, >>>>>>> rfuzz: .011,
<<<<<<< MathJax.Message.Set("Can't find a valid font using ["+this.config.availableFonts.join(", ")+"]",null,3000); this.fontInUse = "generic"; ======= MESSAGE(["CantFindFontUsing","Can't find a valid font using %1", "["+this.config.availableFonts.join(", ")+"]"],null,3000); >>>>>>> MESSAGE(["CantFindFontUsing","Can't find a valid font using %1", "["+this.config.availableFonts.join(", ")+"]"],null,3000); this.fontInUse = "generic";
<<<<<<< * Implements LaTeX-compatible \color macro rather than MathJax's original * (non-standard) version. It includes the rgb, gray, and named color * models, and the \textcolor, \definecolor, \colorbox, and \fcolorbox * macros. ======= * Implements LaTeX-compatible \color macro rather than MathJax's * original (non-standard) version. It includes the rgb, RGB, gray, * and named color models, and the \definecolor macro. >>>>>>> * Implements LaTeX-compatible \color macro rather than MathJax's original * (non-standard) version. It includes the rgb, RGB, gray, and named color * models, and the \textcolor, \definecolor, \colorbox, and \fcolorbox * macros.
<<<<<<< jax.em = this.em; jax.outerEm = this.outerEm; jax.scale = this.scale; ======= this.getLinebreakWidth(frame); >>>>>>> jax.em = this.em; jax.outerEm = this.outerEm; jax.scale = this.scale; this.getLinebreakWidth(frame); <<<<<<< getJaxFromMath: function (math) { if (math.parentNode.className === "MathJax_Display") {math = math.parentNode} return HUB.getJaxFor(math.nextSibling); ======= /* * Autoload the MathMenu code, when needed */ ContextMenu: function (event,force) { if (HTMLCSS.config.showMathMenu && (HTMLCSS.settings.context === "MathJax" || force)) { if (HTMLCSS.safariContextMenuBug) {setTimeout('window.getSelection().empty()',0)} if (!event || HTMLCSS.msieEventBug) {event = window.event} var MENU = MathJax.Menu; if (MENU) { var math = (this.parentNode.className === "MathJax_Display" ? this.parentNode : this) MENU.jax = HUB.getJaxFor(math.nextSibling); MENU.menu.items[1].menu.items[1].name = (MENU.jax.inputJax === "MathML" ? "Original" : MENU.jax.inputJax); return MENU.menu.Post(event); } else { if (!AJAX.loadingMathMenu) { AJAX.loadingMathMenu = true; var EVENT = {pageX:event.pageX, pageY:event.pageY, clientX:event.clientX, clientY:event.clientY}; MathJax.Callback.Queue( AJAX.Require("[MathJax]/extensions/MathMenu.js"), function () {delete AJAX.loadingMathMenu}, [this,arguments.callee,EVENT,force] // call this function again ); } if (!event) {event = window.event} if (event.preventDefault) {event.preventDefault()} if (event.stopPropagation) {event.stopPropagation()} event.cancelBubble = true; event.returnValue = false; return false; } } >>>>>>> getJaxFromMath: function (math) { if (math.parentNode.className === "MathJax_Display") {math = math.parentNode} return HUB.getJaxFor(math.nextSibling); <<<<<<< if (scale !== 1) { SPAN = this.addElement(span,"span",{ style:{fontSize: this.Percent(scale)}, scale:scale, isMathJax: true }); ======= if (data[4]) {scale *= data[4]} if (scale !== 1 || data[3]) { SPAN = this.addElement(span,"span",{style:{fontSize: this.Percent(scale)}, scale:scale}); >>>>>>> if (data[4]) {scale *= data[4]} if (scale !== 1 || data[3]) { SPAN = this.addElement(span,"span",{style:{fontSize: this.Percent(scale)}, scale:scale, isMathJax:true}); <<<<<<< if (!this.spanID) {this.spanID = HTMLCSS.GetID()} span.id = (this.id || "MathJax-Span-"+this.spanID) + HTMLCSS.idPostfix; span.bbox = {w:0, h:0, d:0, lw:0, lr:0}; ======= >>>>>>> <<<<<<< if (values.mathbackground && values.mathbackground !== MML.COLOR.TRANSPARENT) { var dd = (span.bbox.exact ? 0 : 1/HTMLCSS.em), lW = 0, rW = 0; ======= if ((values.mathbackground && values.mathbackground !== MML.COLOR.TRANSPARENT) || borders || padding) { var dd = 1/HTMLCSS.em, lW = 0, rW = 0, lpad = span.style.paddingLeft, rpad = span.style.paddingRight; >>>>>>> if ((values.mathbackground && values.mathbackground !== MML.COLOR.TRANSPARENT) || borders || padding) { var dd = (span.bbox.exact ? 0 : 1/HTMLCSS.em), lW = 0, rW = 0, lpad = span.style.paddingLeft, rpad = span.style.paddingRight; <<<<<<< var alttext = this.Get("alttext"); if (alttext) {node.setAttribute("aria-label",alttext)} var nobr = HTMLCSS.addElement(span,"nobr",{isMathJax: true}); ======= var alttext = this.Get("alttext"); if (alttext && alttext !== "") {node.setAttribute("aria-label",alttext)} var nobr = HTMLCSS.addElement(span,"nobr"); >>>>>>> var alttext = this.Get("alttext"); if (alttext && alttext !== "") {node.setAttribute("aria-label",alttext)} var nobr = HTMLCSS.addElement(span,"nobr",{isMathJax: true});
<<<<<<< SENSOR_ALIGNMENT.align_gyro = parseInt(orientation_gyro_e.val()); SENSOR_ALIGNMENT.align_acc = parseInt(orientation_acc_e.val()); SENSOR_ALIGNMENT.align_mag = parseInt(orientation_mag_e.val()); ======= // track feature usage if (isFeatureEnabled('RX_SERIAL')) { googleAnalytics.sendEvent('Setting', 'SerialRxProvider', serialRXtypes[BF_CONFIG.serialrx_type]); } for (var i = 0; i < features.length; i++) { var featureName = features[i].name; if (isFeatureEnabled(featureName)) { googleAnalytics.sendEvent('Setting', 'Feature', featureName); } } >>>>>>> SENSOR_ALIGNMENT.align_gyro = parseInt(orientation_gyro_e.val()); SENSOR_ALIGNMENT.align_acc = parseInt(orientation_acc_e.val()); SENSOR_ALIGNMENT.align_mag = parseInt(orientation_mag_e.val()); // track feature usage if (isFeatureEnabled('RX_SERIAL')) { googleAnalytics.sendEvent('Setting', 'SerialRxProvider', serialRXtypes[BF_CONFIG.serialrx_type]); } for (var i = 0; i < features.length; i++) { var featureName = features[i].name; if (isFeatureEnabled(featureName)) { googleAnalytics.sendEvent('Setting', 'Feature', featureName); } }
<<<<<<< var switchery = new Switchery(elem, { size: 'small' }); $(elem).on("change", function (evt) { ======= var switchery = new Switchery(elem, { size: 'small', color: 'var(--accent)', secondaryColor: 'var(--switcherysecond)' }); $(elem).on("change", function () { >>>>>>> var switchery = new Switchery(elem, { size: 'small', color: 'var(--accent)', secondaryColor: 'var(--switcherysecond)' }); $(elem).on("change", function () { <<<<<<< var switchery = new Switchery(elem, { }); $(elem).on("change", function (evt) { ======= var switchery = new Switchery(elem, { color: 'var(--accent)', secondaryColor: 'var(--switcherysecond)' }); $(elem).on("change", function () { >>>>>>> var switchery = new Switchery(elem, { color: 'var(--accent)', secondaryColor: 'var(--switcherysecond)' }); $(elem).on("change", function () { <<<<<<< var switchery = new Switchery(elem, { className: 'switcherymid' }); $(elem).on("change", function (evt) { ======= var switchery = new Switchery(elem, { className: 'switcherymid', color: 'var(--accent)', secondaryColor: 'var(--switcherysecond)' }); $(elem).on("change", function () { >>>>>>> var switchery = new Switchery(elem, { className: 'switcherymid', color: 'var(--accent)', secondaryColor: 'var(--switcherysecond)' }); $(elem).on("change", function () { <<<<<<< var defaultTab = GUI.allowedTabs[0]; chrome.storage.local.get(['rememberLastTab', 'lastTab'], function (result) { if (!(result.rememberLastTab && !!result.lastTab ======= ConfigStorage.get(['rememberLastTab', 'lastTab'], function (result) { if (!(result.rememberLastTab && !!result.lastTab >>>>>>> var defaultTab = GUI.allowedTabs[0]; ConfigStorage.get(['rememberLastTab', 'lastTab'], function (result) { if (!(result.rememberLastTab && !!result.lastTab <<<<<<< var tab = result.lastTab; if (GUI.allowedTabs.indexOf(tab) == -1) { tab = defaultTab; } $("#tabs ul.mode-connected .tab_" + tab + " a").click(); }); ======= $("#tabs ul.mode-connected ." + result.lastTab + " a").click(); }); }; GUI_control.prototype.isChromeApp = function () { return this.Mode == GUI_Modes.ChromeApp; }; GUI_control.prototype.isNWJS = function () { return this.Mode == GUI_Modes.NWJS; >>>>>>> var tab = result.lastTab; if (GUI.allowedTabs.indexOf(tab) == -1) { tab = defaultTab; } $("#tabs ul.mode-connected .tab_" + tab + " a").click(); }); }; GUI_control.prototype.isChromeApp = function () { return this.Mode == GUI_Modes.ChromeApp; }; GUI_control.prototype.isNWJS = function () { return this.Mode == GUI_Modes.NWJS;
<<<<<<< OSD.constants.TIMER_TYPES = [ 'ON TIME', 'TOTAL ARMED TIME', 'LAST ARMED TIME' ]; if (semver.gte(CONFIG.apiVersion, "1.42.0")) { OSD.constants.TIMER_TYPES = OSD.constants.TIMER_TYPES.concat([ 'ON/ARM TIME' ]); } ======= if (semver.gte(CONFIG.apiVersion, "1.42.0")) { OSD.constants.WARNINGS = OSD.constants.WARNINGS.concat([ F.RSSI, F.LINK_QUALITY ]); } >>>>>>> OSD.constants.TIMER_TYPES = [ 'ON TIME', 'TOTAL ARMED TIME', 'LAST ARMED TIME' ]; if (semver.gte(CONFIG.apiVersion, "1.42.0")) { OSD.constants.TIMER_TYPES = OSD.constants.TIMER_TYPES.concat([ 'ON/ARM TIME' ]); OSD.constants.WARNINGS = OSD.constants.WARNINGS.concat([ F.RSSI, F.LINK_QUALITY ]); }
<<<<<<< // if tracking is enabled, check the statistics checkbox if (googleAnalyticsConfig.isTrackingPermitted()) { $('div.statistics input').prop('checked', true); } ======= $('input[name="expertModeCheckbox"]').prop('checked', checked).change(); if (FEATURE_CONFIG) { updateTabList(FEATURE_CONFIG.features); } >>>>>>> // if tracking is enabled, check the statistics checkbox if (googleAnalyticsConfig.isTrackingPermitted()) { $('div.statistics input').prop('checked', true); } <<<<<<< ======= chrome.storage.local.get('permanentExpertMode', function (result) { if (result.permanentExpertMode) { $('input[name="expertModeCheckbox"]').prop('checked', true); } $('input[name="expertModeCheckbox"]').change(function () { if (FEATURE_CONFIG) { updateTabList(FEATURE_CONFIG.features); } }).change(); }); >>>>>>> <<<<<<< ======= function isExpertModeEnabled() { return $('input[name="expertModeCheckbox"]').is(':checked'); } function updateTabList(features) { if (features.isEnabled('GPS') && isExpertModeEnabled()) { $('#tabs ul.mode-connected li.tab_gps').show(); } else { $('#tabs ul.mode-connected li.tab_gps').hide(); } if (isExpertModeEnabled()) { $('#tabs ul.mode-connected li.tab_failsafe').show(); } else { $('#tabs ul.mode-connected li.tab_failsafe').hide(); } if (isExpertModeEnabled()) { $('#tabs ul.mode-connected li.tab_adjustments').show(); } else { $('#tabs ul.mode-connected li.tab_adjustments').hide(); } if (isExpertModeEnabled()) { $('#tabs ul.mode-connected li.tab_servos').show(); } else { $('#tabs ul.mode-connected li.tab_servos').hide(); } if (features.isEnabled('LED_STRIP')) { $('#tabs ul.mode-connected li.tab_led_strip').show(); } else { $('#tabs ul.mode-connected li.tab_led_strip').hide(); } if (isExpertModeEnabled()) { $('#tabs ul.mode-connected li.tab_sensors').show(); } else { $('#tabs ul.mode-connected li.tab_sensors').hide(); } if (isExpertModeEnabled()) { $('#tabs ul.mode-connected li.tab_logging').show(); } else { $('#tabs ul.mode-connected li.tab_logging').hide(); } if (features.isEnabled('TRANSPONDER')) { $('#tabs ul.mode-connected li.tab_transponder').show(); } else { $('#tabs ul.mode-connected li.tab_transponder').hide(); } if (features.isEnabled('OSD')) { $('#tabs ul.mode-connected li.tab_osd').show(); } else { $('#tabs ul.mode-connected li.tab_osd').hide(); } } >>>>>>>
<<<<<<< } MSP.SDCARD_STATE_NOT_PRESENT = 0; MSP.SDCARD_STATE_FATAL = 1; MSP.SDCARD_STATE_CARD_INIT = 2; MSP.SDCARD_STATE_FS_INIT = 3; MSP.SDCARD_STATE_READY = 4; ======= } MSP.sendRxFailConfig = function(onCompleteCallback) { var nextFunction = send_next_rxfail_config; var rxFailIndex = 0; if (RXFAIL_CONFIG.length == 0) { onCompleteCallback(); } else { send_next_rxfail_config(); } function send_next_rxfail_config() { var rxFail = RXFAIL_CONFIG[rxFailIndex]; var buffer = []; buffer.push(rxFailIndex); buffer.push(rxFail.mode); buffer.push(lowByte(rxFail.value)); buffer.push(highByte(rxFail.value)); // prepare for next iteration rxFailIndex++; if (rxFailIndex == RXFAIL_CONFIG.length) { nextFunction = onCompleteCallback; } MSP.send_message(MSP_codes.MSP_SET_RXFAIL_CONFIG, buffer, false, nextFunction); } }; >>>>>>> } MSP.sendRxFailConfig = function(onCompleteCallback) { var nextFunction = send_next_rxfail_config; var rxFailIndex = 0; if (RXFAIL_CONFIG.length == 0) { onCompleteCallback(); } else { send_next_rxfail_config(); } function send_next_rxfail_config() { var rxFail = RXFAIL_CONFIG[rxFailIndex]; var buffer = []; buffer.push(rxFailIndex); buffer.push(rxFail.mode); buffer.push(lowByte(rxFail.value)); buffer.push(highByte(rxFail.value)); // prepare for next iteration rxFailIndex++; if (rxFailIndex == RXFAIL_CONFIG.length) { nextFunction = onCompleteCallback; } MSP.send_message(MSP_codes.MSP_SET_RXFAIL_CONFIG, buffer, false, nextFunction); } }; MSP.SDCARD_STATE_NOT_PRESENT = 0; MSP.SDCARD_STATE_FATAL = 1; MSP.SDCARD_STATE_CARD_INIT = 2; MSP.SDCARD_STATE_FS_INIT = 3; MSP.SDCARD_STATE_READY = 4;
<<<<<<< import { NativeModules, Platform } from 'react-native' import { connectionTag, type ConnectionTag, logger, isDevelopment } from 'utils/common' import type Model, { RecordId } from 'Model' import type Query from 'Query' import type { TableName, AppSchema } from 'Schema' import type { DatabaseAdapter, CachedQueryResult, CachedFindResult, BatchOperation, } from 'adapters/type' ======= import { NativeModules } from 'react-native' import { connectionTag, type ConnectionTag, logger, isDevelopment } from '../../utils/common' import type Model, { RecordId } from '../../Model' import type Query from '../../Query' import type { TableName, AppSchema } from '../../Schema' import type { SchemaMigrations } from '../../Schema/migrations' import type { DatabaseAdapter, CachedQueryResult, CachedFindResult, BatchOperation } from '../type' >>>>>>> import { NativeModules, Platform } from 'react-native' import { connectionTag, type ConnectionTag, logger, isDevelopment } from '../../utils/common' import type Model, { RecordId } from '../../Model' import type Query from '../../Query' import type { TableName, AppSchema } from '../../Schema' import type { SchemaMigrations } from '../../Schema/migrations' import type { DatabaseAdapter, CachedQueryResult, CachedFindResult, BatchOperation } from '../type'
<<<<<<< StatisticsAction = require("./action/StatisticsAction"), approveAction = require("./action/ApproveAction"), ======= ApproveAction = require("./action/ApproveAction"), >>>>>>> StatisticsAction = require("./action/StatisticsAction"), ApproveAction = require("./action/ApproveAction"), <<<<<<< case "statistics" : StatisticsAction[operation](params, req, res); break; ======= default : next(); >>>>>>> case "statistics" : StatisticsAction[operation](params, req, res); break; default : next();
<<<<<<< if(GLOBAL.DEBUG ){ user = req.session.user = {loginName: "coverguo", chineseName: '郭锋棉' ,role : 1, id:1} } ======= >>>>>>> //if(GLOBAL.DEBUG ){ // user = req.session.user = {loginName: "coverguo", chineseName: '郭锋棉' ,role : 1, id:1} //}
<<<<<<< var Leisure, Prim, ReplCore, addsLine, bindNotebook, box, checkMutateFromModification, checkMutateToDef, cleanOutput, codeBox, codeSpan, configureSaveLink, continueRangePosition, delay, envFor, evalDoc, evalOutput, findDefs, getBox, getRangePosition, getRangeText, getRanges, grp, highlightPosition, initNotebook, insertControls, loadProgram, makeOutputBox, makeRange, makeTestBox, makeTestCase, markupDefs, nodeEnd, oldBrackets, postLoadQueue, prepExpr, queueAfterLoad, removeOldDefs, req, root, runTests, selInDef, testPat, textNode, toDefBox, toExprBox, unwrap, ======= var Leisure, Prim, ReplCore, addsLine, bindNotebook, box, changeTheme, changeView, checkMutateFromModification, checkMutateToDef, cleanOutput, codeBox, codeSpan, configureSaveLink, continueRangePosition, delay, envFor, evalDoc, evalOutput, findDefs, getBox, getRangePosition, getRangeText, getRanges, grp, highlightPosition, initNotebook, insertControls, loadProgram, makeOption, makeOutputBox, makeRange, makeTestBox, makeTestCase, markupDefs, nodeEnd, oldBrackets, postLoadQueue, prepExpr, queueAfterLoad, removeOldDefs, req, root, runTests, selInDef, testPat, textNode, toDefBox, toExprBox, unwrap, writeFile, >>>>>>> var Leisure, Prim, ReplCore, addsLine, bindNotebook, box, changeTheme, changeView, checkMutateFromModification, checkMutateToDef, cleanOutput, codeBox, codeSpan, configureSaveLink, continueRangePosition, delay, envFor, evalDoc, evalOutput, findDefs, getBox, getRangePosition, getRangeText, getRanges, grp, highlightPosition, initNotebook, insertControls, loadProgram, makeOption, makeOutputBox, makeRange, makeTestBox, makeTestCase, markupDefs, nodeEnd, oldBrackets, postLoadQueue, prepExpr, queueAfterLoad, removeOldDefs, req, root, runTests, selInDef, testPat, textNode, toDefBox, toExprBox, unwrap, <<<<<<< var controlDiv, downloadLink, loadButton, processButton, testButton, viewLink; ======= var controlDiv, loadButton, processButton, saveLink, testButton, themeLabel, themeSelect, viewLabel, viewSelect; >>>>>>> var controlDiv, downloadLink, loadButton, processButton, testButton, themeLabel, themeSelect, viewLabel, viewLink, viewSelect;
<<<<<<< var controlDiv, loadButton, processButton, testButton, themeSelect, viewSelect, _ref, _ref2; controlDiv = createNode("<div LeisureOutput contentEditable='false' class='leisure_bar'>\n <span class='leisure_load'>Load: </span>\n <input type='file' leisureId='loadButton'></input>\n <a download='program.lsr' leisureId='downloadLink'>Download</a>\n <a target='_blank' leisureId='viewLink'>View</a>\n <button leisureId='testButton'>Run Tests <span leisureId='testResults' class=\"notrun\"></span></button>\n <span class=\"leisure_theme\">Theme: </span>\n <select leisureId='themeSelect'>\n <option value=thin>Thin</option>\n <option value=gaudy>Gaudy</option>\n <option value=cthulhu>Cthulhu</option>\n </select>\n <span>View: </span>\n <select leisureId='viewSelect'>\n <option value=coding>Coding</option>\n <option value=debugging>Debugging</option>\n <option value=testing>Testing</option>\n <option value=running>Running</option>\n </select>\n <button leisureId='processButton' style=\"float: right\">Process</button>\n</div>"); ======= var controlDiv, loadButton, processButton, testButton, themeSelect, viewSelect, _ref; controlDiv = createNode("<div LeisureOutput contentEditable='false' class='leisure_bar'>\n <span class='leisure_load'>Load: </span>\n <input type='file' leisureId='loadButton'></input>\n <a download='program.lsr' leisureId='downloadLink'>Download</a>\n <a target='_blank' leisureId='viewLink'>View</a>\n <button leisureId='testButton'>Run Tests</button> <span leisureId='testResults' class=\"notrun\"></span>\n <span class=\"leisure_theme\">Theme: </span>\n <select leisureId='themeSelect'>\n <option value=thin>Thin</option>\n <option value=gaudy>Gaudy</option>\n <option value=cthulhu>Cthulhu</option>\n </select>\n <span>View: </span>\n <select leisureId='viewSelect'>\n <option value=coding>Coding</option>\n <option value=debugging>Debugging</option>\n <option value=testing>Testing</option>\n <option value=running>Running</option>\n </select>\n <button leisureId='processButton' style=\"float: right\">Process</button>\n</div>"); >>>>>>> var controlDiv, loadButton, processButton, testButton, themeSelect, viewSelect, _ref, _ref2; controlDiv = createNode("<div LeisureOutput contentEditable='false' class='leisure_bar'>\n <span class='leisure_load'>Load: </span>\n <input type='file' leisureId='loadButton'></input>\n <a download='program.lsr' leisureId='downloadLink'>Download</a>\n <a target='_blank' leisureId='viewLink'>View</a>\n <button leisureId='testButton'>Run Tests</button> <span leisureId='testResults' class=\"notrun\"></span>\n <span class=\"leisure_theme\">Theme: </span>\n <select leisureId='themeSelect'>\n <option value=thin>Thin</option>\n <option value=gaudy>Gaudy</option>\n <option value=cthulhu>Cthulhu</option>\n </select>\n <span>View: </span>\n <select leisureId='viewSelect'>\n <option value=coding>Coding</option>\n <option value=debugging>Debugging</option>\n <option value=testing>Testing</option>\n <option value=running>Running</option>\n </select>\n <button leisureId='processButton' style=\"float: right\">Process</button>\n</div>");
<<<<<<< ToolbarAndroid, Navigator, ======= BackAndroid, >>>>>>> ToolbarAndroid, Navigator, BackAndroid, <<<<<<< ======= _renderScene: function (route, navigator) { this.navigator = navigator; switch (route.name) { case 'Examples': return <Home navigator={navigator}/>; default: return ( <route.component/> ); // default: // return ( // <View style={{flex: 1}}> // <ToolbarAndroid actions={[]} // title={route.name} // navIcon={require('image!ic_back')} // onIconClicked={navigator.pop} // style={styles.toolbar} // /> // <route.component/> // </View> // ); } }, hardwareBackPress: function () { var currentRoutes = this.navigator.getCurrentRoutes(); // example: [ { name: 'Examples' }, { name: 'Cards' } ] if (currentRoutes[currentRoutes.length - 1].name !== 'Examples') { // if not on main screen // go back to main screen this.navigator.popToTop(); return true; } // else minimize the application return false; }, componentWillMount: function () { BackAndroid.addEventListener('hardwareBackPress', this.hardwareBackPress); }, componentWillUnmount: function () { BackAndroid.removeEventListener('hardwareBackPress', this.hardwareBackPress); }, >>>>>>> routes: function (route, navigator) { this.navigator = navigator; //console.log('routing to:', route); switch (route.name) { case 'home': return renderHome(navigator); default: return renderScreen(route, navigator); } }, hardwareBackPress: function () { if (!this.navigator) { return false; } var currentRoutes = this.navigator.getCurrentRoutes(); if (currentRoutes[currentRoutes.length - 1].name !== 'home') { // if not on main screen // go back to main screen this.navigator.popToTop(); return true; } // else minimize the application return false; }, componentWillMount: function () { BackAndroid.addEventListener('hardwareBackPress', this.hardwareBackPress); }, componentWillUnmount: function () { BackAndroid.removeEventListener('hardwareBackPress', this.hardwareBackPress); },
<<<<<<< export const calculateZoomLevelFromResolutions = (resolutions, scale) => { const sortedResolutions = resolutions.map(x => +x).sort((a, b) => b - a); ======= export const calculateZoomLevelFromResolutions = (resolutions, scale) => { const sortedResolutions = resolutions.map(x => +x).sort((a,b) => b-a) // console.log('sortedResolutions:', sortedResolutions); >>>>>>> export const calculateZoomLevelFromResolutions = (resolutions, scale) => { const sortedResolutions = resolutions.map(x => +x).sort((a,b) => b-a) <<<<<<< ======= // console.log('trackWidth:', trackWidth, 'scale:', this._xScale.domain()[1] - this._xScale.domain()[0]); >>>>>>>
<<<<<<< toRemoveIds.forEach((id) => { const tileIdStr = id; ======= if (this.renderingTiles.size) { return; } toRemoveIds.forEach((x) => { const tileIdStr = x; >>>>>>> if (this.renderingTiles.size) { return; } toRemoveIds.forEach((id) => { const tileIdStr = id; <<<<<<< ======= /** * We've gotten a bunch of tiles from the server in * response to a request from fetchTiles. */ >>>>>>>
<<<<<<< ======= if (this.options.valueScaling) { this.calculateMedianVisibleValue(); } this.synchronizeTilesAndGraphics(); >>>>>>> <<<<<<< this.refreshTiles(); ======= >>>>>>>
<<<<<<< ======= let showDebug = 0; >>>>>>> let showDebug = 0; <<<<<<< //tileStatus = []; ======= >>>>>>> <<<<<<< tileStatus[tile[1]]= []; if(!tileStatus[tile[1]][tile[2]]) { tileStatus[tile[1]][tile[2]] = {}; } ======= tileStatus[tile[0]] = []; >>>>>>> tileStatus[tile[0]] = []; <<<<<<< tileStatus[tile[1]][tile[2]] = {'status':'Not Loaded'}; console.log(tileStatus); let speed; let speedArray; let speedTotal; let averageSpeed; ======= } if(!tileStatus[tile[0]][tile[1]][tile[2]]) { >>>>>>> } if(!tileStatus[tile[0]][tile[1]][tile[2]]) { <<<<<<< console.log(tile); console.log(tileStatus); speed = parseFloat(d3.event.loaded)/parseFloat(d3.event.timeStamp); if (!('speed' in tileStatus[tile[1]][tile[2]])) { speedArray = []; speedArray.push(speed); tileStatus[tile[1]][tile[2]] = {'status':'Loading','speed': speedArray}; console.log(tileStatus); } else { speedArray = tileStatus[tile[1]][tile[2]]['speed']; speedArray.push(speed); speedTotal = 0; for(let i = 0; i < speedArray.length; i++) { speedTotal += speedArray[i]; } averageSpeed = speedTotal / speedArray.length; tileStatus[tile[1]][tile[2]] = {'status':'Loading','speed': speedArray, 'averageSpeed': averageSpeed}; } //tileStatus[tileId(tile)] = {'Status':} ======= Loaded = d3.event.loaded; Time = d3.event.timeStamp; tileStatus[tile[0]][tile[1]][tile[2]] = {'status':'Loading','TimeElapsed':Math.round(Time/1000)+"sec",'Loaded':Math.round(Loaded/1000)+"kB"}; // console.log(tileStatus); >>>>>>> Loaded = d3.event.loaded; Time = d3.event.timeStamp; tileStatus[tile[0]][tile[1]][tile[2]] = {'status':'Loading','TimeElapsed':Math.round(Time/1000)+"sec",'Loaded':Math.round(Loaded/1000)+"kB"}; // console.log(tileStatus); <<<<<<< console.log(tile); tileStatus[tile[1]][tile[2]]['status'] = 'Loaded'; ======= // tileStatus[tile[1]][tile[2]]['status'] = 'Loaded'; tileStatus[tile[0]][tile[1]][tile[2]] = {'status':'Loaded'}; // console.log(tileStatus); // console.log(d3.event); >>>>>>> // tileStatus[tile[1]][tile[2]]['status'] = 'Loaded'; tileStatus[tile[0]][tile[1]][tile[2]] = {'status':'Loaded'}; // console.log(tileStatus); // console.log(d3.event);
<<<<<<< // there might no be a value scale if no valueColumn was specified if (this.valueScale) this.drawAxis(this.valueScale); ======= if (this.valueScale) { // there might no be a value scale if no valueColumn // was specified this.drawAxis(this.valueScale); } >>>>>>> // there might no be a value scale if no valueColumn was specified if (this.valueScale) this.drawAxis(this.valueScale); <<<<<<< const min = this.minVisibleValue(); const max = this.maxVisibleValue(); if (this.options.colorEncoding) { this.valueColorScale = scaleLinear().domain([min, max]).range([0, 255]); } else { this.valueScale = this.makeValueScale( min, this.calculateMedianVisibleValue(), max ); } ======= // makeValueScale returns [scale, pseudocount] this.valueScale = this.makeValueScale( this.minVisibleValue(), this.calculateMedianVisibleValue(), this.maxVisibleValue() )[0]; >>>>>>> const min = this.minVisibleValue(); const max = this.maxVisibleValue(); if (this.options.colorEncoding) { this.valueColorScale = scaleLinear().domain([min, max]).range([0, 255]); } else { this.valueScale = this.makeValueScale( min, this.calculateMedianVisibleValue(), max )[0]; } <<<<<<< if (this.options.colorEncoding) { const rgb = valueToColor( this.valueColorScale, this.colorScale, )(+geneInfo[+this.options.valueColumn - 1]); fill = colorToHex(rgbToHex(...rgb)); } else { // These intervals come with some y-value that we want to plot yMiddle = this.valueScale( +geneInfo[+this.options.valueColumn - 1] ); rectHeight /= 2; } ======= // These intervals come with some y-value that we want to plot const value = +geneInfo[+this.options.valueColumn-1]; if (value > maxValue) { maxValue = value; } yMiddle = this.valueScale( value ); // console.log('valueScale:', this.valueScale.domain() ); // console.log('yMiddle:', +geneInfo[+this.options.valueColumn-1], yMiddle); rectHeight = rectHeight / 2; } else { >>>>>>> if (this.options.colorEncoding) { const rgb = valueToColor( this.valueColorScale, this.colorScale, )(+geneInfo[+this.options.valueColumn - 1]); fill = colorToHex(rgbToHex(...rgb)); } else { // These intervals come with some y-value that we want to plot const value = +geneInfo[+this.options.valueColumn - 1]; if (value > maxValue) { maxValue = value; } yMiddle = this.valueScale(value); rectHeight /= 2; } <<<<<<< const xStartPos = this._xScale(txStart); const xEndPos = this._xScale(txEnd); ======= let xStartPos = this._xScale(txStart); let xEndPos = this._xScale(txEnd); /* if (xEndPos - xStartPos < MIN_RECT_WIDTH) { xStartPos -= 1; xEndPos += 1; console.log('xStartPos:', xStartPos); console.log('xEndPos:', xStartPos); } */ >>>>>>> const xStartPos = this._xScale(txStart); const xEndPos = this._xScale(txEnd); <<<<<<< if (!this.drawnRects[zoomLevel]) this.drawnRects[zoomLevel] = {}; ======= //console.log('drawing:', td.uid, tile.tileId, td.xStart, td.xEnd); if (!this.drawnRects[zoomLevel]) this.drawnRects[zoomLevel] = {} >>>>>>> if (!this.drawnRects[zoomLevel]) this.drawnRects[zoomLevel] = {}; <<<<<<< } ]; ======= }, tile.tileId]; >>>>>>> }, tile.tileId ]; <<<<<<< if (i >= MAX_TEXTS) return; ======= if (i >= MAX_TEXTS) { continue; } >>>>>>> if (i >= MAX_TEXTS) continue; <<<<<<< .sort((a,b) => b.importance - a.importance) .slice(0, MAX_TILE_ENTRIES) .map(y => +y.fields[+this.options.valueColumn - 1]) )) ======= .sort((a,b) => b.importance - a.importance) .slice(0, MAX_TILE_ENTRIES) .map(y => +y.fields[+this.options.valueColumn - 1]) .filter(y => !isNaN(y)) ) }) >>>>>>> .sort((a,b) => b.importance - a.importance) .slice(0, MAX_TILE_ENTRIES) .map(y => +y.fields[+this.options.valueColumn - 1]) .filter(y => !isNaN(y)) ))
<<<<<<< import { scaleLinear, scaleLog } from 'd3-scale'; import { tileProxy } from './services'; import { format } from 'd3-format'; ======= import { scaleLinear } from 'd3-scale'; >>>>>>> import { format } from 'd3-format'; import { scaleLinear } from 'd3-scale'; <<<<<<< } stopHover() { this.pMouseOver.clear(); this.animate(); } getMouseOverHtml(trackX, trackY) { if (!this.tilesetInfo) return; const zoomLevel = this.calculateZoomLevel(); const tileWidth = tileProxy.calculateTileWidth(this.tilesetInfo, zoomLevel, this.tilesetInfo.tile_size); // the position of the tile containing the query position const tilePos = this._xScale.invert(trackX) / tileWidth; const posInTileX = this.tilesetInfo.tile_size * (tilePos - Math.floor(tilePos)); const tileId = this.tileToLocalId([zoomLevel, Math.floor(tilePos)]) const fetchedTile = this.fetchedTiles[tileId]; let value = ''; let textValue = ''; if (fetchedTile) { const index = Math.floor(posInTileX); value = fetchedTile.tileData.dense[index]; textValue = format(".3f")(value); } else { return ''; } const graphics = this.pMouseOver; //const colorHex = colorToHex('black'); const colorHex = 0; const yPos = this.valueScale(value); graphics.clear(); graphics.beginFill(colorHex, .5); graphics.lineStyle(1, colorHex, 1); const markerWidth = 4; graphics.drawRect( trackX - markerWidth / 2, yPos - markerWidth / 2, markerWidth, markerWidth); this.animate(); return `${textValue}`; ======= >>>>>>> } stopHover() { this.pMouseOver.clear(); this.animate(); } getMouseOverHtml(trackX, trackY) { if (!this.tilesetInfo) return; const zoomLevel = this.calculateZoomLevel(); const tileWidth = tileProxy.calculateTileWidth(this.tilesetInfo, zoomLevel, this.tilesetInfo.tile_size); // the position of the tile containing the query position const tilePos = this._xScale.invert(trackX) / tileWidth; const posInTileX = this.tilesetInfo.tile_size * (tilePos - Math.floor(tilePos)); const tileId = this.tileToLocalId([zoomLevel, Math.floor(tilePos)]) const fetchedTile = this.fetchedTiles[tileId]; let value = ''; let textValue = ''; if (fetchedTile) { const index = Math.floor(posInTileX); value = fetchedTile.tileData.dense[index]; textValue = format(".3f")(value); } else { return ''; } const graphics = this.pMouseOver; //const colorHex = colorToHex('black'); const colorHex = 0; const yPos = this.valueScale(value); graphics.clear(); graphics.beginFill(colorHex, .5); graphics.lineStyle(1, colorHex, 1); const markerWidth = 4; graphics.drawRect( trackX - markerWidth / 2, yPos - markerWidth / 2, markerWidth, markerWidth); this.animate(); return `${textValue}`;
<<<<<<< import pubSub, { create } from './services/pub-sub'; let stack = {}; let pubSubs = []; const apiPubSub = create(stack); export const destroy = () => { pubSubs.forEach(subscription => pubSub.unsubscribe(subscription)); pubSubs = []; stack = {}; }; ======= import pubSub from './services/pub-sub'; import ChromosomeInfo from './ChromosomeInfo'; >>>>>>> import pubSub, { create } from './services/pub-sub'; let stack = {}; let pubSubs = []; const apiPubSub = create(stack); export const destroy = () => { pubSubs.forEach(subscription => pubSub.unsubscribe(subscription)); pubSubs = []; stack = {}; }; import ChromosomeInfo from './ChromosomeInfo';
<<<<<<< return Promise.resolve({ _index: kuzzle.config.internalIndex, ======= return q({ _index: '%kuzzle', >>>>>>> return q({ _index: kuzzle.config.internalIndex, <<<<<<< return Promise.resolve({ _index: kuzzle.config.internalIndex, ======= return q({ _index: '%kuzzle', >>>>>>> return q({ _index: kuzzle.config.internalIndex,
<<<<<<< import createElementAndApi from './utils/create-element-and-api'; import removeDiv from './utils/remove-div'; ======= import { viewer } from '../app/scripts/hglib'; configure({ adapter: new Adapter() }); function findCanvas(element) { if (element.tagName.toLowerCase() === 'canvas') return element; let canvas; some((childElement) => { const el = findCanvas(childElement); if (el) { canvas = el; return true; } return false; })(element.children); return canvas; } function createElementAndAPI(viewConfig, options) { const div = global.document.createElement('div'); global.document.body.appendChild(div); div.setAttribute('style', 'width:600px; height: 400px; background-color: lightgreen'); const api = viewer(div, viewConfig, options); return [div, api]; } >>>>>>> import createElementAndApi from './utils/create-element-and-api'; import removeDiv from './utils/remove-div'; function findCanvas(element) { if (element.tagName.toLowerCase() === 'canvas') return element; let canvas; some((childElement) => { const el = findCanvas(childElement); if (el) { canvas = el; return true; } return false; })(element.children); return canvas; } <<<<<<< it('APIs are independent', (done) => { [div, api] = createElementAndApi( simpleCenterViewConfig, { editable: false, bounded: true } ); const [div2, api2] = createElementAndApi( simpleCenterViewConfig, { editable: false, bounded: true } ); setTimeout(() => { expect(api).not.toEqual(api2); const hgc = api.getComponent(); const hgc2 = api2.getComponent(); let counter = 0; let counter2 = 0; api.on('rangeSelection', () => { ++counter; }); api2.on('rangeSelection', () => { ++counter2; }); hgc.apiPublish('rangeSelection', 'a'); hgc.apiPublish('rangeSelection', 'a'); expect(counter).toEqual(2); expect(counter2).toEqual(0); hgc2.apiPublish('rangeSelection', 'b'); expect(counter).toEqual(2); expect(counter2).toEqual(1); let moved = false; let moved2 = false; const createMouseEvent = (type, x, y) => new MouseEvent(type, { view: window, bubbles: true, cancelable: true, // WARNING: The following property is absolutely crucial to have the // event being picked up by PIXI. Do not remove under any circumstances! // pointerType: 'mouse', screenX: x, screenY: y, clientX: x, clientY: y }); api.on('mouseMoveZoom', () => { moved = true; }); api2.on('mouseMoveZoom', () => { moved2 = true; }); waitForTilesLoaded(api.getComponent(), () => { div .querySelector('.center-track') .dispatchEvent(createMouseEvent('mousemove', 330, 230)); expect(moved).toEqual(true); expect(moved2).toEqual(false); div2 .querySelector('.center-track') .dispatchEvent(createMouseEvent('mousemove', 330, 730)); expect(moved2).toEqual(true); setTimeout(() => { api2.destroy(); setTimeout(() => { removeDiv(div2); setTimeout(() => { done(); }, 0); }, 0); }, 0); }, 0); }); }); ======= // Fritz: This test fails but if you comment out all the other tests it will // succeed!? Also, if you move this test to the top it will succeed but // tests number 3, 4, and 6 will fail all of a sudden! Therefore, I assume // the test itself work just fine but there's something fundamentally broken // with our test setup or with HG. Either way, the HG instances must have // some shared state that influences each other. I am giving up for now but // we need to look into this again. it('listens to click events', (done) => { [div, api] = createElementAndAPI( simple1And2dAnnotations, { editable: false, bounded: true } ); const canvas = findCanvas(div); let clicked = 0; api.on('click', () => { clicked++; }); const createPointerEvent = (type, x, y) => new PointerEvent(type, { view: window, bubbles: true, cancelable: true, // WARNING: The following property is absolutely crucial to have the // event being picked up by PIXI. Do not remove under any circumstances! pointerType: 'mouse', screenX: x, screenY: y, clientX: x, clientY: y }); setTimeout(() => { canvas.dispatchEvent(createPointerEvent('pointerdown', 100, 100)); canvas.dispatchEvent(createPointerEvent('pointerup', 100, 100)); }, 0); waitForTilesLoaded(api.getComponent(), () => { setTimeout(() => { canvas.dispatchEvent(createPointerEvent('pointerdown', 100, 200)); canvas.dispatchEvent(createPointerEvent('pointerup', 100, 200)); }, 0); setTimeout(() => { expect(clicked).to.equal(2); done(); }, 0); }); }); >>>>>>> it('APIs are independent', (done) => { [div, api] = createElementAndApi( simpleCenterViewConfig, { editable: false, bounded: true } ); const [div2, api2] = createElementAndApi( simpleCenterViewConfig, { editable: false, bounded: true } ); setTimeout(() => { expect(api).not.toEqual(api2); const hgc = api.getComponent(); const hgc2 = api2.getComponent(); let counter = 0; let counter2 = 0; api.on('rangeSelection', () => { ++counter; }); api2.on('rangeSelection', () => { ++counter2; }); hgc.apiPublish('rangeSelection', 'a'); hgc.apiPublish('rangeSelection', 'a'); expect(counter).toEqual(2); expect(counter2).toEqual(0); hgc2.apiPublish('rangeSelection', 'b'); expect(counter).toEqual(2); expect(counter2).toEqual(1); let moved = false; let moved2 = false; const createMouseEvent = (type, x, y) => new MouseEvent(type, { view: window, bubbles: true, cancelable: true, // WARNING: The following property is absolutely crucial to have the // event being picked up by PIXI. Do not remove under any circumstances! // pointerType: 'mouse', screenX: x, screenY: y, clientX: x, clientY: y }); api.on('mouseMoveZoom', () => { moved = true; }); api2.on('mouseMoveZoom', () => { moved2 = true; }); waitForTilesLoaded(api.getComponent(), () => { div .querySelector('.center-track') .dispatchEvent(createMouseEvent('mousemove', 330, 230)); expect(moved).toEqual(true); expect(moved2).toEqual(false); div2 .querySelector('.center-track') .dispatchEvent(createMouseEvent('mousemove', 330, 730)); expect(moved2).toEqual(true); setTimeout(() => { api2.destroy(); setTimeout(() => { removeDiv(div2); setTimeout(() => { done(); }, 0); }, 0); }, 0); }, 0); }); }); // Fritz: This test fails but if you comment out all the other tests it will // succeed!? Also, if you move this test to the top it will succeed but // tests number 3, 4, and 6 will fail all of a sudden! Therefore, I assume // the test itself work just fine but there's something fundamentally broken // with our test setup or with HG. Either way, the HG instances must have // some shared state that influences each other. I am giving up for now but // we need to look into this again. it('listens to click events', (done) => { [div, api] = createElementAndApi( simple1And2dAnnotations, { editable: false, bounded: true } ); const canvas = findCanvas(div); let clicked = 0; api.on('click', () => { clicked++; }); const createPointerEvent = (type, x, y) => new PointerEvent(type, { view: window, bubbles: true, cancelable: true, // WARNING: The following property is absolutely crucial to have the // event being picked up by PIXI. Do not remove under any circumstances! pointerType: 'mouse', screenX: x, screenY: y, clientX: x, clientY: y }); setTimeout(() => { canvas.dispatchEvent(createPointerEvent('pointerdown', 100, 100)); canvas.dispatchEvent(createPointerEvent('pointerup', 100, 100)); }, 0); waitForTilesLoaded(api.getComponent(), () => { setTimeout(() => { canvas.dispatchEvent(createPointerEvent('pointerdown', 100, 200)); canvas.dispatchEvent(createPointerEvent('pointerup', 100, 200)); }, 0); setTimeout(() => { expect(clicked).to.equal(2); done(); }, 0); }); }); <<<<<<< api.destroy(); removeDiv(div); api = undefined; div = undefined; ======= if (api) { api.destroy(); api = undefined; } if (div) { document.body.removeChild(div); div = undefined; } >>>>>>> api.destroy(); removeDiv(div); api = undefined; div = undefined;
<<<<<<< import { mix } from '../mixwith'; ======= import slugid from 'slugid'; >>>>>>> import { mix } from '../mixwith'; import slugid from 'slugid'; <<<<<<< PIXI, mix, ======= PIXI, slugid, >>>>>>> PIXI, mix, PIXI, slugid,
<<<<<<< class Tiled1DPixiTrack extends TiledPixiTrack { ======= const BINS_PER_TILE = 1024; export class Tiled1DPixiTrack extends TiledPixiTrack { >>>>>>> const BINS_PER_TILE = 1024; class Tiled1DPixiTrack extends TiledPixiTrack {
<<<<<<< ======= this.canvasDom = ReactDOM.findDOMNode(this.currentProps.canvasElement); // used to determine whether to update the graphics of the // child tracks this.mounted = true; >>>>>>> <<<<<<< initialXDomain === this.initialXDomain && initialYDomain === this.initialYDomain ======= initialXDomain[0] == this.initialXDomain[0] && initialXDomain[1] == this.initialXDomain[1] && initialYDomain[0] == this.initialYDomain[0] && initialYDomain[1] == this.initialYDomain[1] >>>>>>> initialXDomain[0] == this.initialXDomain[0] && initialXDomain[1] == this.initialXDomain[1] && initialYDomain[0] == this.initialYDomain[0] && initialYDomain[1] == this.initialYDomain[1] <<<<<<< const currentCenterX = ( this.currentProps.marginLeft + this.currentProps.leftWidth + (this.currentProps.centerWidth / 2) ); const currentCenterY = ( this.currentProps.marginTop + this.currentProps.topHeight + (this.currentProps.centerHeight / 2) ); ======= const currentCenterX = ( this.currentProps.marginLeft + this.currentProps.leftWidth + (this.currentProps.centerWidth / 2) ); const currentCenterY = ( this.currentProps.marginTop + this.currentProps.topHeight + (this.currentProps.centerHeight / 2) ); >>>>>>> const currentCenterX = ( this.currentProps.marginLeft + this.currentProps.leftWidth + (this.currentProps.centerWidth / 2) ); const currentCenterY = ( this.currentProps.marginTop + this.currentProps.topHeight + (this.currentProps.centerHeight / 2) ); <<<<<<< // These need to be separated because the zoom behavior acts on a larger // region than the visible scale shows // if the window is resized, we don't want to change the scale, but we do // want to move the center point. this needs to be tempered by the zoom // factor so that we keep the visible center point in the center const centerDomainXOffset = ( this.drawableToDomainX(currentCenterX) - this.drawableToDomainX(this.prevCenterX) ) / this.zoomTransform.k; const centerDomainYOffset = ( this.drawableToDomainY(currentCenterY) - this.drawableToDomainY(this.prevCenterY) ) / this.zoomTransform.k; ======= // These need to be separated because the zoom behavior acts on a larger // region than the visible scale shows // if the window is resized, we don't want to change the scale, but we do // want to move the center point. this needs to be tempered by the zoom // factor so that we keep the visible center point in the center const centerDomainXOffset = ( ( this.drawableToDomainX(currentCenterX) - this.drawableToDomainX(this.prevCenterX) ) / this.zoomTransform.k ); const centerDomainYOffset = ( ( this.drawableToDomainY(currentCenterY) - this.drawableToDomainY(this.prevCenterY) ) / this.zoomTransform.k ); >>>>>>> // These need to be separated because the zoom behavior acts on a larger // region than the visible scale shows // if the window is resized, we don't want to change the scale, but we do // want to move the center point. this needs to be tempered by the zoom // factor so that we keep the visible center point in the center const centerDomainXOffset = ( ( this.drawableToDomainX(currentCenterX) - this.drawableToDomainX(this.prevCenterX) ) / this.zoomTransform.k ); const centerDomainYOffset = ( ( this.drawableToDomainY(currentCenterY) - this.drawableToDomainY(this.prevCenterY) ) / this.zoomTransform.k ); <<<<<<< if (this.closing || !this.element) return; ======= if (this.closing) { return; } if (!this.mounted) { return; } >>>>>>> if (this.closing || !this.element) return; <<<<<<< onScalesChanged: PropTypes.func.isRequired, pixiStage: PropTypes.object.isRequired, ======= onMouseMoveZoom: PropTypes.func, onScalesChanged: PropTypes.func, pixiStage: PropTypes.object, >>>>>>> onMouseMoveZoom: PropTypes.func, onScalesChanged: PropTypes.func.isRequired, pixiStage: PropTypes.object.isRequired,
<<<<<<< import BasicMultipleLineChart from './BasicMultipleLineChart'; import BasicMultipleBarChart from './BasicMultipleBarChart'; import BasicStackedBarChart from './BasicStackedBarChart'; ======= import AnnotationsInsets from './AnnotationsInsets'; import Insets2dTrack from './Insets2dTrack'; >>>>>>> import BasicMultipleLineChart from './BasicMultipleLineChart'; import BasicMultipleBarChart from './BasicMultipleBarChart'; import BasicStackedBarChart from './BasicStackedBarChart'; import AnnotationsInsets from './AnnotationsInsets'; import Insets2dTrack from './Insets2dTrack'; <<<<<<< import {dictItems} from './utils'; ======= import { forwardEvent, dictItems, trimTrailingSlash, scalesCenterAndK } from './utils'; >>>>>>> import { forwardEvent, dictItems, trimTrailingSlash, scalesCenterAndK } from './utils'; <<<<<<< if (!this.divTrackAreaSelection) { return; } ======= if (!this.elementSelection) return; >>>>>>> if (!this.divTrackAreaSelection || !this.elementSelection) return; <<<<<<< if (this.closing) { return; } if (!this.mounted) { return; } ======= if (this.closing || !this.element) return; >>>>>>> if (this.closing || !this.element) return; <<<<<<< ======= >>>>>>> <<<<<<< TrackRenderer.defaultProps = { pluginTracks: {} }; ======= TrackRenderer.defaultProps = { canvasElement: null, centerHeight: 0, centerWidth: 0, children: [], galleryDim: 0, height: 0, initialXDomain: [], initialYDomain: [], isRangeSelection: false, leftWidth: 0, leftWidthNoGallery: 0, marginLeft: 0, marginTop: 0, positionedTracks: [], topHeight: 0, topHeightNoGallery: 0, width: 0, metaTracks: [], }; >>>>>>> TrackRenderer.defaultProps = { pluginTracks: {}, canvasElement: null, centerHeight: 0, centerWidth: 0, children: [], galleryDim: 0, height: 0, initialXDomain: [], initialYDomain: [], isRangeSelection: false, leftWidth: 0, leftWidthNoGallery: 0, marginLeft: 0, marginTop: 0, positionedTracks: [], topHeight: 0, topHeightNoGallery: 0, width: 0, metaTracks: [], }; <<<<<<< onScalesChanged: PropTypes.func, pixiStage: PropTypes.object, pluginTracks: PropTypes.object, ======= onScalesChanged: PropTypes.func.isRequired, pixiStage: PropTypes.object.isRequired, >>>>>>> onScalesChanged: PropTypes.func.isRequired, pixiStage: PropTypes.object.isRequired, pluginTracks: PropTypes.object,
<<<<<<< export { default as reduce } from './reduce'; ======= export { default as rangeQuery2d } from './range-query-2d'; >>>>>>> export { default as reduce } from './reduce'; export { default as rangeQuery2d } from './range-query-2d'; <<<<<<< export { default as svgLine } from './svg-line'; export { default as tileToCanvas } from './tile-to-canvas'; ======= export { default as svgLine } from './svg-line'; export { default as totalTrackPixelHeight } from './total-track-pixel-height'; export { default as trimTrailingSlash } from './trim-trailing-slash'; export { default as valueToColor } from './value-to-color'; >>>>>>> export { default as svgLine } from './svg-line'; export { default as tileToCanvas } from './tile-to-canvas'; export { default as totalTrackPixelHeight } from './total-track-pixel-height'; export { default as trimTrailingSlash } from './trim-trailing-slash'; export { default as valueToColor } from './value-to-color';
<<<<<<< this.uuid = slugid.nice(); ======= this.refreshTilesDebounced = debounce( this.refreshTiles.bind(this), ZOOM_DEBOUNCE ); >>>>>>> this.uuid = slugid.nice(); this.refreshTilesDebounced = debounce( this.refreshTiles.bind(this), ZOOM_DEBOUNCE );
<<<<<<< class HorizontalLine1DPixiTrack extends HorizontalTiled1DPixiTrack { ======= export class HorizontalLine1DPixiTrack extends HorizontalTiled1DPixiTrack { constructor( scene, dataConfig, handleTilesetInfoReceived, option, animate, onValueScaleChanged, ) { super( scene, dataConfig, handleTilesetInfoReceived, option, animate, () => { this.drawAxis(this.valueScale); onValueScaleChanged(); } ); } >>>>>>> class HorizontalLine1DPixiTrack extends HorizontalTiled1DPixiTrack { constructor( scene, dataConfig, handleTilesetInfoReceived, option, animate, onValueScaleChanged, ) { super( scene, dataConfig, handleTilesetInfoReceived, option, animate, () => { this.drawAxis(this.valueScale); onValueScaleChanged(); } ); }
<<<<<<< import { HeatmapTiledPixiTrack } from './HeatmapTiledPixiTrack'; import { format } from 'd3-format'; ======= import HeatmapTiledPixiTrack from './HeatmapTiledPixiTrack'; >>>>>>> import { format } from 'd3-format'; import HeatmapTiledPixiTrack from './HeatmapTiledPixiTrack';
<<<<<<< /* this.element.addEventListener('mousewheel', (evt) => { console.log('element mw', evt) }) this.element.addEventListener('wheel', (evt) => { console.log('wheel', evt); }) */ ======= >>>>>>> <<<<<<< // console.log('fe e:', e); ======= >>>>>>> <<<<<<< this.props.pubSub.publish('app.event', e); ======= e.forwarded = true; pubSub.publish('app.event', e); >>>>>>> e.forwarded = true; this.props.pubSub.publish('app.event', e);
<<<<<<< if ( node.name in meta ) { return meta[ node.name ].enter( generator, node ); } const isComponent = node.name in generator.components || node.name === ':Self'; ======= const isComponent = generator.components.has( node.name ) || node.name === ':Self'; >>>>>>> if ( node.name in meta ) { return meta[ node.name ].enter( generator, node ); } const isComponent = generator.components.has( node.name ) || node.name === ':Self'; <<<<<<< if ( node.name in meta ) { if ( meta[ node.name ].leave ) meta[ node.name ].leave( generator, node ); return; } const isComponent = node.name in generator.components; ======= const isComponent = generator.components.has( node.name ); >>>>>>> if ( node.name in meta ) { if ( meta[ node.name ].leave ) meta[ node.name ].leave( generator, node ); return; } const isComponent = generator.components.has( node.name );
<<<<<<< function create_main_fragment ( state, component ) { ======= function create_main_fragment ( root, component ) { var text_value; >>>>>>> function create_main_fragment ( state, component ) { var text_value; <<<<<<< var text_value = state.foo; var text = createText( text_value ); ======= var text = createText( text_value = root.foo ); >>>>>>> var text = createText( text_value = state.foo );
<<<<<<< ======= const anchor = `${name}_anchor`; const iterations = `${name}_iterations`; >>>>>>> const iterations = `${name}_iterations`; <<<<<<< const isToplevel = generator.current.localElementDepth === 0; ======= >>>>>>> <<<<<<< for ( var i = 0; i < ${name}_iterations.length; i += 1 ) { ${name}_iterations[i].teardown( ${isToplevel ? 'detach' : 'false'} ); ======= for ( var i = 0; i < ${iterations}.length; i += 1 ) { ${iterations}[i].teardown( ${isToplevel ? 'detach' : 'false'} ); >>>>>>> for ( var i = 0; i < ${iterations}.length; i += 1 ) { ${iterations}[i].teardown( ${isToplevel ? 'detach' : 'false'} );
<<<<<<< let addAttribute = false; if ( attribute.name === 'xmlns' ) { ======= if ( name === 'xmlns' ) { >>>>>>> let addAttribute = false; if ( name === 'xmlns' ) { <<<<<<< addAttribute = true; } if (addAttribute) { generator.uses.setAttribute = true; ======= generator.uses[ helper ] = true; >>>>>>> addAttribute = true; } if (addAttribute) { generator.uses[ helper ] = true;
<<<<<<< ======= import 'dotenv/config'; import sirv from 'sirv'; >>>>>>> import 'dotenv/config'; import sirv from 'sirv'; <<<<<<< serve('static', { setHeaders: res => res.setHeader('Access-Control-Allow-Origin', '*') }), ======= compression({ threshold: 0 }), sirv('static', { setHeaders(res) { res.setHeader('Access-Control-Allow-Origin', '*'); res.hasHeader('Cache-Control') || res.setHeader('Cache-Control', 'max-age=600'); // 10min default } }), >>>>>>> sirv('static', { setHeaders(res) { res.setHeader('Access-Control-Allow-Origin', '*'); res.hasHeader('Cache-Control') || res.setHeader('Cache-Control', 'max-age=600'); // 10min default } }),
<<<<<<< hydrate: function() { foo_handler = foo.call(component, button, function(event) { ======= h: function hydrate() { foo_handler = template.events.foo.call(component, button, function(event) { >>>>>>> h: function hydrate() { foo_handler = foo.call(component, button, function(event) {
<<<<<<< text = createText("foo"); this.h(); ======= button.textContent = "foo"; this.hydrate(); >>>>>>> button.textContent = "foo"; this.h();
<<<<<<< if (this.options.selectable === true) { let obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);; ======= if (this.options.select === true) { let obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer); >>>>>>> if (this.options.selectable === true) { let obj = this.getNodeAt(pointer) || this.getEdgeAt(pointer);
<<<<<<< /** * do a small comparision to get the direction between two touches. * @method getDirection * @param {Touch} touch1 * @param {Touch} touch2 * @return {String} direction matches `DIRECTION_LEFT|RIGHT|UP|DOWN` */ getDirection: function getDirection(touch1, touch2) { var x = Math.abs(touch1.clientX - touch2.clientX), y = Math.abs(touch1.clientY - touch2.clientY); if(x >= y) { return touch1.clientX - touch2.clientX > 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; } return touch1.clientY - touch2.clientY > 0 ? DIRECTION_UP : DIRECTION_DOWN; }, ======= if ('group' in props) { // drag from one group to another var group = ItemSet.groupFromTarget(event); _moveToGroup(props.item, group); } }); >>>>>>> /** * do a small comparision to get the direction between two touches. * @method getDirection * @param {Touch} touch1 * @param {Touch} touch2 * @return {String} direction matches `DIRECTION_LEFT|RIGHT|UP|DOWN` */ getDirection: function getDirection(touch1, touch2) { var x = Math.abs(touch1.clientX - touch2.clientX), y = Math.abs(touch1.clientY - touch2.clientY); if(x >= y) { return touch1.clientX - touch2.clientX > 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; } return touch1.clientY - touch2.clientY > 0 ? DIRECTION_UP : DIRECTION_DOWN; }, <<<<<<< for(var i = 0; i < prefixes.length; i++) { var p = prop; // prefixes if(prefixes[i]) { p = prefixes[i] + p.slice(0, 1).toUpperCase() + p.slice(1); } ======= // only apply changes when start or end is actually changed if (changed) { me.options.onMove(itemData, function (itemData) { if (itemData) { // apply changes itemData[dataset._fieldId] = id; // ensure the item contains its id (can be undefined) changes.push(itemData); } else { // restore original values if ('start' in props) props.item.data.start = props.start; if ('end' in props) props.item.data.end = props.end; if ('group' in props && props.item.data.group != props.group) { var group = me.groups[props.group]; _moveToGroup(props.item, group); } >>>>>>> for(var i = 0; i < prefixes.length; i++) { var p = prop; // prefixes if(prefixes[i]) { p = prefixes[i] + p.slice(0, 1).toUpperCase() + p.slice(1); } <<<<<<< ======= } }); >>>>>>> <<<<<<< // getting group Ids var groupIds = []; for (var groupId in this.groups) { if (this.groups.hasOwnProperty(groupId)) { groupIds.push(groupId); } } ======= // first check if moment.js is already loaded in the browser window, if so, // use this instance. Else, load via commonjs. module.exports = (typeof window !== 'undefined') && window['moment'] || __webpack_require__(49); >>>>>>> // getting group Ids var groupIds = []; for (var groupId in this.groups) { if (this.groups.hasOwnProperty(groupId)) { groupIds.push(groupId); } } <<<<<<< // first select and preprocess the data from the datasets. // the groups have their preselection of data, we now loop over this data to see // what data we need to draw. Sorted data is much faster. // more optimization is possible by doing the sampling before and using the binary search // to find the end date to determine the increment. if (groupIds.length > 0) { for (i = 0; i < groupIds.length; i++) { group = this.groups[groupIds[i]]; if (group.visible == true) { groupData = []; // optimization for sorted data if (group.options.sort == true) { var guess = Math.max(0,util.binarySearchGeneric(group.itemsData, minDate, 'x', 'before')); ======= /***/ }, /* 41 */ /***/ function(module, exports, __webpack_require__) { // Only load hammer.js when in a browser environment // (loading hammer.js in a node.js environment gives errors) if (typeof window !== 'undefined') { module.exports = window['Hammer'] || __webpack_require__(48); } else { module.exports = function () { throw Error('hammer.js is only available in a browser, not in node.js.'); } } >>>>>>> // first select and preprocess the data from the datasets. // the groups have their preselection of data, we now loop over this data to see // what data we need to draw. Sorted data is much faster. // more optimization is possible by doing the sampling before and using the binary search // to find the end date to determine the increment. if (groupIds.length > 0) { for (i = 0; i < groupIds.length; i++) { group = this.groups[groupIds[i]]; if (group.visible == true) { groupData = []; // optimization for sorted data if (group.options.sort == true) { var guess = Math.max(0,util.binarySearchGeneric(group.itemsData, minDate, 'x', 'before')); <<<<<<< }; ======= this.moving = true; this.start(); } /***/ }, /* 57 */ /***/ function(module, exports, __webpack_require__) { function webpackContext(req) { throw new Error("Cannot find module '" + req + "'."); } webpackContext.resolve = webpackContext; webpackContext.keys = function() { return []; }; module.exports = webpackContext; >>>>>>> };
<<<<<<< network = process.env.arcjs_network || 'kovan'; ======= >>>>>>>
<<<<<<< function playMastheadRippleTransition(startPage, endPage, e) { return new Promise(function(resolve) { var t = IOWA.Elements.Template; var startBgClass = t.pages[startPage].mastheadBgClass; var endBgClass = t.pages[endPage].mastheadBgClass; var isFadeRipple = startBgClass === endBgClass; var rippleColor = isFadeRipple ? '#fff' : t.rippleColors[endBgClass]; ======= function playMastheadRippleTransition(startPage, endPage, e, sourceEl) { return new Promise(function(resolve, reject) { >>>>>>> function playMastheadRippleTransition(startPage, endPage, e, sourceEl) { // eslint-disable-line no-unused-vars return new Promise(function(resolve) { <<<<<<< var duration = 300; // isFadeRipple ? 300 : 600; ======= >>>>>>> <<<<<<< var touchData = (e.type === 'touchstart') ? e.touches[0] : e; return new Promise(function(resolve) { var t = IOWA.Elements.Template; var endBgClass = t.pages[endPage].mastheadBgClass; var rippleColor = t.rippleColors[endBgClass]; ======= var touchData = (e.type == 'touchstart') ? e.touches[0] : e; return new Promise(function(resolve, reject) { >>>>>>> var touchData = (e.type === 'touchstart') ? e.touches[0] : e; return new Promise(function(resolve) {
<<<<<<< const isProd = process.env.NODE_ENV === 'production'; const isTest = process.env.NODE_ENV === 'test'; const isDev = !isProd && !isTest; const styles = () => { return src('src/app/**/*.scss') .pipe($.plumber()) .pipe($.if(!isProd, $.sourcemaps.init())) .pipe($.sass.sync({ outputStyle: 'expanded', precision: 10, includePaths: ['.'] }).on('error', $.sass.logError)) .pipe($.postcss([ autoprefixer() ])) .pipe($.if(!isProd, $.sourcemaps.write())) .pipe(dest('dist')) .pipe(server.reload({ stream: true })); }; const startAppServer = () => { server.init({ notify: false, port, server: { baseDir: ['dist', 'temp'], routes: { '/node_modules': 'node_modules' }, https: true, directory: true } }); injectSources(); watches(); } ======= const SCHEMAS = [ { version: "1.3", schema: "https://developer.microsoft.com/en-us/json-schemas/teams/v1.3/MicrosoftTeams.schema.json" }, { version: "1.4", schema: "https://developer.microsoft.com/en-us/json-schemas/teams/v1.4/MicrosoftTeams.schema.json" }, { version: "1.5", schema: "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json" }, { version: "devPreview", schema: "https://raw.githubusercontent.com/OfficeDev/microsoft-teams-app-schema/preview/DevPreview/MicrosoftTeams.schema.json" } ]; >>>>>>> const isProd = process.env.NODE_ENV === 'production'; const isTest = process.env.NODE_ENV === 'test'; const isDev = !isProd && !isTest; const styles = () => { return src('src/app/**/*.scss') .pipe($.plumber()) .pipe($.if(!isProd, $.sourcemaps.init())) .pipe($.sass.sync({ outputStyle: 'expanded', precision: 10, includePaths: ['.'] }).on('error', $.sass.logError)) .pipe($.postcss([ autoprefixer() ])) .pipe($.if(!isProd, $.sourcemaps.write())) .pipe(dest('dist')) .pipe(server.reload({ stream: true })); }; const startAppServer = () => { server.init({ notify: false, port, server: { baseDir: ['dist', 'temp'], routes: { '/node_modules': 'node_modules' }, https: true, directory: true } }); injectSources(); watches(); } <<<<<<< ngrok.connect(conf).then((url) => { log('[NGROK] Url: ' + url); ======= >>>>>>>
<<<<<<< this.numberOfTexturesRemoved = 0; ======= this.numberOfMeshesRemoved = 0; >>>>>>> this.numberOfTexturesRemoved = 0; this.numberOfMeshesRemoved = 0; <<<<<<< process.stdout.write('Textures removed: ' + this.numberOfTexturesRemoved + '\n'); ======= process.stdout.write('Meshes removed: ' + this.numberOfMeshesRemoved + '\n'); >>>>>>> process.stdout.write('Textures removed: ' + this.numberOfTexturesRemoved + '\n'); process.stdout.write('Meshes removed: ' + this.numberOfMeshesRemoved + '\n');
<<<<<<< var tetrahedronGrid = StaticUniformGrid.fromTriangleSoup(tetrahedron, 10.0); ======= // data for an equilateral triangle whose center is inside the tetrahedron var normal = new Cartesian3(0.0, 1.0, 0.0); var equilateralBufferDataByAccessor = { indices : { data : [0, 1, 2] }, positions : { data : [ new Cartesian3(0.0, 0.0, 1.0), new Cartesian3(-0.5, 0.0, -Math.sqrt(3.0) / 6.0), new Cartesian3(0.5, 0.0, -Math.sqrt(3.0) / 6.0) ] }, normals : { data : [ normal, normal, normal ] } }; >>>>>>> var tetrahedronGrid = StaticUniformGrid.fromTriangleSoup(tetrahedron, 10.0); // data for an equilateral triangle whose center is inside the tetrahedron var normal = new Cartesian3(0.0, 1.0, 0.0); var equilateralBufferDataByAccessor = { indices : { data : [0, 1, 2] }, positions : { data : [ new Cartesian3(0.0, 0.0, 1.0), new Cartesian3(-0.5, 0.0, -Math.sqrt(3.0) / 6.0), new Cartesian3(0.5, 0.0, -Math.sqrt(3.0) / 6.0) ] }, normals : { data : [ normal, normal, normal ] } }; <<<<<<< bakeAmbientOcclusion.computeAmbientOcclusionAt( texel.position, texel.normal, 16, 4, tetrahedronGrid, 0.001, 10.0, aoBuffer, texel.index); ======= samples[i] = bakeAmbientOcclusion.computeAmbientOcclusionAt({ position : texel.position, normal : texel.normal, numberRays : 16, sqrtNumberRays : 4, triangles : tetrahedron, nearCull : 0.001, rayDistance : 10.0}); >>>>>>> samples[i] = bakeAmbientOcclusion.computeAmbientOcclusionAt({ position : texel.position, normal : texel.normal, numberRays : 16, sqrtNumberRays : 4, triangleGrid : tetrahedronGrid, nearCull : 0.001, rayDistance : 10.0}); <<<<<<< var openTetrahedronGrid = StaticUniformGrid.fromTriangleSoup(openTetrahedron, 10.0); var aoBuffer = { resolution: 2, samples: new Array(4).fill(0.0), count: new Array(4).fill(0.0) }; ======= var samples = new Array(4).fill(0.0); >>>>>>> var samples = new Array(4).fill(0.0); <<<<<<< bakeAmbientOcclusion.computeAmbientOcclusionAt( texel.position, texel.normal, 16, 4, openTetrahedronGrid, 0.001, 10.0, aoBuffer, texel.index); ======= samples[i] += bakeAmbientOcclusion.computeAmbientOcclusionAt({ position : texel.position, normal : texel.normal, numberRays : 16, sqrtNumberRays : 4, triangles : openTetrahedron, nearCull : 0.001, rayDistance : 10.0}); >>>>>>> samples[i] += bakeAmbientOcclusion.computeAmbientOcclusionAt({ position : texel.position, normal : texel.normal, numberRays : 16, sqrtNumberRays : 4, triangleGrid : StaticUniformGrid.fromTriangleSoup(openTetrahedron, 10.0), nearCull : 0.001, rayDistance : 10.0});
<<<<<<< var fsOutputFile = Promise.promisify(fsExtra.outputFile); // .crn (Crunch) is not a supported mime type, so add it mime.define({'image/crn': ['crn']}); ======= >>>>>>> <<<<<<< // Write sources for compressed textures if (name === 'images') { var image = object; if (defined(image.extras) && defined(image.extras.compressedImage3DTiles)) { var compressedImages = image.extras.compressedImage3DTiles; promises.push(writeSource(compressedImages, 'images', undefined, embed, embedImage)); } } if (embed && (embedImage || name !== 'images') || !defined(basePath)) { if (name === 'shaders') { object.uri = 'data:text/plain;base64,' + new Buffer(source).toString('base64'); ======= if (embed && (embedImage || name !== 'images') || !defined(basePath)) { if (name === 'shaders') { object.uri = 'data:text/plain;base64,' + Buffer.from(source).toString('base64'); } else { // .crn (Crunch) is not a supported mime type, so add it mime.define({'image/crn' : ['crn']}); object.uri = 'data:' + mime.lookup(extension) + ';base64,' + source.toString('base64'); } >>>>>>> // Write sources for compressed textures if (name === 'images') { var image = object; if (defined(image.extras) && defined(image.extras.compressedImage3DTiles)) { var compressedImages = image.extras.compressedImage3DTiles; promises.push(writeSource(compressedImages, 'images', undefined, embed, embedImage)); } } if (embed && (embedImage || name !== 'images') || !defined(basePath)) { if (name === 'shaders') { object.uri = 'data:text/plain;base64,' + Buffer.from(source).toString('base64'); <<<<<<< var mimeType = object.mimeType; if (!defined(mimeType)) { mimeType = mime.lookup(extension); } object.uri = 'data:' + mimeType + ';base64,' + source.toString('base64'); } } else { var fileName = i + extension; // Use the name if we have one if (defined(object.name)) { fileName = object.name + extension; } var uri = object.uri; if (defined(uri) && !isDataUri(uri)) { // Use the original filename if it was external fileName = uri; } // For compressed textures use the name stored in the extras rather than the id if (defined(pipelineExtras.name)) { fileName = pipelineExtras.name + extension; ======= // For compressed textures use the name stored in the extras rather than the id var fileName = defaultValue(pipelineExtras.name, id) + extension; object.uri = fileName; var outputPath = path.join(basePath, fileName); promises.push(fsExtra.outputFile(outputPath, source)); >>>>>>> var mimeType = object.mimeType; if (!defined(mimeType)) { mimeType = mime.lookup(extension); } object.uri = 'data:' + mimeType + ';base64,' + source.toString('base64'); } } else { var fileName = i + extension; // Use the name if we have one if (defined(object.name)) { fileName = object.name + extension; } var uri = object.uri; if (defined(uri) && !isDataUri(uri)) { // Use the original filename if it was external fileName = uri; } // For compressed textures use the name stored in the extras rather than the id if (defined(pipelineExtras.name)) { fileName = pipelineExtras.name + extension;
<<<<<<< ======= fragmentShaderUri = 'data:text/plain;base64,' + Buffer.from(fragmentShaderData).toString('base64'); >>>>>>> <<<<<<< expect(gltf.shaders[0].extras).not.toBeDefined(); expect(gltf.shaders[0].uri).toEqual('CesiumTexturedBoxTest0FS.glsl'); return fsReadFile(outputFragmentShaderPath); ======= expect(gltf.shaders.CesiumTexturedBoxTest0FS.extras).not.toBeDefined(); expect(gltf.shaders.CesiumTexturedBoxTest0FS.uri).toEqual('CesiumTexturedBoxTest0FS.glsl'); return fsExtra.readFile(outputFragmentShaderPath); >>>>>>> expect(gltf.shaders[0].extras).not.toBeDefined(); expect(gltf.shaders[0].uri).toEqual('CesiumTexturedBoxTest0FS.glsl'); return fsExtra.readFile(outputFragmentShaderPath);
<<<<<<< ' -q, quantize the attributes of this model.\n' + ' --ao.toTexture: Bake AO to existing diffuse textures instead of to vertices. Does not modify shaders. Deactivated by default.\n' + ' --ao.groundPlane: Add a groundplane at the lowest point of the model for AO computation. Deactivated by default.\n' + ' --ao.ambientShadowContribution: amount of AO to show when blending between shader computed lighting and AO. 1.0 is full AO, 0.5 is a 50/50 blend. Default: 0.5\n' + ' --ao.quality: Valid settings are high, medium, and low. Default: medium\n'; ======= ' -q --quantize, quantize the attributes of this model.\n' + ' -n --encodeNormals, oct-encode the normals of this model.\n' + ' -c --compressTextureCoordinates, compress the texture coordinates of this model.\n'; >>>>>>> ' -q --quantize, quantize the attributes of this model.\n' + ' -n --encodeNormals, oct-encode the normals of this model.\n' + ' -c --compressTextureCoordinates, compress the texture coordinates of this model.\n' + ' --ao.toTexture: Bake AO to existing diffuse textures instead of to vertices. Does not modify shaders. Deactivated by default.\n' + ' --ao.groundPlane: Add a groundplane at the lowest point of the model for AO computation. Deactivated by default.\n' + ' --ao.ambientShadowContribution: amount of AO to show when blending between shader computed lighting and AO. 1.0 is full AO, 0.5 is a 50/50 blend. Default: 0.5\n' + ' --ao.quality: Valid settings are high, medium, and low. Default: medium\n'; <<<<<<< var aoOptions = argv.ao; if (!defined(gltfPath)) { throw new DeveloperError('Input path is undefined.'); } if (fileExtension !== '.glb' && fileExtension !== '.gltf') { throw new DeveloperError('Invalid glTF file.'); } ======= var encodeNormals = defaultValue(defaultValue(argv.n, argv.encodeNormals), false); var compressTextureCoordinates = defaultValue(defaultValue(argv.c, argv.compressTextureCoordinates), false); >>>>>>> var encodeNormals = defaultValue(defaultValue(argv.n, argv.encodeNormals), false); var compressTextureCoordinates = defaultValue(defaultValue(argv.c, argv.compressTextureCoordinates), false); var aoOptions = argv.ao; <<<<<<< quantize : quantize, aoOptions : aoOptions, imageProcess : defined(aoOptions) && aoOptions.toTexture ======= quantize : quantize, encodeNormals : encodeNormals, compressTextureCoordinates : compressTextureCoordinates >>>>>>> quantize : quantize, encodeNormals : encodeNormals, compressTextureCoordinates : compressTextureCoordinates, aoOptions : aoOptions, imageProcess : defined(aoOptions) && aoOptions.toTexture
<<<<<<< var Cesium = require('cesium'); var defaultValue = Cesium.defaultValue; var OptimizationStatistics = require('./OptimizationStatistics'); ======= var async = require('async'); >>>>>>> var Cesium = require('cesium'); var defaultValue = Cesium.defaultValue; var OptimizationStatistics = require('./OptimizationStatistics'); var async = require('async'); <<<<<<< var combinePrimitives = require('./combinePrimitives'); var compressTextureCoordinates = require('./compressTextureCoordinates'); var convertDagToTree = require('./convertDagToTree'); var encodeImages = require('./encodeImages'); var loadGltfUris = require('./loadGltfUris'); ======= // var combinePrimitives = require('./combinePrimitives'); >>>>>>> var compressTextureCoordinates = require('./compressTextureCoordinates'); // var combinePrimitives = require('./combinePrimitives'); var convertDagToTree = require('./convertDagToTree'); var encodeImages = require('./encodeImages'); var loadGltfUris = require('./loadGltfUris'); <<<<<<< ======= var readGltf = require('./readGltf'); var loadGltfUris = require('./loadGltfUris'); var quantizeAttributes = require('./quantizeAttributes'); var cacheOptimizeIndices = require('./cacheOptimizeIndices'); var encodeImages = require('./encodeImages'); var writeSource = require('./writeSource'); var Cesium = require('cesium'); var defaultValue = Cesium.defaultValue; >>>>>>> <<<<<<< // combinePrimitives(gltfWithExtras); ======= // TODO: Combine primitives can be uncommented and added back into the pipeline once it is fixed, but right now there are too many issues with it to allow in the main pipeline. // combinePrimitives(gltfWithExtras); >>>>>>> // TODO: Combine primitives can be uncommented and added back into the pipeline once it is fixed, but right now there are too many issues with it to allow in the main pipeline. // combinePrimitives(gltfWithExtras);