Fix for bug #23 and generate docs with new pull request. Removed VERIFY sections

master
Dmitry Baranovskiy 2013-10-14 22:59:34 +11:00
parent 9b4b3ad9bc
commit c6245cb435
5 changed files with 895 additions and 868 deletions

947
dist/reference.html vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

755
dist/snap.svg.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -1066,7 +1066,7 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
* Returns the coordinates of the point located at the given length along the given path * Returns the coordinates of the point located at the given length along the given path
** **
- path (string) SVG path string - path (string) SVG path string
- length (number) length, in pixels, from the start of the path, excluding non-rendering jumps VERIFY - length (number) length, in pixels, from the start of the path, excluding non-rendering jumps
** **
= (object) representation of the point: = (object) representation of the point:
o { o {
@ -1083,8 +1083,8 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
* Returns the subpath of a given path between given start and end lengths * Returns the subpath of a given path between given start and end lengths
** **
- path (string) SVG path string - path (string) SVG path string
- from (number) length, in pixels, from the start of the path to the start of the segment VERIFY - from (number) length, in pixels, from the start of the path to the start of the segment
- to (number) length, in pixels, from the start of the path to the end of the segment VERIFY - to (number) length, in pixels, from the start of the path to the end of the segment
** **
= (string) path string definition for the segment = (string) path string definition for the segment
\*/ \*/
@ -1114,7 +1114,7 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
** **
* Returns coordinates of the point located at the given length on the given path (only works for `path` elements) * Returns coordinates of the point located at the given length on the given path (only works for `path` elements)
** **
- length (number) length, in pixels, from the start of the path, excluding non-rendering jumps VERIFY - length (number) length, in pixels, from the start of the path, excluding non-rendering jumps
** **
= (object) representation of the point: = (object) representation of the point:
o { o {
@ -1133,8 +1133,8 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
** **
* Returns subpath of a given element from given start and end lengths (only works for `path` elements) * Returns subpath of a given element from given start and end lengths (only works for `path` elements)
** **
- from (number) length, in pixels, from the start of the path to the start of the segment VERIFY - from (number) length, in pixels, from the start of the path to the start of the segment
- to (number) length, in pixels, from the start of the path to the end of the segment VERIFY - to (number) length, in pixels, from the start of the path to the end of the segment
** **
= (string) path string definition for the segment = (string) path string definition for the segment
\*/ \*/
@ -1199,16 +1199,14 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
- p2y (number) y of the second point of the curve - p2y (number) y of the second point of the curve
* or * or
- bez (array) array of six points for beziér curve - bez (array) array of six points for beziér curve
= (object) point information in format: = (object) bounding box
o { o {
o min: { o x: (number) x coordinate of the left top point of the box,
o x: (number) x coordinate of the left point, o y: (number) y coordinate of the left top point of the box,
o y: (number) y coordinate of the top point o x2: (number) x coordinate of the right bottom point of the box,
o }, o y2: (number) y coordinate of the right bottom point of the box,
o max: { o width: (number) width of the box,
o x: (number) x coordinate of the right point, o height: (number) height of the box
o y: (number) y coordinate of the bottom point
o }
o } o }
\*/ \*/
Snap.path.bezierBBox = bezierBBox; Snap.path.bezierBBox = bezierBBox;
@ -1262,14 +1260,15 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
\*/ \*/
Snap.path.intersection = pathIntersection; Snap.path.intersection = pathIntersection;
Snap.path.intersectionNumber = pathIntersectionNumber; Snap.path.intersectionNumber = pathIntersectionNumber;
// SIERRA Does the fill mode affect how isPointInside behaves?
/*\ /*\
* Snap.path.isPointInside * Snap.path.isPointInside
[ method ] [ method ]
** **
* Utility method * Utility method
** **
* Returns `true` if given point is inside a given closed path * Returns `true` if given point is inside a given closed path.
*
* Note: fill mode doesnt affect the result of this method.
- path (string) path string - path (string) path string
- x (number) x of the point - x (number) x of the point
- y (number) y of the point - y (number) y of the point

View File

@ -13,7 +13,7 @@
// limitations under the License. // limitations under the License.
var Snap = (function() { var Snap = (function() {
Snap.version = "0.0.1"; Snap.version = "0.1.0";
// SIERRA: this method appears to be missing from HTML output // SIERRA: this method appears to be missing from HTML output
/*\ /*\
* Snap * Snap
@ -322,7 +322,7 @@ Snap.is = is;
* Snaps given value to given grid * Snaps given value to given grid
- values (array|number) given array of values or step of the grid - values (array|number) given array of values or step of the grid
- value (number) value to adjust - value (number) value to adjust
- tolerance (number) #optional maximum distance to the target value that would trigger the snap. Default is `10`. VERIFY - tolerance (number) #optional maximum distance to the target value that would trigger the snap. Default is `10`.
= (number) adjusted value = (number) adjusted value
\*/ \*/
Snap.snapTo = function (values, value, tolerance) { Snap.snapTo = function (values, value, tolerance) {
@ -442,8 +442,8 @@ function Matrix(a, b, c, d, e, f) {
[ method ] [ method ]
** **
* Translate the matrix * Translate the matrix
- x (number) horizontal offset distance VERIFY - x (number) horizontal offset distance
- y (number) vertical offset distance VERIFY - y (number) vertical offset distance
\*/ \*/
matrixproto.translate = function (x, y) { matrixproto.translate = function (x, y) {
return this.add(1, 0, 0, 1, x, y); return this.add(1, 0, 0, 1, x, y);
@ -454,9 +454,9 @@ function Matrix(a, b, c, d, e, f) {
[ method ] [ method ]
** **
* Scales the matrix * Scales the matrix
- x (number) amount to be scaled, with `1` resulting in no change VERIFY - x (number) amount to be scaled, with `1` resulting in no change
- y (number) #optional amount to scale along the vertical axis. (Otherwise `x` applies to both axes.) - y (number) #optional amount to scale along the vertical axis. (Otherwise `x` applies to both axes.)
- cx (number) #optional horizontal origin point from which to scale VERIFY - cx (number) #optional horizontal origin point from which to scale
- cy (number) #optional vertical origin point from which to scale - cy (number) #optional vertical origin point from which to scale
\*/ \*/
matrixproto.scale = function (x, y, cx, cy) { matrixproto.scale = function (x, y, cx, cy) {
@ -471,9 +471,9 @@ function Matrix(a, b, c, d, e, f) {
[ method ] [ method ]
** **
* Rotates the matrix * Rotates the matrix
- a (number) angle of rotation, in radians VERIFY - a (number) angle of rotation, in degrees
- x (number) horizontal origin point from which to rotate VERIFY - x (number) horizontal origin point from which to rotate
- y (number) vertical origin point from which to rotate VERIFY - y (number) vertical origin point from which to rotate
\*/ \*/
matrixproto.rotate = function (a, x, y) { matrixproto.rotate = function (a, x, y) {
a = rad(a); a = rad(a);
@ -2032,7 +2032,7 @@ function arrayFirstValue(arr) {
- attr (object) attributes of final destination - attr (object) attributes of final destination
- duration (number) duration of the animation, in milliseconds - duration (number) duration of the animation, in milliseconds
- easing (function) #optional one of easing functions of @mina or custom one - easing (function) #optional one of easing functions of @mina or custom one
- callback (function) #optional callback function that fires when animation ends VERIFY - callback (function) #optional callback function that fires when animation ends
= (object) animation object = (object) animation object
\*/ \*/
Snap.animation = function (attr, ms, easing, callback) { Snap.animation = function (attr, ms, easing, callback) {
@ -2042,7 +2042,7 @@ function arrayFirstValue(arr) {
* Element.inAnim * Element.inAnim
[ method ] [ method ]
** **
* Returns a set of animations that may be able to manipulate the current element VERIFY * Returns a set of animations that may be able to manipulate the current element
** **
= (object) in format: = (object) in format:
o { o {
@ -2086,7 +2086,7 @@ function arrayFirstValue(arr) {
- setter (function) caring function that accepts one number argument - setter (function) caring function that accepts one number argument
- duration (number) duration, in milliseconds - duration (number) duration, in milliseconds
- easing (function) #optional easing function from @mina or custom - easing (function) #optional easing function from @mina or custom
- callback (function) #optional callback function to execute when animation ends VERIFY - callback (function) #optional callback function to execute when animation ends
= (object) animation object in @mina format = (object) animation object in @mina format
o { o {
o id (string) animation id, consider it read-only, o id (string) animation id, consider it read-only,
@ -2134,7 +2134,7 @@ function arrayFirstValue(arr) {
- attrs (object) key-value pairs of destination attributes - attrs (object) key-value pairs of destination attributes
- duration (number) duration of the animation in milliseconds - duration (number) duration of the animation in milliseconds
- easing (function) #optional easing function from @mina or custom - easing (function) #optional easing function from @mina or custom
- callback (function) #optional callback function that executes when the animation ends VERIFY - callback (function) #optional callback function that executes when the animation ends
= (Element) the current element = (Element) the current element
\*/ \*/
elproto.animate = function (attrs, ms, easing, callback) { elproto.animate = function (attrs, ms, easing, callback) {