fix some useless console.log
parent
d73e5cad5b
commit
9a68ba6358
|
@ -727,7 +727,6 @@ describe('draw.Drawing', function () {
|
|||
drawing.setLayerOpacity(LAYER3, -1.4);
|
||||
|
||||
assert.strictEqual(drawing.getLayerOpacity(LAYER1), 0.4);
|
||||
// console.log('layer2 opacity ' + drawing.getLayerOpacity(LAYER2));
|
||||
assert.strictEqual(drawing.getLayerOpacity(LAYER2), 1.0);
|
||||
assert.strictEqual(drawing.getLayerOpacity(LAYER3), 1.0);
|
||||
|
||||
|
|
|
@ -159,8 +159,6 @@ describe('Basic Module', function () {
|
|||
assert.strictEqual(attrVal, 'bar', true, 'Preserved namespaced attribute on import');
|
||||
|
||||
const output = svgCanvas.getSvgString();
|
||||
// } catch(e) {console.log(e)}
|
||||
// console.log('output',output);
|
||||
const hasXlink = output.includes('xmlns:xlink="http://www.w3.org/1999/xlink"');
|
||||
const hasSe = output.includes('xmlns:se=');
|
||||
const hasFoo = output.includes('xmlns:foo=');
|
||||
|
|
|
@ -3,58 +3,7 @@
|
|||
|
||||
module.exports = {
|
||||
plugins: [ 'plugins/markdown' ],
|
||||
markdown: {
|
||||
// tags: ['examples']
|
||||
/*
|
||||
// "The highlighter function should escape the code block's contents and wrap them in <pre><code> tags"
|
||||
highlight (code, language) {
|
||||
function ret () {
|
||||
// Default:
|
||||
return '<pre><code>' + code + ' in this language: ' + language + '</code></pre>';
|
||||
}
|
||||
if (language !== 'js') { // E.g., we have one URL in some tutorial Markdown
|
||||
// Seems to be only for full triple-backticked fences
|
||||
// console.log('lll', code);
|
||||
return ret();
|
||||
}
|
||||
|
||||
// Programmatic ESLint API: https://eslint.org/docs/developer-guide/nodejs-api
|
||||
const {CLIEngine} = require('eslint');
|
||||
const cli = new CLIEngine({
|
||||
useEslintrc: true,
|
||||
rules: {
|
||||
'no-undef': 0, // Many variables in examples will be undefined
|
||||
'padded-blocks': 0 // Can look nicer
|
||||
}
|
||||
});
|
||||
|
||||
// Undo escaping done by node_modules/jsdoc/lib/jsdoc/util/markdown.js
|
||||
code = code
|
||||
.replace(/\s+$/, '')
|
||||
.replace(/'/g, "'")
|
||||
.replace(/(https?):\\\/\\\//g, '$1://')
|
||||
.replace(/\{@[^}\r\n]+\}/g, function (wholeMatch) {
|
||||
return wholeMatch.replace(/"/g, '"');
|
||||
});
|
||||
|
||||
// lint the supplied text and optionally set
|
||||
// a filename that is displayed in the report
|
||||
const report = cli.executeOnText(code + '\n');
|
||||
if (!report.errorCount && !report.warningCount) {
|
||||
return ret();
|
||||
}
|
||||
|
||||
// Although we don't get the file, at least we can report the source code
|
||||
const {messages} = report.results[0];
|
||||
messages.forEach(({message, line, column, severity, ruleId}) => {
|
||||
console.log(`${ruleId}: ${message} (Severity: ${severity}; ${line}:${column})`);
|
||||
});
|
||||
console.log('\n' + code);
|
||||
|
||||
return ret();
|
||||
}
|
||||
*/
|
||||
},
|
||||
markdown: {},
|
||||
recurseDepth: 10,
|
||||
source: {
|
||||
exclude: [
|
||||
|
|
|
@ -775,7 +775,7 @@ class Editor extends EditorStartup {
|
|||
const icon = (typeof iconId === 'string') ? img : iconId.cloneNode(true);
|
||||
if (!icon) {
|
||||
// Todo: Investigate why this still occurs in some cases
|
||||
console.log('NOTE: Icon image missing: ' + iconId);
|
||||
console.warn('NOTE: Icon image missing: ' + iconId);
|
||||
return;
|
||||
}
|
||||
// empty()
|
||||
|
|
|
@ -789,7 +789,6 @@ class EditorStartup {
|
|||
* @returns {void}
|
||||
*/
|
||||
messageListener ({ data, origin }) {
|
||||
// console.log('data, origin, extensionsAdded', data, origin, extensionsAdded);
|
||||
const messageObj = { data, origin };
|
||||
if (!this.extensionsAdded) {
|
||||
this.messageQueue.push(messageObj);
|
||||
|
|
|
@ -48,7 +48,6 @@ export const add = function (menuItem) {
|
|||
throw new Error('Cannot add extension "' + menuItem.id + '", an extension by that name already exists"');
|
||||
}
|
||||
// Register menuItem action, see below for deferred menu dom injection
|
||||
console.log('Registered contextmenu item: {id:' + menuItem.id + ', label:' + menuItem.label + '}');
|
||||
contextMenuExtensions[menuItem.id] = menuItem;
|
||||
// TODO: Need to consider how to handle custom enable/disable behavior
|
||||
};
|
||||
|
|
|
@ -34,7 +34,6 @@ async function processResults (url) {
|
|||
|
||||
const r = await fetch(url);
|
||||
const json = await r.json();
|
||||
// console.log('json', json);
|
||||
|
||||
if (!json || json.msg !== 'success') {
|
||||
// Todo: This could use a generic alert library instead
|
||||
|
@ -87,7 +86,6 @@ async function processResults (url) {
|
|||
async click (e) {
|
||||
e.preventDefault();
|
||||
const { value: svgurl } = this.dataset;
|
||||
// console.log('this', id, svgurl);
|
||||
const post = (message) => {
|
||||
// Todo: Make origin customizable as set by opening window
|
||||
// Todo: If dropping IE9, avoid stringifying
|
||||
|
@ -103,7 +101,6 @@ async function processResults (url) {
|
|||
});
|
||||
const result = await fetch(svgurl);
|
||||
const svg = await result.text();
|
||||
// console.log('url and svg', svgurl, svg);
|
||||
post({
|
||||
href: svgurl,
|
||||
data: svg
|
||||
|
|
|
@ -123,8 +123,6 @@ export default {
|
|||
function setIcon (pos, id) {
|
||||
if (id.substr(0, 1) !== '\\') { id = '\\textmarker'; }
|
||||
const ci = idPrefix + pos + '_' + id.substr(1);
|
||||
console.log(ci);
|
||||
console.log('cur_' + pos + '_marker_list');
|
||||
svgEditor.setIcon('cur_' + pos + '_marker_list', $id(ci).children);
|
||||
$id(ci).classList.add('current');
|
||||
const siblings = Array.prototype.filter.call($id(ci).parentNode.children, function(child){
|
||||
|
@ -585,7 +583,6 @@ export default {
|
|||
},
|
||||
selectedChanged (opts) {
|
||||
// Use this to update the current selected elements
|
||||
// console.log('selectChanged',opts);
|
||||
selElems = opts.elems;
|
||||
|
||||
const markerElems = [ 'line', 'path', 'polyline', 'polygon' ];
|
||||
|
|
|
@ -191,12 +191,11 @@ export default {
|
|||
// When MathJax is loaded get the div where the math will be rendered.
|
||||
MathJax.Hub.queue.Push(function () {
|
||||
math = MathJax.Hub.getAllJax('#mathjax_creator')[0];
|
||||
console.log(math);
|
||||
mathjaxLoaded = true;
|
||||
console.log('MathJax Loaded');
|
||||
console.info('MathJax Loaded');
|
||||
});
|
||||
} catch (e) {
|
||||
console.log('Failed loading MathJax.');
|
||||
console.warn('Failed loading MathJax.');
|
||||
// eslint-disable-next-line no-alert
|
||||
alert('Failed loading MathJax. You will not be able to change the mathematics.');
|
||||
}
|
||||
|
|
|
@ -223,7 +223,6 @@ export default {
|
|||
function colorChanged (el) {
|
||||
const color = el.getAttribute('stroke');
|
||||
const marker = getLinked(el, 'marker-start');
|
||||
// console.log(marker);
|
||||
if (!marker) { return; }
|
||||
if (!marker.attributes.class) { return; } // not created by this extension
|
||||
const ch = marker.lastElementChild;
|
||||
|
|
|
@ -41,7 +41,6 @@ export default {
|
|||
* @returns {void}
|
||||
*/
|
||||
(win, { data, origin }) => {
|
||||
// console.log('data, origin', data, origin);
|
||||
let type, content;
|
||||
try {
|
||||
({ type, pathID, content } = data.webappfind); // May throw if data is not an object
|
||||
|
|
|
@ -83,7 +83,7 @@ export const putLocale = async function (givenParam, goodLangs) {
|
|||
}
|
||||
}
|
||||
});
|
||||
console.log(`Lang: ${i18next.t('lang')}`);
|
||||
console.info(`Lang: ${i18next.t('lang')}`);
|
||||
return { langParam, i18next };
|
||||
};
|
||||
|
||||
|
|
|
@ -318,8 +318,7 @@ export const pathActionsMethod = (function () {
|
|||
}
|
||||
return element;
|
||||
};
|
||||
// console.log(pathActionsContext_);
|
||||
// const convertPath = pathActionsContext_.getConvertPath();
|
||||
|
||||
return (/** @lends module:path.pathActions */ {
|
||||
/**
|
||||
* @param {MouseEvent} evt
|
||||
|
@ -464,7 +463,6 @@ export const pathActionsMethod = (function () {
|
|||
editorContext_.getMouseTarget(evt)
|
||||
)) {
|
||||
// Clicked outside canvas, so don't make point
|
||||
// console.log('Clicked outside canvas');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue