Element.add()⚓➭
Element.add()⚓➭
See Element.append.
-diff --git a/dist/reference.html b/dist/reference.html index 7a800e4..ba84394 100644 --- a/dist/reference.html +++ b/dist/reference.html @@ -18,7 +18,7 @@
Inserts given element after the current one.
Returns: Element parent
-Animate given attributes of the element.
Returns: Element the element
-Appends given element to current one.
Returns: Element parent
-Return given attribute of the element as a px
value. (Not %, em, etc)
Returns: Element result of query selection
-Inserts given element before the current one.
Returns: Element parent
-Adds event handler for click for the element.
Returns: object Element
-Creates <use>
element linked to the current element.
Returns: Element <use>
element
Adds or retrieves given value asociated with given key. See also Element.removeData
@@ -151,7 +151,7 @@ See also Element.removeData }); } -Adds event handler for double click for the element.
Returns: object Element
-Adds event handlers for drag of the element.
Returns: object Element
-Returns bounding box descriptor for the given element.
Returns: object bounding box descriptor:
@@ -227,7 +227,7 @@ See also Element.removeDataReturn coordinates of the point located at the given length on the given path. Only works for element of “path” type.
Return subpath of a given element from given length to given length. Only works for element of “path” type.
Returns: string pathstring for the segment
-Returns length of the path in pixels. Only works for element of “path” type.
Returns: number length.
-Adds event handlers for hover for the element.
Returns: object Element
-Returns an array of animations element currently in
Returns: object in format
@@ -282,7 +282,7 @@ See also Element.removeDataInserts the element after the given one.
Returns: Element parent
-Inserts the element after the given one.
Returns: Element parent
-Creates <marker>
element from the current element.
To create a marker you have to specify the bounding rect and reference point:
Returns: Element <marker>
element
You can use pattern later on as an argument for marker-start
or marker-end
attributes.
Adds event handler for mousedown for the element.
Returns: object Element
-Adds event handler for mousemove for the element.
Returns: object Element
-Adds event handler for mouseout for the element.
Returns: object Element
-Adds event handler for mouseover for the element.
Returns: object Element
-Adds event handler for mouseup for the element.
Returns: object Element
-Shortcut for assigning event handler for drag.over.<id>
event, where id is id of the element (see Element.id).
Returns parent of the element
Returns: Element parent
-Creates <pattern>
element from the current element.
To create a pattern you have to specify the pattern rect:
Prepends given element to current one.
Returns: Element parent
-Removes element from the DOM
-Removes value associated with an element by given key. If key is not provided, removes all the data of the element.
@@ -426,7 +426,7 @@ If key is not provided, removes all the data of the element. keyReturns: object Element
-Applies CSS selector with the element as a parent and returns the result as an Element.
Returns: Element result of query selection
-Applies CSS selector with the element as a parent and returns the result as a set or array of elements.
Returns: Set array result of query selection
-Stops all the animations of the current element.
Returns: Element the element
-Adds event handler for touchcancel for the element.
Returns: object Element
-Adds event handler for touchend for the element.
Returns: object Element
-Adds event handler for touchmove for the element.
Returns: object Element
-Adds event handler for touchstart for the element.
Returns: object Element
-Removes event handler for click for the element.
Returns: object Element
-Removes event handler for double click for the element.
Returns: object Element
-Removes all drag event handlers from given element.
-Removes event handlers for hover for the element.
Returns: object Element
-Removes event handler for mousedown for the element.
Returns: object Element
-Removes event handler for mousemove for the element.
Returns: object Element
-Removes event handler for mouseout for the element.
Returns: object Element
-Removes event handler for mouseover for the element.
Returns: object Element
-Removes event handler for mouseup for the element.
Returns: object Element
-Removes event handler for touchcancel for the element.
Returns: object Element
-Removes event handler for touchend for the element.
Returns: object Element
-Removes event handler for touchmove for the element.
Returns: object Element
-Removes event handler for touchstart for the element.
Returns: object Element
-Creates <use>
element linked to the current element.
Returns: Element <use>
element
See Element.select
-Adds given matrix to existing one.
Returns copy of the matrix
Returns: object Matrix
-Returns inverted version of the matrix
Returns: object Matrix
-Rotates the matrix
Scales the matrix
Splits matrix into primitive transformations
Returns: object in format:
@@ -688,11 +688,11 @@ If key is not provided, removes all the data of the element.Return transform string that represents given matrix
Returns: string transform string
-Translate the matrix
Return x coordinate for given point after transformation described by the matrix. See also Matrix.y
Returns: number x
-Return y coordinate for given point after transformation described by the matrix. See also Matrix.x
Returns: number y
See Paper.g
-Draws a polygon. See Paper.polyline
-Draws a rectangle.
@@ -1039,7 +1039,7 @@ var c = paper.rect(10, 10, 50, 50); // rectangle with rounded corners var c = paper.rect(40, 40, 50, 50, 10); -Draws a text string.
var t1 = paper.text(50, 50, "Savage");
var t2 = paper.text(50, 50, ["S","a","v","a","g","e"]);
Utility method Returns matrix based on given parameters.
@@ -1087,7 +1091,7 @@ Returns matrix based on given parameters.Returns: object Matrix
-Simple implementation of Ajax.
Returns: XMLHttpRequest XMLHttpRequest (just in case)
-Creates animation object.
Returns: object animation object
-Transform angle to degrees
Returns: number angle in degrees.
-Utility method Find dot coordinates on the given cubic bezier curve at the given t.
@@ -1240,7 +1244,7 @@ Find dot coordinates on the given cubic bezier curve at the given t.Creates DOM fragment from given list of elements or strings
Returns: Fragment the Fragment
-Converts HSB values to hex representation of the colour.
Returns: string hex representation of the colour.
-Converts HSL values to hex representation of the colour.
Returns: string hex representation of the colour.
-Handfull replacement for typeof
operator.
Returns: boolean is given value is of given type
-Loads external SVG file as a Fragment. For more advanced AJAX see Savage.ajax. +
+Parses SVG fragment and converts it into Fragment.
Returns: Fragment the fragment
-Utility method Parses given path string into an array of arrays of path segments.
@@ -1389,7 +1407,7 @@ Parses given path string into an array of arrays of path segments. path string or array of segments (in the last case it will be returned straight away)Returns: array array of segments.
-Utility method Parses given path string into an array of transformations.
@@ -1399,7 +1417,7 @@ Parses given path string into an array of transformations.Returns: array array of transformations.
Utility method Return bounding box of a given cubic bezier curve
@@ -1440,7 +1458,7 @@ Return bounding box of a given cubic bezier curveReturn subpath of a given path from given length to given length.
Returns: string pathstring for the segment
-Returns length of the given path in pixels.
Returns: number length.
-Utility method Finds intersections of two paths
@@ -1498,7 +1516,7 @@ Finds intersections of two pathsUtility method
Returns true
if two bounding boxes intersect
true
if two bounding boxes intersect
second bounding box
Returns: boolean true
if they intersect
Utility method
Returns true
if given point is inside a given closed path.
true
if given point is inside a given closed path.
y of the point
Returns: boolean true, if point is inside the path
-Utility method
Returns true
if given point is inside bounding box.
true
if given point is inside bounding box.
y coordinate of the point
Returns: boolean true
if point inside
Transform the path string with given matrix.
true
if given point is inside bounding box.
see MatrixReturns: string transformed path string
-Utility method Converts path coordinates into absolute values.
@@ -1560,7 +1578,7 @@ Converts path coordinates into absolute values. path stringReturns: array path string
-Utility method Converts path to a new path where all segments are cubic bezier curves.
@@ -1569,7 +1587,7 @@ Converts path to a new path where all segments are cubic bezier curves. path string or array of segmentsReturns: array array of segments.
-Utility method Converts path coordinates into relative values.
@@ -1578,7 +1596,7 @@ Converts path coordinates into relative values. path stringReturns: array path string
-Utility method Return bounding box of a given path
@@ -1594,7 +1612,7 @@ Return bounding box of a given pathTransform angle to radians
Returns: number angle in radians.
-Converts RGB values to hex representation of the colour.
Returns: string hex representation of the colour.
-Wraps DOM element specified by CSS selector as Element
Returns: Element
-Wraps DOM elements specified by CSS selector as set or array of Element
Returns: Element
-Snaps given value to given grid.
Returns: number adjusted value.
Removeds all elements from the set
-Removes given element from the set
Returns: boolean true
if object was found & removed from the set
Executes given function for each element in the set.
If function returns false
it will stop loop running.
@@ -1708,15 +1726,15 @@ Return bounding box of a given path
context object for the callback
Returns: object Set object
-Removes last element and returns it.
Returns: object element
-Adds each argument to the current set.
Returns: object original element
-Removes given element from the set
Returns: object set elements that were deleted
-Backin easing.
Returns: number output 0..1
-Backout easing.
Returns: number output 0..1
-Bounce easing.
Returns: number output 0..1
-Easein easing.
Returns: number output 0..1
-Easeinout easing.
Returns: number output 0..1
-Easeout easing.
Returns: number output 0..1
-Elastic easing.
Returns: number output 0..1
-Returns animation by it’s id.
Returns: object See mina
-Default linear easing.
Returns: number output 0..1
-Returns current time. Equal to
function () {
@@ -1858,7 +1876,7 @@ Return bounding box of a given path