Kivy scatter region is limited to window size
<p>I'm basically running into issues with the only "grabbable" scatter regions being entirely defined by the size of the window I am viewing the program in, and not the size of the scatter.</p>

<p>Here's a working example of the bug:</p>

<pre><code>from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.button import Button
from kivy.uix.gridlayout import GridLayout
from kivy.uix.scatter import Scatter

class AppFrame(GridLayout):
    def __init__(self,**kwargs):
        super(AppFrame,self).__init__(**kwargs)
        self.myscatter=Scatter(
            width=2000,
            height=200,
            do_rotation=False,
            do_scale=True,
            do_translation=True)
        self.add_widget(self.myscatter)
        self.layout=GridLayout(cols=30,width=2000,height=200)
        self.myscatter.add_widget(self.layout)

        for i in range(300):
            self.layout.add_widget(Button(text=str(i)))

class TestApp(App):
    def build(self):
        return AppFrame(cols=3)

if __name__ == '__main__':
    TestApp().run()
</code></pre>

<p>On my screen, if I use the scatter to move to the right (increasing with the buttons), I can't grab anything past button ~10-11.  If I resize my screen, I can grab a bit farther.  If I make my screen small, the grabbable area shrinks and might not even be reachable. How on earth can I fix this?  </p>

<p>I'm using the Kivy environment with the Android emulator, so I have a pretty big screen. Unfortunately if I moved this to a phone, the screen size would shrink significantly, making this bug effectively disable scrolling.</p>

<p>(The toplevel layout is for adding a menu. The actual menu isn't included in this example as it's not necessary to recreate the bug)</p>

<p>The main things I'm trying to figure out are:</p>

<ol>
<li>Is this an issue with the code or with the android emulator?</li>
<li>If its an issue with the code, can it be fixed and how?</li>
<li>If it can't be fixed, how else can I get this functionality?</li>
</ol>

<p>UPDATE:
 After the comment from George Bou, I've isolated the problem to be within the scatter's BBOX. On creation, the scatter bbox size is 2000x200.  However, after window creation it is 800x600 (the default size of the screen that pops up).</p>

<p>Annoyingly, I can't figure out how to fix this.  If I change the scatter's width/height at any point(i.e., in a button), it immediately gets reset back to 800x600 whenever a translation/zoom occurs. Anyone know how to make scatter stop automatically resizing its bbox to the window?</p>

<p>Ok. I couldn't figure out a way to do it with the vanilla scatter object itself, but I made a workaround that seems to work well enough.</p>

<p>Basically, scatter controls what's grabbable through the <code>collide_point</code> method in its class.  This class references its own width/height (which are irritatingly immutable).  So I got things to work by creating a custom scatter class that overwrites the collide_point method with something changeable.</p>

<pre><code>class CustScatter(Scatter):
    def collide_point(self, x, y):
        x, y = self.to_local(x, y)
        return 0 &lt;= x &lt;= self.xboundval and 0 &lt;= y &lt;= self.yboundval
    def custSetBounds(self,xval,yval):
        self.xboundval=xval
        self.yboundval=yval
</code></pre>

<p>To use this, I just make sure to set the bounds (<code>custSetBounds</code>) immediately after I create an instance of the class.</p>

<p>Kivy <em>really</em> makes me miss Tkinter...</p>

python kivy