diff --git a/backgroundRadialGradient.go b/backgroundRadialGradient.go index 17cb41a..9a1026e 100644 --- a/backgroundRadialGradient.go +++ b/backgroundRadialGradient.go @@ -43,7 +43,7 @@ type backgroundRadialGradient struct { // // The following properties can be used: // - "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-shape" (RadialGradientShape) - Defines shape of the radial gradient. // - "repeating" (Repeating) - Defines whether stop points needs to be repeated after the last one. diff --git a/canvas.go b/canvas.go index 653a369..f76f6a8 100644 --- a/canvas.go +++ b/canvas.go @@ -201,7 +201,7 @@ type Canvas interface { // SetConicGradientFillStyle sets a conic gradient around a point // 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. // * startColor - the start color; // * endColor - the end color; @@ -210,7 +210,7 @@ type Canvas interface { // SetConicGradientFillStyle sets a conic gradient around a point // 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. // * startColor - the start color; // * endColor - the end color; diff --git a/columnSeparator.go b/columnSeparator.go index 5de3574..7112f0c 100644 --- a/columnSeparator.go +++ b/columnSeparator.go @@ -93,12 +93,12 @@ func NewColumnSeparator(style int, color Color, width SizeUnit) ColumnSeparatorP func (separator *columnSeparatorProperty) init() { separator.dataProperty.init() - separator.normalize = normalizeVolumnSeparatorTag + separator.normalize = normalizeColumnSeparatorTag separator.set = columnSeparatorSet separator.supportedProperties = []PropertyName{Style, Width, ColorTag} } -func normalizeVolumnSeparatorTag(tag PropertyName) PropertyName { +func normalizeColumnSeparatorTag(tag PropertyName) PropertyName { tag = defaultNormalize(tag) switch tag { case ColumnSeparatorStyle, "separator-style": diff --git a/customView.go b/customView.go index 75b75e3..7a715a4 100644 --- a/customView.go +++ b/customView.go @@ -292,15 +292,15 @@ func (customView *CustomViewData) ViewIndex(view View) int { return -1 } -func (customView *CustomViewData) exscludeTags() []PropertyName { +func (customView *CustomViewData) excludeTags() []PropertyName { if customView.superView != nil { - exsclude := []PropertyName{} + exclude := []PropertyName{} for tag, value := range customView.defaultParams { if value == customView.superView.getRaw(tag) { - exsclude = append(exsclude, tag) + exclude = append(exclude, tag) } } - return exsclude + return exclude } return nil } @@ -310,7 +310,7 @@ func (customView *CustomViewData) String() string { if customView.superView != nil { buffer := allocStringBuilder() defer freeStringBuilder(buffer) - writeViewStyle(customView.tag, customView, buffer, "", customView.exscludeTags()) + writeViewStyle(customView.tag, customView, buffer, "", customView.excludeTags()) return buffer.String() } return customView.tag + " { }" diff --git a/dragAndDrop.go b/dragAndDrop.go index d24be28..243a4c1 100644 --- a/dragAndDrop.go +++ b/dragAndDrop.go @@ -49,7 +49,7 @@ const ( // Supported types: int, string. // // 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. // - 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. @@ -68,7 +68,7 @@ const ( // Supported types: int, string. // // 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. // - 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. @@ -210,7 +210,7 @@ const ( // DropEffectLinkMove - the value of the "drop-effect-allowed" property: a link or move operation is permitted. 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 ) @@ -472,7 +472,7 @@ func dragAndDropHtml(view View, buffer *strings.Builder) { 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) { buffer.WriteString(` data-drop-effect-allowed="`) buffer.WriteString(effects[n]) diff --git a/listLayout.go b/listLayout.go index 2952a0c..1503029 100644 --- a/listLayout.go +++ b/listLayout.go @@ -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) // // The second argument (subviewID) specifies the path to the child element whose value needs to be returned. diff --git a/listView.go b/listView.go index 5103631..376ebd7 100644 --- a/listView.go +++ b/listView.go @@ -534,7 +534,7 @@ func (listView *listViewData) getDivs(checkbox, hCheckboxAlign, vCheckboxAlign i 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() defer freeStringBuilder(itemStyleBuilder) @@ -621,7 +621,7 @@ func (listView *listViewData) checkboxSubviews(adapter ListAdapter, buffer *stri hCheckboxAlign := GetListViewCheckboxHorizontalAlign(listView) vCheckboxAlign := GetListViewCheckboxVerticalAlign(listView) - itemDiv := listView.checkboxItemDiv(checkbox, hCheckboxAlign, vCheckboxAlign) + itemDiv := listView.checkboxItemDiv(hCheckboxAlign, vCheckboxAlign) onDiv, offDiv, contentDiv := listView.getDivs(checkbox, hCheckboxAlign, vCheckboxAlign) current := GetCurrent(listView) @@ -728,7 +728,7 @@ func (listView *listViewData) updateCheckboxItem(index int, checked bool) { buffer := allocStringBuilder() defer freeStringBuilder(buffer) - buffer.WriteString(listView.checkboxItemDiv(checkbox, hCheckboxAlign, vCheckboxAlign)) + buffer.WriteString(listView.checkboxItemDiv(hCheckboxAlign, vCheckboxAlign)) if checked { buffer.WriteString(onDiv) } else { diff --git a/numberPicker.go b/numberPicker.go index da94424..e6a7594 100644 --- a/numberPicker.go +++ b/numberPicker.go @@ -166,8 +166,8 @@ func (picker *numberPickerData) setFunc(tag PropertyName, value any) []PropertyN } func (picker *numberPickerData) numberFormat() string { - if precission := GetNumberPickerPrecision(picker); precission > 0 { - return fmt.Sprintf("%%.%df", precission) + if precision := GetNumberPickerPrecision(picker); precision > 0 { + return fmt.Sprintf("%%.%df", precision) } return "%g" } diff --git a/resources.go b/resources.go index 999b85d..5569b7f 100644 --- a/resources.go +++ b/resources.go @@ -401,7 +401,7 @@ func OpenRawResource(filename string) fs.File { return nil } -// AllRawResources returns the list of all raw resouces +// AllRawResources returns the list of all raw resources func AllRawResources() []string { result := []string{} @@ -448,7 +448,7 @@ func AllRawResources() []string { return result } -// AllImageResources returns the list of all image resouces +// AllImageResources returns the list of all image resources func AllImageResources() []string { result := make([]string, 0, len(resources.images)) for image := range resources.images { diff --git a/tableView.go b/tableView.go index 039ec27..8f198e1 100644 --- a/tableView.go +++ b/tableView.go @@ -1303,7 +1303,7 @@ func (table *tableViewData) htmlSubviews(self View, buffer *strings.Builder) { if columnStyle := GetTableColumnStyle(table); columnStyle != nil { buffer.WriteString("") - for column := 0; column < columnCount; column++ { + for column := range columnCount { cssBuilder.buffer.Reset() if styles := columnStyle.ColumnStyle(column); styles != nil { view.Clear() diff --git a/view.go b/view.go index 982b806..d52891f 100644 --- a/view.go +++ b/view.go @@ -102,7 +102,7 @@ type View interface { htmlProperties(self View, buffer *strings.Builder) cssStyle(self View, builder cssBuilder) addToCSSStyle(addCSS map[string]string) - exscludeTags() []PropertyName + excludeTags() []PropertyName htmlDisabledProperty() bool binding() any @@ -959,7 +959,7 @@ func (view *viewData) propertyChanged(tag PropertyName) { case DropEffectAllowed: effect := GetDropEffectAllowed(view) 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]) } else { session.removeProperty(htmlID, "data-drop-effect-allowed") @@ -1321,6 +1321,6 @@ func (view *viewData) String() string { return buffer.String() } -func (view *viewData) exscludeTags() []PropertyName { +func (view *viewData) excludeTags() []PropertyName { return nil } diff --git a/viewStyle.go b/viewStyle.go index db488bb..2aa4518 100644 --- a/viewStyle.go +++ b/viewStyle.go @@ -799,14 +799,14 @@ func writePropertyValue(buffer *strings.Builder, tag PropertyName, value any, in buffer.WriteString("[]") 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: buffer.WriteString("[\n") indent2 := indent + "\t" for _, v := range value { buffer.WriteString(indent2) - writeViewStyle(v.Tag(), v, buffer, indent2, v.exscludeTags()) + writeViewStyle(v.Tag(), v, buffer, indent2, v.excludeTags()) buffer.WriteString(",\n") }