Commit Graph

55 Commits (3b04fe0c63de0dd8432b60f5dfbe3bf87cd63d5f)

Author SHA1 Message Date
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 4bfbaacb5e - Complete conversion to 2-spaces, fixing issue #37 (also removed some extra/misplaced tabs/spaces in process) 2018-05-18 14:23:36 +08:00
Brett Zamir 89cbab7217 - Refactoring (minor): Simplify (empty string is falsey)
- Refactoring (minor): Consistent HTML indenting/no-namespacing and title/icon use
- Testing: Add browser bug test with reference to issue
2018-05-18 11:35:24 +08:00
Neil Fraser f9fb7f47ae Residual linting
{object} -> {Object}
Remove extra semicolons.
Use jQuery’s .empty().
Make nodelist loops O(n) rather than O(n^2).
Specify radix in parseInt to prevent guessing octal.
2018-05-17 11:57:28 -07:00
Brett Zamir 820964334c - Fix: Broken lv locale, inconsistent tabs/spaces pt-PR
- Linting: Add ESLint script and devDeps and begin ESLint conversion (completed locales and jspdf directories only)
2018-05-13 11:03:45 +08:00
Brett Zamir d84a4465d2 Minor clean-up
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2813 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-04-09 03:44:19 +00:00
Brett Zamir bdb81d541c Update trunk to the non-release-related minor changes in stable/branch 2.7
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2758 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-04-07 04:08:52 +00:00
Brett Zamir e463b43220 1. Reference config.js in the editor (and remove encouragement for adding extensions to HTML) but ignore config.js in SVN (let user configure) but supply config-sample.js to indicate config/pref/extension possibilities;
2. Move ext-overview_window.js to default but overridable list of extensions (as with other extensions);
3. Allow extensions to avoid problems if failing to return an object (in svgcanvas.js);
4. Support new langReady callback to ensure extension always called when locale info is ready (and always load locale, even English);
5. Move localStorage storing to a new (i18n-ized and available-by-default) storage extension which adds a dialog asking user for whether to store prefs and/or SVG content; $.pref() now falls back to checking defaultPrefs (which may have been expanded at runtime to include URL or storage settings); use new config "forceStorage" to get old (bad) behavior
6. Remove initial cap from "Editor" to reflect singleton nature of object (as compared to JSLint conventions for initial cap constructors);
7. Begin a little JSDoc, clearer grouping of properties/methods; JSLint/clean-up
8. Omit values for lang and iconsize to be successfully auto-detected; 9. Document "save_notice_done" and "export_notice_done" within list of prefs; document "showlayers" and "no_save_warning" as config
10. Add "preventAllURLConfig" and "preventURLContentLoading" config for URL security; 
11. Add "lockExtensions" and "noDefaultExtensions" config for URL behavior re: extension loading
12. Document "showGrid", and new "noStorageOnLoad" and "emptyStorageOnDecline" extension-related config
13. Change setConfig to allow a second object with "overwrite" and "allowInitialUserOverride" properties and to behave accordingly (with URL config acting with overwrite=false to act under lower priority given security concern), along with checking "preventAllURLConfig" and "lockExtensions" config.
14. Remove any dupe extensions
15. Strip all path config from URL setting in addition to extPath (imgPath, langPath, jGraduatePath)
16. Support select+checkbox type dialog (used for storage ext.)
17. Ensure clickSelect is public so can be properly used by ext-connector.js
18. Reinstate 'in' checks just to be safe
19. Fix broken linkControlPoints() and addSubPath() functions
20. Fix problem when position returned by extension object was too high (e.g., if too few other extensions were included).

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2705 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-02-18 15:06:27 +00:00
Brett Zamir 74810573b2 Change group to group_elements (though keep duplicate group under old name in case it is supposed to have a different function)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2686 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-02-11 01:58:57 +00:00
Brett Zamir 21520e6392 JSLint locale.js
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2685 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-02-11 01:24:09 +00:00
Brett Zamir f8aeacd7a8 Support PNG, JPEG, BMP, WEBP export formats by change of "Export to PNG" menu item into "Export" with its own pull-down dialog (and a HTML5 range type input element for "quality" selection for JPEG or WEBP files), including changes for the server_opensave extension; change locale key from "export_png" to "export_img" and change the corresponding localized strings (currently CS, DE, ES, FR, IT, NL, PT-BR, RO, SK, all reset to English to avoid translation errors); within the setCustomHandlers() API, deprecate "pngsave" in favor of "exportImage" (chosen to avoid just using the simpler but reserved JS keyword "export") including use within the server_opensave extension; a few JSLint-friendly changes
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2602 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-10-28 03:53:30 +00:00
Bruno Heridet 617c5c32bb fixed #895 thanks to FlintOBrien - Grid is invisible when background is black
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2435 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-19 21:07:24 +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
Alexis Deveria 90fffe8a09 Fixed locale script to no longer use eval() (and work locally in chrome)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1995 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-11 19:21:50 +00:00
Jeff Schiller af0599d632 Changes to Makefile so things build better. Start on a python script for releasing the HTML file
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1929 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-01-17 22:11:35 +00:00
Jeff Schiller e4714fd767 Restore layer button functionality broken since locale-script change
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1922 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-01-16 20:25:57 +00:00
Jeff Schiller 3ffc78a81c Remove debugging statements
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1920 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-01-16 16:30:29 +00:00
Jeff Schiller c21b9be33c Fix width of layer button panel for Firefox OSX. Fix setting of uiStrings in editor for New Label. Move all_layers into svgedit.document.Document
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1919 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-01-16 16:28:26 +00:00
Alexis Deveria e5ce3448b1 Mass conversion of locale files to new format
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1901 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-01-11 21:15:08 +00:00
Alexis Deveria f411047b04 Finalizing new locale system
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1896 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-01-04 20:03:02 +00:00
Alexis Deveria 73a4490b1d Made many more localization fixes/additions
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1895 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-01-03 18:45:36 +00:00
Alexis Deveria 0bc65d35c6 Begin locale revamp (will break all non-en languages for now)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1894 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-12-31 20:02:35 +00:00
Alexis Deveria d96ddad902 More wacky internal changes and documentation updates
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1620 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-06-30 18:27:36 +00:00
Pavol Rusnak 125d6082d8 most of Slovak translation, some minor changes to the rest
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1563 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-05-03 23:29:13 +00:00
Alexis Deveria 2ba315bc96 More internal re-arranging and support for new config options
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1464 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-03-16 19:28:57 +00:00
Alexis Deveria 85a7f57e78 Changed basic structure for improved integration and customization, introduces global svgEditor object
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1456 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-03-11 21:07:13 +00:00
Alexis Deveria eb8b9ab5e6 Made 'good' locale array be populated based on svg-editor.html, made namespaces only be added on serialization when used
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1377 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-02-11 21:24:15 +00:00
Wormsxulla 8304c43d47 Add Japanese to the good languages. Thank you Dong! Correct name of Russian in Russian in AUTHORS.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1359 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-02-08 20:00:30 +00:00
Alexis Deveria fad1c4395d Fixed bug in Opera where flyout icon didn't show and fixed Issue 451: Switching languages is broken
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1327 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-02-02 19:24:17 +00:00
Alexis Deveria bed10696d2 Split off the arrow part of the connector plugin to be its own arrows plugin (start on issue 308)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1317 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-02-01 18:40:57 +00:00
Wormsxulla d0783f80bd Add zh-TW to the good languages. Update the first draft of the Chinese-TW translation by zenixls2.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1309 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-01-30 11:41:10 +00:00
Alexis Deveria 7890d47e06 Fixed issue 418 and issue 441
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1281 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-01-27 15:14:23 +00:00
Alexis Deveria d60fb28557 Made improvements to extension support as well as connector extension
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1279 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-01-26 21:28:52 +00:00
Wormsxulla ddeace083c Add Arabic to the list of good languages. Update the AUTHORS list for Arabic.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1246 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-01-20 06:50:23 +00:00
Wormsxulla afa5e7d58c Add Russian language to the good languages. Possibly display "Hindi" in Hindi in svg-editor.html, too.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1222 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-01-15 09:44:25 +00:00
Wormsxulla 1dbdbc0352 Update the first draft of the Frisian language file by Wander Nauta.
Add Frisian and Hindi languages to the good languages (Not able to display "Hindi" in "Hindi" in svg-editor.html, though.)

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1219 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-01-14 18:33:05 +00:00
Alexis Deveria b835da83ea Fixed locale issues for main menu (will work once lang files are updated)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1218 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-01-14 16:05:05 +00:00
Jeff Schiller faa165eb9d Change encoding from Western to UTF-8
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1201 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-01-12 20:39:03 +00:00
Jeff Schiller f00068c02c Merge arbelos fixes for opera widget for svgicons and locale to trunk
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1195 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-01-12 08:07:50 +00:00
Alexis Deveria 4313c95d7e Applying recent 2.4 branch changes to trunk
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1174 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-01-08 20:36:39 +00:00
Alexis Deveria f1f3c31d21 Added German to good auto-set lang list, fixed issues 376 and 365
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1099 eee81c28-f429-11dd-99c0-75d572ba1ddd
2009-12-23 14:25:43 +00:00
Alexis Deveria 732155a028 Made auto-language-picker only use full translations
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1083 eee81c28-f429-11dd-99c0-75d572ba1ddd
2009-12-22 21:24:58 +00:00
Jeff Schiller 3481940e38 Update selector box to be a path, change selectors to be circles (for convenience). Getting closer to a fix for negative resizing
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@976 eee81c28-f429-11dd-99c0-75d572ba1ddd
2009-11-25 13:51:42 +00:00
Alexis Deveria 2a9f517306 More minor language-related tweaks
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@940 eee81c28-f429-11dd-99c0-75d572ba1ddd
2009-11-12 21:43:19 +00:00
Alexis Deveria 6d30a6b7ee Possibly fixed lang detection script
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@939 eee81c28-f429-11dd-99c0-75d572ba1ddd
2009-11-12 21:28:04 +00:00
Alexis Deveria 6f4a74dad9 Changed authors file, zoom list order, and added a UA language test
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@938 eee81c28-f429-11dd-99c0-75d572ba1ddd
2009-11-12 21:13:29 +00:00
Alexis Deveria 344e7a802d Fixed several remaining cross-browser icon bugs
git-svn-id: http://svg-edit.googlecode.com/svn/branches/transformlist@933 eee81c28-f429-11dd-99c0-75d572ba1ddd
2009-11-12 16:00:50 +00:00
Alexis Deveria c5467373ef Made editor preferences (language, icon size and background) be saved and re-applied on page load
git-svn-id: http://svg-edit.googlecode.com/svn/branches/transformlist@930 eee81c28-f429-11dd-99c0-75d572ba1ddd
2009-11-11 18:13:26 +00:00