Commit Graph

1986 Commits

Author SHA1 Message Date
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
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
f21d41a231 - Linting (ESLint): Use two spaces for indent
- Update links in commented out copyright section of editor, link in screencast, and within SVG file comments (created with SVG-edit should refer to current URL)
2018-05-18 14:05:52 +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
646a927ef6 Convert all tabs to spaces in extensions for issue #37 2018-05-17 21:54:31 -07:00
codedread
e38fbc75c7 Remove un-maintained wave code 2018-05-17 21:19:40 -07:00
codedread
81c11b2ce0 Merge branch 'master' of https://github.com/SVG-Edit/svgedit 2018-05-17 21:03:15 -07:00
codedread
4043c6e537 Change all tab indentations to 2sp indentation. Addresses issue #37 2018-05-17 21:02:30 -07:00
Brett Zamir
80d49ed0e4 - Refactoring (Browser unsupported): Restore newly appied HTML/CSS standards, add lbs; remove now unused file
- Fix (Browser unsupported page): Fix IE download link, caniuse links (use more broad SVG category)
2018-05-18 11:55:28 +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
Brett Zamir
f768fe2547 Merge pull request #236 from NeilFraser/lint2
Lint (v2)
2018-05-18 11:20:09 +08:00
Neil Fraser
7bb89f53a5 Don’t throw error for unlinked nodes in Chrome
evt.target in Chrome is the abandoned shape, not connected to the DOM.  evt.target in Firefox is the svgroot.

Add checks to ensure that no matter what node is presented by the event, there are no property calls to null or undefined.

Fixes issue #232.
2018-05-17 12:04:58 -07: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
Neil Fraser
1c966d17ed Update not supported page (#230)
Update old links.  Remove now-defunct link to Chrome Frame.  Use CSS instead of JavaScript and jQuery.
2018-05-17 11:29:20 -07:00
Brett Zamir
4fd4054f03 - Enhancement: Use minified version of jpicker in svg-editor
- Build: Update minified version of jgraduate/jpicker per linted/improved files (and add to uglify script)
- Fix: jgraduate recent regressions
- Docs: Update CHANGES
2018-05-17 17:42:46 +08:00
Brett Zamir
e252e866b7 - npm: Add uglify script
- Todo: Indicate to-do re: converting AppCache to sample service-worker
- Build: Update minified version of spinbtn per linted/improved file
2018-05-17 16:55:33 +08:00
Brett Zamir
fb329e4977 Merge pull request #229 from NeilFraser/deps
Add missing dependency
2018-05-17 15:32:20 +08:00
Brett Zamir
69f3a42aa8 Current test status: All tests passing (in at least Chrome and Firefox beta)
- Fix (Firefox): tspan (and textPath apparently) have no `getBBox` in Firefox, so recover (fixes FF issue with recalculate test 3: "recalculateDimensions() on text w/tspan with simple translate")
- Fix (Chrome): Chrome has a bug in not performing `removeAttribute` after `removeItem`; deal with it (though only if there is a single identity matrix) (fixes Chrome issue with recalculate test 1: " recalculateDimensions() on rect with identity matrix")
2018-05-17 15:27:38 +08:00
Brett Zamir
25b1e9be01 - Linting (ESLint): Fix other indents besides main (though continue to disable check) 2018-05-17 13:15:20 +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
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
eba9dee54c - Linting (ESLint): Finish editor/svg-editor.js; unfinished: editor/svgcanvas.js
- Fix: Restore save alert
2018-05-16 16:03:43 +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
Brett Zamir
15331535f8 - jgraduate->jpicker: Fix Throw Error object of Invalid Mode instead of string
- jgraduate->jpicker: Fix missing `var` for some i loops
- jgraduate->jpicker: Fix Color val check when `name.length` is empty (equal to "all")
- jquery.jgraduate.js: Fix `numstops` is present for check
- Linting: ESLint; unfinished: editor/extensions/, editor/ (root), test/ (root) HTML
2018-05-15 23:10:20 +08:00
Brett Zamir
5894398c36 - Linting: ESLint (or ignore) JavaScript files; unfinished: editor/jgraduate and editor/extensions folders, editor/ (root), test/ (root) HTML
- Fix: An apparent bug in jquery.svgicons.js whereby a variable `holder` was declared in too nested of a scope
- Fix: `addBezierCurve` in canvg.js had undeclared `i`
- Fix: Undeclared variable in opera widget
- Fix: Screencast `showNotes`
2018-05-13 18:47:00 +08: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
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
Neil Fraser
6aced017ea Add missing dependency
HistoryRecordingService is required at line 400.
2018-05-10 12:07:44 -07:00
Igin
edb8a75402 fix #222 Browsers block data URI (#224)
* fix #222 Browsers block data URI

* add spaces and blank lines
2018-04-12 11:00:52 -07:00
Jeff Schiller
396cce40eb Merge pull request #208 from iuyiuy/setSvgString_without_undo
Add ability to set the svg drawing without adding to the undo stack.
2018-02-27 07:04:09 -08:00
KB Jørgensen
64759a8cab Added documentation for the preventUndo parameter in the svgcanvas.setSvgString() function. 2018-02-27 11:21:07 +01:00
Jeff Schiller
aadb85a9b7 Merge pull request #158 from iuyiuy/improved_transform_list_detection
Improved transform list detection.
2018-02-26 20:39:27 -08:00
Philip Rogers
f5f9e627d7 Update pathseg.js to fix Firefox 59+ path editing
Firefox 59 removed some SVG path seg APIs which breaks path editing.

This change updates pathseg.js to the latest version which contains a fix for Firefox 59. I checked that Firefox 58 (pre-api-change), Firefox 59 (post-api-change), Chrome 65, and Safari Tech Preview can all edit paths correctly with this change. This change has a lot of diffs due to minor changes in pathseg.js since the first time it was imported into svgedit.

This fixes issue #216
2018-02-26 18:10:26 -08:00
KB Jørgensen
d3ed6cbb8c Changed code style as requested in svgedit pull request #208. 2018-01-26 15:11:41 +01:00
KB Jørgensen
07803fd1db Add ability to set the svg drawing without adding to the undo stack. 2018-01-22 11:40:00 +01:00
KB Jørgensen
42bcd5bcf8 Fixed typo in comment. 2018-01-22 10:15:59 +01:00
KB Jørgensen
e055468f77 Added comment to explain meaning of a regex. 2018-01-22 10:15:59 +01:00
KB Jørgensen
055198e28d Use a variable for the key, as requested by codedread. 2018-01-22 10:15:59 +01:00
KB Jørgensen
19170116ba Fixed handling of connectors after the new clipboard changes. 2018-01-22 10:15:59 +01:00
KB Jørgensen
524f47cab9 Let the 'this' keyword propagate in to the for each loop. 2018-01-22 10:15:59 +01:00
KB Jørgensen
02c8721c2d Implemented a clipboard that works across tabs and windows. 2018-01-18 14:02:03 +01:00
codedread
6f7aa650f8 Allow data- attributes in the sanitize whitelist. Fixes issue #203. 2017-11-29 07:52:02 -08:00
Jeff Schiller
cba2d0aa1e Merge pull request #195 from TijoloAzul/master
Bug importing complex paths to svg edit
2017-11-28 00:00:50 -08:00
Teemu Koivisto
6ee97e0d3f Fix broken saving of svg in Chrome >=60 2017-11-27 19:49:34 +02:00
Tiago Fonseca
c761cb68b7 correct import of paths with several "M/m" and "Z/z" 2017-10-04 12:15:43 +01:00
KB Jørgensen
92719c1bce Improved transform list detection. 2017-01-04 12:28:09 +01:00
KB Jørgensen
aafcbb694e Log errors from extensions to the browser console. 2016-11-21 15:45:43 +01:00
Jeff Schiller
97f5127e81 Merge pull request #130 from iuyiuy/addSvgElementFromJson_expansion
Add svg element from json expansion
2016-11-15 05:57:26 -08:00