|
|
@ -148,11 +148,7 @@ export default class StyleableModel<T extends ObjectHash = any> extends Model<T> |
|
|
|
|
|
|
|
|
dataListeners.forEach((ls) => |
|
|
dataListeners.forEach((ls) => |
|
|
this.listenTo(ls.obj, ls.event, () => { |
|
|
this.listenTo(ls.obj, ls.event, () => { |
|
|
const [dsId, drId, keyPath] = stringToPath(path); |
|
|
const newValue = dataVar.getDataValue(); |
|
|
const ds = em?.DataSources.get(dsId); |
|
|
|
|
|
const dr = ds && ds.records.get(drId); |
|
|
|
|
|
const newValue = dr && dr.get(keyPath); |
|
|
|
|
|
|
|
|
|
|
|
this.updateStyleProp(styleProp, newValue); |
|
|
this.updateStyleProp(styleProp, newValue); |
|
|
}), |
|
|
}), |
|
|
); |
|
|
); |
|
|
@ -185,12 +181,7 @@ export default class StyleableModel<T extends ObjectHash = any> extends Model<T> |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (styleValue instanceof StyleDataVariable) { |
|
|
if (styleValue instanceof StyleDataVariable) { |
|
|
const [dsId, drId, keyPath] = stringToPath(styleValue.get('path')); |
|
|
resolvedStyle[key] = styleValue.getDataValue(); |
|
|
const ds = this.em?.DataSources.get(dsId); |
|
|
|
|
|
const dr = ds && ds.records.get(drId); |
|
|
|
|
|
const resolvedValue = dr && dr.get(keyPath); |
|
|
|
|
|
|
|
|
|
|
|
resolvedStyle[key] = resolvedValue || styleValue.get('value'); |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
return resolvedStyle; |
|
|
return resolvedStyle; |
|
|
|