Hey everyone,
Is it possible to clone the attributes of a style into another style? I have a label (<label>) in a layer (<div>). I want the label's style to be identical to the layers style. How can I do this? Oh, and I can't set the styles in the label directly, only in the layer. And of course, I don't know which attributes that has been set.
Example:
myLayer.innerHTML = "<label>This is a label</label>";
myLayer.style.fontSize = 64;
And now I want the fontsize to be 64 in the label as well. It doesn't seem to inherit the style, so I'll need to clone it some how. But how?
Thanks on advance,
Nille
Is it possible to clone the attributes of a style into another style? I have a label (<label>) in a layer (<div>). I want the label's style to be identical to the layers style. How can I do this? Oh, and I can't set the styles in the label directly, only in the layer. And of course, I don't know which attributes that has been set.
Example:
myLayer.innerHTML = "<label>This is a label</label>";
myLayer.style.fontSize = 64;
And now I want the fontsize to be 64 in the label as well. It doesn't seem to inherit the style, so I'll need to clone it some how. But how?
Thanks on advance,
Nille