diff --git a/.remarkrc b/.remarkrc new file mode 100644 index 00000000..bfbd6972 --- /dev/null +++ b/.remarkrc @@ -0,0 +1,10 @@ +{ + "plugins": { + "lint": { + "ordered-list-marker-value": "one", + "no-missing-blank-lines": false, + "list-item-spacing": false, + "list-item-indent": false + } + } +} diff --git a/AUTHORS b/AUTHORS index 3c527e0c..9ea98d20 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3,6 +3,7 @@ Pavol Rusnak Jeff Schiller Vidar Hokstad Alexis Deveria +Brett Zamir Translation credits: diff --git a/CHANGES.md b/CHANGES.md index 593a7d53..2baac262 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +# 3.0.0-alpha.1 + +(Only released on npm) + +* Provide `package.json` for npm to reserve name (reflecting current state of `master`) + # 2.8.1 (Ellipse) - December 2nd, 2015 For a complete list of changes run: @@ -79,11 +85,11 @@ git log 4bb15e0..253b4bf * Security improvements and other fixes * Embedded editor can now work same domain without JSON parsing and the consequent potential loss of arguments or return values. * Potentially breaking API changes: -** Disallowed "extPath", "imgPath", "langPath", and "jGraduatePath" setting via URL and prevent cross-domain/cross-folder extensions being set by URL (security enhancement) -** Deprecated "pngsave" option called by setCustomHandlers() in favor of "exportImage" (to accommodate export of other image types). Second argument will now supply, in addition to "issues" and "svg", the properties "type" (currently 'PNG', 'JPEG', 'BMP', 'WEBP'), "mimeType", and "quality" (for 'JPEG' and 'WEBP' types). -** Default extensions will now always load (along with those supplied in the URL unless the latter is prohibited by configuration), so if you do not wish your old code to load all of the default extensions, you will need to add &noDefaultExtensions=true to the URL (or add equivalent configuration in config.js). ext-overview_window.js can now be excluded though it is still a default. -** Preferences and configuration options must be within the list supplied within svg-editor.js (should include those of all documented extensions). -** Embedded messaging will no longer work by default for privacy/data integrity reasons. One must include the "ext-xdomain-messaging.js" extension and supply an array configuration item, "allowedOrigins" with potential values including: "\*" (to allow all domains--strongly discouraged!), "null" as a string to allow file:// access, window.location.origin (to allow same domain access), or specific trusted origins. The embedded editor works without the extension if the main editor is on the same domain, but if cross-domain control is needed, the "allowedOrigins" array must be supplied by a call to svgEditor.setConfig({allowedOrigins: [origin1, origin2, etc.]}) in the new config.js file. + * Disallowed "extPath", "imgPath", "langPath", and "jGraduatePath" setting via URL and prevent cross-domain/cross-folder extensions being set by URL (security enhancement) + * Deprecated "pngsave" option called by setCustomHandlers() in favor of "exportImage" (to accommodate export of other image types). Second argument will now supply, in addition to "issues" and "svg", the properties "type" (currently 'PNG', 'JPEG', 'BMP', 'WEBP'), "mimeType", and "quality" (for 'JPEG' and 'WEBP' types). + * Default extensions will now always load (along with those supplied in the URL unless the latter is prohibited by configuration), so if you do not wish your old code to load all of the default extensions, you will need to add &noDefaultExtensions=true to the URL (or add equivalent configuration in config.js). ext-overview_window.js can now be excluded though it is still a default. + * Preferences and configuration options must be within the list supplied within svg-editor.js (should include those of all documented extensions). + * Embedded messaging will no longer work by default for privacy/data integrity reasons. One must include the "ext-xdomain-messaging.js" extension and supply an array configuration item, "allowedOrigins" with potential values including: "\*" (to allow all domains--strongly discouraged!), "null" as a string to allow file:// access, window.location.origin (to allow same domain access), or specific trusted origins. The embedded editor works without the extension if the main editor is on the same domain, but if cross-domain control is needed, the "allowedOrigins" array must be supplied by a call to svgEditor.setConfig({allowedOrigins: [origin1, origin2, etc.]}) in the new config.js file. # 2.6 (Cycloid) - January 15th, 2013 diff --git a/LICENSE b/LICENSE-MIT.txt similarity index 94% rename from LICENSE rename to LICENSE-MIT.txt index d075ca6e..4f78db60 100644 --- a/LICENSE +++ b/LICENSE-MIT.txt @@ -1,4 +1,4 @@ -Copyright (c) 2009-2012 by SVG-edit authors (see AUTHORS file) +Copyright (c) 2009-2018 by SVG-edit authors (see AUTHORS file) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/composer.json b/composer.json index 66779d24..a4da44ed 100644 --- a/composer.json +++ b/composer.json @@ -3,24 +3,28 @@ "description": "SVG-edit is a fast, web-based, javascript-driven SVG drawing editor that works in any modern browser.", "authors": [ { - "name":"Narendra Sisodiya", + "name": "Narendra Sisodiya", "email": "narendra@narendrasisodiya.com" }, { - "name":"Pavol Rusnak", + "name": "Pavol Rusnak", "email": "stick@gk2.sk" }, { - "name":"Jeff Schiller", + "name": "Jeff Schiller", "email": "codedread@gmail.com" }, { - "name":"Vidar Hokstad", + "name": "Vidar Hokstad", "email": "vidar.hokstad@gmail.com" }, { - "name":"Alexis Deveria", + "name": "Alexis Deveria", "email": "adeveria@gmail.com" + }, + { + "name": "Brett Zamir", + "email": "brettz9@yahoo.com" } ], "keywords": [ diff --git a/docs/Acknowledgements.md b/docs/Acknowledgements.md index 4b7834e3..77f75f72 100644 --- a/docs/Acknowledgements.md +++ b/docs/Acknowledgements.md @@ -1,37 +1,36 @@ -Projects used by SVG-edit -=== +# Projects used by SVG-edit Like many open source projects, SVG-edit depends on other open source projects. This page acknowledges these projects and the many software developers across the globe without which our software would be sorely lacking. -#### jQuery +## jQuery Jonathan Resig's [jQuery library](https://jquery.com) was chosen as a basis for the project since the beginning. The power of jQuery really lets us focus on the functionality and not worry about all the intricacies of mixing with the HTML, CSS and SVG DOM. -#### jPicker +## jPicker Christopher Tillman's awesome [jPicker](http://www.digitalmagicpro.com/jPicker) is used as our fill/stroke picker. The source code repository is now hosted at GoogleCode. Christopher was gracious enough to take suggestions from Pavol on how to incorporate opacity and some callback functionality back upstream into jPicker. -#### jGraduate +## jGraduate Jeff Schiller created the excellent [jGraduate](https://code.google.com/p/jgraduate/) plugin to select SVG gradients in SVG-edit. -#### canvg +## canvg Gabe Lerner's excellent [canvg](https://github.com/gabelerner/canvg) library has helped us bypass browsers' inability to save SVG files an PNGs, by first rendering SVG images in an HTML5 Canvas element. -#### jQuery UI +## jQuery UI We use [jQuery-UI](http://jqueryui.com) for making the dialog boxes (color picker, document properties) draggable, as well as for the opacity slider. -#### js-hotkeys +## js-hotkeys [js-hotkeys](https://github.com/jeresig/jquery.hotkeys) is used to bind all keyboard events in the editor. -#### JQuery Web Spin-Button +## JQuery Web Spin-Button George Adamson's [Web Spin-Button](http://www.softwareunity.com/jquery/JQuerySpinBtn) provided a starting point to implementing a cross-browser spin control in SVG-edit. A few bugs were fixed with compatibility and sent back to George for hopeful inclusion in the next version of his jQuery plugin. -#### SVG Icon Loader +## SVG Icon Loader Alexis Deveria's [svg-icon-loader](https://code.google.com/p/svg-icon-loader/) is used to load in all the SVG icons for the SVG-edit user interface. -#### Icons +## Icons Many of the icons used in SVG-edit come from the [Tango Desktop Project](http://tango.freedesktop.org/Tango_Desktop_Project) which are released into the public domain. We also used a couple of icons from the [Silk Icon Project](http://famfamfam.com/lab/icons/silk), which is licensed under the Creative Commons Attribution 2.5 License. Finally, some of the icons were hand-drawn (in SVG-edit itself). diff --git a/docs/ReleaseInstructions.md b/docs/ReleaseInstructions.md index e650f586..0479e9d4 100644 --- a/docs/ReleaseInstructions.md +++ b/docs/ReleaseInstructions.md @@ -1,11 +1,11 @@ -Creating a new svg-edit release -============ +# Creating a new svg-edit release ## Update the main project 1. Update the VERSION variable in Makefile. - 2. Update the CHANGES file with a summary of all changes. - 3. Commit these changes with `git commit -m "Updating Makefile and CHANGES for release X.Y"`. + 2. Update `version` in `package.json` + 3. Update the CHANGES file with a summary of all changes. + 4. Commit these changes with `git commit -m "Updating Makefile and CHANGES for release X.Y"`. The above steps can be done on a fork and committed via a pull request. @@ -33,6 +33,10 @@ The above steps can be done on a fork and committed via a pull request. You will need to be a member of the SVGEdit GitHub group to do this step. +## Publish to npm + +1. `npm publish` + ## Update the project docs - Update `README.md` with references and links to the shiny new release. +Update `README.md` with references and links to the shiny new release. diff --git a/docs/SvgCanvas.md b/docs/SvgCanvas.md index 9f3866ff..2b51cfde 100644 --- a/docs/SvgCanvas.md +++ b/docs/SvgCanvas.md @@ -9,7 +9,7 @@ The main SvgCanvas class that manages all SVG-related functions ## Summary -### SvgCanvas - The main SvgCanvas class that manages all SVG-related functions +### SvgCanvas - The main SvgCanvas class that manages all SVG-related functions Function | Description ---------|------------ @@ -85,7 +85,7 @@ Function | Description [`SelectorManager.releaseSelector`](#selectormanagerreleaseselector) | Removes the selector of the given element (hides selection box) [`SelectorManager.getRubberBandBox`](#selectormanagergetrubberbandbox`) | Returns the rubberBandBox DOM element. -### Helper functions +### Helper functions Function | Description ---------|------------ @@ -110,7 +110,7 @@ Function | Description [`ffClone`](#ffclone) | Hack for Firefox bugs where text element features aren't updated. [`getPathBBox`](#getpathbbox) | Get correct BBox for a path in Webkit Converted from code found [here](http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html) -### Element Transforms +### Element Transforms Function | Description ---------|------------ @@ -129,7 +129,7 @@ Function | Description [`transformBox`](#transformbox) | Transforms a rectangle based on the given matrix ### Selection - + Function | Description ---------|------------ [`clearSelection`](#clearselection) | Clears the selection. @@ -144,7 +144,7 @@ Function | Description ### Path edit functions - Functions relating to editing path elements -### Serialization +### Serialization Function | Description ---------|------------ @@ -158,7 +158,7 @@ Function | Description [`setSvgString`](#setsvgstring) | This function sets the current drawing as the input SVG XML. [`importSvgString`](#importsvgstring) | This function imports the input SVG XML into the current layer in the drawing -### Layers +### Layers Function | Description ---------|------------ @@ -177,7 +177,7 @@ Function | Description [`getLayerOpacity`](#getlayeropacity) | Returns the opacity of the given layer. [`setLayerOpacity`](#setlayeropacity) | Sets the opacity of the given layer. -### Document functions +### Document functions Function | Description ---------|------------ @@ -201,7 +201,7 @@ Function | Description [`getMode`](#getmode) | Returns the current editor mode string [`setMode`](#setmode) | Sets the editor’s mode to the given string -### Element Styling +### Element Styling Function | Description ---------|------------ @@ -236,7 +236,7 @@ Function | Description [`setImageURL`](#setimageurl) | Sets the new image URL for the selected image element. [`setRectRadius`](#setrectradius) | Sets the rx & ry values to the selected rect element to change its corner radius -### Element manipulation +### Element manipulation Function | Description ---------|------------ @@ -253,7 +253,7 @@ Function | Description [`cloneSelectedElements`](#cloneselectedelements) | Create deep DOM copies (clones) of all selected elements and move them slightly from their originals [`alignSelectedElements`](#alignselectedelements) | Aligns selected elements -### Additional editor tools +### Additional editor tools Function | Description ---------|------------ @@ -283,7 +283,7 @@ Converts XML entities in a string to single characters. Example: `&` becomes #### Returns -The converted string +The converted string ## `Utils.encode64` Converts a string to base64 @@ -312,7 +312,7 @@ Boolean that’s true if rectangles intersect ## `snapToAngle` "snapToAngle": function( x1, y1, x2, y2 ) - + Returns a 45 degree angle coordinate associated with the two given coordinates #### Parameters @@ -871,7 +871,7 @@ Get the given/selected element’s bounding box object, convert it to be more us var ffClone = function( elem ) -Hack for Firefox bugs where text element features aren’t updated. This function clones the element and re-selects it +Hack for Firefox bugs where text element features aren’t updated. This function clones the element and re-selects it > TODO: Test for this bug on load and add it to “support” object instead of browser sniffing @@ -1256,7 +1256,7 @@ This function imports the input SVG XML into the current layer in the drawing This function returns false if the import was unsuccessful, true otherwise. ->TODO: +>TODO: * properly handle if namespace is introduced by imported content (must add to svgcontent and update all prefixes in the imported node) * properly handle recalculating dimensions, recalculateDimensions() doesn’t handle arbitrary transform lists, but makes some assumptions about how the transform list was obtained diff --git a/editor/browser-not-supported.html b/editor/browser-not-supported.html index 24995e52..8553f50e 100644 --- a/editor/browser-not-supported.html +++ b/editor/browser-not-supported.html @@ -1,21 +1,30 @@ - - - - - -Browser does not support SVG | SVG-edit + + + + + + Browser does not support SVG | SVG-edit
-SVG-edit logo
-

Sorry, but your browser does not support SVG. Below is a list of alternate browsers and versions that support SVG and SVG-edit (from caniuse.com).

-

Try the latest version of Firefox, Google Chrome, Safari, Opera or Internet Explorer.

-

If you are unable to install one of these and must use an old version of Internet Explorer, you can install the Google Chrome Frame plugin.

- +SVG-edit logo
+

Sorry, but your browser does not support SVG. Below is a list of + alternate browsers and versions that support SVG and SVG-edit + (from caniuse.com).

+

Try the latest version of + Firefox, + Google Chrome, + Safari, + Opera or + Internet Explorer.

+

If you are unable to install one of these and must use an old version of + Internet Explorer, you can install the + Google Chrome Frame plugin.

- + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - + + - - - + + + - -SVG-edit + + SVG-edit
@@ -85,7 +85,7 @@ by creating the following file and adding by calls to svgEditor.setConfig -->
- +
diff --git a/opera-widget/index.html b/opera-widget/index.html index adcbaa4d..ddcc803d 100644 --- a/opera-widget/index.html +++ b/opera-widget/index.html @@ -3,7 +3,7 @@ SVG Edit - + - \ No newline at end of file + diff --git a/test/contextmenu_test.html b/test/contextmenu_test.html index 80cd87d0..7fca59e3 100644 --- a/test/contextmenu_test.html +++ b/test/contextmenu_test.html @@ -3,14 +3,14 @@ Unit Tests for contextmenu.js - - + + - - + + -

Unit Tests for contextmenu.js

-

-

-
    - +

    Unit Tests for contextmenu.js

    +

    +

    +
      + diff --git a/test/coords_test.html b/test/coords_test.html index ea612439..7ff981a8 100644 --- a/test/coords_test.html +++ b/test/coords_test.html @@ -3,18 +3,18 @@ Unit Tests for coords.js - - - - - - - - - - + + + + + + + + + + - + - -

      Unit Tests for svgedit.coords

      -

      -

      -
        - + +

        Unit Tests for svgedit.coords

        +

        +

        +
          + diff --git a/test/draw_test.html b/test/draw_test.html index 87a5f3be..c886bb61 100644 --- a/test/draw_test.html +++ b/test/draw_test.html @@ -3,16 +3,16 @@ Unit Tests for draw.js - - - - - - - - - - + + + + + + + + + + -

          Unit Tests for draw.js

          -

          -

          -
            - +

            Unit Tests for draw.js

            +

            +

            +
              + diff --git a/test/history_test.html b/test/history_test.html index a876b106..060fcbe1 100644 --- a/test/history_test.html +++ b/test/history_test.html @@ -3,11 +3,11 @@ Unit Tests for history.js - - - - - + + + + + -

              Unit Tests for history.js

              -

              -

              -
                -