mirror of https://github.com/anoshenko/rui.git
Bug fixing
This commit is contained in:
parent
39a22905f0
commit
705a9c0e37
20
animation.go
20
animation.go
|
@ -672,11 +672,29 @@ func (style *viewStyle) transitionCSS(session Session) string {
|
|||
buffer := allocStringBuilder()
|
||||
defer freeStringBuilder(buffer)
|
||||
|
||||
convert := map[string]string{
|
||||
CellHeight: "grid-template-rows",
|
||||
CellWidth: "grid-template-columns",
|
||||
Row: "grid-row",
|
||||
Column: "grid-column",
|
||||
Clip: "clip-path",
|
||||
Shadow: "box-shadow",
|
||||
ColumnSeparator: "column-rule",
|
||||
FontName: "font",
|
||||
TextSize: "font-size",
|
||||
TextLineThickness: "text-decoration-thickness",
|
||||
}
|
||||
|
||||
for tag, animation := range style.transitions {
|
||||
if buffer.Len() > 0 {
|
||||
buffer.WriteString(", ")
|
||||
}
|
||||
buffer.WriteString(tag)
|
||||
|
||||
if cssTag, ok := convert[tag]; ok {
|
||||
buffer.WriteString(cssTag)
|
||||
} else {
|
||||
buffer.WriteString(tag)
|
||||
}
|
||||
animation.transitionCSS(buffer, session)
|
||||
}
|
||||
return buffer.String()
|
||||
|
|
|
@ -394,12 +394,10 @@ func (style *viewStyle) cssViewStyle(builder cssBuilder, session Session) {
|
|||
}
|
||||
|
||||
if r, ok := rangeProperty(style, Row, session); ok {
|
||||
builder.add("grid-row-start", strconv.Itoa(r.First+1))
|
||||
builder.add("grid-row-end", strconv.Itoa(r.Last+2))
|
||||
builder.add("grid-row", fmt.Sprintf("%d / %d", r.First+1, r.Last+2))
|
||||
}
|
||||
if r, ok := rangeProperty(style, Column, session); ok {
|
||||
builder.add("grid-column-start", strconv.Itoa(r.First+1))
|
||||
builder.add("grid-column-end", strconv.Itoa(r.Last+2))
|
||||
builder.add("grid-column", fmt.Sprintf("%d / %d", r.First+1, r.Last+2))
|
||||
}
|
||||
if text := style.gridCellSizesCSS(CellWidth, session); text != "" {
|
||||
builder.add(`grid-template-columns`, text)
|
||||
|
|
Loading…
Reference in New Issue