Commit 80f9e574 by Dmitry Baranovskiy

0.6.2 Fixed IE bug with getting translation attributes. Added new methods…

0.6.2 Fixed IE bug with getting translation attributes. Added new methods insertBefore and insertAfter.
parent 6c6d7eaf
...@@ -169,6 +169,16 @@ Linearly changes attribute from current to specified in given amount of millisec ...@@ -169,6 +169,16 @@ Linearly changes attribute from current to specified in given amount of millisec
var c = paper.circle(10, 10, 10); var c = paper.circle(10, 10, 10);
c.animate({cx: 20, r: 20}, 2000); c.animate({cx: 20, r: 20}, 2000);
#### stop
Stops current animation of the element
##### Usage
var c = paper.circle(10, 10, 10);
c.animate({cx: 20, r: 20}, 2000);
document.body.onclick = function () { c.stop(); };
#### getBBox #### getBBox
Returns dimensions of given element. Returns dimensions of given element.
...@@ -196,6 +206,26 @@ Moves element to back in hierarchy. ...@@ -196,6 +206,26 @@ Moves element to back in hierarchy.
var c = paper.circle(10, 10, 10); var c = paper.circle(10, 10, 10);
c.toBack(); c.toBack();
#### insertBefore
Inserts current object before the given one
##### Usage
var r = paper.rect(10, 10, 10, 10);
var c = paper.circle(10, 10, 10);
c.insertBefore(r);
#### insertAfter
Inserts current object after the given one
##### Usage
var c = paper.circle(10, 10, 10);
var r = paper.rect(10, 10, 10, 10);
c.insertAfter(r);
### Graphic Primitives ### Graphic Primitives
#### circle #### circle
...@@ -378,14 +408,14 @@ Draws quarter of circle form current point. ...@@ -378,14 +408,14 @@ Draws quarter of circle form current point.
Possible dir values Possible dir values
* lu: left up * “lu”: left up
* ld: left down * “ld”: left down
* ru: right up * “ru”: right up
* rd: right down * “rd”: right down
* ur: up right * “ur”: up right
* ul: up left * “ul”: up left
* dr: down right * “dr”: down right
* dl: down left * “dl”: down left
##### Usage ##### Usage
...@@ -403,4 +433,4 @@ Closes the path. ...@@ -403,4 +433,4 @@ Closes the path.
http://www.opensource.org/licenses/mit-license.php http://www.opensource.org/licenses/mit-license.php
Copyright (c) 2008 Dmitry Baranovskiy (http://raphaeljs.com) Copyright © 2008 – 2009 Dmitry Baranovskiy (http://raphaeljs.com)
\ No newline at end of file \ No newline at end of file
...@@ -199,6 +199,26 @@ ...@@ -199,6 +199,26 @@
<h4>Usage</h4> <h4>Usage</h4>
<pre class="javascript code"><code>var c = paper.circle(10, 10, 10);</code> <pre class="javascript code"><code>var c = paper.circle(10, 10, 10);</code>
<code>c.toBack();</code></pre> <code>c.toBack();</code></pre>
<h3 id="insertBefore">
insertBefore
</h3>
<p>
Inserts current object before the given one.
</p>
<h4>Usage</h4>
<pre class="javascript code"><code>var r = paper.rect(10, 10, 10, 10);</code>
<code>var c = paper.circle(10, 10, 10);</code>
<code>c.insertBefore(r);</code></pre>
<h3 id="insertAfter">
insertAfter
</h3>
<p>
Inserts current object after the given one
</p>
<h4>Usage</h4>
<pre class="javascript code"><code>var r = paper.rect(10, 10, 10, 10);</code>
<code>var c = paper.circle(10, 10, 10);</code>
<code>r.insertAfter(c);</code></pre>
<h2>Graphic Primitives</h2> <h2>Graphic Primitives</h2>
<h3 id="circle"> <h3 id="circle">
circle circle
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment