- Linting (ESLint): Apply per latest ash-nazg (jsdoc: complete sentence descriptions)
- npm: Update devDeps
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* Browser detection
|
||||
* Browser detection.
|
||||
* @module browser
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/* eslint-disable new-cap, class-methods-use-this */
|
||||
// Todo: Compare with latest canvg (add any improvements of ours) and add full JSDocs (denoting links to standard APIs and which are custom): https://github.com/canvg/canvg
|
||||
/**
|
||||
* canvg.js - Javascript SVG parser and renderer on Canvas
|
||||
* Javascript SVG parser and renderer on Canvas.
|
||||
* @file canvg.js
|
||||
* @module canvg
|
||||
* @license MIT
|
||||
* @author Gabe Lerner <gabelerner@gmail.com>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* For parsing color values
|
||||
* For parsing color values.
|
||||
* @module RGBColor
|
||||
* @author Stoyan Stefanov <sstoo@gmail.com>
|
||||
* @see https://www.phpied.com/rgb-color-parser-in-javascript/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* Adds context menu functionality
|
||||
* Adds context menu functionality.
|
||||
* @module contextmenu
|
||||
* @license Apache-2.0
|
||||
* @author Adam Bender
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* jQuery Context Menu Plugin
|
||||
* @file jQuery Context Menu Plugin
|
||||
* Cory S.N. LaViska
|
||||
* A Beautiful Site ({@link https://abeautifulsite.net/})
|
||||
* Modified by Alexis Deveria
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* Manipulating coordinates
|
||||
* Manipulating coordinates.
|
||||
* @module coords
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* Tools for drawing
|
||||
* Tools for drawing.
|
||||
* @module draw
|
||||
* @license MIT
|
||||
* @copyright 2011 Jeff Schiller
|
||||
@@ -697,7 +697,7 @@ export const randomizeIds = function (enableRandomization, currentDrawing) {
|
||||
// Layer API Functions
|
||||
|
||||
/**
|
||||
* Group: Layers
|
||||
* Group: Layers.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -738,7 +738,7 @@ export const randomizeIds = function (enableRandomization, currentDrawing) {
|
||||
* @returns {void}
|
||||
*/
|
||||
/**
|
||||
* Run the callback function associated with the given event
|
||||
* Run the callback function associated with the given event.
|
||||
* @function module:draw.DrawCanvasInit#call
|
||||
* @param {"changed"|"contextset"} ev - String with the event name
|
||||
* @param {module:svgcanvas.SvgCanvas#event:changed|module:svgcanvas.SvgCanvas#event:contextset} arg - Argument to pass through to the callback
|
||||
|
||||
@@ -68,7 +68,7 @@ function exportPDF () {
|
||||
svgCanvas.getUIStrings()(function (uiStrings) {
|
||||
const str = uiStrings.notification.loadingImage;
|
||||
|
||||
/**
|
||||
/*
|
||||
// If you want to handle the PDF blob yourself, do as follows
|
||||
svgCanvas.bind('exportedPDF', function (win, data) {
|
||||
alert(data.output);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/**
|
||||
* Handles underlying communication between the embedding window and the editor frame
|
||||
* Handles underlying communication between the embedding window and the
|
||||
* editor frame.
|
||||
* @module EmbeddedSVGEdit
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-arrows.js
|
||||
* @file ext-arrows.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-closepath.js
|
||||
* @file ext-closepath.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable unicorn/no-fn-reference-in-iterator */
|
||||
/**
|
||||
* ext-connector.js
|
||||
* @file ext-connector.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-eyedropper.js
|
||||
* @file ext-eyedropper.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-foreignobject.js
|
||||
* @file ext-foreignobject.js
|
||||
*
|
||||
* @license Apache-2.0
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-grid.js
|
||||
* @file ext-grid.js
|
||||
*
|
||||
* @license Apache-2.0
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-helloworld.js
|
||||
* @file ext-helloworld.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-imagelib.js
|
||||
* @file ext-imagelib.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-markers.js
|
||||
* @file ext-markers.js
|
||||
*
|
||||
* @license Apache-2.0
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* globals MathJax */
|
||||
/**
|
||||
* ext-mathjax.js
|
||||
* @file ext-mathjax.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-overview_window.js
|
||||
* @file ext-overview_window.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-panning.js
|
||||
* @file ext-panning.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-placemark.js
|
||||
* @file ext-placemark.js
|
||||
*
|
||||
*
|
||||
* @copyright 2010 CloudCanvas, Inc. All rights reserved
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-polygon.js
|
||||
* @file ext-polygon.js
|
||||
*
|
||||
*
|
||||
* @copyright 2010 CloudCanvas, Inc. All rights reserved
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-server_moinsave.js
|
||||
* @file ext-server_moinsave.js
|
||||
*
|
||||
* @license (MIT OR GPL-2.0-or-later)
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-server_opensave.js
|
||||
* @file ext-server_opensave.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-shapes.js
|
||||
* @file ext-shapes.js
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-star.js
|
||||
* @file ext-star.js
|
||||
*
|
||||
*
|
||||
* @copyright 2010 CloudCanvas, Inc. All rights reserved
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* ext-storage.js
|
||||
* @file ext-storage.js
|
||||
*
|
||||
* This extension allows automatic saving of the SVG canvas contents upon
|
||||
* page unload (which can later be automatically retrieved upon future
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/**
|
||||
* Depends on Firefox add-on and executables from {@link https://github.com/brettz9/webappfind}
|
||||
* Depends on Firefox add-on and executables from
|
||||
* {@link https://github.com/brettz9/webappfind}.
|
||||
* @author Brett Zamir
|
||||
* @license MIT
|
||||
* @todo See WebAppFind Readme for SVG-related todos
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Should not be needed for same domain control (just call via child frame),
|
||||
* but an API common for cross-domain and same domain use can be found
|
||||
* in embedapi.js with a demo at embedapi.html
|
||||
* in embedapi.js with a demo at embedapi.html.
|
||||
*/
|
||||
export default {
|
||||
name: 'xdomain-messaging',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* For command history tracking and undo functionality
|
||||
* For command history tracking and undo functionality.
|
||||
* @module history
|
||||
* @license MIT
|
||||
* @copyright 2010 Jeff Schiller
|
||||
@@ -9,7 +9,7 @@ import {getHref, setHref, getRotationAngle, isNullish} from './utilities.js';
|
||||
import {removeElementFromListMap} from './svgtransformlist.js';
|
||||
|
||||
/**
|
||||
* Group: Undo/Redo history management
|
||||
* Group: Undo/Redo history management.
|
||||
*/
|
||||
export const HistoryEventTypes = {
|
||||
BEFORE_APPLY: 'before_apply',
|
||||
@@ -41,7 +41,7 @@ class Command {
|
||||
* @interface module:history.HistoryCommand
|
||||
*/
|
||||
/**
|
||||
* Applies
|
||||
* Applies.
|
||||
*
|
||||
* @function module:history.HistoryCommand#apply
|
||||
* @param {module:history.HistoryEventHandler} handler
|
||||
@@ -50,29 +50,29 @@ class Command {
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* Unapplies
|
||||
* Unapplies.
|
||||
* @function module:history.HistoryCommand#unapply
|
||||
* @param {module:history.HistoryEventHandler} handler
|
||||
* @fires module:history~Command#event:history
|
||||
* @returns {void|true}
|
||||
*/
|
||||
/**
|
||||
* Returns the elements
|
||||
* Returns the elements.
|
||||
* @function module:history.HistoryCommand#elements
|
||||
* @returns {Element[]}
|
||||
*/
|
||||
/**
|
||||
* Gets the text
|
||||
* Gets the text.
|
||||
* @function module:history.HistoryCommand#getText
|
||||
* @returns {string}
|
||||
*/
|
||||
/**
|
||||
* Gives the type
|
||||
* Gives the type.
|
||||
* @function module:history.HistoryCommand.type
|
||||
* @returns {string}
|
||||
*/
|
||||
/**
|
||||
* Gives the type
|
||||
* Gives the type.
|
||||
* @function module:history.HistoryCommand#type
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* HistoryRecordingService component of history
|
||||
* HistoryRecordingService component of history.
|
||||
* @module history
|
||||
* @license MIT
|
||||
* @copyright 2016 Flint O'Brien
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* jQuery module to work with SVG attributes
|
||||
* A jQuery module to work with SVG attributes.
|
||||
* @module jQueryAttr
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* jGraduate 0.4
|
||||
* @file jGraduate 0.4
|
||||
*
|
||||
* jQuery Plugin for a gradient picker
|
||||
*
|
||||
@@ -86,13 +86,13 @@ export default function jQueryPluginJGraduate ($) {
|
||||
*/
|
||||
this.type = options.copy.type;
|
||||
/**
|
||||
* Represents opacity (0-100)
|
||||
* Represents opacity (0-100).
|
||||
* @name module:jGraduate~Paint#alpha
|
||||
* @type {Float}
|
||||
*/
|
||||
this.alpha = options.copy.alpha;
|
||||
/**
|
||||
* Represents #RRGGBB hex of color
|
||||
* Represents #RRGGBB hex of color.
|
||||
* @name module:jGraduate~Paint#solidColor
|
||||
* @type {string}
|
||||
*/
|
||||
@@ -169,7 +169,7 @@ export default function jQueryPluginJGraduate ($) {
|
||||
*/
|
||||
$.fn.jGraduateDefaults = /** @lends external:jQuery.fn.jGraduateDefaults */ {
|
||||
/**
|
||||
* Creates an object with a 'none' color
|
||||
* Creates an object with a 'none' color.
|
||||
* @type {external:jQuery.jGraduate.Paint}
|
||||
* @see module:jGraduate.Options
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable no-bitwise */
|
||||
/**
|
||||
* jPicker (Adapted from version 1.1.6)
|
||||
* @file jPicker (Adapted from version 1.1.6)
|
||||
*
|
||||
* jQuery Plugin for Photoshop style color picker
|
||||
*
|
||||
@@ -698,7 +698,7 @@ const jPicker = function ($) {
|
||||
$.jPicker = /** @lends external:jQuery.jPicker */ {
|
||||
/* eslint-enable jsdoc/require-property */
|
||||
/**
|
||||
* Array holding references to each active instance of the jPicker control
|
||||
* Array holding references to each active instance of the jPicker control.
|
||||
* @type {external:jQuery.fn.$.fn.jPicker[]}
|
||||
*/
|
||||
List: [],
|
||||
@@ -1006,7 +1006,7 @@ const jPicker = function ($) {
|
||||
}
|
||||
},
|
||||
/**
|
||||
* color conversion methods - make public to give use to external scripts
|
||||
* Color conversion methods - make public to give use to external scripts.
|
||||
* @namespace
|
||||
*/
|
||||
ColorMethods: {
|
||||
@@ -1191,7 +1191,7 @@ const jPicker = function ($) {
|
||||
*/
|
||||
|
||||
/**
|
||||
* Will be bound to active {@link jQuery.jPicker.Color}
|
||||
* Will be bound to active {@link jQuery.jPicker.Color}.
|
||||
* @callback module:jPicker.LiveCallback
|
||||
* @param {external:jQuery} ui
|
||||
* @param {Element} context
|
||||
@@ -2331,8 +2331,8 @@ const jPicker = function ($) {
|
||||
* @property {string} localization.tooltips.hex.alpha
|
||||
*/
|
||||
/**
|
||||
* jPicker defaults - you can change anything in this section (such as the
|
||||
* clientPath to your images) without fear of breaking the program
|
||||
* The jPicker defaults - you can change anything in this section (such as the
|
||||
* clientPath to your images) without fear of breaking the program.
|
||||
* @namespace {external:jQuery.fn.jPickerOptions} defaults
|
||||
* @memberof external:jQuery.fn.$.fn.jPicker
|
||||
* @borrows external:jQuery.fn.jPickerOptions as external:jQuery.fn.jPicker.defaults
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* Provides tools for the layer concept
|
||||
* Provides tools for the layer concept.
|
||||
* @module layer
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable unicorn/no-fn-reference-in-iterator */
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* Localizing script for SVG-edit UI
|
||||
* Localizing script for SVG-edit UI.
|
||||
* @module locale
|
||||
* @license MIT
|
||||
*
|
||||
@@ -11,11 +11,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Used, for example, in the ImageLibs extension, to present libraries (with name/URL/description) in order
|
||||
* Used, for example, in the ImageLibs extension, to present libraries
|
||||
* (with name/URL/description) in order.
|
||||
* @typedef {GenericArray<module:locale.LocaleStrings>} module:locale.LocaleArray
|
||||
*/
|
||||
/**
|
||||
* The string keys of the object are two-letter language codes
|
||||
* The string keys of the object are two-letter language codes.
|
||||
* @tutorial LocaleDocs
|
||||
* @typedef {PlainObject<string, string|module:locale.LocaleStrings|module:locale.LocaleArray>} module:locale.LocaleStrings
|
||||
*/
|
||||
@@ -91,7 +92,7 @@ export const setStrings = function (type, obj, ids) {
|
||||
|
||||
/**
|
||||
* The "data" property is generally set to an an array of objects with
|
||||
* "id" and "title" or "textContent" properties
|
||||
* "id" and "title" or "textContent" properties.
|
||||
* @typedef {PlainObject} module:locale.AddLangExtensionLocaleData
|
||||
* @property {module:locale.LocaleStrings[]} data See {@tutorial LocaleDocs}
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Mathematical utilities
|
||||
* Mathematical utilities.
|
||||
* @module math
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
* Namespaces or tools therefor
|
||||
* Namespaces or tools therefor.
|
||||
* @module namespaces
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/**
|
||||
* Common namepaces constants in alpha order
|
||||
* Common namepaces constants in alpha order.
|
||||
* @enum {string}
|
||||
* @type {PlainObject}
|
||||
* @memberof module:namespaces
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* Path functionality
|
||||
* Path functionality.
|
||||
* @module path
|
||||
* @license MIT
|
||||
*
|
||||
@@ -86,7 +86,7 @@ let editorContext_ = null;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Object with the following keys/values
|
||||
* Object with the following keys/values.
|
||||
* @typedef {PlainObject} module:path.SVGElementJSON
|
||||
* @property {string} element - Tag name of the SVG element to create
|
||||
* @property {PlainObject<string, string>} attr - Has key-value attributes to assign to the new element. An `id` should be set so that {@link module:utilities.EditorContext#addSVGElementFromJson} can later re-identify the element for modification or replacement.
|
||||
@@ -111,7 +111,7 @@ let editorContext_ = null;
|
||||
* @returns {void}
|
||||
*/
|
||||
/**
|
||||
* Note: This doesn't round to an integer necessarily
|
||||
* Note: This doesn't round to an integer necessarily.
|
||||
* @function module:path.EditorContext#round
|
||||
* @param {Float} val
|
||||
* @returns {Float} Rounded value to nearest value based on `currentZoom`
|
||||
@@ -193,17 +193,17 @@ let editorContext_ = null;
|
||||
* @returns {Float} The current zoom level
|
||||
*/
|
||||
/**
|
||||
* Returns the last created DOM element ID string
|
||||
* Returns the last created DOM element ID string.
|
||||
* @function module:path.EditorContext#getId
|
||||
* @returns {string}
|
||||
*/
|
||||
/**
|
||||
* Creates and returns a unique ID string for a DOM element
|
||||
* Creates and returns a unique ID string for a DOM element.
|
||||
* @function module:path.EditorContext#getNextId
|
||||
* @returns {string}
|
||||
*/
|
||||
/**
|
||||
* Gets the desired element from a mouse event
|
||||
* Gets the desired element from a mouse event.
|
||||
* @function module:path.EditorContext#getMouseTarget
|
||||
* @param {external:MouseEvent} evt - Event object from the mouse event
|
||||
* @returns {Element} DOM element we want
|
||||
@@ -1503,7 +1503,7 @@ export const reorientGrads = function (elem, m) {
|
||||
};
|
||||
|
||||
/**
|
||||
* This is how we map paths to our preferred relative segment types
|
||||
* This is how we map paths to our preferred relative segment types.
|
||||
* @name module:path.pathMap
|
||||
* @type {GenericArray}
|
||||
*/
|
||||
@@ -1699,8 +1699,8 @@ function pathDSegment (letter, points, morePoints, lastPoint) {
|
||||
|
||||
/* eslint-disable jsdoc/require-property */
|
||||
/**
|
||||
* Group: Path edit functions
|
||||
* Functions relating to editing path elements
|
||||
* Group: Path edit functions.
|
||||
* Functions relating to editing path elements.
|
||||
* @namespace {PlainObject} pathActions
|
||||
* @memberof module:path
|
||||
*/
|
||||
@@ -2640,7 +2640,7 @@ export const pathActions = (function () {
|
||||
},
|
||||
// Can't seem to use `@borrows` here, so using `@see`
|
||||
/**
|
||||
* Smooth polyline into path
|
||||
* Smooth polyline into path.
|
||||
* @function module:path.pathActions.smoothPolylineIntoPath
|
||||
* @see module:path~smoothPolylineIntoPath
|
||||
*/
|
||||
@@ -2704,7 +2704,7 @@ export const pathActions = (function () {
|
||||
},
|
||||
// Can't seem to use `@borrows` here, so using `@see`
|
||||
/**
|
||||
* Convert a path to one with only absolute or relative values
|
||||
* Convert a path to one with only absolute or relative values.
|
||||
* @function module:path.pathActions.convertPath
|
||||
* @see module:path.convertPath
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Tools for SVG sanitization
|
||||
* Tools for SVG sanitization.
|
||||
* @module sanitize
|
||||
* @license MIT
|
||||
*
|
||||
@@ -15,7 +15,7 @@ const REVERSE_NS = getReverseNS();
|
||||
// Todo: Split out into core attributes, presentation attributes, etc. so consistent
|
||||
/**
|
||||
* This defines which elements and attributes that we support (or at least
|
||||
* don't remove)
|
||||
* don't remove).
|
||||
* @type {PlainObject}
|
||||
*/
|
||||
const svgWhiteList_ = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* DOM element selection box tools
|
||||
* DOM element selection box tools.
|
||||
* @module select
|
||||
* @license MIT
|
||||
*
|
||||
|
||||
@@ -1,53 +1,55 @@
|
||||
/**
|
||||
* SpinButton control
|
||||
* SpinButton control.
|
||||
*
|
||||
* Adds bells and whistles to any ordinary textbox to
|
||||
* make it look and feel like a SpinButton Control.
|
||||
*
|
||||
* Supplies {@link external:jQuery.fn.SpinButton} (and also {@link external:jQuery.loadingStylesheets})
|
||||
* Supplies {@link external:jQuery.fn.SpinButton} (and also {@link external:jQuery.loadingStylesheets}).
|
||||
*
|
||||
* Originally written by George Adamson, Software Unity (george.jquery@softwareunity.com) August 2006.
|
||||
* - Added min/max options
|
||||
* - Added step size option
|
||||
* - Added bigStep (page up/down) option
|
||||
* Originally written by George Adamson, Software Unity (george.jquery@softwareunity.com) August 2006:
|
||||
* - Added min/max options.
|
||||
* - Added step size option.
|
||||
* - Added bigStep (page up/down) option.
|
||||
*
|
||||
* Modifications made by Mark Gibson, (mgibson@designlinks.net) September 2006:
|
||||
* - Converted to jQuery plugin
|
||||
* - Allow limited or unlimited min/max values
|
||||
* - Allow custom class names, and add class to input element
|
||||
* - Removed global vars
|
||||
* - Reset (to original or through config) when invalid value entered
|
||||
* - Repeat whilst holding mouse button down (with initial pause, like keyboard repeat)
|
||||
* - Support mouse wheel in Firefox
|
||||
* - Fix double click in IE
|
||||
* - Refactored some code and renamed some vars
|
||||
* - Converted to jQuery plugin.
|
||||
* - Allow limited or unlimited min/max values.
|
||||
* - Allow custom class names, and add class to input element.
|
||||
* - Removed global vars.
|
||||
* - Reset (to original or through config) when invalid value entered.
|
||||
* - Repeat whilst holding mouse button down (with initial pause, like keyboard repeat).
|
||||
* - Support mouse wheel in Firefox.
|
||||
* - Fix double click in IE.
|
||||
* - Refactored some code and renamed some vars.
|
||||
*
|
||||
* Modifications by Jeff Schiller, June 2009:
|
||||
* - provide callback function for when the value changes based on the following
|
||||
* {@link https://www.mail-archive.com/jquery-en@googlegroups.com/msg36070.html}
|
||||
* {@link https://www.mail-archive.com/jquery-en@googlegroups.com/msg36070.html}.
|
||||
*
|
||||
* Modifications by Jeff Schiller, July 2009:
|
||||
* - improve styling for widget in Opera
|
||||
* - consistent key-repeat handling cross-browser
|
||||
* - improve styling for widget in Opera.
|
||||
* - consistent key-repeat handling cross-browser.
|
||||
*
|
||||
* Modifications by Alexis Deveria, October 2009:
|
||||
* - provide "stepfunc" callback option to allow custom function to run when changing a value
|
||||
* - provide "stepfunc" callback option to allow custom function to run when changing a value.
|
||||
* - Made adjustValue(0) only run on certain keyup events, not all.
|
||||
*
|
||||
* Tested in IE6, Opera9, Firefox 1.5
|
||||
* Tested in IE6, Opera9, Firefox 1.5.
|
||||
*
|
||||
* | Version | Date | Author | Notes
|
||||
* |---------|------|--------|------|
|
||||
* | v1.0 | 11 Aug 2006 | George Adamson | First release
|
||||
* | v1.1 | Aug 2006 | George Adamson | Minor enhancements
|
||||
* | v1.2 | 27 Sep 2006 | Mark Gibson | Major enhancements
|
||||
* | v1.3a | 28 Sep 2006 | George Adamson | Minor enhancements
|
||||
* | v1.4 | 18 Jun 2009 | Jeff Schiller | Added callback function
|
||||
* | v1.5 | 06 Jul 2009 | Jeff Schiller | Fixes for Opera.
|
||||
* | v1.6 | 13 Oct 2009 | Alexis Deveria | Added stepfunc function
|
||||
* | v1.7 | 21 Oct 2009 | Alexis Deveria | Minor fixes.<br />Fast-repeat for keys and live updating as you type.
|
||||
* | v1.8 | 12 Jan 2010 | Benjamin Thomas | Fixes for mouseout behavior.<br />Added smallStep
|
||||
* | Version | Date | Author | Notes |
|
||||
* |---------|------|--------|-------|
|
||||
* | v1.0 | 11 Aug 2006 | George Adamson | First release |
|
||||
* | v1.1 | Aug 2006 | George Adamson | Minor enhancements |
|
||||
* | v1.2 | 27 Sep 2006 | Mark Gibson | Major enhancements |
|
||||
* | v1.3a | 28 Sep 2006 | George Adamson | Minor enhancements |
|
||||
* | v1.4 | 18 Jun 2009 | Jeff Schiller | Added callback function |
|
||||
* | v1.5 | 06 Jul 2009 | Jeff Schiller | Fixes for Opera. |
|
||||
* | v1.6 | 13 Oct 2009 | Alexis Deveria | Added stepfunc function |
|
||||
* | v1.7 | 21 Oct 2009 | Alexis Deveria | Minor fixes.<br />Fast-repeat for keys and live updating as you type. |
|
||||
* | v1.8 | 12 Jan 2010 | Benjamin Thomas | Fixes for mouseout behavior.<br />Added smallStep |
|
||||
* | v1.9 | 20 May 2018 | Brett Zamir | Avoid SVGEdit dependency via `stateObj` config;<br />convert to ES6 module |
|
||||
* .
|
||||
*
|
||||
* @module jQuerySpinButton
|
||||
* @example
|
||||
// Create group of settings to initialise spinbutton(s). (Optional)
|
||||
|
||||
@@ -31,7 +31,7 @@ import {
|
||||
import loadStylesheets from './external/load-stylesheets/index-es.js';
|
||||
|
||||
/**
|
||||
* The main module for the visual SVG Editor
|
||||
* The main module for the visual SVG Editor.
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
@@ -102,7 +102,7 @@ const callbacks = [],
|
||||
* @typedef {"s"|"m"|"l"|"xl"|Float} module:SVGEditor.IconSize
|
||||
*/
|
||||
/**
|
||||
* Preferences
|
||||
* Preferences.
|
||||
* @interface module:SVGEditor.Prefs
|
||||
* @property {string} [lang="en"] Two-letter language code. The language must exist in the Editor Preferences language list. Defaults to "en" if `locale.js` detection does not detect another language.
|
||||
* @property {module:SVGEditor.IconSize} [iconsize="s"|"m"] Size of the toolbar icons. Will default to 's' if the window height is smaller than the minimum height and 'm' otherwise.
|
||||
@@ -122,12 +122,12 @@ const callbacks = [],
|
||||
defaultPrefs = /** @lends module:SVGEditor~defaultPrefs */ {
|
||||
// EDITOR OPTIONS (DIALOG)
|
||||
/**
|
||||
* Default to "en" if locale.js detection does not detect another language
|
||||
* Default to "en" if locale.js detection does not detect another language.
|
||||
*/
|
||||
lang: '',
|
||||
/**
|
||||
* Will default to 's' if the window height is smaller than the minimum height and
|
||||
* 'm' otherwise
|
||||
* Will default to 's' if the window height is smaller than the minimum
|
||||
* height and 'm' otherwise.
|
||||
*/
|
||||
iconsize: '',
|
||||
bkgd_color: '#FFF',
|
||||
@@ -286,7 +286,7 @@ const callbacks = [],
|
||||
avoidClientSideOpen: false
|
||||
},
|
||||
/**
|
||||
* LOCALE
|
||||
* LOCALE.
|
||||
* @name module:SVGEditor.uiStrings
|
||||
* @type {PlainObject}
|
||||
*/
|
||||
@@ -381,7 +381,7 @@ function getImportLocale ({defaultLang, defaultName}) {
|
||||
}
|
||||
|
||||
/**
|
||||
* EXPORTS
|
||||
* EXPORTS.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -569,7 +569,7 @@ editor.setConfig = function (opts, cfgCfg) {
|
||||
};
|
||||
|
||||
/**
|
||||
* All methods are optional
|
||||
* All methods are optional.
|
||||
* @interface module:SVGEditor.CustomHandler
|
||||
* @type {PlainObject}
|
||||
*/
|
||||
@@ -586,7 +586,7 @@ editor.setConfig = function (opts, cfgCfg) {
|
||||
* Its responsibilities are:
|
||||
* - accept the string contents of the current document
|
||||
* - invoke a file chooser dialog in 'save' mode
|
||||
* - save the file to location chosen by the user
|
||||
* - save the file to location chosen by the user.
|
||||
* @function module:SVGEditor.CustomHandler#save
|
||||
* @param {external:Window} win
|
||||
* @param {module:svgcanvas.SvgCanvas#event:saved} svgStr A string of the SVG
|
||||
@@ -3939,7 +3939,7 @@ editor.init = function () {
|
||||
// Made public for UI customization.
|
||||
// TODO: Group UI functions into a public editor.ui interface.
|
||||
/**
|
||||
* See {@link http://api.jquery.com/bind/#bind-eventType-eventData-handler}
|
||||
* See {@link http://api.jquery.com/bind/#bind-eventType-eventData-handler}.
|
||||
* @callback module:SVGEditor.DropDownCallback
|
||||
* @param {external:jQuery.Event} ev See {@link http://api.jquery.com/Types/#Event}
|
||||
* @listens external:jQuery.Event
|
||||
@@ -5554,7 +5554,7 @@ editor.init = function () {
|
||||
];
|
||||
/* eslint-disable jsdoc/require-property */
|
||||
/**
|
||||
* Associate all button actions as well as non-button keyboard shortcuts
|
||||
* Associate all button actions as well as non-button keyboard shortcuts.
|
||||
* @namespace {PlainObject} module:SVGEditor~Actions
|
||||
*/
|
||||
const Actions = (function () {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable indent, unicorn/no-fn-reference-in-iterator */
|
||||
/* globals jQuery, jsPDF */
|
||||
/**
|
||||
* Numerous tools for working with the editor's "canvas"
|
||||
* Numerous tools for working with the editor's "canvas".
|
||||
* @module svgcanvas
|
||||
*
|
||||
* @license MIT
|
||||
@@ -173,7 +173,7 @@ const svgroot = svgdoc.importNode(
|
||||
container.append(svgroot);
|
||||
|
||||
/**
|
||||
* The actual element that represents the final output SVG element
|
||||
* The actual element that represents the final output SVG element.
|
||||
* @name module:svgcanvas~svgcontent
|
||||
* @type {SVGSVGElement}
|
||||
*/
|
||||
@@ -220,7 +220,7 @@ canvas.setIdPrefix = function (p) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Current draw.Drawing object
|
||||
* Current `draw.Drawing` object.
|
||||
* @type {module:draw.Drawing}
|
||||
* @name module:svgcanvas.SvgCanvas#current_drawing_
|
||||
*/
|
||||
@@ -236,7 +236,7 @@ const getCurrentDrawing = canvas.getCurrentDrawing = function () {
|
||||
};
|
||||
|
||||
/**
|
||||
* Float displaying the current zoom level (1 = 100%, .5 = 50%, etc)
|
||||
* Float displaying the current zoom level (1 = 100%, .5 = 50%, etc.).
|
||||
* @type {Float}
|
||||
*/
|
||||
let currentZoom = 1;
|
||||
@@ -373,8 +373,8 @@ canvas.transformListToTransform = transformListToTransform;
|
||||
const getBaseUnit = () => { return curConfig.baseUnit; };
|
||||
|
||||
/**
|
||||
* initialize from units.js.
|
||||
* Send in an object implementing the ElementContainer interface (see units.js)
|
||||
* Initialize from units.js.
|
||||
* Send in an object implementing the ElementContainer interface (see units.js).
|
||||
*/
|
||||
unitsInit(
|
||||
/**
|
||||
@@ -578,7 +578,7 @@ const round = this.round = function (val) {
|
||||
selectInit(
|
||||
curConfig,
|
||||
/**
|
||||
* Export to select.js
|
||||
* Export to select.js.
|
||||
* @implements {module:select.SVGFactory}
|
||||
*/
|
||||
{
|
||||
@@ -589,7 +589,7 @@ selectInit(
|
||||
}
|
||||
);
|
||||
/**
|
||||
* This object manages selectors for us
|
||||
* This object manages selectors for us.
|
||||
* @name module:svgcanvas.SvgCanvas#selectorManager
|
||||
* @type {module:select.SelectorManager}
|
||||
*/
|
||||
@@ -1307,23 +1307,23 @@ const events = {};
|
||||
|
||||
canvas.call = call;
|
||||
/**
|
||||
* Array of what was changed (elements, layers)
|
||||
* Array of what was changed (elements, layers).
|
||||
* @event module:svgcanvas.SvgCanvas#event:changed
|
||||
* @type {Element[]}
|
||||
*/
|
||||
/**
|
||||
* Array of selected elements
|
||||
* Array of selected elements.
|
||||
* @event module:svgcanvas.SvgCanvas#event:selected
|
||||
* @type {Element[]}
|
||||
*/
|
||||
/**
|
||||
* Array of selected elements
|
||||
* Array of selected elements.
|
||||
* @event module:svgcanvas.SvgCanvas#event:transition
|
||||
* @type {Element[]}
|
||||
*/
|
||||
/**
|
||||
* The Element is always `SVGGElement`?
|
||||
* If not `null`, will be the set current group element
|
||||
* If not `null`, will be the set current group element.
|
||||
* @event module:svgcanvas.SvgCanvas#event:contextset
|
||||
* @type {null|Element}
|
||||
*/
|
||||
@@ -1376,7 +1376,7 @@ canvas.call = call;
|
||||
* @type {module:svgcanvas.Message}
|
||||
*/
|
||||
/**
|
||||
* SVG canvas converted to string
|
||||
* SVG canvas converted to string.
|
||||
* @event module:svgcanvas.SvgCanvas#event:saved
|
||||
* @type {string}
|
||||
*/
|
||||
@@ -1414,7 +1414,7 @@ canvas.call = call;
|
||||
|
||||
/**
|
||||
* The promise return, if present, resolves to `undefined`
|
||||
* (`extension_added`, `exported`, `saved`)
|
||||
* (`extension_added`, `exported`, `saved`).
|
||||
* @typedef {Promise<void>|void} module:svgcanvas.EventHandlerReturn
|
||||
*/
|
||||
|
||||
@@ -1581,7 +1581,7 @@ const logMatrix = function (m) {
|
||||
let rootSctm = null;
|
||||
|
||||
/**
|
||||
* Group: Selection
|
||||
* Group: Selection.
|
||||
*/
|
||||
|
||||
// TODO: do we need to worry about selectedBBoxes here?
|
||||
@@ -2072,7 +2072,7 @@ const mouseDown = function (evt) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The main (left) mouse button is held down on the canvas area
|
||||
* The main (left) mouse button is held down on the canvas area.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_mouseDown
|
||||
* @type {PlainObject}
|
||||
* @property {MouseEvent} event The event object
|
||||
@@ -2524,7 +2524,7 @@ const mouseMove = function (evt) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The mouse has moved on the canvas area
|
||||
* The mouse has moved on the canvas area.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_mouseMove
|
||||
* @type {PlainObject}
|
||||
* @property {MouseEvent} event The event object
|
||||
@@ -2786,7 +2786,7 @@ const mouseUp = function (evt) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The main (left) mouse button is released (anywhere)
|
||||
* The main (left) mouse button is released (anywhere).
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_mouseUp
|
||||
* @type {PlainObject}
|
||||
* @property {MouseEvent} event The event object
|
||||
@@ -3025,7 +3025,7 @@ $(container).bind(
|
||||
/* eslint-disable jsdoc/require-property */
|
||||
/**
|
||||
* Group: Text edit functions
|
||||
* Functions relating to editing text elements
|
||||
* Functions relating to editing text elements.
|
||||
* @namespace {PlainObject} textActions
|
||||
* @memberof module:svgcanvas.SvgCanvas#
|
||||
*/
|
||||
@@ -3533,7 +3533,7 @@ return /** @lends module:svgcanvas.SvgCanvas#textActions */ {
|
||||
}());
|
||||
|
||||
/**
|
||||
* Group: Serialization
|
||||
* Group: Serialization.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -3819,7 +3819,7 @@ this.svgToString = function (elem, indent) {
|
||||
}; // end svgToString()
|
||||
|
||||
/**
|
||||
* Function to run when image data is found
|
||||
* Function to run when image data is found.
|
||||
* @callback module:svgcanvas.ImageEmbeddedCallback
|
||||
* @param {string|false} result Data URL
|
||||
* @returns {void}
|
||||
@@ -4824,7 +4824,7 @@ draw.init(
|
||||
);
|
||||
|
||||
/**
|
||||
* Group: Document functions
|
||||
* Group: Document functions.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -5195,14 +5195,14 @@ this.setBBoxZoom = function (val, editorW, editorH) {
|
||||
* @type {Float}
|
||||
*/
|
||||
/**
|
||||
* The bottom panel was updated
|
||||
* The bottom panel was updated.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_toolButtonStateUpdate
|
||||
* @type {PlainObject}
|
||||
* @property {boolean} nofill Indicates fill is disabled
|
||||
* @property {boolean} nostroke Indicates stroke is disabled
|
||||
*/
|
||||
/**
|
||||
* The element selection has changed (elements were added/removed from selection)
|
||||
* The element selection has changed (elements were added/removed from selection).
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_selectedChanged
|
||||
* @type {PlainObject}
|
||||
* @property {Element[]} elems Array of the newly selected elements
|
||||
@@ -5217,13 +5217,13 @@ this.setBBoxZoom = function (val, editorW, editorH) {
|
||||
* @property {Element[]} elems Array of transitioning elements
|
||||
*/
|
||||
/**
|
||||
* One or more elements were changed
|
||||
* One or more elements were changed.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_elementChanged
|
||||
* @type {PlainObject}
|
||||
* @property {Element[]} elems Array of the affected elements
|
||||
*/
|
||||
/**
|
||||
* Invoked as soon as the locale is ready
|
||||
* Invoked as soon as the locale is ready.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_langReady
|
||||
* @type {PlainObject}
|
||||
* @property {string} lang The two-letter language code
|
||||
@@ -5243,12 +5243,12 @@ this.setBBoxZoom = function (val, editorW, editorH) {
|
||||
* @property {module:SVGEditor~ImportLocale} importLocale
|
||||
*/
|
||||
/**
|
||||
* Called when new image is created
|
||||
* Called when new image is created.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_onNewDocument
|
||||
* @type {void}
|
||||
*/
|
||||
/**
|
||||
* Called when sidepanel is resized or toggled
|
||||
* Called when sidepanel is resized or toggled.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_workareaResized
|
||||
* @type {void}
|
||||
*/
|
||||
@@ -5300,7 +5300,7 @@ this.setMode = function (name) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Group: Element Styling
|
||||
* Group: Element Styling.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -6089,7 +6089,7 @@ this.removeHyperlink = function () {
|
||||
};
|
||||
|
||||
/**
|
||||
* Group: Element manipulation
|
||||
* Group: Element manipulation.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -6393,7 +6393,7 @@ this.pasteElements = function (type, x, y) {
|
||||
|
||||
// Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||
/**
|
||||
* Triggered when `pasteElements` is called from a paste action (context menu or key)
|
||||
* Triggered when `pasteElements` is called from a paste action (context menu or key).
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_IDsUpdated
|
||||
* @type {PlainObject}
|
||||
* @property {module:svgcanvas.SVGAsJSON[]} elems
|
||||
@@ -7090,7 +7090,7 @@ this.alignSelectedElements = function (type, relativeTo) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Group: Additional editor tools
|
||||
* Group: Additional editor tools.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Todo: Move to own module (and have it import a modular base64 encoder)
|
||||
import {encode64} from '../utilities.js';
|
||||
/**
|
||||
* SVG Icon Loader 2.0
|
||||
* @file SVG Icon Loader 2.0
|
||||
*
|
||||
* jQuery Plugin for loading SVG icons from a single file
|
||||
*
|
||||
@@ -162,12 +162,12 @@ export default function jQueryPluginSVGIcons ($) {
|
||||
|
||||
/**
|
||||
* Map of raster images with each key being the SVG icon ID
|
||||
* to replace, and the value the image file name
|
||||
* to replace, and the value the image file name.
|
||||
* @typedef {PlainObject<string, string>} external:jQuery.svgIcons.Fallback
|
||||
*/
|
||||
/**
|
||||
* Map of raster images with each key being the SVG icon ID
|
||||
* whose `alt` will be set, and the value being the `alt` text
|
||||
* whose `alt` will be set, and the value being the `alt` text.
|
||||
* @typedef {PlainObject<string, string>} external:jQuery.svgIcons.Alts
|
||||
*/
|
||||
/**
|
||||
|
||||
@@ -69,27 +69,27 @@ let listMap_ = {};
|
||||
* @returns {SVGTransform}
|
||||
*/
|
||||
/**
|
||||
* (DOES NOT THROW DOMException, INDEX_SIZE_ERR)
|
||||
* DOES NOT THROW DOMException, INDEX_SIZE_ERR.
|
||||
* @function module:SVGTransformList.SVGEditTransformList#getItem
|
||||
* @param {Integer} index unsigned long
|
||||
* @returns {SVGTransform}
|
||||
*/
|
||||
/**
|
||||
* (DOES NOT THROW DOMException, INDEX_SIZE_ERR)
|
||||
* DOES NOT THROW DOMException, INDEX_SIZE_ERR.
|
||||
* @function module:SVGTransformList.SVGEditTransformList#insertItemBefore
|
||||
* @param {SVGTransform} newItem
|
||||
* @param {Integer} index unsigned long
|
||||
* @returns {SVGTransform}
|
||||
*/
|
||||
/**
|
||||
* (DOES NOT THROW DOMException, INDEX_SIZE_ERR)
|
||||
* DOES NOT THROW DOMException, INDEX_SIZE_ERR.
|
||||
* @function module:SVGTransformList.SVGEditTransformList#replaceItem
|
||||
* @param {SVGTransform} newItem
|
||||
* @param {Integer} index unsigned long
|
||||
* @returns {SVGTransform}
|
||||
*/
|
||||
/**
|
||||
* (DOES NOT THROW DOMException, INDEX_SIZE_ERR)
|
||||
* DOES NOT THROW DOMException, INDEX_SIZE_ERR.
|
||||
* @function module:SVGTransformList.SVGEditTransformList#removeItem
|
||||
* @param {Integer} index unsigned long
|
||||
* @returns {SVGTransform}
|
||||
@@ -100,14 +100,14 @@ let listMap_ = {};
|
||||
* @returns {SVGTransform}
|
||||
*/
|
||||
/**
|
||||
* NOT IMPLEMENTED
|
||||
* NOT IMPLEMENTED.
|
||||
* @ignore
|
||||
* @function module:SVGTransformList.SVGEditTransformList#createSVGTransformFromMatrix
|
||||
* @param {SVGMatrix} matrix
|
||||
* @returns {SVGTransform}
|
||||
*/
|
||||
/**
|
||||
* NOT IMPLEMENTED
|
||||
* NOT IMPLEMENTED.
|
||||
* @ignore
|
||||
* @function module:SVGTransformList.SVGEditTransformList#consolidate
|
||||
* @returns {SVGTransform}
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
|
||||
/**
|
||||
* This should only be used for arrays known to be potentially arbitrary in form and
|
||||
* representing arguments for passing around
|
||||
* representing arguments for passing around.
|
||||
* @typedef {GenericArray} ArgumentsArray
|
||||
*/
|
||||
|
||||
/**
|
||||
* The `Any` type should only be used for items known to be wholly arbitrary
|
||||
* The `Any` type should only be used for items known to be wholly arbitrary.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Tools for working with units
|
||||
* Tools for working with units.
|
||||
* @module units
|
||||
* @license MIT
|
||||
*
|
||||
@@ -105,7 +105,7 @@ export const init = function (elementContainer) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Group: Unit conversion functions
|
||||
* Group: Unit conversion functions.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* globals jQuery */
|
||||
/**
|
||||
* Miscellaneous utilities
|
||||
* Miscellaneous utilities.
|
||||
* @module utilities
|
||||
* @license MIT
|
||||
*
|
||||
@@ -38,7 +38,7 @@ let domcontainer_ = null;
|
||||
let svgroot_ = null;
|
||||
|
||||
/**
|
||||
* Object with the following keys/values
|
||||
* Object with the following keys/values.
|
||||
* @typedef {PlainObject} module:utilities.SVGElementJSON
|
||||
* @property {string} element - Tag name of the SVG element to create
|
||||
* @property {PlainObject<string, string>} attr - Has key-value attributes to assign to the new element. An `id` should be set so that {@link module:utilities.EditorContext#addSVGElementFromJson} can later re-identify the element for modification or replacement.
|
||||
@@ -60,7 +60,7 @@ let svgroot_ = null;
|
||||
/**
|
||||
* Create a new SVG element based on the given object keys/values and add it
|
||||
* to the current layer.
|
||||
* The element will be run through `cleanupElement` before being returned
|
||||
* The element will be run through `cleanupElement` before being returned.
|
||||
* @function module:utilities.EditorContext#addSVGElementFromJson
|
||||
* @param {module:utilities.SVGElementJSON} data
|
||||
* @returns {Element} The new element
|
||||
|
||||
@@ -269,13 +269,13 @@
|
||||
document.addEventListener('touchcancel', touchHandler, true);
|
||||
|
||||
/**
|
||||
* Namespaces or tools therefor
|
||||
* Namespaces or tools therefor.
|
||||
* @module namespaces
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/**
|
||||
* Common namepaces constants in alpha order
|
||||
* Common namepaces constants in alpha order.
|
||||
* @enum {string}
|
||||
* @type {PlainObject}
|
||||
* @memberof module:namespaces
|
||||
@@ -2906,7 +2906,7 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* jQuery module to work with SVG attributes
|
||||
* A jQuery module to work with SVG attributes.
|
||||
* @module jQueryAttr
|
||||
* @license MIT
|
||||
*/
|
||||
@@ -3076,14 +3076,14 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* (DOES NOT THROW DOMException, INDEX_SIZE_ERR)
|
||||
* DOES NOT THROW DOMException, INDEX_SIZE_ERR.
|
||||
* @function module:SVGTransformList.SVGEditTransformList#getItem
|
||||
* @param {Integer} index unsigned long
|
||||
* @returns {SVGTransform}
|
||||
*/
|
||||
|
||||
/**
|
||||
* (DOES NOT THROW DOMException, INDEX_SIZE_ERR)
|
||||
* DOES NOT THROW DOMException, INDEX_SIZE_ERR.
|
||||
* @function module:SVGTransformList.SVGEditTransformList#insertItemBefore
|
||||
* @param {SVGTransform} newItem
|
||||
* @param {Integer} index unsigned long
|
||||
@@ -3091,7 +3091,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* (DOES NOT THROW DOMException, INDEX_SIZE_ERR)
|
||||
* DOES NOT THROW DOMException, INDEX_SIZE_ERR.
|
||||
* @function module:SVGTransformList.SVGEditTransformList#replaceItem
|
||||
* @param {SVGTransform} newItem
|
||||
* @param {Integer} index unsigned long
|
||||
@@ -3099,7 +3099,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* (DOES NOT THROW DOMException, INDEX_SIZE_ERR)
|
||||
* DOES NOT THROW DOMException, INDEX_SIZE_ERR.
|
||||
* @function module:SVGTransformList.SVGEditTransformList#removeItem
|
||||
* @param {Integer} index unsigned long
|
||||
* @returns {SVGTransform}
|
||||
@@ -3112,7 +3112,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOT IMPLEMENTED
|
||||
* NOT IMPLEMENTED.
|
||||
* @ignore
|
||||
* @function module:SVGTransformList.SVGEditTransformList#createSVGTransformFromMatrix
|
||||
* @param {SVGMatrix} matrix
|
||||
@@ -3120,7 +3120,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOT IMPLEMENTED
|
||||
* NOT IMPLEMENTED.
|
||||
* @ignore
|
||||
* @function module:SVGTransformList.SVGEditTransformList#consolidate
|
||||
* @returns {SVGTransform}
|
||||
@@ -3472,7 +3472,7 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* Tools for working with units
|
||||
* Tools for working with units.
|
||||
* @module units
|
||||
* @license MIT
|
||||
*
|
||||
@@ -3576,7 +3576,7 @@
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Group: Unit conversion functions
|
||||
* Group: Unit conversion functions.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -3758,7 +3758,7 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* Group: Undo/Redo history management
|
||||
* Group: Undo/Redo history management.
|
||||
*/
|
||||
|
||||
var HistoryEventTypes = {
|
||||
@@ -3801,7 +3801,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Applies
|
||||
* Applies.
|
||||
*
|
||||
* @function module:history.HistoryCommand#apply
|
||||
* @param {module:history.HistoryEventHandler} handler
|
||||
@@ -3811,7 +3811,7 @@
|
||||
|
||||
/**
|
||||
*
|
||||
* Unapplies
|
||||
* Unapplies.
|
||||
* @function module:history.HistoryCommand#unapply
|
||||
* @param {module:history.HistoryEventHandler} handler
|
||||
* @fires module:history~Command#event:history
|
||||
@@ -3819,25 +3819,25 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns the elements
|
||||
* Returns the elements.
|
||||
* @function module:history.HistoryCommand#elements
|
||||
* @returns {Element[]}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gets the text
|
||||
* Gets the text.
|
||||
* @function module:history.HistoryCommand#getText
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gives the type
|
||||
* Gives the type.
|
||||
* @function module:history.HistoryCommand.type
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gives the type
|
||||
* Gives the type.
|
||||
* @function module:history.HistoryCommand#type
|
||||
* @returns {string}
|
||||
*/
|
||||
@@ -4666,7 +4666,7 @@
|
||||
});
|
||||
|
||||
/**
|
||||
* Mathematical utilities
|
||||
* Mathematical utilities.
|
||||
* @module math
|
||||
* @license MIT
|
||||
*
|
||||
@@ -4962,7 +4962,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Object with the following keys/values
|
||||
* Object with the following keys/values.
|
||||
* @typedef {PlainObject} module:path.SVGElementJSON
|
||||
* @property {string} element - Tag name of the SVG element to create
|
||||
* @property {PlainObject<string, string>} attr - Has key-value attributes to assign to the new element. An `id` should be set so that {@link module:utilities.EditorContext#addSVGElementFromJson} can later re-identify the element for modification or replacement.
|
||||
@@ -4991,7 +4991,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Note: This doesn't round to an integer necessarily
|
||||
* Note: This doesn't round to an integer necessarily.
|
||||
* @function module:path.EditorContext#round
|
||||
* @param {Float} val
|
||||
* @returns {Float} Rounded value to nearest value based on `currentZoom`
|
||||
@@ -5089,19 +5089,19 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns the last created DOM element ID string
|
||||
* Returns the last created DOM element ID string.
|
||||
* @function module:path.EditorContext#getId
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates and returns a unique ID string for a DOM element
|
||||
* Creates and returns a unique ID string for a DOM element.
|
||||
* @function module:path.EditorContext#getNextId
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gets the desired element from a mouse event
|
||||
* Gets the desired element from a mouse event.
|
||||
* @function module:path.EditorContext#getMouseTarget
|
||||
* @param {external:MouseEvent} evt - Event object from the mouse event
|
||||
* @returns {Element} DOM element we want
|
||||
@@ -6552,7 +6552,7 @@
|
||||
}
|
||||
};
|
||||
/**
|
||||
* This is how we map paths to our preferred relative segment types
|
||||
* This is how we map paths to our preferred relative segment types.
|
||||
* @name module:path.pathMap
|
||||
* @type {GenericArray}
|
||||
*/
|
||||
@@ -6808,8 +6808,8 @@
|
||||
/* eslint-disable jsdoc/require-property */
|
||||
|
||||
/**
|
||||
* Group: Path edit functions
|
||||
* Functions relating to editing path elements
|
||||
* Group: Path edit functions.
|
||||
* Functions relating to editing path elements.
|
||||
* @namespace {PlainObject} pathActions
|
||||
* @memberof module:path
|
||||
*/
|
||||
@@ -7796,7 +7796,7 @@
|
||||
// Can't seem to use `@borrows` here, so using `@see`
|
||||
|
||||
/**
|
||||
* Smooth polyline into path
|
||||
* Smooth polyline into path.
|
||||
* @function module:path.pathActions.smoothPolylineIntoPath
|
||||
* @see module:path~smoothPolylineIntoPath
|
||||
*/
|
||||
@@ -7874,7 +7874,7 @@
|
||||
// Can't seem to use `@borrows` here, so using `@see`
|
||||
|
||||
/**
|
||||
* Convert a path to one with only absolute or relative values
|
||||
* Convert a path to one with only absolute or relative values.
|
||||
* @function module:path.pathActions.convertPath
|
||||
* @see module:path.convertPath
|
||||
*/
|
||||
@@ -7895,7 +7895,7 @@
|
||||
var domcontainer_ = null;
|
||||
var svgroot_ = null;
|
||||
/**
|
||||
* Object with the following keys/values
|
||||
* Object with the following keys/values.
|
||||
* @typedef {PlainObject} module:utilities.SVGElementJSON
|
||||
* @property {string} element - Tag name of the SVG element to create
|
||||
* @property {PlainObject<string, string>} attr - Has key-value attributes to assign to the new element. An `id` should be set so that {@link module:utilities.EditorContext#addSVGElementFromJson} can later re-identify the element for modification or replacement.
|
||||
@@ -7919,7 +7919,7 @@
|
||||
/**
|
||||
* Create a new SVG element based on the given object keys/values and add it
|
||||
* to the current layer.
|
||||
* The element will be run through `cleanupElement` before being returned
|
||||
* The element will be run through `cleanupElement` before being returned.
|
||||
* @function module:utilities.EditorContext#addSVGElementFromJson
|
||||
* @param {module:utilities.SVGElementJSON} data
|
||||
* @returns {Element} The new element
|
||||
@@ -9316,7 +9316,7 @@
|
||||
/* globals jQuery */
|
||||
|
||||
/**
|
||||
* Adds context menu functionality
|
||||
* Adds context menu functionality.
|
||||
* @module contextmenu
|
||||
* @license Apache-2.0
|
||||
* @author Adam Bender
|
||||
@@ -11074,7 +11074,7 @@
|
||||
}; // Layer API Functions
|
||||
|
||||
/**
|
||||
* Group: Layers
|
||||
* Group: Layers.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -11122,7 +11122,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Run the callback function associated with the given event
|
||||
* Run the callback function associated with the given event.
|
||||
* @function module:draw.DrawCanvasInit#call
|
||||
* @param {"changed"|"contextset"} ev - String with the event name
|
||||
* @param {module:svgcanvas.SvgCanvas#event:changed|module:svgcanvas.SvgCanvas#event:contextset} arg - Argument to pass through to the callback
|
||||
@@ -11446,7 +11446,7 @@
|
||||
|
||||
/**
|
||||
* This defines which elements and attributes that we support (or at least
|
||||
* don't remove)
|
||||
* don't remove).
|
||||
* @type {PlainObject}
|
||||
*/
|
||||
|
||||
@@ -13657,7 +13657,7 @@
|
||||
var svgroot = svgdoc.importNode(text2xml('<svg id="svgroot" xmlns="' + NS.SVG + '" xlinkns="' + NS.XLINK + '" ' + 'width="' + dimensions[0] + '" height="' + dimensions[1] + '" x="' + dimensions[0] + '" y="' + dimensions[1] + '" overflow="visible">' + '<defs>' + '<filter id="canvashadow" filterUnits="objectBoundingBox">' + '<feGaussianBlur in="SourceAlpha" stdDeviation="4" result="blur"/>' + '<feOffset in="blur" dx="5" dy="5" result="offsetBlur"/>' + '<feMerge>' + '<feMergeNode in="offsetBlur"/>' + '<feMergeNode in="SourceGraphic"/>' + '</feMerge>' + '</filter>' + '</defs>' + '</svg>').documentElement, true);
|
||||
container.append(svgroot);
|
||||
/**
|
||||
* The actual element that represents the final output SVG element
|
||||
* The actual element that represents the final output SVG element.
|
||||
* @name module:svgcanvas~svgcontent
|
||||
* @type {SVGSVGElement}
|
||||
*/
|
||||
@@ -13702,7 +13702,7 @@
|
||||
idprefix = p;
|
||||
};
|
||||
/**
|
||||
* Current draw.Drawing object
|
||||
* Current `draw.Drawing` object.
|
||||
* @type {module:draw.Drawing}
|
||||
* @name module:svgcanvas.SvgCanvas#current_drawing_
|
||||
*/
|
||||
@@ -13719,7 +13719,7 @@
|
||||
return canvas.current_drawing_;
|
||||
};
|
||||
/**
|
||||
* Float displaying the current zoom level (1 = 100%, .5 = 50%, etc)
|
||||
* Float displaying the current zoom level (1 = 100%, .5 = 50%, etc.).
|
||||
* @type {Float}
|
||||
*/
|
||||
|
||||
@@ -13855,8 +13855,8 @@
|
||||
return curConfig.baseUnit;
|
||||
};
|
||||
/**
|
||||
* initialize from units.js.
|
||||
* Send in an object implementing the ElementContainer interface (see units.js)
|
||||
* Initialize from units.js.
|
||||
* Send in an object implementing the ElementContainer interface (see units.js).
|
||||
*/
|
||||
|
||||
|
||||
@@ -14088,7 +14088,7 @@
|
||||
|
||||
init$6(curConfig,
|
||||
/**
|
||||
* Export to select.js
|
||||
* Export to select.js.
|
||||
* @implements {module:select.SVGFactory}
|
||||
*/
|
||||
{
|
||||
@@ -14104,7 +14104,7 @@
|
||||
getCurrentZoom: getCurrentZoom
|
||||
});
|
||||
/**
|
||||
* This object manages selectors for us
|
||||
* This object manages selectors for us.
|
||||
* @name module:svgcanvas.SvgCanvas#selectorManager
|
||||
* @type {module:select.SelectorManager}
|
||||
*/
|
||||
@@ -14921,26 +14921,26 @@
|
||||
var events = {};
|
||||
canvas.call = call;
|
||||
/**
|
||||
* Array of what was changed (elements, layers)
|
||||
* Array of what was changed (elements, layers).
|
||||
* @event module:svgcanvas.SvgCanvas#event:changed
|
||||
* @type {Element[]}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Array of selected elements
|
||||
* Array of selected elements.
|
||||
* @event module:svgcanvas.SvgCanvas#event:selected
|
||||
* @type {Element[]}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Array of selected elements
|
||||
* Array of selected elements.
|
||||
* @event module:svgcanvas.SvgCanvas#event:transition
|
||||
* @type {Element[]}
|
||||
*/
|
||||
|
||||
/**
|
||||
* The Element is always `SVGGElement`?
|
||||
* If not `null`, will be the set current group element
|
||||
* If not `null`, will be the set current group element.
|
||||
* @event module:svgcanvas.SvgCanvas#event:contextset
|
||||
* @type {null|Element}
|
||||
*/
|
||||
@@ -15001,7 +15001,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* SVG canvas converted to string
|
||||
* SVG canvas converted to string.
|
||||
* @event module:svgcanvas.SvgCanvas#event:saved
|
||||
* @type {string}
|
||||
*/
|
||||
@@ -15045,7 +15045,7 @@
|
||||
|
||||
/**
|
||||
* The promise return, if present, resolves to `undefined`
|
||||
* (`extension_added`, `exported`, `saved`)
|
||||
* (`extension_added`, `exported`, `saved`).
|
||||
* @typedef {Promise<void>|void} module:svgcanvas.EventHandlerReturn
|
||||
*/
|
||||
|
||||
@@ -15224,7 +15224,7 @@
|
||||
|
||||
var rootSctm = null;
|
||||
/**
|
||||
* Group: Selection
|
||||
* Group: Selection.
|
||||
*/
|
||||
// TODO: do we need to worry about selectedBBoxes here?
|
||||
|
||||
@@ -15791,7 +15791,7 @@
|
||||
break;
|
||||
}
|
||||
/**
|
||||
* The main (left) mouse button is held down on the canvas area
|
||||
* The main (left) mouse button is held down on the canvas area.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_mouseDown
|
||||
* @type {PlainObject}
|
||||
* @property {MouseEvent} event The event object
|
||||
@@ -16334,7 +16334,7 @@
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The mouse has moved on the canvas area
|
||||
* The mouse has moved on the canvas area.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_mouseMove
|
||||
* @type {PlainObject}
|
||||
* @property {MouseEvent} event The event object
|
||||
@@ -16651,7 +16651,7 @@
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The main (left) mouse button is released (anywhere)
|
||||
* The main (left) mouse button is released (anywhere).
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_mouseUp
|
||||
* @type {PlainObject}
|
||||
* @property {MouseEvent} event The event object
|
||||
@@ -16884,7 +16884,7 @@
|
||||
|
||||
/**
|
||||
* Group: Text edit functions
|
||||
* Functions relating to editing text elements
|
||||
* Functions relating to editing text elements.
|
||||
* @namespace {PlainObject} textActions
|
||||
* @memberof module:svgcanvas.SvgCanvas#
|
||||
*/
|
||||
@@ -17409,7 +17409,7 @@
|
||||
);
|
||||
}();
|
||||
/**
|
||||
* Group: Serialization
|
||||
* Group: Serialization.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -17752,7 +17752,7 @@
|
||||
}; // end svgToString()
|
||||
|
||||
/**
|
||||
* Function to run when image data is found
|
||||
* Function to run when image data is found.
|
||||
* @callback module:svgcanvas.ImageEmbeddedCallback
|
||||
* @param {string|false} result Data URL
|
||||
* @returns {void}
|
||||
@@ -18925,7 +18925,7 @@
|
||||
}
|
||||
});
|
||||
/**
|
||||
* Group: Document functions
|
||||
* Group: Document functions.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -19392,7 +19392,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* The bottom panel was updated
|
||||
* The bottom panel was updated.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_toolButtonStateUpdate
|
||||
* @type {PlainObject}
|
||||
* @property {boolean} nofill Indicates fill is disabled
|
||||
@@ -19400,7 +19400,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* The element selection has changed (elements were added/removed from selection)
|
||||
* The element selection has changed (elements were added/removed from selection).
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_selectedChanged
|
||||
* @type {PlainObject}
|
||||
* @property {Element[]} elems Array of the newly selected elements
|
||||
@@ -19417,14 +19417,14 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* One or more elements were changed
|
||||
* One or more elements were changed.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_elementChanged
|
||||
* @type {PlainObject}
|
||||
* @property {Element[]} elems Array of the affected elements
|
||||
*/
|
||||
|
||||
/**
|
||||
* Invoked as soon as the locale is ready
|
||||
* Invoked as soon as the locale is ready.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_langReady
|
||||
* @type {PlainObject}
|
||||
* @property {string} lang The two-letter language code
|
||||
@@ -19447,13 +19447,13 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Called when new image is created
|
||||
* Called when new image is created.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_onNewDocument
|
||||
* @type {void}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Called when sidepanel is resized or toggled
|
||||
* Called when sidepanel is resized or toggled.
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_workareaResized
|
||||
* @type {void}
|
||||
*/
|
||||
@@ -19514,7 +19514,7 @@
|
||||
currentMode = name;
|
||||
};
|
||||
/**
|
||||
* Group: Element Styling
|
||||
* Group: Element Styling.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -20387,7 +20387,7 @@
|
||||
canvas.ungroupSelectedElement();
|
||||
};
|
||||
/**
|
||||
* Group: Element manipulation
|
||||
* Group: Element manipulation.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -20736,7 +20736,7 @@
|
||||
clipb.forEach(checkIDs); // Give extensions like the connector extension a chance to reflect new IDs and remove invalid elements
|
||||
|
||||
/**
|
||||
* Triggered when `pasteElements` is called from a paste action (context menu or key)
|
||||
* Triggered when `pasteElements` is called from a paste action (context menu or key).
|
||||
* @event module:svgcanvas.SvgCanvas#event:ext_IDsUpdated
|
||||
* @type {PlainObject}
|
||||
* @property {module:svgcanvas.SVGAsJSON[]} elems
|
||||
@@ -21540,7 +21540,7 @@
|
||||
this.moveSelectedElements(dx, dy);
|
||||
};
|
||||
/**
|
||||
* Group: Additional editor tools
|
||||
* Group: Additional editor tools.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -22317,7 +22317,7 @@
|
||||
|
||||
// Todo: Move to own module (and have it import a modular base64 encoder)
|
||||
/**
|
||||
* SVG Icon Loader 2.0
|
||||
* @file SVG Icon Loader 2.0
|
||||
*
|
||||
* jQuery Plugin for loading SVG icons from a single file
|
||||
*
|
||||
@@ -22478,13 +22478,13 @@
|
||||
var svgIcons = {};
|
||||
/**
|
||||
* Map of raster images with each key being the SVG icon ID
|
||||
* to replace, and the value the image file name
|
||||
* to replace, and the value the image file name.
|
||||
* @typedef {PlainObject<string, string>} external:jQuery.svgIcons.Fallback
|
||||
*/
|
||||
|
||||
/**
|
||||
* Map of raster images with each key being the SVG icon ID
|
||||
* whose `alt` will be set, and the value being the `alt` text
|
||||
* whose `alt` will be set, and the value being the `alt` text.
|
||||
* @typedef {PlainObject<string, string>} external:jQuery.svgIcons.Alts
|
||||
*/
|
||||
|
||||
@@ -22899,7 +22899,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* jGraduate 0.4
|
||||
* @file jGraduate 0.4
|
||||
*
|
||||
* jQuery Plugin for a gradient picker
|
||||
*
|
||||
@@ -22998,14 +22998,14 @@
|
||||
*/
|
||||
this.type = options.copy.type;
|
||||
/**
|
||||
* Represents opacity (0-100)
|
||||
* Represents opacity (0-100).
|
||||
* @name module:jGraduate~Paint#alpha
|
||||
* @type {Float}
|
||||
*/
|
||||
|
||||
this.alpha = options.copy.alpha;
|
||||
/**
|
||||
* Represents #RRGGBB hex of color
|
||||
* Represents #RRGGBB hex of color.
|
||||
* @name module:jGraduate~Paint#solidColor
|
||||
* @type {string}
|
||||
*/
|
||||
@@ -23091,7 +23091,7 @@
|
||||
/** @lends external:jQuery.fn.jGraduateDefaults */
|
||||
{
|
||||
/**
|
||||
* Creates an object with a 'none' color
|
||||
* Creates an object with a 'none' color.
|
||||
* @type {external:jQuery.jGraduate.Paint}
|
||||
* @see module:jGraduate.Options
|
||||
*/
|
||||
@@ -24190,55 +24190,57 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* SpinButton control
|
||||
* SpinButton control.
|
||||
*
|
||||
* Adds bells and whistles to any ordinary textbox to
|
||||
* make it look and feel like a SpinButton Control.
|
||||
*
|
||||
* Supplies {@link external:jQuery.fn.SpinButton} (and also {@link external:jQuery.loadingStylesheets})
|
||||
* Supplies {@link external:jQuery.fn.SpinButton} (and also {@link external:jQuery.loadingStylesheets}).
|
||||
*
|
||||
* Originally written by George Adamson, Software Unity (george.jquery@softwareunity.com) August 2006.
|
||||
* - Added min/max options
|
||||
* - Added step size option
|
||||
* - Added bigStep (page up/down) option
|
||||
* Originally written by George Adamson, Software Unity (george.jquery@softwareunity.com) August 2006:
|
||||
* - Added min/max options.
|
||||
* - Added step size option.
|
||||
* - Added bigStep (page up/down) option.
|
||||
*
|
||||
* Modifications made by Mark Gibson, (mgibson@designlinks.net) September 2006:
|
||||
* - Converted to jQuery plugin
|
||||
* - Allow limited or unlimited min/max values
|
||||
* - Allow custom class names, and add class to input element
|
||||
* - Removed global vars
|
||||
* - Reset (to original or through config) when invalid value entered
|
||||
* - Repeat whilst holding mouse button down (with initial pause, like keyboard repeat)
|
||||
* - Support mouse wheel in Firefox
|
||||
* - Fix double click in IE
|
||||
* - Refactored some code and renamed some vars
|
||||
* - Converted to jQuery plugin.
|
||||
* - Allow limited or unlimited min/max values.
|
||||
* - Allow custom class names, and add class to input element.
|
||||
* - Removed global vars.
|
||||
* - Reset (to original or through config) when invalid value entered.
|
||||
* - Repeat whilst holding mouse button down (with initial pause, like keyboard repeat).
|
||||
* - Support mouse wheel in Firefox.
|
||||
* - Fix double click in IE.
|
||||
* - Refactored some code and renamed some vars.
|
||||
*
|
||||
* Modifications by Jeff Schiller, June 2009:
|
||||
* - provide callback function for when the value changes based on the following
|
||||
* {@link https://www.mail-archive.com/jquery-en@googlegroups.com/msg36070.html}
|
||||
* {@link https://www.mail-archive.com/jquery-en@googlegroups.com/msg36070.html}.
|
||||
*
|
||||
* Modifications by Jeff Schiller, July 2009:
|
||||
* - improve styling for widget in Opera
|
||||
* - consistent key-repeat handling cross-browser
|
||||
* - improve styling for widget in Opera.
|
||||
* - consistent key-repeat handling cross-browser.
|
||||
*
|
||||
* Modifications by Alexis Deveria, October 2009:
|
||||
* - provide "stepfunc" callback option to allow custom function to run when changing a value
|
||||
* - provide "stepfunc" callback option to allow custom function to run when changing a value.
|
||||
* - Made adjustValue(0) only run on certain keyup events, not all.
|
||||
*
|
||||
* Tested in IE6, Opera9, Firefox 1.5
|
||||
* Tested in IE6, Opera9, Firefox 1.5.
|
||||
*
|
||||
* | Version | Date | Author | Notes
|
||||
* |---------|------|--------|------|
|
||||
* | v1.0 | 11 Aug 2006 | George Adamson | First release
|
||||
* | v1.1 | Aug 2006 | George Adamson | Minor enhancements
|
||||
* | v1.2 | 27 Sep 2006 | Mark Gibson | Major enhancements
|
||||
* | v1.3a | 28 Sep 2006 | George Adamson | Minor enhancements
|
||||
* | v1.4 | 18 Jun 2009 | Jeff Schiller | Added callback function
|
||||
* | v1.5 | 06 Jul 2009 | Jeff Schiller | Fixes for Opera.
|
||||
* | v1.6 | 13 Oct 2009 | Alexis Deveria | Added stepfunc function
|
||||
* | v1.7 | 21 Oct 2009 | Alexis Deveria | Minor fixes.<br />Fast-repeat for keys and live updating as you type.
|
||||
* | v1.8 | 12 Jan 2010 | Benjamin Thomas | Fixes for mouseout behavior.<br />Added smallStep
|
||||
* | Version | Date | Author | Notes |
|
||||
* |---------|------|--------|-------|
|
||||
* | v1.0 | 11 Aug 2006 | George Adamson | First release |
|
||||
* | v1.1 | Aug 2006 | George Adamson | Minor enhancements |
|
||||
* | v1.2 | 27 Sep 2006 | Mark Gibson | Major enhancements |
|
||||
* | v1.3a | 28 Sep 2006 | George Adamson | Minor enhancements |
|
||||
* | v1.4 | 18 Jun 2009 | Jeff Schiller | Added callback function |
|
||||
* | v1.5 | 06 Jul 2009 | Jeff Schiller | Fixes for Opera. |
|
||||
* | v1.6 | 13 Oct 2009 | Alexis Deveria | Added stepfunc function |
|
||||
* | v1.7 | 21 Oct 2009 | Alexis Deveria | Minor fixes.<br />Fast-repeat for keys and live updating as you type. |
|
||||
* | v1.8 | 12 Jan 2010 | Benjamin Thomas | Fixes for mouseout behavior.<br />Added smallStep |
|
||||
* | v1.9 | 20 May 2018 | Brett Zamir | Avoid SVGEdit dependency via `stateObj` config;<br />convert to ES6 module |
|
||||
* .
|
||||
*
|
||||
* @module jQuerySpinButton
|
||||
* @example
|
||||
// Create group of settings to initialise spinbutton(s). (Optional)
|
||||
@@ -24560,7 +24562,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* jQuery Context Menu Plugin
|
||||
* @file jQuery Context Menu Plugin
|
||||
* Cory S.N. LaViska
|
||||
* A Beautiful Site ({@link https://abeautifulsite.net/})
|
||||
* Modified by Alexis Deveria
|
||||
@@ -24892,7 +24894,7 @@
|
||||
/* eslint-disable no-bitwise */
|
||||
|
||||
/**
|
||||
* jPicker (Adapted from version 1.1.6)
|
||||
* @file jPicker (Adapted from version 1.1.6)
|
||||
*
|
||||
* jQuery Plugin for Photoshop style color picker
|
||||
*
|
||||
@@ -25754,7 +25756,7 @@
|
||||
/* eslint-enable jsdoc/require-property */
|
||||
|
||||
/**
|
||||
* Array holding references to each active instance of the jPicker control
|
||||
* Array holding references to each active instance of the jPicker control.
|
||||
* @type {external:jQuery.fn.$.fn.jPicker[]}
|
||||
*/
|
||||
List: [],
|
||||
@@ -26148,7 +26150,7 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* color conversion methods - make public to give use to external scripts
|
||||
* Color conversion methods - make public to give use to external scripts.
|
||||
* @namespace
|
||||
*/
|
||||
ColorMethods: {
|
||||
@@ -26383,7 +26385,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Will be bound to active {@link jQuery.jPicker.Color}
|
||||
* Will be bound to active {@link jQuery.jPicker.Color}.
|
||||
* @callback module:jPicker.LiveCallback
|
||||
* @param {external:jQuery} ui
|
||||
* @param {Element} context
|
||||
@@ -27822,8 +27824,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* jPicker defaults - you can change anything in this section (such as the
|
||||
* clientPath to your images) without fear of breaking the program
|
||||
* The jPicker defaults - you can change anything in this section (such as the
|
||||
* clientPath to your images) without fear of breaking the program.
|
||||
* @namespace {external:jQuery.fn.jPickerOptions} defaults
|
||||
* @memberof external:jQuery.fn.$.fn.jPicker
|
||||
* @borrows external:jQuery.fn.jPickerOptions as external:jQuery.fn.jPicker.defaults
|
||||
@@ -28297,7 +28299,7 @@
|
||||
};
|
||||
/**
|
||||
* The "data" property is generally set to an an array of objects with
|
||||
* "id" and "title" or "textContent" properties
|
||||
* "id" and "title" or "textContent" properties.
|
||||
* @typedef {PlainObject} module:locale.AddLangExtensionLocaleData
|
||||
* @property {module:locale.LocaleStrings[]} data See {@tutorial LocaleDocs}
|
||||
*/
|
||||
@@ -28817,7 +28819,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* The main module for the visual SVG Editor
|
||||
* The main module for the visual SVG Editor.
|
||||
*
|
||||
* @license MIT
|
||||
*
|
||||
@@ -28897,7 +28899,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Preferences
|
||||
* Preferences.
|
||||
* @interface module:SVGEditor.Prefs
|
||||
* @property {string} [lang="en"] Two-letter language code. The language must exist in the Editor Preferences language list. Defaults to "en" if `locale.js` detection does not detect another language.
|
||||
* @property {module:SVGEditor.IconSize} [iconsize="s"|"m"] Size of the toolbar icons. Will default to 's' if the window height is smaller than the minimum height and 'm' otherwise.
|
||||
@@ -28921,13 +28923,13 @@
|
||||
// EDITOR OPTIONS (DIALOG)
|
||||
|
||||
/**
|
||||
* Default to "en" if locale.js detection does not detect another language
|
||||
* Default to "en" if locale.js detection does not detect another language.
|
||||
*/
|
||||
lang: '',
|
||||
|
||||
/**
|
||||
* Will default to 's' if the window height is smaller than the minimum height and
|
||||
* 'm' otherwise
|
||||
* Will default to 's' if the window height is smaller than the minimum
|
||||
* height and 'm' otherwise.
|
||||
*/
|
||||
iconsize: '',
|
||||
bkgd_color: '#FFF',
|
||||
@@ -29095,7 +29097,7 @@
|
||||
},
|
||||
|
||||
/**
|
||||
* LOCALE
|
||||
* LOCALE.
|
||||
* @name module:SVGEditor.uiStrings
|
||||
* @type {PlainObject}
|
||||
*/
|
||||
@@ -29268,7 +29270,7 @@
|
||||
);
|
||||
}
|
||||
/**
|
||||
* EXPORTS
|
||||
* EXPORTS.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -29454,7 +29456,7 @@
|
||||
editor.curConfig = curConfig; // Update exported value
|
||||
};
|
||||
/**
|
||||
* All methods are optional
|
||||
* All methods are optional.
|
||||
* @interface module:SVGEditor.CustomHandler
|
||||
* @type {PlainObject}
|
||||
*/
|
||||
@@ -29473,7 +29475,7 @@
|
||||
* Its responsibilities are:
|
||||
* - accept the string contents of the current document
|
||||
* - invoke a file chooser dialog in 'save' mode
|
||||
* - save the file to location chosen by the user
|
||||
* - save the file to location chosen by the user.
|
||||
* @function module:SVGEditor.CustomHandler#save
|
||||
* @param {external:Window} win
|
||||
* @param {module:svgcanvas.SvgCanvas#event:saved} svgStr A string of the SVG
|
||||
@@ -33212,7 +33214,7 @@
|
||||
// TODO: Group UI functions into a public editor.ui interface.
|
||||
|
||||
/**
|
||||
* See {@link http://api.jquery.com/bind/#bind-eventType-eventData-handler}
|
||||
* See {@link http://api.jquery.com/bind/#bind-eventType-eventData-handler}.
|
||||
* @callback module:SVGEditor.DropDownCallback
|
||||
* @param {external:jQuery.Event} ev See {@link http://api.jquery.com/Types/#Event}
|
||||
* @listens external:jQuery.Event
|
||||
@@ -35264,7 +35266,7 @@
|
||||
/* eslint-disable jsdoc/require-property */
|
||||
|
||||
/**
|
||||
* Associate all button actions as well as non-button keyboard shortcuts
|
||||
* Associate all button actions as well as non-button keyboard shortcuts.
|
||||
* @namespace {PlainObject} module:SVGEditor~Actions
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user