panning

Synonym of scrolling, at least in some communities. Some people find the term "panning" completely unfamiliar and would use "scrolling" instead, whereas others seem to consider the two as distinct.

Explanation given in Canvas slowdowns (see it for a real life example)

lv What is panning?

AM Panning is the process whereby the whole picture is shifted - you get a different viewing rectangle. With zooming you enlarge the drawn objects, with panning you move them around. One way to do it (from the user's point of view) is to keep the mouse button down and move it around. The "map" underneath then shifts with the mouse pointer.

LV Thanks! I see people mention this word but never knew how to actually try to do what they were describing.


Alastair Davies thinks the canvas has more or less built-in support for panning. (In other words, the global variables required by the above method, can actually be handled by the canvas itself, using the mark and dragto subcommands.) The following two bindings invoke it:

 bind $c <ButtonPress-1> {
     %W scan mark %x %y
 }

 bind $c <B1-Motion> {
     %W scan dragto %x %y 1
 }

slebetman: Excellent! I didn't realise this. Should have read the man pages more carefully. I hereby withdraw my submission in favor of this.


[ Category Glossary | Category GUI ]