- 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)
This commit is contained in:
Brett Zamir
2018-05-13 09:58:13 +08:00
parent edb8a75402
commit 38d6274723
33 changed files with 475 additions and 399 deletions

View File

@@ -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).

View File

@@ -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.

View File

@@ -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 editors 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 thats 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 elements bounding box object, convert it to be more us
var ffClone = function( elem )
Hack for Firefox bugs where text element features arent updated. This function clones the element and re-selects it
Hack for Firefox bugs where text element features arent 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() doesnt handle arbitrary transform lists, but makes some assumptions about how the transform list was obtained