Spell Checking

This commit is contained in:
Alexei Anoshenko 2025-06-25 14:36:04 +03:00
parent b0185726db
commit 3090a0e94f
12 changed files with 28 additions and 28 deletions

View File

@ -43,7 +43,7 @@ type backgroundRadialGradient struct {
// //
// The following properties can be used: // The following properties can be used:
// - "gradient" (Gradient) - Describes gradient stop points. This is a mandatory property while describing background gradients. // - "gradient" (Gradient) - Describes gradient stop points. This is a mandatory property while describing background gradients.
// - "center-x" (CenterX), "center-y" (CenterY) - Defines the gradient center point cooordinates. // - "center-x" (CenterX), "center-y" (CenterY) - Defines the gradient center point coordinates.
// - "radial-gradient-radius" (RadialGradientRadius) - Defines radius of the radial gradient. // - "radial-gradient-radius" (RadialGradientRadius) - Defines radius of the radial gradient.
// - "radial-gradient-shape" (RadialGradientShape) - Defines shape of the radial gradient. // - "radial-gradient-shape" (RadialGradientShape) - Defines shape of the radial gradient.
// - "repeating" (Repeating) - Defines whether stop points needs to be repeated after the last one. // - "repeating" (Repeating) - Defines whether stop points needs to be repeated after the last one.

View File

@ -201,7 +201,7 @@ type Canvas interface {
// SetConicGradientFillStyle sets a conic gradient around a point // SetConicGradientFillStyle sets a conic gradient around a point
// to use inside shapes // to use inside shapes
// * x, y - coordinates of the center of the conic gradient in pilels; // * x, y - coordinates of the center of the conic gradient in piles;
// * startAngle - the angle at which to begin the gradient, in radians. The angle starts from a line going horizontally right from the center, and proceeds clockwise. // * startAngle - the angle at which to begin the gradient, in radians. The angle starts from a line going horizontally right from the center, and proceeds clockwise.
// * startColor - the start color; // * startColor - the start color;
// * endColor - the end color; // * endColor - the end color;
@ -210,7 +210,7 @@ type Canvas interface {
// SetConicGradientFillStyle sets a conic gradient around a point // SetConicGradientFillStyle sets a conic gradient around a point
// to use inside shapes // to use inside shapes
// * x, y - coordinates of the center of the conic gradient in pilels; // * x, y - coordinates of the center of the conic gradient in piles;
// * startAngle - the angle at which to begin the gradient, in radians. The angle starts from a line going horizontally right from the center, and proceeds clockwise. // * startAngle - the angle at which to begin the gradient, in radians. The angle starts from a line going horizontally right from the center, and proceeds clockwise.
// * startColor - the start color; // * startColor - the start color;
// * endColor - the end color; // * endColor - the end color;

View File

@ -93,12 +93,12 @@ func NewColumnSeparator(style int, color Color, width SizeUnit) ColumnSeparatorP
func (separator *columnSeparatorProperty) init() { func (separator *columnSeparatorProperty) init() {
separator.dataProperty.init() separator.dataProperty.init()
separator.normalize = normalizeVolumnSeparatorTag separator.normalize = normalizeColumnSeparatorTag
separator.set = columnSeparatorSet separator.set = columnSeparatorSet
separator.supportedProperties = []PropertyName{Style, Width, ColorTag} separator.supportedProperties = []PropertyName{Style, Width, ColorTag}
} }
func normalizeVolumnSeparatorTag(tag PropertyName) PropertyName { func normalizeColumnSeparatorTag(tag PropertyName) PropertyName {
tag = defaultNormalize(tag) tag = defaultNormalize(tag)
switch tag { switch tag {
case ColumnSeparatorStyle, "separator-style": case ColumnSeparatorStyle, "separator-style":

View File

@ -292,15 +292,15 @@ func (customView *CustomViewData) ViewIndex(view View) int {
return -1 return -1
} }
func (customView *CustomViewData) exscludeTags() []PropertyName { func (customView *CustomViewData) excludeTags() []PropertyName {
if customView.superView != nil { if customView.superView != nil {
exsclude := []PropertyName{} exclude := []PropertyName{}
for tag, value := range customView.defaultParams { for tag, value := range customView.defaultParams {
if value == customView.superView.getRaw(tag) { if value == customView.superView.getRaw(tag) {
exsclude = append(exsclude, tag) exclude = append(exclude, tag)
} }
} }
return exsclude return exclude
} }
return nil return nil
} }
@ -310,7 +310,7 @@ func (customView *CustomViewData) String() string {
if customView.superView != nil { if customView.superView != nil {
buffer := allocStringBuilder() buffer := allocStringBuilder()
defer freeStringBuilder(buffer) defer freeStringBuilder(buffer)
writeViewStyle(customView.tag, customView, buffer, "", customView.exscludeTags()) writeViewStyle(customView.tag, customView, buffer, "", customView.excludeTags())
return buffer.String() return buffer.String()
} }
return customView.tag + " { }" return customView.tag + " { }"

View File

@ -49,7 +49,7 @@ const (
// Supported types: int, string. // Supported types: int, string.
// //
// Values: // Values:
// - 0 (DropEffectUndefined) or "undefined" - The property value is not defined (defaut value). // - 0 (DropEffectUndefined) or "undefined" - The property value is not defined (default value).
// - 1 (DropEffectCopy) or "copy" - A copy of the source item may be made at the new location. // - 1 (DropEffectCopy) or "copy" - A copy of the source item may be made at the new location.
// - 2 (DropEffectMove) or "move" - An item may be moved to a new location. // - 2 (DropEffectMove) or "move" - An item may be moved to a new location.
// - 4 (DropEffectLink) or "link" - A link may be established to the source at the new location. // - 4 (DropEffectLink) or "link" - A link may be established to the source at the new location.
@ -68,7 +68,7 @@ const (
// Supported types: int, string. // Supported types: int, string.
// //
// Values: // Values:
// - 0 (DropEffectUndefined) or "undefined" - The property value is not defined (defaut value). Equivalent to DropEffectAll // - 0 (DropEffectUndefined) or "undefined" - The property value is not defined (default value). Equivalent to DropEffectAll
// - 1 (DropEffectCopy) or "copy" - A copy of the source item may be made at the new location. // - 1 (DropEffectCopy) or "copy" - A copy of the source item may be made at the new location.
// - 2 (DropEffectMove) or "move" - An item may be moved to a new location. // - 2 (DropEffectMove) or "move" - An item may be moved to a new location.
// - 3 (DropEffectLink) or "link" - A link may be established to the source at the new location. // - 3 (DropEffectLink) or "link" - A link may be established to the source at the new location.
@ -210,7 +210,7 @@ const (
// DropEffectLinkMove - the value of the "drop-effect-allowed" property: a link or move operation is permitted. // DropEffectLinkMove - the value of the "drop-effect-allowed" property: a link or move operation is permitted.
DropEffectLinkMove = DropEffectLink + DropEffectMove DropEffectLinkMove = DropEffectLink + DropEffectMove
// DropEffectAll - the value of the "drop-effect-allowed" property: all operations (copy, move, and link) are permitted (defaut value). // DropEffectAll - the value of the "drop-effect-allowed" property: all operations (copy, move, and link) are permitted (default value).
DropEffectAll = DropEffectCopy + DropEffectMove + DropEffectLink DropEffectAll = DropEffectCopy + DropEffectMove + DropEffectLink
) )
@ -472,7 +472,7 @@ func dragAndDropHtml(view View, buffer *strings.Builder) {
buffer.WriteString(`" `) buffer.WriteString(`" `)
} }
effects := []string{"undifined", "copy", "move", "copyMove", "link", "copyLink", "linkMove", "all"} effects := []string{"undefined", "copy", "move", "copyMove", "link", "copyLink", "linkMove", "all"}
if n := GetDropEffectAllowed(view); n > 0 && n < len(effects) { if n := GetDropEffectAllowed(view); n > 0 && n < len(effects) {
buffer.WriteString(` data-drop-effect-allowed="`) buffer.WriteString(` data-drop-effect-allowed="`)
buffer.WriteString(effects[n]) buffer.WriteString(effects[n])

View File

@ -200,7 +200,7 @@ func (listLayout *listLayoutData) UpdateContent() {
} }
} }
// GetListVerticalAlign returns the vertical align of a ListLayout or ListView sibview: // GetListVerticalAlign returns the vertical align of a ListLayout or ListView subview:
// TopAlign (0), BottomAlign (1), CenterAlign (2), or StretchAlign (3) // TopAlign (0), BottomAlign (1), CenterAlign (2), or StretchAlign (3)
// //
// The second argument (subviewID) specifies the path to the child element whose value needs to be returned. // The second argument (subviewID) specifies the path to the child element whose value needs to be returned.

View File

@ -534,7 +534,7 @@ func (listView *listViewData) getDivs(checkbox, hCheckboxAlign, vCheckboxAlign i
return onDivBuilder.String(), offDivBuilder.String(), contentBuilder.String() return onDivBuilder.String(), offDivBuilder.String(), contentBuilder.String()
} }
func (listView *listViewData) checkboxItemDiv(checkbox, hCheckboxAlign, vCheckboxAlign int) string { func (listView *listViewData) checkboxItemDiv(hCheckboxAlign, vCheckboxAlign int) string {
itemStyleBuilder := allocStringBuilder() itemStyleBuilder := allocStringBuilder()
defer freeStringBuilder(itemStyleBuilder) defer freeStringBuilder(itemStyleBuilder)
@ -621,7 +621,7 @@ func (listView *listViewData) checkboxSubviews(adapter ListAdapter, buffer *stri
hCheckboxAlign := GetListViewCheckboxHorizontalAlign(listView) hCheckboxAlign := GetListViewCheckboxHorizontalAlign(listView)
vCheckboxAlign := GetListViewCheckboxVerticalAlign(listView) vCheckboxAlign := GetListViewCheckboxVerticalAlign(listView)
itemDiv := listView.checkboxItemDiv(checkbox, hCheckboxAlign, vCheckboxAlign) itemDiv := listView.checkboxItemDiv(hCheckboxAlign, vCheckboxAlign)
onDiv, offDiv, contentDiv := listView.getDivs(checkbox, hCheckboxAlign, vCheckboxAlign) onDiv, offDiv, contentDiv := listView.getDivs(checkbox, hCheckboxAlign, vCheckboxAlign)
current := GetCurrent(listView) current := GetCurrent(listView)
@ -728,7 +728,7 @@ func (listView *listViewData) updateCheckboxItem(index int, checked bool) {
buffer := allocStringBuilder() buffer := allocStringBuilder()
defer freeStringBuilder(buffer) defer freeStringBuilder(buffer)
buffer.WriteString(listView.checkboxItemDiv(checkbox, hCheckboxAlign, vCheckboxAlign)) buffer.WriteString(listView.checkboxItemDiv(hCheckboxAlign, vCheckboxAlign))
if checked { if checked {
buffer.WriteString(onDiv) buffer.WriteString(onDiv)
} else { } else {

View File

@ -166,8 +166,8 @@ func (picker *numberPickerData) setFunc(tag PropertyName, value any) []PropertyN
} }
func (picker *numberPickerData) numberFormat() string { func (picker *numberPickerData) numberFormat() string {
if precission := GetNumberPickerPrecision(picker); precission > 0 { if precision := GetNumberPickerPrecision(picker); precision > 0 {
return fmt.Sprintf("%%.%df", precission) return fmt.Sprintf("%%.%df", precision)
} }
return "%g" return "%g"
} }

View File

@ -401,7 +401,7 @@ func OpenRawResource(filename string) fs.File {
return nil return nil
} }
// AllRawResources returns the list of all raw resouces // AllRawResources returns the list of all raw resources
func AllRawResources() []string { func AllRawResources() []string {
result := []string{} result := []string{}
@ -448,7 +448,7 @@ func AllRawResources() []string {
return result return result
} }
// AllImageResources returns the list of all image resouces // AllImageResources returns the list of all image resources
func AllImageResources() []string { func AllImageResources() []string {
result := make([]string, 0, len(resources.images)) result := make([]string, 0, len(resources.images))
for image := range resources.images { for image := range resources.images {

View File

@ -1303,7 +1303,7 @@ func (table *tableViewData) htmlSubviews(self View, buffer *strings.Builder) {
if columnStyle := GetTableColumnStyle(table); columnStyle != nil { if columnStyle := GetTableColumnStyle(table); columnStyle != nil {
buffer.WriteString("<colgroup>") buffer.WriteString("<colgroup>")
for column := 0; column < columnCount; column++ { for column := range columnCount {
cssBuilder.buffer.Reset() cssBuilder.buffer.Reset()
if styles := columnStyle.ColumnStyle(column); styles != nil { if styles := columnStyle.ColumnStyle(column); styles != nil {
view.Clear() view.Clear()

View File

@ -102,7 +102,7 @@ type View interface {
htmlProperties(self View, buffer *strings.Builder) htmlProperties(self View, buffer *strings.Builder)
cssStyle(self View, builder cssBuilder) cssStyle(self View, builder cssBuilder)
addToCSSStyle(addCSS map[string]string) addToCSSStyle(addCSS map[string]string)
exscludeTags() []PropertyName excludeTags() []PropertyName
htmlDisabledProperty() bool htmlDisabledProperty() bool
binding() any binding() any
@ -959,7 +959,7 @@ func (view *viewData) propertyChanged(tag PropertyName) {
case DropEffectAllowed: case DropEffectAllowed:
effect := GetDropEffectAllowed(view) effect := GetDropEffectAllowed(view)
if effect >= DropEffectCopy && effect >= DropEffectAll { if effect >= DropEffectCopy && effect >= DropEffectAll {
values := []string{"undifined", "copy", "move", "copyMove", "link", "copyLink", "linkMove", "all"} values := []string{"undefined", "copy", "move", "copyMove", "link", "copyLink", "linkMove", "all"}
session.updateProperty(htmlID, "data-drop-effect-allowed", values[effect]) session.updateProperty(htmlID, "data-drop-effect-allowed", values[effect])
} else { } else {
session.removeProperty(htmlID, "data-drop-effect-allowed") session.removeProperty(htmlID, "data-drop-effect-allowed")
@ -1321,6 +1321,6 @@ func (view *viewData) String() string {
return buffer.String() return buffer.String()
} }
func (view *viewData) exscludeTags() []PropertyName { func (view *viewData) excludeTags() []PropertyName {
return nil return nil
} }

View File

@ -799,14 +799,14 @@ func writePropertyValue(buffer *strings.Builder, tag PropertyName, value any, in
buffer.WriteString("[]") buffer.WriteString("[]")
case 1: case 1:
writeViewStyle(value[0].Tag(), value[0], buffer, indent, value[0].exscludeTags()) writeViewStyle(value[0].Tag(), value[0], buffer, indent, value[0].excludeTags())
default: default:
buffer.WriteString("[\n") buffer.WriteString("[\n")
indent2 := indent + "\t" indent2 := indent + "\t"
for _, v := range value { for _, v := range value {
buffer.WriteString(indent2) buffer.WriteString(indent2)
writeViewStyle(v.Tag(), v, buffer, indent2, v.exscludeTags()) writeViewStyle(v.Tag(), v, buffer, indent2, v.excludeTags())
buffer.WriteString(",\n") buffer.WriteString(",\n")
} }