can almost drag two different things
This commit is contained in:
parent
a5b3a934d2
commit
c5e6c66338
|
@ -75,26 +75,30 @@ func (tk *guiWidget) verifyRect() bool {
|
|||
}
|
||||
var ok bool = true
|
||||
if vw0 != tk.gocuiSize.w0 {
|
||||
tk.dumpWidget("verifyRect() err w0")
|
||||
// tk.dumpWidget("verifyRect() err w0")
|
||||
tk.gocuiSize.w0 = vw0
|
||||
ok = false
|
||||
}
|
||||
if vw1 != tk.gocuiSize.w1 {
|
||||
tk.dumpWidget("verifyRect() err w1")
|
||||
// tk.dumpWidget("verifyRect() err w1")
|
||||
tk.gocuiSize.w0 = vw1
|
||||
ok = false
|
||||
}
|
||||
if vh0 != tk.gocuiSize.h0 {
|
||||
tk.dumpWidget("verifyRect() err h0")
|
||||
// tk.dumpWidget("verifyRect() err h0")
|
||||
tk.gocuiSize.h0 = vh0
|
||||
ok = false
|
||||
}
|
||||
if vh1 != tk.gocuiSize.h1 {
|
||||
tk.dumpWidget("verifyRect() err h1")
|
||||
tk.gocuiSize.h1 = vh1
|
||||
// tk.dumpWidget("verifyRect() err h1")
|
||||
ok = false
|
||||
}
|
||||
if !ok {
|
||||
log.Info("verifyRect() NEED TO FIX RECT HERE", tk.cuiName)
|
||||
tk.dumpWidget("verifyRect() FIXME")
|
||||
// log.Info("verifyRect() NEED TO FIX RECT HERE", tk.cuiName)
|
||||
// tk.dumpWidget("verifyRect() FIXME")
|
||||
}
|
||||
log.Printf("verifyRect() OK cuiName=%s v.Name=%s", tk.cuiName, tk.v.Name())
|
||||
// log.Printf("verifyRect() OK cuiName=%s v.Name=%s", tk.cuiName, tk.v.Name())
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ func mouseUp(g *gocui.Gui, v *gocui.View) error {
|
|||
|
||||
log.Info("mouseUp() setting me.globalMouseDown = false")
|
||||
me.globalMouseDown = false
|
||||
currentDrag = nil
|
||||
|
||||
dropdownUnclicked(w, h)
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ func mouseMove(g *gocui.Gui) {
|
|||
}
|
||||
for _, tk := range findByXY(w, h) {
|
||||
if tk.node.WidgetType == widget.Stdout {
|
||||
// currentDrag = tk
|
||||
currentDrag = tk
|
||||
// tk.moveNew(g)
|
||||
return
|
||||
}
|
||||
|
@ -90,12 +90,14 @@ func (tk *guiWidget) moveNew(g *gocui.Gui) {
|
|||
if tk.node.WidgetType == widget.Flag {
|
||||
log.Info("MOVE FLAG")
|
||||
log.Info("MOVE FLAG")
|
||||
// outputW, outputH := tk.Size()
|
||||
// g.SetView(tk.cuiName, w-xOffset, h-yOffset, w-xOffset+outputW+20, h-yOffset+outputH+me.FramePadH+20, 0)
|
||||
g.SetView(tk.cuiName, w-3, h-3, w+20, h+20, 0)
|
||||
tk.verifyRect()
|
||||
s := fmt.Sprintf("move(%dx%d) %s ###", w, h, tk.cuiName)
|
||||
tk.dumpWidget(s)
|
||||
outputW, outputH := tk.Size()
|
||||
g.SetView(tk.cuiName, w-xOffset, h-yOffset, w-xOffset+outputW+20, h-yOffset+outputH+me.FramePadH+20, 0)
|
||||
me.startOutputW = w - xOffset
|
||||
me.startOutputH = h - yOffset
|
||||
// me.startOutputW = w - xOffset
|
||||
// me.startOutputH = h - yOffset
|
||||
// g.SetViewOnBottom(tk.cuiName)
|
||||
return
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue