Commit Graph

2282 Commits (a2df54881f6b3a4aabb646e60838ea6a7725c913)

Author SHA1 Message Date
Neil Fraser a2df54881f Remove redundant (and incorrect) length set. (#256)
* Remove redundant (and incorrect) length set.

Fixes issue #255

* Simplify code by using push instead of a variable
2018-06-11 08:44:45 -07:00
Brett Zamir e7f3fbc841 - npm: Update devDep Rollup
- Linting (ESLint): Prefer `const` over `let`
- Build: Update `dist` files
2018-06-06 16:44:19 +08:00
Neil Fraser 2deaf4710a Sort SVG attributes alphabetically. (#252)
* Sort SVG attributes alphabetically.

This makes the exported SVG deterministic and diffable.

* Simplify attr variable
2018-06-03 02:44:57 -07:00
Brett Zamir 5469084919 - Refactoring (minor): `getIssues` to return codes and strings, lbs
- JSDoc: Fix param
2018-06-01 15:59:17 +08:00
Brett Zamir 812ca80230 - Docs: Further exclusions 2018-05-31 17:45:48 +08:00
Brett Zamir bbded75c54 - ExtensionDocs update 2018-05-31 17:09:53 +08:00
Brett Zamir a27a5d5637 - Docs: Exclude from jsdoc firefox-extension, opera-widget, screencasts, test folders and build.html.js/rollup files
- Docs: Further JSDoc of methods
- Docs: Transfer some changes from ExtensionDocs on wiki (need to fully reconcile)
- Refactoring (minor): variadic args through ellipsis
2018-05-31 16:07:44 +08:00
Brett Zamir 96e089f930 - Breaking change: In interests of modularity/removing globals, remove `window.svgCanvas`
and `svgCanvas.ready` as used by older extensions; use `svgEditor.canvas` and
    `svgEditor.ready` instead
- npm: Add `prepare` script to ensure building/testing before publish
2018-05-31 09:53:47 +08:00
Brett Zamir 77999a31ce - Docs: Fix outdated comment 2018-05-31 09:43:35 +08:00
Brett Zamir 6ccaf2491c - Enhancement: Add `pointsAdded` canvas event (Fixes #141) 2018-05-31 09:43:18 +08:00
Brett Zamir 7f5c315812 - Linting (ESLint): Missed a few comments 2018-05-31 09:16:29 +08:00
Brett Zamir a5c25a2113 - Code comments: Coding standards within
- Refactoring (minor): Use single quotes in PHP
2018-05-31 07:52:13 +08:00
Brett Zamir 8f53e34c0c - Docs (JSDoc)
- Fix regression (Imagelib): Fix path for non-module version
2018-05-30 21:49:32 +08:00
Brett Zamir d173df34d2 - Fix (Embedded API): Cross-domain may fail to even access `origin` or `contentDocument`
- Fix (Embedded API): Avoid adding URL to iframe src if there are no arguments
- Fix (Cross-domain usage): Recover from exceptions with `localStorage`
- Docs (JSDoc): Missing function
2018-05-30 19:39:00 +08:00
Brett Zamir f2b1a1ff0c - Enhancement: Allow callback argument and return promise
for canvas methods: `rasterExport` and `exportPDF`
2018-05-30 16:47:43 +08:00
Brett Zamir a5ad91a370 - Refactoring: Sort Embedded functions alphabetically and add lbs for better visibiilty in code
- i18n: Clarify locale messages (where still available as English) to reflect fact that Chrome only has "Save as" via context menu/right-click, not via file menu (toward #192)
- Linting (ESLint): Avoid linting jsdoc folder
2018-05-30 16:00:06 +08:00
Brett Zamir 41201cf452 - Docs: Reference JSDocs in README
- Docs (ReleaseInstructions): Clarify README changing; lbs
2018-05-30 11:40:55 +08:00
Brett Zamir df69ba2b72 - Move jsdoc output to public directory so may be visible on releases (while still having in a `.gitignore`) 2018-05-30 11:32:56 +08:00
Brett Zamir f1bdd668c6 - Docs (ReleaseInstructions): Avoid referencing binary files for now;
include mention of ES6 Module HTML file and need to copy
    config files (without `.git`/`.gitignore` files); mention reviewing
    Github release format
2018-05-30 11:16:54 +08:00
Brett Zamir 3b04fe0c63 - Docs: Add README link to pre-release
- Docs (ReleaseInstructions): Comment out Makefile-related instructions for now and
    add to-dos (README referencing current version and `package-lock.json`, tagging)
- npm: Bump to 3.0.0-alpha.4
2018-05-30 10:57:28 +08:00
Brett Zamir 2ddc78d525 - Fix (regression): Favicon setting 2018-05-30 08:54:56 +08:00
Brett Zamir 9f4eedc419 - Fix (regression): Star tool (radialshift) 2018-05-30 08:48:56 +08:00
Brett Zamir 81dc19cc17 - Fix (regression): Bad name on function passed to `path.js`
- Linting (ESLint): Fix semi-colon error
2018-05-30 08:25:56 +08:00
tetedacier d098dc0914 Bugfix/separate declaration from exposition (#245)
* Separate definition from exposition

* Suppress previous documentation before generating new one

* Restore deleted line

* Set up verbosity to provide details on what's going on
2018-05-29 09:43:02 -07:00
Brett Zamir 76db126ec7 - Update `dist` files 2018-05-29 21:40:03 +08:00
Brett Zamir 785e9b11dc - Fix `main` on `package.json` to reference UMD distribution and `module` to point to ES6 Module dist 2018-05-29 21:30:34 +08:00
Brett Zamir dc79fe7fde - npm: Alphabetize scripts
- JSDoc: Exclude svgedit config files
- JSDoc: Convert remaining items in old format to JSDoc (as could easily be found)
2018-05-29 20:31:24 +08:00
tetedacier fb413a8e9f Add contributor name 2018-05-29 10:45:45 +02:00
tetedacier 86d2ef0e01 Add jsdoc dependency 2018-05-29 10:45:10 +02:00
tetedacier 2293b122d8 Setup jsdoc configuration and output placeholder 2018-05-29 10:42:33 +02:00
tetedacier c965d6b5f2 Fix jsdoc syntax error 2018-05-29 10:41:26 +02:00
Brett Zamir 463fb72bb2 - Docs: CHANGES
- npm: Bump to 3.0.0-alpha.3
2018-05-29 13:54:14 +08:00
Brett Zamir a353d6fc89 - npm: Update devDeps
- Fix: Enforce stylesheet ordering sequence
- Fix: Ensure SVG-edit hidden until stylesheets loaded
- Fix: Avoid abandoning stylesheet loading if one load fails
2018-05-29 13:48:42 +08:00
Brett Zamir 83e3e66ddc - Demos: Add svgcanvas demo (Neil Fraser) 2018-05-29 07:17:30 +08:00
Brett Zamir 5e8f460f55 - Fix (Extensions): Use "extIconsPath` for now given that `extPath` will not work relative to `dist` 2018-05-28 21:59:39 +08:00
Brett Zamir 54d6fd41b6 - Allow `addSvgElementFromJson` to accept non-SVG namespaces with explicit
`namespace` property as well as the default SVG namespace (fixes #155);
    document
2018-05-28 21:17:27 +08:00
Brett Zamir 28ba66d98d - Optimization: For `setSvgString`, if element content is not SVG, return `false` earlier (Fixes #152); thanks iuyiuy! 2018-05-28 20:42:37 +08:00
Brett Zamir 5b23b93154 - Fix (ext-connector): Handle case of 2 connecting elements with same y-coordinate (fixes #210 ; thanks, @iuyiuy!) 2018-05-28 20:29:22 +08:00
Brett Zamir c2e06534ff - Enhancement: Delete the imge upon cancel if it is a new image (fixes #177) 2018-05-28 19:19:00 +08:00
Brett Zamir beb513ae0e - npm: `package-lock.json`: updated version
- Fix (Connector extension): Get config object when available
2018-05-28 18:49:30 +08:00
Brett Zamir bfbd0a42ec - Default to stylesheet above `editor` directory 2018-05-28 16:43:34 +08:00
Brett Zamir f11c918c53 - Docs: Further install clarification 2018-05-27 00:15:04 +08:00
Brett Zamir c74b482bc4 - Docs: Add more complete setup instructions 2018-05-27 00:09:43 +08:00
Brett Zamir 4dbfe81163 - Fix installation step 2018-05-26 23:54:57 +08:00
Brett Zamir f14d96ede9 - npmignore: Allow `docs` 2018-05-26 11:23:34 +08:00
Brett Zamir cea251b15a - New installation steps 2018-05-26 09:12:46 +08:00
Brett Zamir 5ad83b9b87 - Refactoring: Clean-up
- Fix: Race condition with svgicons and seticonsize
- Embedded editor: Use module form for now; drop unused inline attribute
- Embedded editor: Fix PNG export; work toward restoring PDF (add `getUIStrings` method to editor for assisting)
- canvg and importScript fixes
2018-05-25 22:43:01 +08:00
Brett Zamir 52268c4324 - Docs: Add to CHANGES (and change prior list formatting)
- npm: Bump to 3.0.0-alpha.2
2018-05-25 21:26:53 +08:00
Brett Zamir bf261fd670 - Add in locales for English 2018-05-25 21:25:38 +08: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