royale-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] hcsuk commented on issue #341: Adding listener for when a bindable style has changed
Date Sat, 10 Nov 2018 14:53:38 GMT
hcsuk commented on issue #341: Adding listener for when a bindable style has changed
   One question: if you set the "style" property via a string, and make multiple calls, should
the result be incremental? e.g. ` = "backgroundColor: blue";` followed by `
= "backgroundAlpha: 0.5";` - would we end up with an object that still has the blue backround
now at 50% opacity? I'm assuming so .. which means that the current code is a bit inefficient,
it will keep creating an object that's then used in the `applyStyles` method.
   So if a string is passed in, we could either just apply this directly within `applyStyles`
without caching the resulting object as the `_style` member variable, or alternatively we
could build up a `_style` object that is extended each time the call is made. I'm not sure
whether it's worth doing this though - given our proposed paradigm would mean that we then
need to ensure that the dynamic object that we create implements the `IStyleObject` interface.
   So I'm thinking that setting a style by string just directly applies that style but doesn't
create the object; is this okay i.e. no one wants to read back the style afterwards? And when
setting a style by object, it needs to implement the IStyleObject interface and then in the
Bindable version we can add the necessary logic to ensure any updates to it are applied to
the element..

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

View raw message