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
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
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
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
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
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
KB Jørgensen
02c8721c2d
Implemented a clipboard that works across tabs and windows.
2018-01-18 14:02:03 +01:00
Tiago Fonseca
c761cb68b7
correct import of paths with several "M/m" and "Z/z"
2017-10-04 12:15:43 +01:00
Flint O'Brien
6023bd6f5a
Formatting changes.
2016-05-04 09:54:20 -04:00
Flint O'Brien
87e25e9d2c
Fix merge/cloneLayer. Migrate more Canvas functions to Draw. Tests.
...
Fixed recently introduced bugs in mergeLayer, cloneLayer.
More Draw unit tests.
Migrating Canvas methods to Draw, Layer, and utilities: copyElem,
pathActions.convertPath, cloneLayer, mergeLayer, and mergeAllLayers.
Canvas API is unchanged for backwards compatibility (i.e. previous
functions forward to new functions).
2016-05-04 09:38:29 -04:00
Flint O'Brien
3230520d67
Optimized getBBoxWithTransform when rotation multiple of 90
...
This feature was in previous release, but broken. This update uses
standard, faster bounding box calculation for simple shapes when angle
is multiple of 90.
Updated tests. Fixed two tests that were broken in Safari.
2016-04-28 12:11:54 -04:00
Flint O'Brien
7db3b22c58
Updates from pull request code review. Refactored getExtraAttributesForConvertToPath.
...
Updated all formatting requests.
Refactored and renamed addAttributesForConvertToPath to
getExtraAttributesForConvertToPath. Now called from
getBBoxOfElementAsPath and convertToPath.
2016-04-26 16:01:39 -04:00
Flint O'Brien
12a393505d
Refactoring and performance improvements for getStrokedBBox.
...
canvas.getStrokedBBox internals refactored to svgutils.
getStrokedBBox/getCheckedBBox renamed to
svgedit.utilities.getBBoxWithTransform
Removed duplicate calls to native getBBox.
Refactored slow transformed BBox from temporary DOM append/remove to
matrix calculations.
Lots of tests. Added qunit/qunit-assert-close.js.
2016-04-24 16:43:20 -04:00
Flint O'Brien
0c9ff4d1ac
Updated comment svgutils convertToPath... again.
2016-04-22 13:39:20 -04:00
Flint O'Brien
86c3818886
Updated comment svgutils convertToPath.
2016-04-22 13:36:10 -04:00
Flint O'Brien
01ad9d7fdd
Refactor canvas.convertToPath() internals to svgutils in preparation for getBBox performance improvements.
...
Two new functions in svgutils: convertToPath() and getBBoxOfElementAsPath().
Updated test/svgutils_test.html.
2016-04-22 12:24:52 -04:00
Magne Bratseth
48e54b6f85
Simplify the code a bit more
2016-02-26 09:46:32 +01:00
Magne Bratseth
78f214de8b
Cosmetics
2016-02-25 09:05:50 +01:00
Magne Bratseth
0cf2fc57a1
Slight changes to make the code more readable
2016-02-25 09:03:20 +01:00
Magne Bratseth
b23502fba4
Do not strip rx=0 and ry=0 from ellipse elements as these values are not
...
default and holds a special meaning for ellipses (a value of 0 disables
rendering of the element)
2016-02-09 15:16:44 +01:00
Harikrishnan K
750c9c7141
Update svgutils.js
...
remove the commented 'if' to resolve #48
2015-12-11 12:04:03 +05:30
Jeff Schiller
3f0db99c6c
Use SVGElement.getIntersectionList() for multiselect. Remove some try-catch statements
2015-11-30 19:08:13 -08:00
Jeff Schiller
59303eb6cc
Remove all suspendRedraws
2015-11-30 18:59:53 -08:00
Philip Rogers
7e3f9e037d
Add pathseg.js, a polyfill for the SVGPathSeg API
...
The SVGPathSeg API is being removed from the spec [1] and is being
removed in Chromium 47 [2]. I implemented a drop-in polyfill[3] so
svg-edit users are not broken as browsers migrate away from the
path seg api.
This patch simply imports the upstream pathseg.js and updates all
dependencies. With this change all tests pass in Chrome 46 (with
the path seg api), Chrome 47 (without the path seg api), and
there are no changes to tests in Safari 9.01 or Firefox 43. I
also manually tested svg-edit while developing the polyfill and
could not find any broken features.
[1] https://lists.w3.org/Archives/Public/www-svg/2015Jun/0044.html
[2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/EDC3cBg9mCU/OvElJgOWCgAJ
[3] https://github.com/progers/pathseg
2015-11-04 19:25:30 -08:00
Brett Zamir
d84b1d267f
Simplify encodeUTF8 function; ensure base 64 decoding also uses new decodeUTF8
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2879 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-06-12 23:42:27 +00:00
Brett Zamir
abc9cd6ffb
Move embedapi.html code which is not part of the API into embedapi-dom.js; demo export PDF in embedded editor; add new exportPDF method to canvas (and exposed to embedded editor) which can support JSON-able data URI string response, removing PDF exporting from rasterExport; JSLint; move dependency checking code for canvg and jsPDF to utilities; simplify Utils calls; allow for custom PDF export handler (but not yet implemented in server-based extensions); import PDF todo
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2860 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-05-22 10:21:29 +00:00
Brett Zamir
46fdbdfb6a
Update encodeUTF8 function
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2728 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-03-15 09:50:49 +00:00
Brett Zamir
dc1bf5d88c
Safer encoding of cookies; ensure emptyStorageOnDecline only works with explicit decline (and as before, with config so set); add cookie removal to emptyStorageOnDecline behavior
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2709 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-02-19 01:37:21 +00:00
Brett Zamir
f18cdbbeae
Fix issue 1174 reported by psh.tnt re: XML entity escaping (within attributes); updated test as well
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2696 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-02-12 10:10:56 +00:00
Brett Zamir
21c946fd99
server_opensave-related changes: 1) Be more lenient in filename possibilities for server_opensave (supporting Unicode except characters disallowed in Windows file names); 2) XHTML escape filename and SVG content when put into HTML hidden input element as opposed to unnecessary URL-encoding; 3) fix base64 encoding (with update to dependent utf8-encoding function)--old base64 code caused SVG to break with surrogate pairs (e.g., in title); 4) provide default UTF-8 encoding in XML declaration and add this XML declaration to the download attribute as well
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2662 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-02-01 16:13:51 +00:00
Brett Zamir
75bd787023
JSLint
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2644 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-01-31 02:13:37 +00:00
Brett Zamir
6b5a4e645e
change beforeunload to use addEventListener (only supporting IE9 now and better to allow multiple if user wishes); also CamelCase internal variable for consistency; add brackets
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2639 eee81c28-f429-11dd-99c0-75d572ba1ddd
2014-01-31 00:06:50 +00:00
Brett Zamir
c75661c758
Indent consistency per file
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2591 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-10-14 01:50:42 +00:00
Bruno Heridet
363bfb4cf2
fixed missing semicolons and leaking ret var
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2428 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-19 11:18:04 +00:00
Jeff Schiller
29534a7d4b
Move remapElement() to coords and add a first unit test
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2416 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-17 04:58:04 +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
Jeff Schiller
ed4e7e9ec6
Fix error in findDefs()
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2392 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-14 19:11:30 +00:00
Jeff Schiller
a779a74aa9
Add fully qualified function calls, shuffle a couple tiny functions into svgutils.js, add an empty coords.js module for later
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2390 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-14 15:19:46 +00:00
Jacques Distler
bc84fac91b
Ack! Butterfingers.
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2349 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-10 17:44:09 +00:00
Jacques Distler
7fe3d3ef2d
Fix Bug 1048 (foreignObject selection in Webkit)
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2348 eee81c28-f429-11dd-99c0-75d572ba1ddd
2013-02-10 17:07:30 +00:00
Mark MacKay
b8c8b65024
correct 'use' behavior when dragging elements in webkit
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2199 eee81c28-f429-11dd-99c0-75d572ba1ddd
2012-11-28 05:39:48 +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
Jacques Distler
a808ea61ef
Applying this logic to foreignObject leads to incorrect positioning of the grip for the element (displaced from its correct location by (x,y) ).
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2081 eee81c28-f429-11dd-99c0-75d572ba1ddd
2012-05-22 12:05:25 +00:00
Ahmad Syazwan
2d74a7ace5
Fix regression due to earlier fix of issue 937
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2072 eee81c28-f429-11dd-99c0-75d572ba1ddd
2012-03-30 03:50:54 +00:00
Ahmad Syazwan
f2c76b4b39
Fix issue 937
...
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2071 eee81c28-f429-11dd-99c0-75d572ba1ddd
2012-03-29 02:47:06 +00:00