ref: aba2176b2725ae502e7f4230bc5c5abad0cddea8
parent: b290f900dc270be50ab60a43419df1b72a85ee83
author: Philip Silva <[email protected]>
date: Wed Jan 20 18:45:52 EST 2021
package.rc, go vet
--- a/browser/browser.go
+++ b/browser/browser.go
@@ -266,9 +266,6 @@
if el == nil {
return
}
- if el.slicedDraw(dui, self, img, orig, m, force) {
- return
- }
box, ok := el.UI.(*duit.Box)
if ok && box.Width > 0 && box.Height > 0 {
uiSize := image.Point{X: box.Width, Y: box.Height}
@@ -1034,7 +1031,6 @@
func traverseTree(r int, ui duit.UI, f func(ui duit.UI)) {
if ui == nil {
panic("null")
- return
}
f(ui)
switch v := ui.(type) {
--- a/browser/experimental.go
+++ b/browser/experimental.go
@@ -11,20 +11,6 @@
"github.com/mjl-/duit"
)
-func (el *Element) slicedDraw(dui *duit.DUI, self *duit.Kid, img *draw.Image, orig image.Point, m draw.Mouse, force bool) bool {
- //fmt.Printf("m.Point.y=%v\n", m.Point.Y)
- if experimentalUseSlicedDrawing {
- //offset := scroller.GetOffset()
- offset := -1
- panic("not implemented")
- fmt.Printf("orig=%v m.Point.y=%v offset=%v\n", orig.Y,m.Point.Y,offset)
- if (m.Point.Y-offset < -10 || m.Point.Y-offset > 1200) && isLeaf(el.UI) {
- return true
- }
- }
- return false
-}
-
type AtomBox struct {
Left, Right, Bottom, Top int
}
--- a/package.rc
+++ b/package.rc
@@ -5,6 +5,10 @@
chmod +t ./$name
mkdir ./$name/domino-lib
+echo Testing...
+go vet ./...
+go test -cover ./...
+
echo Compiling...
cd cmd/browse
go build -o $name.bin