From: Dmitry Baranovskiy Date: Mon, 16 Feb 2009 23:33:48 +0000 (+1100) Subject: Update Reference X-Git-Tag: semver~85 X-Git-Url: http://git.roojs.org/?p=raphael;a=commitdiff_plain;h=be44adf9f7c0174d12c4f4050bc2009bbfd55d9d Update Reference --- diff --git a/reference.html b/reference.html index 849e925..f14233d 100644 --- a/reference.html +++ b/reference.html @@ -67,16 +67,43 @@ var paper = Raphael("notepad", 320, 200);

Usage

var c = paper.circle(10, 10, 10); // draw a circle at coordinate 10,10 with radius of 10
 c.node.onclick = function () { c.attr("fill", "red"); };
+

+ remove +

+

+ Removes element from the DOM. You can’t use it after this method call. +

+

Usage

+
var c = paper.circle(10, 10, 10);
+c.remove();
+

+ hide +

+

+ Makes element invisible. +

+

Usage

+
var c = paper.circle(10, 10, 10);
+c.hide();
+

+ show +

+

+ Makes element visible. +

+

Usage

+
var c = paper.circle(10, 10, 10);
+c.show();

rotate

- Rotates the element by the given degree from either its 0,0 corner or its center point. + Rotates the element by the given degree from its center point.

Parameters

  1. degree number Degree of rotation (0 – 360°)
  2. -
  3. isAbsolute boolean [optional] Specifies the rotation point. Use true to rotate the element around its center point. The default, false, rotates the element from its 0,0 coordinate.
  4. +
  5. isAbsolute boolean [optional] Specifies is degree is relative to previous position (false) or is it absolute angle (true)

Usage

var c = paper.circle(10, 10, 10);
@@ -126,6 +153,14 @@ c.scale(.5, .75);  // makes the circle half as wide, and 75% as high
  • params object
  • +

    or

    +
      +
    1. attributeName string in this case method returns current value for given attribute name
    2. +
    +

    or

    +
      +
    1. attributeNames array in this case method returns array of current values for given attribute names
    2. +

    Possible parameters

    Please refer to the SVG specification for an explanation of these parameters.

    +
  • + getColor +
  • +
  • + getColor.reset +