You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cloning element does not clone the styles (Element::meta)
How to reproduce:
Create element in code
Set some property through SetProperty()
Clone the element and attach it to some other element
Result:
Element doest not have set properties and use just loaded css from document
Expected result:
Element is cloned with all attributes and properties
I just found this problem when trying to set drag element style in code, when you drag the element in game, it clones it and just use the original css from file and the inline style is erased.
Point of clone: Context.cpp::1208
The main issue here is that the style attribute is not kept in sync with manually set properties. Thus, when the element was cloned, only styles set using the style attribute would be cloned, but manually set styles using SetProperty would not be cloned (see also related PR #177). I've changed this now so that all inline styles are manually copied over.
Cloning element does not clone the styles (Element::meta)
How to reproduce:
SetProperty()
Result:
Expected result:
I just found this problem when trying to set
drag
element style in code, when you drag the element in game, it clones it and just use the original css from file and the inline style is erased.Point of clone:
Context.cpp::1208
Edit: Maybe #191 similiar problem ?
The text was updated successfully, but these errors were encountered: