remove local jquery file and update to latest npm version
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
/* globals jQuery */
|
||||
const $ = jQuery;
|
||||
/* globals $ */
|
||||
const atags = document.querySelectorAll('a');
|
||||
Array.prototype.forEach.call(atags, function (aEle) {
|
||||
aEle.addEventListener('click', function (event) {
|
||||
|
||||
@@ -4,9 +4,15 @@ For default config and extensions (and available options) available to
|
||||
`setConfig()`, see the file `docs/tutorials/ConfigOptions.md`
|
||||
*/
|
||||
|
||||
import './jquery.min.js';
|
||||
import jQuery from 'jquery/dist/jquery.slim.js';
|
||||
import jQueryPluginSVG from '../svgcanvas/jQuery.attr.js'; // Needed for SVG attribute
|
||||
import './components/index.js';
|
||||
import './dialogs/index.js';
|
||||
import Editor from './Editor.js';
|
||||
|
||||
// Global Constant
|
||||
window.$ = jQueryPluginSVG(jQuery);
|
||||
|
||||
const svgEditor = new Editor();
|
||||
svgEditor.init();
|
||||
|
||||
|
||||
4
src/editor/jquery.min.js
vendored
4
src/editor/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -3,6 +3,7 @@
|
||||
* @license MIT
|
||||
* @copyright 2011 Jeff Schiller
|
||||
*/
|
||||
|
||||
import { jGraduate } from '../editor/components/jgraduate/jQuery.jGraduate.js';
|
||||
import * as hstry from './history.js';
|
||||
import { NS } from '../common/namespaces.js';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* globals jQuery */
|
||||
/* globals $ */
|
||||
/**
|
||||
* Path functionality.
|
||||
* @module path
|
||||
@@ -23,8 +23,6 @@ import {
|
||||
isWebkit
|
||||
} from '../common/browser.js';
|
||||
|
||||
const $ = jQuery;
|
||||
|
||||
let pathActionsContext_ = null;
|
||||
let editorContext_ = null;
|
||||
let path = null;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
/* globals jQuery */
|
||||
/* globals $ */
|
||||
/**
|
||||
* Recalculate.
|
||||
* @module recalculate
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import jQueryPluginSVG from './jQuery.attr.js'; // Needed for SVG attribute setting and array form with `attr`
|
||||
import { NS } from '../common/namespaces.js';
|
||||
import { convertToNum } from '../common/units.js';
|
||||
import { isWebkit } from '../common/browser.js';
|
||||
@@ -18,8 +17,6 @@ import {
|
||||
hasMatrixTransform
|
||||
} from './math.js';
|
||||
|
||||
const $ = jQueryPluginSVG(jQuery);
|
||||
|
||||
let context_;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* globals jQuery */
|
||||
/* globals $ */
|
||||
/**
|
||||
* Tools for SVG selected element operation.
|
||||
* @module selected-elem
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* @copyright 2010 Alexis Deveria, 2010 Jeff Schiller
|
||||
*/
|
||||
import jQueryPluginSVG from './jQuery.attr.js'; // Needed for SVG attribute
|
||||
|
||||
import { NS } from '../common/namespaces.js';
|
||||
import * as hstry from './history.js';
|
||||
import * as pathModule from './path.js';
|
||||
@@ -31,7 +31,6 @@ import { getParents } from '../editor/components/jgraduate/Util.js';
|
||||
const {
|
||||
MoveElementCommand, BatchCommand, InsertElementCommand, RemoveElementCommand, ChangeElementCommand
|
||||
} = hstry;
|
||||
const $ = jQueryPluginSVG(jQuery);
|
||||
|
||||
let elementContext_ = null;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* globals jQuery */
|
||||
/* globals $ */
|
||||
/**
|
||||
* Tools for svg.
|
||||
* @module svg
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
import { jsPDF } from 'jspdf/dist/jspdf.es.min.js';
|
||||
import 'svg2pdf.js/dist/svg2pdf.es.js';
|
||||
import jQueryPluginSVG from './jQuery.attr.js';
|
||||
import * as hstry from './history.js';
|
||||
import {
|
||||
text2xml, cleanupElement, findDefs, getHref, preventClickDefault,
|
||||
@@ -36,8 +35,6 @@ const {
|
||||
ChangeElementCommand, BatchCommand
|
||||
} = hstry;
|
||||
|
||||
const $ = jQueryPluginSVG(jQuery);
|
||||
|
||||
let svgContext_ = null;
|
||||
let $id = null;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* globals jQuery */
|
||||
/* globals $ */
|
||||
/**
|
||||
* Numerous tools for working with the editor's "canvas".
|
||||
* @module svgcanvas
|
||||
@@ -12,8 +12,6 @@
|
||||
import { Canvg as canvg } from 'canvg';
|
||||
import 'pathseg';
|
||||
|
||||
import jQueryPluginSVG from './jQuery.attr.js'; // Needed for SVG attribute setting and array form with `attr`
|
||||
|
||||
import * as pathModule from './path.js';
|
||||
import * as hstry from './history.js';
|
||||
import * as draw from './draw.js';
|
||||
@@ -114,7 +112,6 @@ import {
|
||||
getClosest, getParents, mergeDeep
|
||||
} from '../editor/components/jgraduate/Util.js';
|
||||
|
||||
const $ = jQueryPluginSVG(jQuery);
|
||||
const {
|
||||
MoveElementCommand, InsertElementCommand, RemoveElementCommand,
|
||||
ChangeElementCommand, BatchCommand
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* globals jQuery */
|
||||
/* globals $ */
|
||||
/**
|
||||
* Miscellaneous utilities.
|
||||
* @module utilities
|
||||
@@ -7,7 +7,6 @@
|
||||
* @copyright 2010 Alexis Deveria, 2010 Jeff Schiller
|
||||
*/
|
||||
|
||||
import jQueryPluginSVG from './jQuery.attr.js'; // Needed for SVG attribute setting and array form with `attr`
|
||||
import { NS } from '../common/namespaces.js';
|
||||
import { getTransformList } from './svgtransformlist.js';
|
||||
import { setUnitAttr, getTypeMap } from '../common/units.js';
|
||||
@@ -20,9 +19,6 @@ import {
|
||||
} from '../common/browser.js';
|
||||
import { getClosest } from '../editor/components/jgraduate/Util.js';
|
||||
|
||||
// Constants
|
||||
const $ = jQueryPluginSVG(jQuery);
|
||||
|
||||
// String used to encode base64.
|
||||
const KEYSTR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user