Commit e7441bae authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

CAscColor добавил конструктор от 1 параметра

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52573 954022d7-b5bf-4e40-9824-e11837661b57
parent c55d3910
...@@ -41,6 +41,11 @@ function CAscColor() ...@@ -41,6 +41,11 @@ function CAscColor()
this.Mods = new Array(); this.Mods = new Array();
this.ColorSchemeId = -1; this.ColorSchemeId = -1;
if (1 === arguments.length) {
this.r = arguments[0].r;
this.g = arguments[0].g;
this.b = arguments[0].b;
} else {
if (3 <= arguments.length) { if (3 <= arguments.length) {
this.r = arguments[0]; this.r = arguments[0];
this.g = arguments[1]; this.g = arguments[1];
...@@ -48,6 +53,7 @@ function CAscColor() ...@@ -48,6 +53,7 @@ function CAscColor()
} }
if (4 === arguments.length) if (4 === arguments.length)
this.a = arguments[3]; this.a = arguments[3];
}
} }
CAscColor.prototype.get_r = function(){return this.r} CAscColor.prototype.get_r = function(){return this.r}
CAscColor.prototype.put_r = function(v){this.r = v; this.hex = undefined;} CAscColor.prototype.put_r = function(v){this.r = v; this.hex = undefined;}
......
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 to comment