← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Middle mouse button pan for eeschema and pcbnew drawpanel

 

On 03/24/2012 11:53 PM, lajos kamocsay wrote:
> Hi Dick-
>
>
> Thanks for pushing me for a better solution. I spent some more time
> going through the drawpanel/frame code and found a much nicer way to
> do the panning with the same functions that autopan and many of the
> zoom functions use.
>
> The key is this pretty cool function:
> EDA_DRAW_FRAME::AdjustScrollBars. It does all the limit checking and
> optimizes the scroll bar size, so I didn't have to duplicate all that
> logic.
>
> The attached patch (diff from revno 3477) adds middle button panning
> to eeschema, cvpcb module viewer, pcbnew and gerbview.
>
>
> Thanks-
> -lajos

-lajos,

I see you found a solution to the limitless dragging option, but not the bounded cookie
tray option that I described.

Using your mode does not recognize the boundary of the cookie tray, and reduces the
scrollbar handle size proportional to the travel outside the cookie tray.

I was hoping you would support at least the mode which recognizes the cookie tray
boundary, so we could compare.

The reducing scrollbar handle size is a way to address the discontinuity, but also means
the playground becomes needlessly large, seemingly irreversibly for that session.

Do zoom levels factor into the usability of the mode I described, twice now?

Why did you not code it that way [too]?

Are you making a statement, or simply ran out of time?

Dick




>
>
> On Fri, Mar 23, 2012 at 9:50 PM, lajos kamocsay <panka.nospam@xxxxxxxxx> wrote:
>> OK, makes sense. I should have time to work on it this weekend, I'll
>> post my progress.
>>
>> Thanks-
>> -lajos
>>
>>
>>
>> On Fri, Mar 23, 2012 at 11:32 AM, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:
>>> On 03/23/2012 09:58 AM, lajos kamocsay wrote:
>>>> Hi Dick-
>>>>
>>>> I wish I checked my email more often... last night I already started
>>>> on extending the scroll region similar to what auto pan does. Your
>>>> suggestion of locking the cursor on limits would be a faster solution.
>>>>
>>>> Do you want me to continue with extending the region, or would you
>>>> rather me just lock the cursor as you described?
>>>>
>>>> By the way I wasn't implementing anything with ctrl/shift, I was just
>>>> referring to behavior of the mouse wheel scrolling function, that's
>>>> already in kicad (ctrl+wheel scrolls one axis, shift+wheel the other).
>>>>
>>>> Thanks-
>>>> -lajos
>>> -lajos
>>>
>>> My only concern about extending beyond the scrollbar limits is you impart a discontinuity
>>> when the user switches back to the scroll bar with the mouse, under circumstances of
>>> having travelled beyond the scrollbar limits.  Then moves back into the normal range.
>>> This concern is what directed my original thinking.
>>>
>>> Maybe you have a solution for this.  If you have something you really like, or want to
>>> offer TWO solutions, controlled with an
>>>
>>> #ifdef
>>>
>>> your patch can also simply do it both ways.  We can manually supply the #define for
>>> testing, don't think its worth the time to put that #define in the CMakeLists.txt
>>> configuration yet, or ever.    I don't think this raises to the level "we need to support
>>> both ways long term".  We will probably come to a conclusion on which is best and stick
>>> with one.
>>>
>>> If you still have a lot of work on the harder one you mention, then maybe skip it.
>>>
>>> Dick
>>>
>>>
>>>
>>>>
>>>>
>>>> On Fri, Mar 23, 2012 at 2:03 AM, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:
>>>>> -lajos
>>>>>
>>>>> You might not drink milk, here is a better metaphor.
>>>>>
>>>>> Put a rectangular cookie tray on the table.  Place a rectangular cutting board in side the cookie tray.  Tell the cookie tray to never rotate.
>>>>>
>>>>> Jam a thumbtack anywhere into the cutting board.  Move it around the interior of the cookie tray, it never rotates, but can hit one or both walls.  Your thumbtack never moves, it is your handle.  You release the middle mouse button, the thumbtack comes out, you can move it and re-insert it anywhere on the cutting board and try again.
>>>>>
>>>>> :)
>>>>>
>>>>> I know you eat cookies.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>> More help   : https://help.launchpad.net/ListHelp



Follow ups

References