iobroker.mywebui 1.37.71 → 1.37.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/io-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "mywebui",
4
- "version": "1.37.71",
4
+ "version": "1.37.72",
5
5
  "titleLang": {
6
6
  "en": "mywebui",
7
7
  "de": "mywebui",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.mywebui",
3
- "version": "1.37.71",
3
+ "version": "1.37.72",
4
4
  "description": "ioBroker mywebui - Custom edited mywebui by gokturk413",
5
5
  "type": "module",
6
6
  "main": "dist/backend/main.js",
@@ -889,8 +889,8 @@ export class IobrokerWebuiAppShell extends BaseCustomWebComponentConstructorAppe
889
889
  ['','— none —'],['opacity','Opacity'],['rotation','Rotation'],['scale','Scale'],
890
890
  ['translateX','Move X (relative)'],['translateY','Move Y (relative)'],['translate','Move XY (relative)'],
891
891
  ['left','Move Left (absolute)'],['top','Move Top (absolute)'],
892
- ['skew','Skew'],['fill','Fill Color'],['transform','Transform (CSS)'],
893
- ['svg','SVG Attribute'],['morphSVG','MorphSVG'],['motionPath','Motion Path']
892
+ ['skew','Skew'],['fill','Fill (SVG)'],['color','Color (HTML text)'],['backgroundColor','Background Color (HTML)'],
893
+ ['transform','Transform (CSS)'],['svg','SVG Attribute'],['morphSVG','MorphSVG'],['motionPath','Motion Path']
894
894
  ], cfg.effect || '', save);
895
895
 
896
896
  const svgAttrSel = mkSel([
@@ -950,7 +950,7 @@ export class IobrokerWebuiAppShell extends BaseCustomWebComponentConstructorAppe
950
950
  out.transformOriginX = originXInp.value;
951
951
  out.transformOriginY = originYInp.value;
952
952
  }
953
- if (e === 'fill' || e === 'svg') {
953
+ if (e === 'fill' || e === 'color' || e === 'backgroundColor' || e === 'svg') {
954
954
  if (fillFromInp.value) out.fillColorFrom = fillFromInp.value;
955
955
  if (fillToInp.value) out.fillColorTo = fillToInp.value;
956
956
  }
@@ -979,11 +979,12 @@ export class IobrokerWebuiAppShell extends BaseCustomWebComponentConstructorAppe
979
979
  block.appendChild(mkField('Value To', 'valueTo', valueToInp, cfg));
980
980
 
981
981
  const colorRows = document.createElement('div');
982
- colorRows.style.display = (cfg.effect === 'fill' || cfg.effect === 'svg') ? '' : 'none';
982
+ const isColorEffect = e => ['fill','color','backgroundColor','svg'].includes(e);
983
+ colorRows.style.display = isColorEffect(cfg.effect) ? '' : 'none';
983
984
  colorRows.appendChild(mkField('Color From', 'fillColorFrom', fillFromInp, cfg));
984
985
  colorRows.appendChild(mkField('Color To', 'fillColorTo', fillToInp, cfg));
985
986
  block.appendChild(colorRows);
986
- effectSel.addEventListener('change', () => { colorRows.style.display = (effectSel.value === 'fill' || effectSel.value === 'svg') ? '' : 'none'; });
987
+ effectSel.addEventListener('change', () => { colorRows.style.display = isColorEffect(effectSel.value) ? '' : 'none'; });
987
988
 
988
989
  const motionRows = document.createElement('div');
989
990
  motionRows.style.display = cfg.effect === 'motionPath' ? '' : 'none';
@@ -137,9 +137,16 @@ function buildTweenConfig(cfg, value) {
137
137
  break;
138
138
  }
139
139
  case 'fill':
140
- config.fill = typeof normalVal === 'boolean'
141
- ? (normalVal ? (cfg.fillColorTo || '#ff0000') : (cfg.fillColorFrom || '#000000'))
142
- : (cfg.fillColorTo || '#ff0000');
140
+ config.fill = cfg.fillColorTo || '#ff0000';
141
+ if (cfg.fillColorFrom) config.startAt = { fill: cfg.fillColorFrom };
142
+ break;
143
+ case 'color':
144
+ config.color = cfg.fillColorTo || '#ff0000';
145
+ if (cfg.fillColorFrom) config.startAt = { color: cfg.fillColorFrom };
146
+ break;
147
+ case 'backgroundColor':
148
+ config.backgroundColor = cfg.fillColorTo || '#ff0000';
149
+ if (cfg.fillColorFrom) config.startAt = { backgroundColor: cfg.fillColorFrom };
143
150
  break;
144
151
  case 'transform':
145
152
  config.transform = cfg.valueTo || String(value);