Commit Graph

25 Commits (b4d7b221e0be55a78abed1b3de1b44382655852c)

Author SHA1 Message Date
Brett Zamir a3f0b8e501 - Security fix: 'extPath', 'imgPath', 'extIconsPath', 'canvgPath', 'langPath', 'jGraduatePath', and 'jspdfPath' were not being prevented
- Breaking change: Rename "svgutils.js" to "utilities.js" (make in conformity with JSDoc module naming convention)
- Breaking change: Rename "svgedit.js" to "namespaces.js" (to make clear purpose and avoid confusing with editor)
- Breaking change: Rename "jquery-svg.js" to "jQuery.attr.js"
- Breaking change: Rename "jquery.contextMenu.js" to "jQuery.contextMenu.js"
- Breaking change: Rename "jquery.jpicker.js" to "jQuery.jPicker.js"
- Breaking change: Rename "JQuerySpinBtn.css" to "jQuery.SpinButton.css"
- Breaking change: Rename "JQuerySpinBtn.js" to "jQuery.SpinButton.js" (to have file name more closely reflect name)
- Breaking change: Rename "jquery.svgicons.js" to "jQuery.svgIcons.js"
- Breaking change: Rename "jquery.jgraduate.js" to "jQuery.jGraduate.js"
- Breaking change: Rename "pathseg.js" to "svgpathseg.js" (as it is a poyfill of SVGPathSeg)
- Breaking change: Rename `addSvgElementFromJson()` to `addSVGElementFromJson` for consistency
- Breaking change: Rename `changeSvgContent()` to `changeSVGContent()` for consistency
- Breaking change: Have `exportPDF` resolve with `output` and `outputType` rather than `dataurlstring` (as type may vary)
- Breaking change: Rename `extensions/mathjax/MathJax.js` to `extensions/mathjax/MathJax.min.js`
- Breaking change: Avoid recent change to have editor ready callbacks return Promises (we're not using and advantageous to keep sequential)
- Breaking change: Avoid recent addition of locale-side function in ext-imagelib for l10n
- Breaking change: Change name of ext-arrows.js from `Arrows` to `arrows` for sake of file path (not localized anyways).
- Breaking change: Change `addlangData` extension event to `addLangData` for consistency with method name
- Breaking change: Have `readLang`  return lang and data but do not call `setLang`
- Fix: Have general locales load first so extensions may use
- Fix: Provide `importLocale` to extensions `init` so it may delay adding of the extension until locale data loaded
- Fix: Ensure call to `rasterExport` without `imgType` properly sets MIME type to PNG
- Fix: Wrong name for moinsave
- Update: Update WebAppFind per new API changes
- Enhancement: Make `setStrings` public on editor for late setting (used
  by `ext-shapes.js`)
- Enhancement: Add `extensions_added` event
- Enhancement: Add `message` event (Relay messages including those which
  have been been received prior to extension load)
- Enhancement: Allow SVGEdit to work out of the box--avoid need for copying sample config file. Should also help with Github-based file servers
- Enhancement: Allow avoiding "name" in extension export (just extract out of file name)
- Enhancement: Add stack blur to canvg by default (and refactoring it)
- Enhancement: Return `Promise` for `embedImage` (as with some other loading methods)
- Enhancement: Supply `importLocale` to `langReady` to facilitate extension locale loading
- Enhancement: Recover if an extension fails to load (just log and otherwise ignore)
- Enhancement: More i18n of extensions (also fixed issue with some console warnings about missing locale strings); i18nize Hello World too
- Enhancement: Allowing importing of locales within `addLangData`
- npm: Update devDeps
- Docs: Migrate copies of all old wiki pages to docs/from-old-wiki folder; intended for a possible move to Markdown, so raw HTML (with formatting) was not preserved, though named links had their absolute URL links preserved
- Docs: Begin deleting `SvgCanvas.md` as ensuring jsdoc has replacements
- Docs: Add Edtior doc file for help to general users
- Docs: Clarify/simplify install instructions
- npm/Docs (JSDoc): Add script to check for overly generic types
- Docs (JSDoc): For config/prefs and extension creating, link to tutorials (moved tutorials to own directory to avoid recursion problems by jsdoc)
- Docs (JSDoc): Add modules (upper case for usual main entrance files or regular names)
- Docs (JSDoc): Fill out missing areas; indicate return of `undefined`; consistency with `@returns`
- Docs (JSDoc): Add our own layout template to support overflow
- Docs (JSDoc): Use cleverLinks and disallow unknown tags
- Docs (JSDoc): Insist on "pedantic" flag; put output directory in config
- Docs (JSDoc): Use more precise Integer/Float over number, the specific type of array/function/object
- Docs (JSDoc): Use `@throws`, `@enum`, `@event`/`@fires`/`@listens`
- Docs: Generally update/improve docs (fixes #92)
- Docs: Update links to `latest` path (Avoid needing to update such references upon each release)
- Docs: 80 chars max
- Refactoring: Drop code for extension as function (already requiring export to be an object)
- Refactoring: Object destructuring, `Object.entries`, Object shorthand, array extras, more camelCase variable names
- Refactoring: Add a `Command` base class
- Refactoring: Simplify svgicons `callback` ready detection
- Refactoring: Put `let` or `const` closer to scope
- Refactoring: Remove unneeded `delimiter` from regex escaping utility
- Refactoring: Clearer variable names
- Refactoring: Use (non-deprecated) Event constructors
- Testing: Use new Sinon
2018-07-08 22:39:46 -07:00
Brett Zamir 8c9e40d349 - Breaking change: Rename config file to `svgedit-config-iife.js` (or for the module version, `svgedit-config-es.js`);
also expect one directory higher; incorporates #207 (@iuyiuy)
- Breaking change: Separate `extIconsPath` from `extPath` (not copying over icons)
- Breaking change: Don't reference `custom.css` in HTML; can instead be referenced in JavaScript through
    the config file (provided in `svgedit-config-sample-iife.js`/`svgedit-config-sample-es.js` as `svgedit-custom.css` for
    better namespacing); incorporates #207 (@iuyiuy)
- Breaking change: Remove minified jgraduate/spinbtn files (minified within Rollup routine)
- Fix: Zoom when scrolled; incorporates #169 (@AndrolGenhald), adapting for conventions; also allow avoidance when shift key pressed
- Fix: Update Atom feed reference in HTML
- Fixes related to recent commits: Some path and method name fixes needed, function order, missing methods, variable scope declaration, no need for DOMContentLoaded listeners in modules, switch back to non-default export, avoid trimming nullish, deal with mock tests, fix `math.matrixMultiply`, use jquery-svg where needed for array/SVG attributes; add babel-polyfill and defer script to imagelib; other misc. fixes
- Enhancement: Move config-sample.js out of `editor` directory
- Enhancement: For `callback`-style extensions, also provide config object; add following
   to that object: buildCanvgCallback, canvg, decode64, encode64, executeAfterLoads, getTypeMap, isChrome, ieIE, NS, text2xml
- Enhancement: Complete ES6 modules work (extensions, locales, tests), along with Babel;
    make Node build routine for converting modular source to non-modular,
    use `loadStylesheets` for modular stylehsheet defining (but parallel loading);
- Enhancement: Add `stylesheets` config for modular but parallel stylesheet loading with `@default` option for simple inclusion/exclusion of defaults (if not going with default).
- Refactoring: Clean up `svg-editor.html`: consistent indents; avoid extra lbs, avoid long lines
- Refactoring: Avoid embedded API adding inline JavaScript listener
- Refactoring: Move layers and context code to `draw.js`
- Refactoring: Move `pathActions` from `svgcanvas.js` (though preserve aliases to these methods on `canvas`) and `convertPath` from `svgutils.js` to `path.js`
- Refactoring: Move `getStrokedBBox` from `svgcanvas.js` (while keeping an alias) to `svgutils.js` (as `getStrokedBBoxDefaultVisible` to avoid conflict with existing)
- Docs: Remove "dependencies" comments in code except where summarizing role of jQuery or a non-obvious dependency
- Refactoring/Linting: Enfore `no-extra-semi` and `quote-props` rules
- Refactoring: Further avoidance of quotes on properties (as possible)
- Refactoring: Use `class` in place of functions where intended as classes
- Refactoring: Consistency and granularity in extensions imports
- Testing: Update QUnit to 2.6.1 (node_modules) and Sinon to 5.0.8 (and add sinon-test at 2.1.3) and enforce eslint-plugin-qunit linting rules; update custom extensions
- Testing: Add node-static for automating (and accessing out-of-directory contents)
- Testing: Avoid HTML attributes for styling
- Testing: Add npm `test` script
- Testing: Comment out unused jQuery SVG test
- Testing: Add test1 and svgutils_performance_test to all tests page
- Testing: Due apparently to Path having not been a formal class, the test was calling it without `new`; refactored now with sufficient mock data to take into account it is a class
- npm: Update devDeps
- npm: Add html modules and config build to test script
2018-05-25 20:03:14 +08:00
Brett Zamir fff77db4f1 Test summary: two tests failing: draw.js (releaseId), svgedit.recalculate (text w/tspan with simple translate)
- Testing: Add node-static to get tests working
- Testing: Fix timing for ensuring expanding iframe size to fit content
- Testing: Add favicon to test files
- Refactoring: Move scripts to own files and lint
2018-05-17 12:57:51 +08:00
Brett Zamir f7bdf6be18 - Testing (math_test): Fix undeclared variables
- Testing: Move JavaScript out of HTML to own files
- Linting: ESLint; unfinished: editor/extensions/, editor/ (root); some of test
2018-05-15 23:43:28 +08:00
Brett Zamir 38d6274723 - Linting (HTML): Use double-quotes for attributes, remove redundant `type=text/css`,
indent/lbs, consistent non-use of HTML namespace, consistent indents, consistent charset
    casing
- Linting (Markdown): Add `.remarkrc`, use proper hierarchical headings, use consistent
    heading format, trailing spaces
- `composer.json`: consistent property spacing
- License: Add `.txt` extension, update copyright date, and reflect type (MIT) in file name
- Credits: Add self
- npm: Add `package.json` (version 3.0.0-alpha.1 for npm release only; just reserving name)
2018-05-13 09:58:13 +08:00
Flint O'Brien 12a393505d Refactoring and performance improvements for getStrokedBBox.
canvas.getStrokedBBox internals refactored to svgutils.
getStrokedBBox/getCheckedBBox renamed to
svgedit.utilities.getBBoxWithTransform
Removed duplicate calls to native getBBox.
Refactored slow transformed BBox from temporary DOM append/remove to
matrix calculations.
Lots of tests. Added qunit/qunit-assert-close.js.
2016-04-24 16:43:20 -04:00
Brett Zamir a682236528 Add HTML charset to tests, opera widget
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2610 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-10-29 03:32:01 +00:00
Jeff Schiller 59130ed555 Create jquery-svg module and empty test, update build. Add a couple tiny unit tests for recalculate.js
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2442 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-20 15:34:42 +00:00
Jeff Schiller bbe79434d6 Add empty test file and update Makefile
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2437 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-20 06:42:00 +00:00
Jeff Schiller a779a74aa9 Add fully qualified function calls, shuffle a couple tiny functions into svgutils.js, add an empty coords.js module for later
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2390 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-14 15:19:46 +00:00
Jeff Schiller 936d9cc362 Fix issue 1052: Properly parse the style attribute during sanitization
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2376 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-13 15:04:58 +00:00
Jeff Schiller 5c1227997b Reformat unit test page. Add in dependencies for test1 (but they still do not run)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2074 eee81c28-f429-11dd-99c0-75d572ba1ddd
2012-03-30 16:27:32 +00:00
Jeff Schiller c7635282f4 Fix Issue 907: Allow custom menu options (Apply patch from adambender)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2055 eee81c28-f429-11dd-99c0-75d572ba1ddd
2012-02-25 02:13:18 +00:00
Jeff Schiller 52c74f266b Move most of Path into svgedit.path
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1978 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-04 16:06:25 +00:00
Jeff Schiller 99931f7d5b Move shortFloat() into svgedit.units. Add test file for svgedit.units.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1966 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-02 17:28:43 +00:00
Jeff Schiller 0db154bff4 Rename document module to draw. Add getNumLayers() to draw module.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1925 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-01-16 23:07:35 +00:00
Jeff Schiller e557f346e9 Add unused document JS module and test. Change svgcanvas to always increment object ids for every call to getNextId().
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1908 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-01-13 06:57:26 +00:00
Jeff Schiller 111dba0350 Add select_test to all_tests
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1874 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-11-15 19:13:52 +00:00
Jeff Schiller 3ef0229180 Move Selector and SelectorManager into select.js. Start of unit test file for select.js.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1873 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-11-15 09:25:49 +00:00
Jeff Schiller 4a133d490d Move undo/redo functionality into history.js. Started unit test file.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1864 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-11-12 19:08:29 +00:00
Jeff Schiller dd719b48ea Start on a math unit test file
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1862 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-11-09 05:29:41 +00:00
Jeff Schiller d798f483e2 Add which browsers currently pass
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1861 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-11-08 19:06:56 +00:00
Jeff Schiller 711346f109 Start on a svgutils unit test file
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1856 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-11-08 08:42:46 +00:00
Jeff Schiller 9fa4764f41 Remove jquery from all_tests page
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1855 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-11-08 07:27:22 +00:00
Jeff Schiller 3aabcb428b Add unit tests for svgtransformlist.js and all_tests page
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1853 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-11-08 07:23:26 +00:00