Commit 267c84ca by Tomas Alabes

Fixes in master

parent b19a240f
...@@ -392,7 +392,7 @@ ...@@ -392,7 +392,7 @@
* Raphael.is * Raphael.is
[ method ] [ method ]
** **
* Handfull replacement for `typeof` operator. * Handful of replacements for `typeof` operator.
> Parameters > Parameters
- o (…) any object or primitive - o (…) any object or primitive
- type (string) name of the type, i.e. “string”, “function”, “number”, etc. - type (string) name of the type, i.e. “string”, “function”, “number”, etc.
...@@ -468,7 +468,7 @@ ...@@ -468,7 +468,7 @@
** **
* Transform angle to degrees * Transform angle to degrees
> Parameters > Parameters
- deg (number) angle in radians - rad (number) angle in radians
= (number) angle in degrees. = (number) angle in degrees.
\*/ \*/
R.deg = function (rad) { R.deg = function (rad) {
...@@ -691,8 +691,8 @@ ...@@ -691,8 +691,8 @@
if (this.is(h, "object") && "h" in h && "s" in h && "b" in h) { if (this.is(h, "object") && "h" in h && "s" in h && "b" in h) {
v = h.b; v = h.b;
s = h.s; s = h.s;
h = h.h;
o = h.o; o = h.o;
h = h.h;
} }
h *= 360; h *= 360;
var R, G, B, X, C; var R, G, B, X, C;
...@@ -4875,7 +4875,7 @@ ...@@ -4875,7 +4875,7 @@
* Set.clear * Set.clear
[ method ] [ method ]
** **
* Removeds all elements from the set * Removes all elements from the set
\*/ \*/
setproto.clear = function () { setproto.clear = function () {
while (this.length) { while (this.length) {
......
...@@ -204,7 +204,7 @@ window.Raphael && window.Raphael.svg && function(R) { ...@@ -204,7 +204,7 @@ window.Raphael && window.Raphael.svg && function(R) {
} }
if (type != "none") { if (type != "none") {
var pathId = "raphael-marker-" + type, var pathId = "raphael-marker-" + type,
markerId = "raphael-marker-" + se + type + w + h; markerId = "raphael-marker-" + se + type + w + h + o.id;
if (!R._g.doc.getElementById(pathId)) { if (!R._g.doc.getElementById(pathId)) {
p.defs.appendChild($($("path"), { p.defs.appendChild($($("path"), {
"stroke-linecap": "round", "stroke-linecap": "round",
...@@ -639,7 +639,7 @@ window.Raphael && window.Raphael.svg && function(R) { ...@@ -639,7 +639,7 @@ window.Raphael && window.Raphael.svg && function(R) {
* Element.id * Element.id
[ property (number) ] [ property (number) ]
** **
* Unique id of the element. Especially usesful when you want to listen to events of the element, * Unique id of the element. Especially useful when you want to listen to events of the element,
* because all events are fired in format `<module>.<action>.<id>`. Also useful for @Paper.getById method. * because all events are fired in format `<module>.<action>.<id>`. Also useful for @Paper.getById method.
\*/ \*/
this.id = R._oid++; this.id = R._oid++;
...@@ -896,6 +896,10 @@ window.Raphael && window.Raphael.svg && function(R) { ...@@ -896,6 +896,10 @@ window.Raphael && window.Raphael.svg && function(R) {
} else { } else {
this.node.parentNode.removeChild(this.node); this.node.parentNode.removeChild(this.node);
} }
// Remove custom data for element
this.removeData();
for (var i in this) { for (var i in this) {
this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
} }
...@@ -1204,7 +1208,8 @@ window.Raphael && window.Raphael.svg && function(R) { ...@@ -1204,7 +1208,8 @@ window.Raphael && window.Raphael.svg && function(R) {
y: y, y: y,
"text-anchor": "middle", "text-anchor": "middle",
text: text, text: text,
font: R._availableAttrs.font, "font-family": R._availableAttrs["font-family"],
"font-size": R._availableAttrs["font-size"],
stroke: "none", stroke: "none",
fill: "#000" fill: "#000"
}; };
...@@ -1243,7 +1248,8 @@ window.Raphael && window.Raphael.svg && function(R) { ...@@ -1243,7 +1248,8 @@ window.Raphael && window.Raphael.svg && function(R) {
height: height, height: height,
version: 1.1, version: 1.1,
width: width, width: width,
xmlns: "http://www.w3.org/2000/svg" xmlns: "http://www.w3.org/2000/svg",
"xmlns:xlink": "http://www.w3.org/1999/xlink"
}); });
if (container == 1) { if (container == 1) {
cnvs.style.cssText = css + "position:absolute;left:" + x + "px;top:" + y + "px"; cnvs.style.cssText = css + "position:absolute;left:" + x + "px;top:" + y + "px";
......
...@@ -2323,7 +2323,7 @@ Returns path transformed by a given transformation ...@@ -2323,7 +2323,7 @@ Returns path transformed by a given transformation
</p> </p>
</div><div class="Set-section"><h2 id="Set" class="undefined"><i class="dr-trixie">&#160;</i>Set<a href="#Set" title="Link to this section" class="dr-hash">&#x2693;</a></h2> </div><div class="Set-section"><h2 id="Set" class="undefined"><i class="dr-trixie">&#160;</i>Set<a href="#Set" title="Link to this section" class="dr-hash">&#x2693;</a></h2>
<div class="extra" id="Set-extra"></div></div><div class="Set-clear-section"><h3 id="Set.clear" class="dr-method"><i class="dr-trixie">&#160;</i>Set.clear()<a href="#Set.clear" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4734 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4734">&#x27ad;</a></h3> <div class="extra" id="Set-extra"></div></div><div class="Set-clear-section"><h3 id="Set.clear" class="dr-method"><i class="dr-trixie">&#160;</i>Set.clear()<a href="#Set.clear" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4734 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4734">&#x27ad;</a></h3>
<div class="extra" id="Set.clear-extra"></div></div><div class="dr-method"><p>Removeds all elements from the set <div class="extra" id="Set.clear-extra"></div></div><div class="dr-method"><p>Removes all elements from the set
</p> </p>
</div><div class="Set-exclude-section"><h3 id="Set.exclude" class="dr-method"><i class="dr-trixie">&#160;</i>Set.exclude(element)<a href="#Set.exclude" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4789 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4789">&#x27ad;</a></h3> </div><div class="Set-exclude-section"><h3 id="Set.exclude" class="dr-method"><i class="dr-trixie">&#160;</i>Set.exclude(element)<a href="#Set.exclude" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 4789 in the source" href="https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L4789">&#x27ad;</a></h3>
<div class="extra" id="Set.exclude-extra"></div></div><div class="dr-method"><p>Removes given element from the set <div class="extra" id="Set.exclude-extra"></div></div><div class="dr-method"><p>Removes given element from the set
......
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