mirror of
https://github.com/viliusle/miniPaint.git
synced 2026-02-06 11:21:47 +00:00
fixed color #ffffffff handling (last commit was wrong)
This commit is contained in:
parent
5ee74e261f
commit
c77ce6aa54
@ -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) => {
|
||||
|
||||
@ -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
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user