Compare commits

..

No commits in common. "dcc69ad777b2ab5cf20cbdd6444cea4edd2b7d26" and "9ac68ac0c98b3bc0b6c094c49390ee6a1449ada9" have entirely different histories.

8 changed files with 14 additions and 84 deletions

View File

@ -1,7 +1,6 @@
# v0.14.0
* Added the ability to work without creating a WebSocket. Added NoSocket property of AppParams.
* Added the ability to run a timer on the client side. Added StartTimer and StopTimer methods to Session interface.
* Added "cell-vertical-self-align", and "cell-horizontal-self-align" properties
* Bug fixing
# v0.13.x

View File

@ -2465,10 +2465,9 @@ The SizeUnit value of type SizeInFraction can be either integer or fractional.
The "grid-row-gap" and "grid-column-gap" SizeUnit properties (GridRowGap and GridColumnGap constants)
allow you to set the distance between the rows and columns of the container, respectively. The default is 0px.
### "cell-vertical-align" and "cell-vertical-self-align" properties
### "cell-vertical-align" property
The "cell-vertical-align" int property (constant CellVerticalAlign) sets the default vertical alignment of children
within the cell they are occupying. Valid values:
The "cell-vertical-align" property (constant CellVerticalAlign) of type int sets the vertical alignment of children within the cell they are occupying. Valid values:
| Value | Constant | Name | Alignment |
|:-----:|--------------|-----------|---------------------|
@ -2479,13 +2478,9 @@ within the cell they are occupying. Valid values:
The default value is StretchAlign (3)
The "cell-vertical-self-align" int property (constant CellVerticalAlign) sets the vertical alignment of children
within the cell they are occupying. This property should be set not for the grid, but for the children.
### "cell-horizontal-align" property
### "cell-horizontal-align" and "cell-horizontal-self-align" properties
The "cell-horizontal-align" int property (constant CellHorizontalSelfAlign) sets the horizontal alignment
of children within the occupied cell. Valid values:
The "cell-horizontal-align" property (constant CellHorizontalAlign) of type int sets the horizontal alignment of children within the occupied cell. Valid values:
| Value | Constant | Name | Alignment |
|:-----:|--------------|-----------|--------------------|
@ -2496,9 +2491,6 @@ of children within the occupied cell. Valid values:
The default value is StretchAlign (3)
The "cell-horizontal-self-align" int property (constant CellVerticalSelfAlign) sets the horizontal alignment of children
within the cell they are occupying. This property should be set not for the grid, but for the children.
## ColumnLayout
ColumnLayout is a container that implements the ViewsContainer interface.

View File

@ -57,10 +57,9 @@ button {
textarea {
margin: 2px;
padding: 4px;
padding: 1px;
overflow: auto;
font-size: inherit;
resize: none;
}
ul:focus {

View File

@ -5,44 +5,6 @@ import (
"strings"
)
const (
// CellVerticalAlign is the constant for the "cell-vertical-align" property tag.
// The "cell-vertical-align" int property sets the default vertical alignment
// of GridLayout children within the cell they are occupying. Valid values:
// * TopAlign (0) / "top"
// * BottomAlign (1) / "bottom"
// * CenterAlign (2) / "center", and
// * StretchAlign (2) / "stretch"
CellVerticalAlign = "cell-vertical-align"
// CellHorizontalAlign is the constant for the "cell-horizontal-align" property tag.
// The "cell-horizontal-align" int property sets the default horizontal alignment
// of GridLayout children within the occupied cell. Valid values:
// * LeftAlign (0) / "left"
// * RightAlign (1) / "right"
// * CenterAlign (2) / "center"
// * StretchAlign (3) / "stretch"
CellHorizontalAlign = "cell-horizontal-align"
// CellVerticalSelfAlign is the constant for the "cell-vertical-self-align" property tag.
// The "cell-vertical-align" int property sets the vertical alignment of GridLayout children
// within the cell they are occupying. The property is set for the child view of GridLayout. Valid values:
// * TopAlign (0) / "top"
// * BottomAlign (1) / "bottom"
// * CenterAlign (2) / "center", and
// * StretchAlign (2) / "stretch"
CellVerticalSelfAlign = "cell-vertical-self-align"
// CellHorizontalSelfAlign is the constant for the "cell-horizontal-self-align" property tag.
// The "cell-horizontal-self align" int property sets the horizontal alignment of GridLayout children
// within the occupied cell. The property is set for the child view of GridLayout. Valid values:
// * LeftAlign (0) / "left"
// * RightAlign (1) / "right"
// * CenterAlign (2) / "center"
// * StretchAlign (3) / "stretch"
CellHorizontalSelfAlign = "cell-horizontal-self-align"
)
// GridLayout - grid-container of View
type GridLayout interface {
ViewsContainer

View File

@ -666,8 +666,7 @@ const (
// Resize is the constant for the "resize" property tag.
// The "resize" int property sets whether an element is resizable, and if so, in which directions.
// Valid values are "none" / NoneResize (0), "both" / BothResize (1),
// "horizontal" / HorizontalResize (2), and "vertical" / VerticalResize (3)
// Valid values are "none" (0), "both" (1), horizontal (2), and "vertical" (3)
Resize = "resize"
// UserSelect is the constant for the "user-select" property tag.

View File

@ -331,16 +331,6 @@ var enumProperties = map[string]struct {
"justify-items",
[]string{"start", "end", "center", "stretch"},
},
CellVerticalSelfAlign: {
[]string{"top", "bottom", "center", "stretch"},
"align-self",
[]string{"start", "end", "center", "stretch"},
},
CellHorizontalSelfAlign: {
[]string{"left", "right", "center", "stretch"},
"justify-self",
[]string{"start", "end", "center", "stretch"},
},
GridAutoFlow: {
[]string{"row", "column", "row-dense", "column-dense"},
GridAutoFlow,

View File

@ -11,23 +11,22 @@ const (
// The "side" int property determines which side of the container is used to resize.
// The value of property is or-combination of TopSide (1), RightSide (2), BottomSide (4), and LeftSide (8)
Side = "side"
// ResizeBorderWidth is the constant for the "resize-border-width" property tag.
// The "ResizeBorderWidth" SizeUnit property determines the width of the resizing border
ResizeBorderWidth = "resize-border-width"
// CellVerticalAlign is the constant for the "cell-vertical-align" property tag.
CellVerticalAlign = "cell-vertical-align"
// CellHorizontalAlign is the constant for the "cell-horizontal-align" property tag.
CellHorizontalAlign = "cell-horizontal-align"
// TopSide is value of the "side" property: the top side is used to resize
TopSide = 1
// RightSide is value of the "side" property: the right side is used to resize
RightSide = 2
// BottomSide is value of the "side" property: the bottom side is used to resize
BottomSide = 4
// LeftSide is value of the "side" property: the left side is used to resize
LeftSide = 8
// AllSides is value of the "side" property: all sides is used to resize
AllSides = TopSide | RightSide | BottomSide | LeftSide
)

14
view.go
View File

@ -650,8 +650,6 @@ func viewPropertyChanged(view *viewData, tag string) {
case ZIndex, Order, TabSize:
if i, ok := intProperty(view, tag, session, 0); ok {
session.updateCSSProperty(htmlID, tag, strconv.Itoa(i))
} else {
session.updateCSSProperty(htmlID, tag, "")
}
return
@ -699,11 +697,8 @@ func viewPropertyChanged(view *viewData, tag string) {
}
if cssTag, ok := sizeProperties[tag]; ok {
if size, ok := sizeProperty(view, tag, session); ok {
size, _ := sizeProperty(view, tag, session)
session.updateCSSProperty(htmlID, cssTag, size.cssString("", session))
} else {
session.updateCSSProperty(htmlID, cssTag, "")
}
return
}
@ -724,11 +719,8 @@ func viewPropertyChanged(view *viewData, tag string) {
}
if valuesData, ok := enumProperties[tag]; ok && valuesData.cssTag != "" {
if n, ok := enumProperty(view, tag, session, 0); ok {
n, _ := enumProperty(view, tag, session, 0)
session.updateCSSProperty(htmlID, valuesData.cssTag, valuesData.cssValues[n])
} else {
session.updateCSSProperty(htmlID, valuesData.cssTag, "")
}
return
}
@ -736,8 +728,6 @@ func viewPropertyChanged(view *viewData, tag string) {
if tag == floatTag {
if f, ok := floatTextProperty(view, floatTag, session, 0); ok {
session.updateCSSProperty(htmlID, floatTag, f)
} else {
session.updateCSSProperty(htmlID, floatTag, "")
}
return
}