1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2024-12-23 16:44:34 +01:00

Fixed: Inital color (#109)

This commit is contained in:
nobody 2020-09-25 07:54:01 +02:00
parent 87ad2c3bba
commit 90996224ce
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A

View File

@ -348,8 +348,19 @@ options._colorPicker = function () {
options._textColor = items.badgeTextColor || '#FFFFFF'; options._textColor = items.badgeTextColor || '#FFFFFF';
options._backgroundColor = items.badgeColor || '#4A826C'; options._backgroundColor = items.badgeColor || '#4A826C';
document.getElementById('counter-preview-badge').style.backgroundColor = options._backgroundColor;
document.getElementById('counter-preview-badge').style.color = options._textColor;
document.getElementById('pre-badged-background-color').style.backgroundColor = options._backgroundColor;
document.getElementById('pre-badged-text-color').style.backgroundColor = options._textColor;
document.getElementById('badged-background-color').value = options._backgroundColor;
document.getElementById('badged-text-color').value = options._textColor;
let badgeBackgroundColor = new CP(document.getElementById('badged-background-color')); let badgeBackgroundColor = new CP(document.getElementById('badged-background-color'));
badgeBackgroundColor.on('change', function(r, g, b) { badgeBackgroundColor.on('change', function(r, g, b) {
this.source.value = this.color(r, g, b);
});
badgeBackgroundColor.on('drag', function(r, g, b) {
options._backgroundColor = this.color(r, g, b); options._backgroundColor = this.color(r, g, b);
this.source.value = options._backgroundColor this.source.value = options._backgroundColor
wrappers.setBadgeBackgroundColor({color: options._backgroundColor}); wrappers.setBadgeBackgroundColor({color: options._backgroundColor});
@ -359,6 +370,9 @@ options._colorPicker = function () {
let badgeTextColor = new CP(document.getElementById('badged-text-color')); let badgeTextColor = new CP(document.getElementById('badged-text-color'));
badgeTextColor.on('change', function(r, g, b) { badgeTextColor.on('change', function(r, g, b) {
this.source.value = this.color(r, g, b);
});
badgeTextColor.on('drag', function(r, g, b) {
options._textColor = this.color(r, g, b); options._textColor = this.color(r, g, b);
this.source.value = options._textColor this.source.value = options._textColor
wrappers.setBadgeTextColor({color: options._textColor}); wrappers.setBadgeTextColor({color: options._textColor});