fixed color #ffffffff handling (last commit was wrong)

This commit is contained in:
viliusle 2021-03-11 18:15:33 +02:00
parent 5ee74e261f
commit c77ce6aa54
2 changed files with 5 additions and 5 deletions

View File

@ -96,7 +96,7 @@ export class Insert_layer_action extends Base_action {
};
layer.data = null;
autoresize_as = [config.layer.width, config.layer.height, null, true, true];
need_autoresize = true;
//need_autoresize = true;
}
else if (typeof layer.data == 'string') {
image_load_promise = new Promise((resolve, reject) => {

View File

@ -176,11 +176,11 @@ class Helper_class {
for (var i = 0; i < 3; i++)
hex += temp[i] + temp[i];
}
var triplets = /^([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i.exec(hex).slice(1);
var triplets = /^([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/i.exec(hex).slice(1);
return {
r: parseInt(triplets[1], 16),
g: parseInt(triplets[2], 16),
b: parseInt(triplets[3], 16),
r: parseInt(triplets[0], 16),
g: parseInt(triplets[1], 16),
b: parseInt(triplets[2], 16),
a: 255
};
}