Pre 0.5.0 clean up
parent
7396c39a42
commit
5433d225f6
|
@ -1,3 +1,3 @@
|
|||
Contributions to this code are covered by the Adobe contributors
|
||||
license agreeent. Developers must sign and submit the Adobe CLA in
|
||||
license agreement. Developers must sign and submit the Adobe CLA in
|
||||
order to contribute to this project.
|
16
Gruntfile.js
16
Gruntfile.js
|
@ -63,14 +63,28 @@ module.exports = function(grunt) {
|
|||
eslint: {
|
||||
command: "./node_modules/eslint/bin/eslint.js " + core.join(" ")
|
||||
},
|
||||
},
|
||||
prettify: {
|
||||
options: {
|
||||
indent: 4,
|
||||
indent_char: " ",
|
||||
wrap_line_length: 80,
|
||||
brace_style: "expand",
|
||||
unformatted: ["code", "pre", "script"]
|
||||
},
|
||||
one: {
|
||||
src: "./doc/reference.html",
|
||||
dest: "./doc/reference.html"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks("grunt-contrib-concat");
|
||||
grunt.loadNpmTasks("grunt-contrib-uglify");
|
||||
grunt.loadNpmTasks("grunt-exec");
|
||||
grunt.loadNpmTasks("grunt-prettify");
|
||||
|
||||
grunt.registerTask("default", ["exec:eslint", "concat", "uglify", "exec:dr"]);
|
||||
grunt.registerTask("default", ["exec:eslint", "concat", "uglify", "exec:dr", "prettify"]);
|
||||
grunt.registerTask("lint", ["exec:eslint"]);
|
||||
grunt.registerTask("test", ["exec:test"]);
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@ A JavaScript SVG library for the modern web. Learn more at [snapsvg.io](http://s
|
|||
* [About Snap.svg](http://snapsvg.io/about/)
|
||||
* [Getting Started](http://snapsvg.io/start/)
|
||||
* [API Reference](http://snapsvg.io/docs/)
|
||||
* [Slack Room](https://snapsvg.slack.com/)
|
||||
* [Slack Room](https://snapsvg.slack.com/). [Invite](https://snapsvg.slack.com/shared_invite/MTM2NTE4MTk3MDYwLTE0ODYwODgzNzUtYjQ0YmM1N2U0Mg)
|
||||
|
||||
### Use
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Snap.svg",
|
||||
"version": "0.4.1",
|
||||
"version": "0.5.0",
|
||||
"homepage": "http://snapsvg.io",
|
||||
"authors": [
|
||||
"Dmitry Baranovskiy <dmitry@baranovskiy.com>"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "Snap.svg",
|
||||
"repo": "adobe-webplatform/Snap.svg",
|
||||
"description": "The JavaScript library for modern SVG graphics.",
|
||||
"version": "0.3.0",
|
||||
"version": "0.5.0",
|
||||
"keywords": ["svg", "snap", "js", "javascript"],
|
||||
"dependencies": {},
|
||||
"development": {},
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
// Snap.svg 0.4.2dev
|
||||
// Snap.svg 0.5.0
|
||||
//
|
||||
// Copyright (c) 2013 – 2017 Adobe Systems Incorporated. All rights reserved.
|
||||
//
|
||||
|
@ -14,7 +14,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// build: 2017-02-02
|
||||
// build: 2017-02-03
|
||||
|
||||
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
|
||||
//
|
||||
|
@ -868,7 +868,7 @@ var mina = (function (eve) {
|
|||
// limitations under the License.
|
||||
|
||||
var Snap = (function(root) {
|
||||
Snap.version = "0.4.2dev";
|
||||
Snap.version = "0.5.0";
|
||||
/*\
|
||||
* Snap
|
||||
[ method ]
|
||||
|
@ -4156,9 +4156,20 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
|
|||
}(function (value) {
|
||||
if (value instanceof Element || value instanceof Fragment) {
|
||||
eve.stop();
|
||||
if (value.type == "clipPath") {
|
||||
var clip = value;
|
||||
} else {
|
||||
var clip,
|
||||
node = value.node;
|
||||
while (node) {
|
||||
if (node.nodeName === "clipPath") {
|
||||
clip = new Element(node);
|
||||
break;
|
||||
}
|
||||
if (node.nodeName === "svg") {
|
||||
clip = undefined;
|
||||
break;
|
||||
}
|
||||
node = node.parentNode;
|
||||
}
|
||||
if (!clip) {
|
||||
clip = make("clipPath", getSomeDefs(this));
|
||||
clip.node.appendChild(value.node);
|
||||
!clip.node.id && $(clip.node, {
|
||||
|
|
16368
doc/reference.html
16368
doc/reference.html
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "snapsvg",
|
||||
"version": "0.5.0dev",
|
||||
"version": "0.5.0",
|
||||
"description": "JavaScript Vector Library",
|
||||
"main": "./dist/snap.svg.js",
|
||||
"repository": {
|
||||
|
@ -17,6 +17,7 @@
|
|||
"grunt-contrib-uglify": "~0.2.0",
|
||||
"grunt-contrib-concat": "~0.3.0",
|
||||
"grunt-exec": "~0.4.2",
|
||||
"grunt-prettify": "0.4.0",
|
||||
"mocha": "*",
|
||||
"expect.js": "*",
|
||||
"eslint": "*",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// limitations under the License.
|
||||
|
||||
var Snap = (function(root) {
|
||||
Snap.version = "0.5.0dev";
|
||||
Snap.version = "0.5.0";
|
||||
/*\
|
||||
* Snap
|
||||
[ method ]
|
||||
|
|
17
test.html
17
test.html
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test</title>
|
||||
<script src="dist/snap.svg.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
var s = Snap();
|
||||
Snap.load("inkscape.svg", function (f) {
|
||||
console.log(f.select('path[sodipodi:nodetypes="cc"]'));
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue