mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fix : dont modify transparent color
This commit is contained in:
@@ -41,6 +41,14 @@ if (typeof Function.prototype.bind !== "function") {
|
||||
return ((r << 16) | (g << 8) | b).toString(16);
|
||||
};
|
||||
|
||||
ns.normalize = function (value, def) {
|
||||
if (typeof value === 'undefined' || value === null) {
|
||||
return def;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
ns.inherit = function(extendedObject, inheritFrom) {
|
||||
extendedObject.prototype = Object.create(inheritFrom.prototype);
|
||||
extendedObject.prototype.constructor = extendedObject;
|
||||
|
||||
Reference in New Issue
Block a user