cropper

package
v3.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2024 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	VIEW_MODE_NO_RESTRICTIONS      = 0
	VIEW_MODE_RESTRICT_CROP_BOX    = 1
	VIEW_MODE_FIT_WITHIN_CONTAINER = 2
	VIEW_MODE_FILL_FIT_CONTAINER   = 3
)

Variables

This section is empty.

Functions

func CSSComponentsPack

func CSSComponentsPack() web.ComponentsPack

func JSComponentsPack

func JSComponentsPack() web.ComponentsPack

Types

type CropperBuilder

type CropperBuilder struct {
	// contains filtered or unexported fields
}

func Cropper

func Cropper() (r *CropperBuilder)

func (*CropperBuilder) Alt

func (b *CropperBuilder) Alt(v string) (r *CropperBuilder)

func (*CropperBuilder) AppendChildren

func (b *CropperBuilder) AppendChildren(children ...h.HTMLComponent) (r *CropperBuilder)

func (*CropperBuilder) AspectRatio

func (b *CropperBuilder) AspectRatio(width float64, height float64) (r *CropperBuilder)

func (*CropperBuilder) Attr

func (b *CropperBuilder) Attr(vs ...interface{}) (r *CropperBuilder)

func (*CropperBuilder) AutoCropArea

func (b *CropperBuilder) AutoCropArea(autoCropArea float64) (r *CropperBuilder)

func (*CropperBuilder) Children

func (b *CropperBuilder) Children(children ...h.HTMLComponent) (r *CropperBuilder)

func (*CropperBuilder) Class

func (b *CropperBuilder) Class(names ...string) (r *CropperBuilder)

func (*CropperBuilder) ClassIf

func (b *CropperBuilder) ClassIf(name string, add bool) (r *CropperBuilder)

func (*CropperBuilder) MarshalHTML

func (b *CropperBuilder) MarshalHTML(ctx context.Context) (r []byte, err error)

func (*CropperBuilder) ModelValue added in v3.0.1

func (b *CropperBuilder) ModelValue(v Value) (r *CropperBuilder)

func (*CropperBuilder) PrependChildren

func (b *CropperBuilder) PrependChildren(children ...h.HTMLComponent) (r *CropperBuilder)

func (*CropperBuilder) SetAttr

func (b *CropperBuilder) SetAttr(k string, v interface{})

func (*CropperBuilder) Src

func (b *CropperBuilder) Src(v string) (r *CropperBuilder)

func (*CropperBuilder) ViewMode

func (b *CropperBuilder) ViewMode(viewMode int) (r *CropperBuilder)

type Value

type Value struct {
	X      float64 `json:"x"`
	Y      float64 `json:"y"`
	Width  float64 `json:"width"`
	Height float64 `json:"height"`
}

{"x":1141.504660866477,"y":540.6135919744316,"width":713.7745472301137,"height":466.93834339488643,"rotate":0,"scaleX":1,"scaleY":1}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL