Commit 960d3076 by Dmitry Baranovskiy

Fixed hide and show methods

parent cad50508
function Raphael() { function Raphael() {
return (function (r, args) { return (function (r, args) {
r.version = "0.5.4b"; r.version = "0.5.4";
var C = {}; var C = {};
function Matrix(m11, m12, m21, m22, dx, dy) { function Matrix(m11, m12, m21, m22, dx, dy) {
this.m = [ this.m = [
...@@ -363,10 +363,12 @@ function Raphael() { ...@@ -363,10 +363,12 @@ function Raphael() {
this[0].attrs = {}; this[0].attrs = {};
this.Group = group; this.Group = group;
this.hide = function () { this.hide = function () {
this[0].style.display = "none"; this.Group.style.display = "none";
return this;
}; };
this.show = function () { this.show = function () {
this[0].style.display = "block"; this.Group.style.display = "block";
return this;
}; };
this.rotate = function (deg) { this.rotate = function (deg) {
Rotation += deg; Rotation += deg;
...@@ -618,9 +620,9 @@ function Raphael() { ...@@ -618,9 +620,9 @@ function Raphael() {
o.coordorigin = vml.coordorigin; o.coordorigin = vml.coordorigin;
el.appendChild(o); el.appendChild(o);
el.appendChild(path); el.appendChild(path);
// g.appendChild(el); g.appendChild(el);
vml.canvas.appendChild(el); vml.canvas.appendChild(g);
var res = new Element(o, el, vml); var res = new Element(o, g, vml);
res.shape = el; res.shape = el;
res.type = "text"; res.type = "text";
return res; return res;
...@@ -1008,9 +1010,11 @@ function Raphael() { ...@@ -1008,9 +1010,11 @@ function Raphael() {
this.transformations = []; this.transformations = [];
this.hide = function () { this.hide = function () {
this[0].style.display = "none"; this[0].style.display = "none";
return this;
}; };
this.show = function () { this.show = function () {
this[0].style.display = "block"; this[0].style.display = "block";
return this;
}; };
this.rotate = function (deg) { this.rotate = function (deg) {
var bbox = this.getBBox(); var bbox = this.getBBox();
...@@ -1376,7 +1380,7 @@ function Raphael() { ...@@ -1376,7 +1380,7 @@ function Raphael() {
this._getX = this._getY = this._getW = this._getH = function (x) { return x; }; this._getX = this._getY = this._getW = this._getH = function (x) { return x; };
}; };
C.safari = function () { C.safari = function () {
if (this.type == "SVG") { if (r.type == "SVG") {
var rect = C.rect(0, 0, C.width, C.height).attr("stroke-width", 0); var rect = C.rect(0, 0, C.width, C.height).attr("stroke-width", 0);
setTimeout(function () {rect.remove();}, 0); setTimeout(function () {rect.remove();}, 0);
} }
......
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