Commit Graph

2233 Commits (3fe912eba8abc04f2af056c5948a7e660628c2c8)

Author SHA1 Message Date
cuixiping 2631a21607 fix #334 JS error when changing language 2019-03-16 18:33:42 +08:00
Brett Zamir dade2a7b37 - Linting (ESLint): Apply coding standards
- Testing (Refactoring): Abstract out to helper file functions for approving local storage and opening the main menu
- Docs (CHANGES): Update
- npm: Update devDeps; update nested deps for security audit
2019-03-16 12:33:35 +08:00
cuixiping 573544b41b fix SVG-Edit/svgedit#268 error on dragging control point of arc 2019-03-13 11:15:49 +08:00
Brett Zamir bc2e1ef725 - Fix: Delay icon setting until locales available (fixes #323) 2019-03-05 22:55:02 +08:00
Brett Zamir e524ae6174 - Fix: Extension with no `placement` to be added to end;
for #326 (@sjernigan)
2019-03-05 22:19:02 +08:00
Brett Zamir d7b9cc6309 - Fix: Ensure copy preserves array values (e.g., dimensions in URL per #320) 2019-02-21 20:48:45 +08:00
Brett Zamir d01abf19d2 - npm: Update devDeps
- Linting (ESLint): New ash-nazg rules
2019-02-21 19:41:09 +08:00
Brett Zamir c2a9798bfe - Enhancement: Whitelist `feMorphology` element
- Todo
2019-02-21 19:24:22 +08:00
Brett Zamir 08b310a9f2 - Linting (ESLint): Coding standards (prefer const, etc.)
- Refactoring: Use array destructuring for clearer var naming;
    prefer `includes` over `indexOf`
- Docs (CHANGES): Update
- Build: Update dist files for non-ES use
2019-02-21 16:26:26 +08:00
Александр 080dc1db3e Remove useless code 2019-01-21 14:32:08 +04:00
Александр 7e80e64c7b Update functionality 2019-01-21 14:12:02 +04:00
Александр f75580611b CAD Placemark Extension 2019-01-18 10:02:40 +04:00
Brett Zamir db06248b7e - Optimization fix: Properly run code conditionally on browser check;
fixes #312 (@ianli-sc)
2018-12-27 09:51:26 +08:00
Brett Zamir 01083faf73 - Docs: Update CHANGES
- npm: Update devDeps
- npm: Bump to 4.2.0
2018-12-13 09:48:06 +08:00
Александр 69a5d03e42 Add russian translation to some strings 2018-12-07 11:34:21 +04:00
Brett Zamir cf476ed8ea - l10n: Add zh-CN dist files
- Linting (ESLint): Add back `no-console`; while useful for debugging, could flag incomplete code (and was breaking at reporting of unused directives)
- Docs (CHANGES): Add changes and apply more formal style
- Build: Rebuild with updated Babel/Rollup
- npm: Update devDeps
2018-12-04 14:36:02 +08:00
Brett Zamir 8b44af5398
Merge pull request #307 from NeiroNx/master
Fix Grid bug
2018-12-04 14:07:52 +08:00
NeiroNx 9fa5955b9c
Fix Grid bug 2018-12-04 08:53:09 +04:00
Brett Zamir 17bc78fa3f - l10n: Add Chinese (simplified) extension locales (Thanks, @enlove!)
- Linting (ESLint): Avoid reporting `no-console`
- Refactoring: Avoid Firefox console errors with hidden iframe
- Docs (CHANGES): Fix Markdown heading level
2018-11-30 18:27:22 +08:00
Brett Zamir c6d07fbb7c - Fix: Extension locales with hyphens
- npm: Bump to 4.1.0
2018-11-29 20:41:50 +08:00
Brett Zamir 99ec41a3c3 - Fix: Avoid cross-frame unsafe `instanceof`
- npm: Update eslint-config-ash-nazg
2018-11-28 08:56:41 +08:00
Brett Zamir 3f861af42d - Update: Bump StackBlur version 2018-11-25 22:15:33 +08:00
Brett Zamir 845dbbd7d7 - Linting (ESLint): Prefer `addEventListener`, exponentiation operator, avoiding catastrophic regexes, prefer spread, prefer startsWith/endsWith, no fn ref in iterator
- npm: Update devDeps (rollup and eslint-config-ash-nazg)
2018-11-21 21:03:14 +08:00
Brett Zamir 1c284c948d - Fix (regression): RGBColor
- npm: Bump to 4.0.1
2018-11-16 15:44:20 +08:00
Brett Zamir ba1f0d7f14 - Fix: Adjust side panel width checking based on device zoom (fixes #298) 2018-11-16 14:17:26 +08:00
Brett Zamir b0fad3d765 - Fix (regression): Fix storage namespace; update build files to get regression fix applied 2018-11-16 13:33:13 +08:00
Brett Zamir c42791b2b2 - Fix (regression): Arg names not being passed on properly for `addExtension` 2018-11-16 13:02:14 +08:00
Brett Zamir 2e5c7557a9 - Breaking change: `loadSvgString` now returns a `Promise` rather than accepting a callback
- Breaking change: Treat callbacks to `editor.ready` as Promises, only resolving after all resolve
- Breaking change: Make `editor.runCallbacks` return a `Promise` which resolves upon all callbacks resolving
- Breaking change: Require `npx` (used with `babel-node`) to allow Node files
  for HTML building and JSDoc type checking to be expressed as ESM.
- Breaking change: `addExtension` now throws upon a repeated attempt to add an already-added extension
- Breaking change (storage preference cookies): Namespace the cookie as "svgeditstore" instead of just "store"
- Breaking change (API): Remove `svgCanvas.rasterExport` fourth (callback) argument, collapsing fifth (options) to fourth
- Breaking change (API): Remove `svgCanvas.exportPDF` third (callback) argument
- Breaking change (API): `editor/contextmenu.js` `add` now throws instead of giving a console error only upon detecting a bad menuitem or preexisting context menu
- Breaking change (API): Remove `svgCanvas.embedImage` second (callback) argument
- Breaking change (API): Make `getHelpXML` a class instead of instance method of `RGBColor`
- Breaking change (internal API): Refactor `dbox` (and `alert`/`confirm`/`process`/`prompt`/`select`) to avoid a callback argument in favor of return a Promise
- Fix: Avoid running in extension `langReady` multiple times or serially
- Enhancement (API): Add svgCanvas.runExtension to run just one extension and add `nameFilter` callback to `runExtensions`
- Enhancement (API): Supply `$` (our wrapped jQuery) to extensions so can use its plugins, e.g., dbox with its `alert`
- Enhancement: Use alert dialog in place of `alert` in webappfind
- Enhancement: `editor.ready` now returns a Promise resolving when all callbacks have resolved
- Enhancement: Allow `noAlert` option as part of second argument to `loadSvgString` (and `loadFromURL` and `loadFromDataURI`) to avoid UI alert (and trigger promise rejection)
- Enhancement: Make `dbox` as a separate module for alert, prompt, etc. dialogs
- Refactoring: Internal `PaintBox` as class; other misc. tweaks; no bitwise in canvg
- Linting (ESLint): Further linting changes (for editor); rename `.eslintrc` -> `.eslintrc.json` per recommendation
- Optimization: Recompress images (imageoptim-cli updated)
- npm: Update devDeps
- npm: Bump to 4.0.0
2018-11-16 12:48:23 +08:00
Brett Zamir 7c470e9909 - Linting (ESLint): Stricter rules (or switch to warning)
- Breaking internal API change: `updateGripCursor` moved to be class method of Selector rather than instance method
- Breaking internal API change: `subpathIsClosed` moved to be class method of `Path` rather than instance method
- Refactoring: Reuse utilities base64 encoder for SVG icons plugin
- Docs (JSDoc): Fix return of the `mouseUp` (can also be an object) and `mouseDown` (may also be a boolean) of `pathActions`; other JSDoc additions/improvements
2018-11-08 14:42:48 +08:00
Brett Zamir 901c9547fe TODO: Besides splitting this out from previous commit, should really avoid markdown field in favor of modifying jsdoc to report wherever it lays out "prettyprint"; still probably missing some one-liners; see https://github.com/google/code-prettify; update builds to confirm new stackblur is working; add below to CHANGES; add back for eslint-plugin-jsdoc once merged (though need new version `^3.9.1`); move any linting changes to other linting branch
- Refactoring (minor): Add favicon to canvas demo
- Linting (ESLint Markdown JavaScript): Add `eslint-plugin-markdown` with
  slightly loosened config (`no-undef` and `padded-blocks` off and
  `no-unused-vars` as a warning)
- Linting (ESLint JSDoc code comments): Add `eslint-plugin-jsdoc` and apply to
    JSDoc code comments
- Linting (ESLint): Completely avoid unescaped tabs in files
- Docs (Linting): Add linting info file
- npm: Rename `copy-deps` script to `copy`
- Refactoring: Add stackblur-canvas as a dependency and copy it in (until such time as we can do so for canvg)
2018-11-07 14:51:09 +08:00
Brett Zamir 8899680e60 - npm: Actually commit minor version update to avoid vulnerable qunit dependency; also update sinon
- npm: Avoid using Github version of JSDoc (used in a branch for layout override testing); do a fresh
    install of all packages and update `package-lock.json` accordingly; update qunit dist and openclipart
- npm: Bump to 3.2.0
2018-11-04 15:38:28 +08:00
Brett Zamir 8775528c94 - Docs (CHANGES): Add main heading
- npm: Update devDeps (including Jamilih copied into dist files as well as an updated qunit which resolves some security vulnerabilities
2018-11-04 15:14:53 +08:00
Brett Zamir f78fb05454 - Docs (JSDocs regression): Use nested array format recognized by both ESLint and JSDoc 2018-10-31 02:13:09 +08:00
Brett Zamir aef7b095ef - Refactoring: Avoid unnecessary addEventListener `false`; change internal
jPicker function to class (used with `new`)
- Linting (ESLint): Add `valid-jsdoc` rule and make fixes; but turn off for
  now due to <https://github.com/eslint/eslint/issues/11036> and
  <https://github.com/eslint/eslint/issues/11037>
- Docs (JSDoc): Add some Markdown for variables, line breaks; tighten checks
  for overly generic types (though allow for `.Function` as in
  `jQuery.Function`) and avoid one previously missed instance
2018-10-31 00:31:12 +08:00
Brett Zamir b573a85fba - Fix: Save broken on Firefox (since FF version?)
- Docs: Mention potentially more frequent release schedule
- Docs (ReleaseInstructions): Update per new testing; update
  `grep-doc` -> `types-doc` and indicate current failing status; indicate
  when `build-doc` will be used; clarify `npm pack`
- npm: Add newly renamed `jsdoc-check-overly-generic-types.js` to ignore
- npm: Bump to 3.1.1
2018-10-25 10:45:57 +08:00
Brett Zamir 89515b7e1e - Docs: For clarity, rename `grep-jsdoc.js` to `jsdoc-check-overly-generic-types.js`
- Docs: Move GenericCallback to typedefs.js for possible reuse
- npm: Update "grep-doc" to "types-doc" for greater clarity
2018-10-25 10:09:32 +08:00
Brett Zamir 283ef0b521 - Fix: Have export handler, if triggered, always open a window even if no
window name was given (needed in Chrome to avoid opening an extra window)
- Fix (Embedded editor regression): Ensure event handlers are added even if
    document cannot be directly modified
- Enhancement: Add `opts` object to `rasterExport` with `avoidEvent` property
  to avoid calling the `exported` event
- Docs (CHANGES): Update
- Docs (README): Deemphasize unstable embedded editor fixes
2018-10-24 14:56:09 +08:00
Brett Zamir 07f59ba01a - Refactoring: Reorder path config to group (non-modular-dependent) image
paths together (and correct code comment)
- Docs: CHANGES clarifications/fixes
- Docs: Migrations documents section
- Docs: Add code comment re: use of `extIconsPath` in Mathjax
- Docs: Add JSDoc indicate @this for `ExtensionInitResponse#callback`
- Build: Update build files
- npm: Bump to 3.1.0
2018-10-24 13:52:08 +08:00
Brett Zamir 9d454d79fd - Refactoring: Rename no modules redirect file to begin with "redirect" as with other redirect 2018-10-24 11:03:26 +08:00
Brett Zamir 4a0889c7e5 - Enhancement: For anyone visiting the ES6 modules entrance file without ESM
support, redirect to non-modular vesion
- Build: Add comment not to edit xdomain editor directly
2018-10-24 10:56:07 +08:00
Brett Zamir 25f02d99f2 - Refactoring: Display inline styles within a template for readability
(until we may refactor as class swapping)
- Refactoring: Line breaks
2018-10-24 09:44:43 +08:00
Brett Zamir a714c122d3 - Fix (Embedded editor): (Though embedding cross-origin iframes apparently
only working now in Chrome if same origin or if https?--at least not
  localhost of different ports), PDF export has been fixed (we download the
  PDF to workaround data URI limitations in Chrome)
- Fix (Embedded editor): Avoid using same origin shortcut if there is no
  global available to use (e.g., if using the modular editor)
- Fix (Embedded editor): Add events only after load is complete and
  svgCanvas is available; also log blocked error objects
- Enhancement: For PDF export, switch Chrome by default to "save" `outputType`
- Docs (JSdoc): Denote optional arguments
2018-10-23 22:24:09 +08:00
Brett Zamir 5b4dae0d30 - Docs: CHANGES clarifications
- Docs: More info on `importLocale` for extensions
- Refactoring: Better type-checking on `canvasRGBA_` (but set correctly by default anyways)
- Build: Remove unused Makefile
2018-10-23 18:35:49 +08:00
Brett Zamir 2835ec11b6 - Refactoring: Avoid redundant use of *AttributeNS methods with
`null` value; just use *Attribute methods without namespace
2018-10-23 18:14:27 +08:00
Brett Zamir f4bbd34d34 - Fix: Revert fix to have extension `mouseup` events run on "zoom" and
"select" modes (#159); breaks polygon selection
- npm: Bump to 3.0.1
2018-10-22 23:43:59 +08:00
Brett Zamir 2cecbac24a - Fix (jgraduate->jpicker): Actually fix issue with color val check when no other proper results (equal to "all");
prior fix had not covered original intention
- Docs: Clean-up and fixes in CHANGES
2018-10-22 23:13:04 +08:00
Brett Zamir d13f99bb5e - Breaking change: Remove `storagePromptClosed` state boolean in favor of
`storagePromptState`; used by `ext-storage.js`
- Fix (regression): Ensure storage dialog will not be blocked because of
    canvas updating done for sake of centering background
- Fix (extensions): Ensure `langReady` changes are available by time prefs
  dialog is closed and that its changes have occurred by time extensions
  have first loaded (`setLang` now returns a Promise rather than `undefined`
  as it waits for extension's `langReady` to resolve); this is also useful
  with `ext-storage.js` so we know that `extensions_loaded` (which
  conditionally updates the canvas based on `storagePromptState`) has seen
  `langReady` and the storage extension hasn't set a `storagePromptState`
  of "waiting"
2018-10-21 18:38:53 +08:00
Brett Zamir c37e60fd87 - Fix: Centering of canvas wasn't being set at proper time; fixes #272
- Refactoring: Avoid unneeded internal IIFEs; simplify w/h formula
2018-10-21 01:17:44 +08:00
Brett Zamir 5d9da2d56e - Breaking change: For checkbox for persisting choice of initial use storage
approval in storage extension dialog, turn on by default for convenience of
  most users (must still hit "ok" and users can still turn off the checkbox)
2018-10-20 23:38:47 +08:00
Brett Zamir fb9eb80798 - Fix (regression): Extension locale loading for non-English locales
- Fix: Allow language to be properly set back to a different locale and
  retaining preference (and ensure language changes are available before
  dialog closed)
- Refactoring: array extra/spread operator
- npm: Update devDep (sinon-test)
2018-10-20 22:21:58 +08:00
Brett Zamir 8024304a96 - Fix: Map extension click events to "mousedown" so they can be received
on touch devices (since `touch.js` changes `touchstart` to
    `mousedown`) (@ClemArt); closes #168
- Fix: Ensure extension `mouseup` events run on "zoom" and "select"
  modes (@iuyiuy); closes #159
2018-10-19 20:42:10 +08:00
Brett Zamir b7269db7f4 - Docs: Move from closing rawgit.com to unpkg.com 2018-10-14 12:45:11 +08:00
Brett Zamir 714cbe0c44 Revert "- Fix: Regression with locale string setting"
This reverts commit a5265d2c22.
2018-10-02 22:50:27 +08:00
Brett Zamir a5265d2c22 - Fix: Regression with locale string setting 2018-10-02 21:19:47 +08:00
Brett Zamir 3909d2fd97 - Fix: Only clear selection by escape key if not within a dialog (as the escape key should only close the dialog)
- Fix: Ensure escape key will work from within input text boxes (as was already added for textareas)
- Refactoring: Share code for dialog selectors
2018-10-02 14:02:15 +08:00
Brett Zamir 2a943cd1fa - Enhancement: Allow 'a' also with meta key (command in Mac, ctrl otherwise)
to select all (part of #291)
- Enhancement: Add a global escape key listener to clear the selection
- Refactoring: Change 'a' to lower case in key command to avoid impression
  that shift is needed
2018-10-02 13:21:04 +08:00
Brett Zamir 3d2085c991 - Build: Update `dist` 2018-10-01 16:45:34 +08:00
Brett Zamir 3c036c70cd - Enhancement: Allow "Escape" to work with hotkeys within text boxes;
allows escaping out of source textarea (part of #291)
2018-10-01 16:30:10 +08:00
Brett Zamir e735142a40 - Refactoring: Although openclipart is not currently working, we still add routine for copying query-result/qr-manipulation to be able to use them in other script 2018-09-30 13:33:00 +08:00
Brett Zamir 71b2b33e41 - Fix: Avoid errors occurring in Chrome now for `supportsGoodTextCharPos`
- Linting: Avoid Jamilih file in doc linting
- Testing: Add testcafe (ESLint plugin/rules, accessibility test
  (failing), ui test beginnings (passing))
- Docs: Add "Testing" prefix to contributing file
- npm: Bump to 3.0.0-rc.3
2018-09-30 12:13:34 +08:00
Brett Zamir 1a214ae444 - npm: Update devDeps 2018-09-29 10:59:46 +08:00
Brett Zamir ae58be8277 - Build: Babel 7
- npm: Update qr-manipulation
2018-09-26 21:27:52 +08:00
Brett Zamir 9f7f7b9732 - Openclipart API work (waiting on possibility of their adding a missing CORS header) 2018-09-26 16:49:46 +08:00
Brett Zamir ae7d0d1331 - Compatibility fix (openclipart): Ensure polyfill present; make separate non-modular build (still not integrated as API incomplete)
- Docs: Add compatibility fix to Contributing
2018-09-26 16:06:57 +08:00
Brett Zamir ab5aec978e - Further work on openclipart (now just need to pass to ) 2018-09-26 14:46:53 +08:00
Brett Zamir 526c87b61e - Further work on openclipart (use qr-manipulation) 2018-09-26 12:38:00 +08:00
Brett Zamir 8c0161361f - Fix (Imagelib): Avoid premature exit for string API (#274) 2018-09-25 23:34:51 +08:00
Brett Zamir fff4b2e48b - Openclipart: Bail on error, lbs 2018-09-25 16:52:12 +08:00
Brett Zamir 4b6be7a871 - Incomplete enhancement: Add Openclipart query page (using Jamilih); need to better format results and tie into Imagelib 2018-09-25 16:49:26 +08:00
Brett Zamir 90ff5b9479 - Update (Imagelib): Remove extra (and more outdated) jQuery copy
- Refactoring (minor): Reuse local variable
- Docs: Contributing re: updates
2018-09-25 14:21:40 +08:00
Brett Zamir fa37778ec0 - Fix: Ensure repeated selection of same file overwrites with that
file's contents (fix #289)
2018-09-25 11:19:13 +08:00
Brett Zamir 0034447d44 - Imagelib backward compatibility enhancement: Allow string based API
again so as not to break old SVG-Edit which fail at *presence* of
  `namespace` (fixes #274)
- Known regression: Remove Openclipart as its site's now setting of
  `X-Frame-Options` to `"sameorigin"` makes it unusable on our end
  for our cross-origin uses
- Forward compatibility enhancement: For IAN image library, add
  `svgedit=3` param to URL so that it can keep using old API for
  SVG-Edit versions before 3, while conditionally using new object-based
  API now (and if we switch exclusively to the object-based API in the
  future, this site will continue to work)
- Docs: Add "Forward compatibility enhancement" to list
2018-09-25 10:13:29 +08:00
Brett Zamir 83aa156353 - Fix (regression): Imagelib (ensure non-URL relative paths are treated as current origin); variable order (#274) 2018-09-25 03:32:01 +08:00
Brett Zamir 459a6b8f89 - Build: Update `dist` 2018-09-25 03:12:11 +08:00
Brett Zamir 704336c0f2 - Imagelib backward compatibility enhancement: Allow `namespace-key` as
alternative to `namespace` so as not to break old SVG-Edit which fail
  at *presence* of `namespace` (fixes #274)
- Forward compatibility enhancement: Once IE9 support may be dropped,
  we may post messages as objects, so don't break if objects received
  (embedded API, xdomain, Imagelib)
2018-09-25 03:06:22 +08:00
Brett Zamir 7ff2721ba9 - Enhancement: Auto-detect `allowedImageLibOrigins` based on locale rather than requiring user to supply 2018-09-25 02:35:15 +08:00
Brett Zamir a22895c53a - Security fix (Imagelib): Avoid XSS (fixes #288)
- Fix (Imagelib): `dropXMLInternalSubset` misspelled
2018-09-25 02:06:51 +08:00
Brett Zamir 11baad0402 - Security fix/Breaking change (Imagelib): Require `allowedImageLibOrigins`
config array be set with safe origins or otherwise reject `postMessage`
  messages in case from untrusted sources
- Security fix/Breaking change (xdomain): Namespace xdomain file to avoid
  it being used to modify non-xdomain storage
- Security fix (Imagelib): Expose `dropXMLInternalSubset` to extensions
  for preventing billion laughs attack (and use in Imagelib)
2018-09-24 20:59:47 +08:00
Brett Zamir 25ed8ad465 - Linting (LGTM): Mark remote property injection in embedapi as safe 2018-09-24 20:08:49 +08:00
Brett Zamir 7db8cc9c36 - Fix: Ensure poly shape has a `points` attribute
- Refactoring: Avoid building nested function upon each function call
- Linting (ESLint): Coding standards
2018-09-22 11:59:34 +08:00
eric f485a05c56 Export polygon and polyline to PDF. fix #280 2018-09-22 11:21:22 +08:00
Brett Zamir fbffc86503 - Security fix (minor): For embedded API, avoid chance for arbitrary property
setting (though this was only for trusted origins anyways)
- Security fix (minor): For embedded API example, copy params to iframe
    source without XSS risk (though params should already be XML-safe
    given `encodeURIComponent` and lack of a single quote attribute context)
- Linting (LGTM): Flag origin-checked item as safe
- Refactoring: Destructuring, ellipsis
- Docs (JSDoc): Missing return value
2018-09-22 10:06:25 +08:00
Brett Zamir dab1ff81af - Fix (jPicker): Avoid setting `Math.precision` pseudo-global
- Refactoring (jPicker): Use ES6 templates; avoid unnecessary check
- Refactoring: Avoid useless assignment (courtesty lgtm)
- Build: Update files
2018-09-22 09:01:13 +08:00
Brett Zamir be17cd249c LGTM.com-inspired changes:
- Fix: Ensure all apostrophes are escaped for `toXml` utility
- Fix: Avoid error if `URL` is not defined
- Fix (jPicker): Precision argument had not been passed in previously
- Fix (Star extension): Minor: Avoid erring if `inradius` is `NaN`
- Refactoring: Avoid passing unused arguments, setting unused variables,
  and making unnecessary checks; avoid useless call to `createSVGMatrix`
- Linting (LGTM): Add `lgtm.yml` file (still some remaining items flagged
  but hoping for in-code flagging)
- Docs: Contributing file
2018-09-21 10:56:07 +08:00
Brett Zamir cba5909472 - Fix (regression): i18n of markers extension 2018-09-14 07:36:06 +08:00
Brett Zamir b51db3a3c1 - Fix (Context menus): Avoid showing double shortcuts (#285); add some
missing ones
2018-09-14 07:18:26 +08:00
Brett Zamir ed6aa3fcb8 - Build: Update `dist` files 2018-09-13 22:57:01 +08:00
Brett Zamir c0ea00d36b - Fix (image export) Export in Chrome; fixes #282 2018-09-13 18:23:53 +08:00
Brett Zamir 0688b9af60 - Fix (image import): Put src after onload to avoid missing event;
check other width/height properties in case offset is 0; fixes #278
2018-09-13 17:54:40 +08:00
Brett Zamir b0bad24645 - Linting (ESLint): Apply coding standards
- Breaking change (minor): Change export filename to check `exportWindowName` and change default from `download.pdf` to `svg.pdf` to distinguish from other downloads
- Enhancement: Restore old dataURI functionality for non-Chrome browsers
2018-09-13 09:13:05 +08:00
eric fc1f36714e fix pdf export issue. #124 and #254 2018-09-13 07:47:19 +08:00
Brett Zamir 4b22c248e4 - npm: Update devDeps
- Build: Switch to `terser` plugin with `uglify` plugin not
    supporting ES6+-capable minifier
- Linting (ESLint): Consistent curly spacing; follow new "standard"
2018-09-07 08:19:45 +08:00
Brett Zamir cad412fe6e - Optimization: Image compression 2018-09-07 05:41:46 +08:00
Brett Zamir 97d093d6ef - Linting (ESLint): Add xdomain file to ignore file
- Fix (i18n): Regression in last commit with locales and apostrophe values
- npm: Avoid adding config files to ignore file
- npm: Bump to 3.0.0-rc.2
- Build: Update build
2018-07-31 15:15:25 -07:00
Brett Zamir 63fab9ff43 - i18n: Move `imagelib` reference from common to ext. locale;
remove `toggle_grid` from `az` locale
2018-07-31 14:59:27 -07:00
Brett Zamir f1666d11d1 - i18n: Remove eyedropper reference from main locale (in extension locale now)
- i18n: Add placeholders for `pick_stroke_paint_opacity`, `pick_fill_paint_opacity`, `popupWindowBlocked`
- i18n: Update `saveFromBrowser`
- i18n: Reapply locale strings
2018-07-31 13:22:00 -07:00
Brett Zamir acb57c1609 - Fix: Add images (and references) for fallback (#135)
- Fix (canvg): blur export fix
- i18n (Chinese): A few fixes (#135)
- Optimize: Further image optimizing
- Refactoring: Avoid custom JS substitution syntax
- Refactoring: Reorder default extension list
2018-07-31 00:18:39 -07:00
Brett Zamir 5ad6e6ba48 - Enhancement: Create xdomain file build which works without ES6 Modules
- Enhancement: Build xdomain files dynamically
- Fix: Race condition in svgIcons plugin
- Build: Update `dist` files
2018-07-30 12:51:57 -07:00
Brett Zamir 0a2da503f1 - Fix: Avoid extension `includeWith` button conflicts/redundancies;
Incorporates #147
- Fix: Ensure shift-key cycling through flyouts works with extension-added
    `includeWith` as well as toolbarbuttons
- Fix: Apply flyout arrows after extensions callback
- Fix: Ensure SVG icon of flyout right-arrow is cloned to can be applied to
    more than one extension
- Fix: Ensure line tool shows as selected when "L" key command is used
- Refactoring: Avoid passing on `undefined` var. (#147)
- Refactoring: lbs; avoid indent in connector, destructuring, use map over push
- Docs: Clarify nature of fixes
- Docs: JSDoc for `setupFlyouts`, `Actions`, `toggleSidePanel`; missing for
  ToolbarButton
2018-07-28 19:16:55 -07:00
Brett Zamir e2d378cfe6 - Optimize: Avoid rewriting `points` attribute for free-hand path; incorporates #176 (fixes #175)
- Docs: Update CHANGES
2018-07-26 00:01:58 -07:00
Brett Zamir 3008696314 - Allow template to have text node for readability 2018-07-25 17:44:37 -07:00
Brett Zamir aa2c3f142e - Fix (regression in last commit): Avoid empty text node in SVG template 2018-07-25 17:42:06 -07:00
Brett Zamir a68696ee34 - Refactoring (minor): Array destructuring
- Refactoring (minor): ES6 templates
- i18n: picking stroke/fill paint and opacity
2018-07-25 16:43:29 -07:00
Brett Zamir 5d0dd85507 - Fix: Regression for `text` and `tspan` elements as far as
`captureTextNodes` with canvg (inheriting class had set
  `captureTextNodes` too late)
- Fix: Avoid errors for tspan passed to `getGradient`
2018-07-22 23:39:22 -07:00
Brett Zamir d71ca48654 - Docs: A couple JSDoc fixes 2018-07-20 20:45:46 -07:00
Brett Zamir 0a25236477 - Breaking change: Avoid adding `assignAttributes`, `addSVGElementFromJson`,
`call`, `copyElem`, `findDefs`, `getElem`, `getId`, `getIntersectionList`,
  `getMouseTarget`, `getNextId`, `getUrlFromAttr`, `hasMatrixTransform`,
  `matrixMultiply`, `recalculateAllSelectedDimensions`,
  `recalculateDimensions`, `remapElement`, `removeUnusedDefElems`, `round`,
  `runExtensions`, `sanitizeSvg`, `setGradient` `transformListToTransform`
  (and mistaken `toString` export) to `getPrivateMethods` (passed to
  extensions) as available as public ones
- Build: Update ext-xdomain-messaging
- Fix (extension): ForeignObject editor
- Docs: Avoid reporting deliberate "Any" type
- Docs: Further docs (`logMatrix`, `getPrivateMethods`)
- Docs: Suggest `npm pack`
2018-07-19 14:58:30 -07:00
Brett Zamir 6122d6d2f1 - Fix (Embedded editor): Workaround Chrome blocking issue 2018-07-18 22:37:47 -07:00
Brett Zamir 7e9235504a - Fix (Embedded editor): Ensure origins can match by extracting origin out of base path 2018-07-18 22:32:04 -07:00
Brett Zamir b023a0076b - npm: Add script for testing embedded API
- Fix (Embedded editor): Ensure adding allowedOrigins for embedded response
- Enhancement (Embedded editor): Log if an origin is not whitelisted as sender/receiver
- Demo: Point to raw.githack for proper content-type setting and apparent CORS support; also add `xdomain-svg-editor-es.html` to set origin config and work on Git-based server
2018-07-18 22:25:09 -07:00
Brett Zamir 082d8d0246 - Fix: Truly fix jGraduate CSS casing 2018-07-18 21:21:15 -07:00
Brett Zamir 3289131f7c - Fix (npm): Update `load-stylesheets` to avoid recursion upon CSS loading errors 2018-07-18 21:10:05 -07:00
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 efc3f5aaba - Avoid erring during resize on encountering MathML (which have no `style`) 2018-06-25 13:26:13 +08:00
Brett Zamir 30b2f3cfe1 - Fix rectangle/image/square/foreignObject (fixes #262) 2018-06-25 13:12:27 +08:00
Brett Zamir ccb793e78c - Fix: Detection of whether to keep ellipse (rx and ry when just created are now returning 0 instead of null); fixes #262
- Refactoring: Simplify `isValidUnit`
2018-06-25 12:39:10 +08:00
Brett Zamir 9f65b1adb9 - Breaking change: Extension now formatted as export (and `this` is set to editor, including for `callback`)
- Breaking change: Locale now formatted as export
- Breaking change: Moved out remaining modular i18n (imagelib) to own folder
- Breaking change: Drop `executeAfterLoads` (and getJSPDF/getCanvg)
- Breaking change: `RGBColor` must accept `new`
- Breaking change: canvg - `stackBlurCanvasRGBA` must be set now by function (`setStackBlurCanvasRGBA`) rather than global; `canvg` now a named export
- Breaking change: Avoid passing `canvg`/`buildCanvgCallback` to extensions (have them import)
- Fix: i18nize imaglib more deeply
- Fix: Positioning of Document Properties dialog (Fixes #246)
- Fix (regression): PDF Export (Fixes #249)
- Fix (regression): Add polyfill for `ChildNode`/`ParentNode` (and use further)
- Fix (regression): Apply Babel universally to dependencies
- Fix (regression): Ordering of `uaPrefix` function in `svgEditor.js`
- Fix (regression): Embedded API
- Fix (embedded editor): Fix backspace key in Firefox so it doesn't navigate out of frame
- Fix: Alert if no exportWindow for PDF (e.g., if blocked)
- Refactoring( RGBColor) `RGBColor` as class, without rebuilding constants, optimize string replacement, move methods to prototype, use templates and object literals, use `Object.keys`
- Refactoring (canvg) Use classes more internally, use shorthand objects; array extras, return to lazy-loading
- Refactoring: Use Promises in place of `$.getScript`; always return Promises in case deciding to await resolving
- Refactoring: Avoid importing `RGBColor` into `svgutils.js` (jsPDF imports it itself)
- Refactoring: Arrow functions, destructuring, shorter property references
- Refactoring: Fix `lang` and `dir` for locales (though not in use currently anyways)
- Refactoring: Provide path config for canvg, jspdf
2018-06-12 06:50:28 +08:00
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 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 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 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 c965d6b5f2 Fix jsdoc syntax error 2018-05-29 10:41:26 +02: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 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 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 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
Brett Zamir ae2394f086 (INCOMPLETE: ES6 Module conversion and linting)
- Breaking change: Require `new` with `EmbeddedSVGEdit` (allows us to use `class` internally)
- Breaking change: If `svgcanvas.setUiStrings` must now be called if not using editor in order
    to get strings (for sake of i18n) (and if using path.js alone, must also have its `setUiStrings` called)
- Breaking change (ext-overview-window): Avoid global `overviewWindowGlobals`
- Breaking change (ext-imagelib): Change to object-based encoding for namespacing of
    messages (though keep stringifying/parsing ourselves until we remove IE9 support)
- Breaking change: Rename `jquery.js` to `jquery.min.js`
- Breaking change: Remove `scoped` attribute from `style`; it is now deprecated and
    obsolete; also move to head (after other stylesheets)
- Enhancement: Make SpinButton plugin independent of SVGEdit via
    generic state object for tool_scale
- Enhancement: Remove now unused Python l10n scripts (#238)
- Enhancement: ES6 Modules (including jQuery plugins but not jQuery)
- Enhancement: Further JSDoc (incomplete)
- Enhancement (Optimization): Compress images using imageoptim (and add
    npm script) (per #215)
- Fix: i18nize path.js strings and canvas notifications
- Fix: Attempt i18n for ext-markers
- Refactoring (ext-storage): Move locale info to own file imported by the extension (toward modularity; still should be split into separate files by language and *dynamically* imported, but we'll wait for better `import` support to refactor this)
- Refactoring: For imagelib, add local jQuery copy (using old 1.4.4 as had
    been using from server)
- Refactoring: For MathJax, add local copy (using old 2.3 as had been using from
    server); server had not been working
- Refactoring: Remove `use strict` (implicit in modules)
- Refactoring: Remove trailing whitespace, fix some code within comments
- Refactoring: Expect `jQuery` global rather than `$` for better modularity
    (also to adapt line later once available via `import`)
- Refactoring: Prefer `const` (and then `let`)
- Refactoring: Add block scope keywords closer to first block in which they appear
- Refactoring: Use ES6 `class`
- Refactoring `$.isArray` -> `Array.isArray` and avoid some other jQuery core methods
    with simple VanillaJS replacements
- Refactoring: Use abbreviated object property syntax
- Refactoring: Object destructuring
- Refactoring: Remove `uiStrings` contents in svg-editor.js (obtains from locale)
- Refactoring: Add favicon to embedded API file
- Refactoring: Use arrow functions for brief functions (incomplete)
- Refactoring: Use `Array.prototype.includes`/`String.prototype.includes`;
    `String.prototype.startsWith`, `String.prototype.trim`
- Refactoring: Remove now unnecessary svgutils do/while resetting of variables
- Refactoring: Use shorthand methods for object literals (avoid ": function")
- Refactoring: Avoid quoting object property keys where unnecessary
- Refactoring: Just do truthy/falsey check for lengths in place of comparison to 0
- Refactoring (Testing): Avoid jQuery usage within most test files (defer script,
    also in preparation for future switch to ES6 modules for tests)
- Refactoring: Make jpicker variable declaration indent bearable
- Refactoring (Linting): Finish svgcanvas.js
- Docs: Mention in comment no longer an entry file as before
- Docs: Migrate old config, extensions, and FAQ docs
- Licensing: Indicate MIT is license type of rgbcolor; rename/add license file name for
    jgraduate and screencast to reflect type (Apache 2.0); rename file to reflect it
    contains license information (of type MIT) for Raphael icons
2018-05-22 18:02:57 +08:00
Brett Zamir 7cf976cfb8 - Fix (Locale): Remove bad characters in Persian (fa) file
- Linting (ESLint): Locale files
- Docs: Fix code comment
- Remove BOM from documents (@drsassafras #237)
2018-05-20 15:04:11 +08:00
Brett Zamir 10291dc556 - Remove carriage returns; fixes #37
- Remove extra spaces from svgcanvas, embedapi
2018-05-18 15:39:36 +08:00
Brett Zamir 52353c6321 - Further convert tabs -> 2 spaces in JS code comments (except in test performance
file where used for alignment though use tab escape within JS), CSS
    (including comments), PHP, SVG, JSON, XUL
- Remove extra spaces in svgcanvas.js, ext-connector.js
2018-05-18 14:41:43 +08:00