@node-projects/web-component-designer 0.1.81 → 0.1.82

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.
@@ -66,6 +66,10 @@ export class AbstractPropertiesService {
66
66
  cg.commit();
67
67
  }
68
68
  getPropertyTarget(designItem, property) {
69
+ if (property.propertyType == PropertyType.attribute)
70
+ return BindingTarget.attribute;
71
+ if (property.propertyType == PropertyType.cssValue)
72
+ return BindingTarget.css;
69
73
  return BindingTarget.property;
70
74
  }
71
75
  clearValue(designItems, property, clearType) {
@@ -122,8 +126,18 @@ export class AbstractPropertiesService {
122
126
  return ValueType.bound;
123
127
  }
124
128
  else {
125
- if (bindings && bindings.find(x => x.target == BindingTarget.property && x.targetName == property.name))
126
- return ValueType.bound;
129
+ if (property.propertyType == PropertyType.attribute) {
130
+ if (bindings && bindings.find(x => x.target == BindingTarget.attribute && x.targetName == property.name))
131
+ return ValueType.bound;
132
+ }
133
+ else if (property.propertyType == PropertyType.property) {
134
+ if (bindings && bindings.find(x => x.target == BindingTarget.property && x.targetName == property.name))
135
+ return ValueType.bound;
136
+ }
137
+ else {
138
+ if (bindings && bindings.find(x => (x.target == BindingTarget.property || x.target == BindingTarget.attribute) && x.targetName == property.name))
139
+ return ValueType.bound;
140
+ }
127
141
  }
128
142
  if (!all && property.propertyType == PropertyType.cssValue) {
129
143
  let styles = AbstractPropertiesService._stylesCache.get(designItems[0]);
@@ -193,7 +207,15 @@ export class AbstractPropertiesService {
193
207
  return bindings.find(x => (x.target == BindingTarget.css || x.target == BindingTarget.cssvar) && x.targetName == property.name);
194
208
  }
195
209
  else {
196
- return bindings.find(x => (x.target == BindingTarget.property || x.target == BindingTarget.attribute) && x.targetName == property.name);
210
+ if (property.propertyType == PropertyType.attribute) {
211
+ return bindings.find(x => x.target == BindingTarget.attribute && x.targetName == property.name);
212
+ }
213
+ else if (property.propertyType == PropertyType.property) {
214
+ return bindings.find(x => x.target == BindingTarget.property && x.targetName == property.name);
215
+ }
216
+ else {
217
+ return bindings.find(x => (x.target == BindingTarget.property || x.target == BindingTarget.attribute) && x.targetName == property.name);
218
+ }
197
219
  }
198
220
  }
199
221
  return null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "A UI designer for Polymer apps",
3
3
  "name": "@node-projects/web-component-designer",
4
- "version": "0.1.81",
4
+ "version": "0.1.82",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "jochen.kuehner@gmx.de",