Commit Graph

61 Commits (48e54b6f859f83f61af24e18979665aabbe302a5)

Author SHA1 Message Date
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
Alexis Deveria 6d6c6aa61f Fixed sub-bug in Issue 717: Bounding box not surrounding entire image library image, started on Issue 782: Text editing is buggy (IE9)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1996 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-23 15:56:14 +00:00
Alexis Deveria 32f61b2b3a Fixed more bugs related to issue 717
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1992 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-10 18:10:05 +00:00
Jeff Schiller 45a26c1602 Fix bug where IDs could not be changed. Moved cleanupElement into svgutils.js. Corrected MIME type of two new test files.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1990 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-10 04:10:03 +00:00
Alexis Deveria ca671f90d2 Fixed issue 717: Bounding box not surrounding entire image library image
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1988 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-09 21:32:53 +00:00
Alexis Deveria 292391150f Cleanup code left from last revision
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1987 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-09 17:48:00 +00:00
Alexis Deveria 085d7f479f Fixed error thrown on shift+mousemove in path create mode
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1986 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-09 16:30:11 +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
Jeff Schiller 99931f7d5b Move shortFloat() into svgedit.units. Add test file for svgedit.units.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1966 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-02 17:28:43 +00:00
Alexis Deveria fe537b05a8 Added 'supportsPathBBox' to svgedit.browser to replace a webkit browser sniff
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1965 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-02-01 20:25:06 +00:00
Jeff Schiller 6b8958bd39 Turn on Closure compilers SIMPLE_OPTIMIZATIONS. Slightly change how svgedit namespace is set up in each module
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1931 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-01-18 06:46:45 +00:00
Jeff Schiller 8691a37376 Add identifyLayers() to svg.draw.Drawing with tests
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1927 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-01-17 04:36:54 +00:00
Jeff Schiller 28b9c0cfd7 Rename browsersupport module to browser
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1910 eee81c28-f429-11dd-99c0-75d572ba1ddd
2011-01-13 07:47:21 +00:00
Jeff Schiller f75eb79f0b Woops, left in some test code
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1881 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-12-02 17:15:47 +00:00
Jeff Schiller 3b1b46f874 Fix some bugs with svgutils.js. Add a couple tiny tests to selector_test.html
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1880 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-12-02 17:14:24 +00:00
Jeff Schiller 3ef0229180 Move Selector and SelectorManager into select.js. Start of unit test file for select.js.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1873 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-11-15 09:25:49 +00:00
Jeff Schiller 4a133d490d Move undo/redo functionality into history.js. Started unit test file.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1864 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-11-12 19:08:29 +00:00
Jeff Schiller 711346f109 Start on a svgutils unit test file
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1856 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-11-08 08:42:46 +00:00
Jeff Schiller a681fc2579 Add a sanitize.js module and put sanitizeSvg into it. Fix some browsersupport sniffing calls.
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1852 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-11-07 20:14:05 +00:00