Documentation ¶
Index ¶
- type SVGPanZoomer
- func (p *SVGPanZoomer) CenterBox(minx, miny, maxx, maxy float64) *SVGPanZoomer
- func (p *SVGPanZoomer) Reset() *SVGPanZoomer
- func (p *SVGPanZoomer) ScaleAt(z, x, y float64) *SVGPanZoomer
- func (p *SVGPanZoomer) SetRootTranslation()
- func (p *SVGPanZoomer) SetupHandlers()
- func (p *SVGPanZoomer) Translate(dx, dy float64) *SVGPanZoomer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SVGPanZoomer ¶
type SVGPanZoomer struct {
// contains filtered or unexported fields
}
SVGPanZoomer does zooming and panning of SVG using JS events. This is port of https://github.com/aleofreddi/svgpan Which is also as of 2021-09-19 inlined in https://github.com/google/pprof/blob/master/third_party/svgpan/svgpan.go
func NewSVGPanZoomer ¶
func NewSVGPanZoomer( svgID string, rootID string, zoomScale float64, ) *SVGPanZoomer
func (*SVGPanZoomer) CenterBox ¶
func (p *SVGPanZoomer) CenterBox(minx, miny, maxx, maxy float64) *SVGPanZoomer
CenterBox makes given bounding box in the center and fill the screen.
func (*SVGPanZoomer) Reset ¶
func (p *SVGPanZoomer) Reset() *SVGPanZoomer
func (*SVGPanZoomer) ScaleAt ¶
func (p *SVGPanZoomer) ScaleAt(z, x, y float64) *SVGPanZoomer
func (*SVGPanZoomer) SetRootTranslation ¶
func (p *SVGPanZoomer) SetRootTranslation()
setRootTranslation updates translation matrix of root svg element
func (*SVGPanZoomer) SetupHandlers ¶
func (p *SVGPanZoomer) SetupHandlers()
func (*SVGPanZoomer) Translate ¶
func (p *SVGPanZoomer) Translate(dx, dy float64) *SVGPanZoomer
Click to show internal directories.
Click to hide internal directories.