From c5e6c66338cdf7ddbd53dd64b265ab4a041ef59a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 3 Feb 2025 00:07:48 -0600 Subject: can almost drag two different things --- eventMouseMove.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'eventMouseMove.go') diff --git a/eventMouseMove.go b/eventMouseMove.go index 51835cb..7c383a5 100644 --- a/eventMouseMove.go +++ b/eventMouseMove.go @@ -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 { -- cgit v1.2.3