<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
On 3/7/2024 11:33 AM, Ian Jeffries via Cuis-dev wrote:
<blockquote
cite="mid:CALmM8GHdkAJe_=uTr-G+X8iqsO91jb+01fWw5XOK8EBL0KuxwA@mail.gmail.com"
type="cite">
<div dir="ltr"><span class="gmail-im" style="color: rgb(80, 0,
80);">> Welcome to the Cuis community!
<div><br>
</div>
</span>
<div>Glad to be here, what a cool project. I'm very fond of
small things in software, especially for fun (small in scope
that is, not in the amount of work since getting something
small isn't easy).</div>
</div>
</blockquote>
<br>
Yep. The difference between "simple" and "easy"!<br>
<br>
<blockquote
cite="mid:CALmM8GHdkAJe_=uTr-G+X8iqsO91jb+01fWw5XOK8EBL0KuxwA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>I'll go ahead and respond about the things I've already
done, and leave the rest for a later message.</div>
<span class="gmail-im" style="color: rgb(80, 0, 80);">
<div><br>
</div>
<div>> But then I tried to understand what was going on
with your code, and I<br>
> found a bug in the Cuis image, Rectangle class >>
#center:extent: This<br>
> is the real reason for the jerking you see. I just
pushed an update for<br>
> that. Please pull & install. It will be much
better.<br>
</div>
<div><br>
</div>
</span>
<div>Amazing! Thank you. I wasn't sure about posting before my
car "game" even had roads, now I'm glad I did.</div>
<span class="gmail-im" style="color: rgb(80, 0, 80);">
<div><br>
</div>
<div>> One last comment. You'd add ‘JSON’ as a prerequisite
to your package, so</div>
> it is loaded automatically if needed.
<div><br>
</div>
</span>
<div>Done!</div>
<span class="gmail-im" style="color: rgb(80, 0, 80);">
<div><br>
</div>
<div>> My first thought was "you'd use a
PluggableScrollPane". You can put a</div>
> simpler morph, that knows nothing about panning and
scaling in a<br>
> ScrollPane, and play with the halo to scale it. Most
likely<br>
> PluggableScrollPane could use some tweaks (like handling
the scaling,<br>
> and the pan / zoom gestures), but it is not far from what
you need.<br>
> Separating RoadTrip from Zoom/Pan issues, by composing
them instead of<br>
> subclassing, is better IMO. Besides, in places like
City>>drawOn: you're<br>
> hiding cities out of bounds yourself, while
PluggableScrollPane already<br>
> clips for you. At least that what I'd do.
<div><br>
</div>
</span>
<div>That does seem better. There's a wrinkle though in my case
though: I don't want to set `clipsSubmorphs` to true since I
want to be able to use the car's halo to move it off of the
map. Having the car drive across the screen to get back to the
game has melted people's minds when I show them Cuis. </div>
</div>
</blockquote>
<br>
Hehehe. Yes, that's cool!<br>
<br>
<blockquote
cite="mid:CALmM8GHdkAJe_=uTr-G+X8iqsO91jb+01fWw5XOK8EBL0KuxwA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>So directly using the strategy of `PluggableScrollPane` is
out, since my understanding is it works by a combination of
moving the interior morph around while clipping what part of
it's shown with `clipsSubmorphs`. I'll think about this some
more.</div>
</div>
</blockquote>
<br>
Right. Your approach is perfectly fine and works great.<br>
<br>
<blockquote
cite="mid:CALmM8GHdkAJe_=uTr-G+X8iqsO91jb+01fWw5XOK8EBL0KuxwA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>More to follow once I've tried out your code. Thank you for
the help and encouragement.</div>
</div>
<br>
</blockquote>
<br>
You're most welcome!<br>
<br>
Wrt the code I included before, what it does is to keep at the same
pixel position whe place under the cursor. I feel it is the
intuitive behavior.<br>
<br>
<br>
Cheers,<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</body>
</html>