mirror of https://github.com/anoshenko/rui.git
Bug fixing
This commit is contained in:
parent
e4b89dc833
commit
bb5723ce74
|
|
@ -237,6 +237,16 @@ function insertElementAtStart(elementId, content) {
|
|||
}
|
||||
}
|
||||
|
||||
function replaceElement(elementId, html) {
|
||||
const element = document.getElementById(elementId);
|
||||
if (element) {
|
||||
const div = document.createElement("div");
|
||||
div.innerHTML = html
|
||||
element.replaceWith(div.firstChild);
|
||||
scanElementsSize();
|
||||
}
|
||||
}
|
||||
|
||||
function appendToInputValue(elementId, content) {
|
||||
const element = document.getElementById(elementId);
|
||||
if (element) {
|
||||
|
|
|
|||
9
view.go
9
view.go
|
|
@ -989,6 +989,15 @@ func (view *viewData) propertyChanged(tag PropertyName) {
|
|||
session.updateCSSProperty(htmlID, string(Opacity), "")
|
||||
}
|
||||
|
||||
case Semantics:
|
||||
htmlID := view.htmlID()
|
||||
if v := session.viewByHTMLID(htmlID); v != nil {
|
||||
buffer := allocStringBuilder()
|
||||
defer freeStringBuilder(buffer)
|
||||
viewHTML(v, buffer, "")
|
||||
session.callFunc("replaceElement", htmlID, buffer.String())
|
||||
}
|
||||
|
||||
default:
|
||||
if cssTag, ok := sizeProperties[tag]; ok && cssTag != "" {
|
||||
if size, ok := sizeProperty(view, tag, session); ok {
|
||||
|
|
|
|||
Loading…
Reference in New Issue