mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Don't capitalize twice.
This commit is contained in:
parent
d643ac7626
commit
9b95ba095c
1 changed files with 3 additions and 2 deletions
|
@ -212,10 +212,11 @@ var Color = this.Color = Base.extend(new function() {
|
|||
gray: ['gray']
|
||||
}, function(components, colorType) {
|
||||
Base.each(components, function(component) {
|
||||
fields['get' + Base.capitalize(component)] = function() {
|
||||
var part = Base.capitalize(component);
|
||||
fields['get' + part] = function() {
|
||||
return this.convert(colorType)[component];
|
||||
};
|
||||
fields['set' + Base.capitalize(component)] = function(value) {
|
||||
fields['set' + part] = function(value) {
|
||||
var color = this.convert(colorType);
|
||||
color[component] = value;
|
||||
color = color.convert(this._colorType);
|
||||
|
|
Loading…
Reference in a new issue