Commit Graph

27 Commits (ae2394f086ff4694043b24f80611d6cacf3eee6d)

Author SHA1 Message Date
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 dc6ab72480 - Update Opera and jQuery links
- Use `https://` (fix #172), including in prompt for URL and relevant code comments (where available and naturally not on namespaces)
- Comment out broken link in svg-editor.html
- Trailing space
2018-05-18 13:48:47 +08:00
codedread 4043c6e537 Change all tab indentations to 2sp indentation. Addresses issue #37 2018-05-17 21:02:30 -07:00
Brett Zamir a3b3525789 - Linting (ESLint): Finish
- Fix: Globals (x, y) in `mouseMove`
- Fix: Global (element, d_attr->dAttr) in `mouseDown`
- Fix: Avoid `drawnPath` not defined error
- Docs: sp.
2018-05-17 11:34:21 +08:00
Brett Zamir 340915be4e - Linting (ESLint): Finish extensions and most files in editor/; unfinished: `editor/svg-editor.js`, `editor/svgcanvas.js`
- Linting (ESLint): Fix ignore file paths
- History `elem` fix
2018-05-16 12:08:41 +08:00
Philip Rogers e826d3ff19 Remove fix that cloned path segments and add tests to show it works 2016-02-21 17:13:40 -08:00
ibrierley 85a68c3f42 fixed indentation and extra vars 2015-07-15 13:02:03 +02:00
ibrierley 5bd4952a13 formatting 2015-07-06 12:44:36 +02:00
ibrierley 7d278dbfd8 formatting 2015-07-06 12:42:25 +02:00
ibrierley 92caa0a8d7 indentation 2015-07-06 12:39:41 +02:00
Ian 75dbd66561 Update path.js 2015-07-06 11:36:24 +01:00
ibrierley fbbd740c79 fixed pathtool bug, where browsers would delete path with pathseg error in console. Worked around this by copying 'item' object, but could possibly be optimised further by only copying required pars of object 2015-07-06 12:21:37 +02:00
Brett Zamir 6fe03a595f Add back 'in' checks just to be sure
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2699 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-02-17 00:46:24 +00:00
Brett Zamir 694359f6d6 JSLint including important path fixes
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2692 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-02-12 01:07:26 +00:00
Brett Zamir d12694f9fa More JSLint
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2642 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-01-31 01:05:03 +00:00
Bruno Heridet f9b8aa624c created svgedit main object, moved all namespaces handling in the same place
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2411 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-16 15:02:26 +00:00
Bruno Heridet 7a36f90eb6 fixed getRefElem and smoothControlPoints leaking variables
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2402 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-15 23:05:23 +00:00
Bruno Heridet e906a0f6fd cleaned quote inconsistencies
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2397 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-15 17:02:24 +00:00
Bruno Heridet 3d61d46f6b cleaned inconsistencies with comma spacing
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2396 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-15 16:51:48 +00:00
Bruno Heridet 6afcd9da2b added missing semicolons. Suspecting several leaking global vars, I'll investigate later
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2387 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-14 13:11:01 +00:00
Marc Laporte cf0dde3f4a Updating license information as per http://code.google.com/p/svg-edit/issues/detail?id=959
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2088 eee81c28-f429-11dd-99c0-75d572ba1ddd
2012-09-16 18:53:27 +00:00
Jeff Schiller 582b249a97 Move recalcRotatedPath() into path.js
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2025 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-03-07 18:26:12 +00:00
Jeff Schiller 13cee8b672 Tiny bit of refactoring. Tentative removal of selectedBBoxes from svgcanvas.js
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2005 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-24 16:13:26 +00:00
Jeff Schiller 34bc623f08 Migrate another few bits of code into path.js
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1997 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-23 16:24:07 +00:00
Jeff Schiller 99a73cc06f Refactor a few more functions into the math and path modules. Update MIME type on all JS files
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1984 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-09 06:14:47 +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 bf2757a4de Move getElem() and assignAttributes() into svgutils.js. Started moving pathActions into path.js
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1976 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-04 08:02:46 +00:00