Also, it seems that the locations it moves to does not change with the
movement of the controls. The center takes me back to where it was
originally. I'd like lots of them that I can scatter around and
people can move and they all work no matter where they're put.
On Jun 19, 11:10 am, Ted wrote:
here's another little example, with 4 way panning and distance based
on viewport:
http://ted.limebits.com/scrapbook-introduction3/?bar
What about fixing its position on the scrapbook, rather than on the
screen? Is that a possibility? Is it possible to set where on the
scrapbook grid the content will be at from inside the textbox coding
for it? Also, would you know how to create duplicates of the 4-arrow
control without having them mess up?
If I duplicate it, then it stops working. I click on it and nothing
happens. Also, the other one still has a problem with centering to
the wrong spot. I don't know where it's centering to. At first I
thought it was just where it was originally. But now it's centering
to a spot above and to the left of it. I don't know why it messes up
on duplication. Nothing happens, though, when the copy is clicked on.
Clayburn wrote:Also, the class is set to fixed but it still is movable. I'd like to
be able to do both, have it at a fixed position on the scrapbook, or
have it movable.
But I got to get the centering working correctly
first. Also, how would I set its position in the controls-fixed.html
file? Is that possible?
Change the script to register the click handler only for the particular arrow4 instance; or
Move the script into index.html as a { load: function(){} } option for the jQuery invocation of the scrapbook.
Thanks,
--Jonathan
-----Original Message-----
From: Clayburn
Sent: Saturday, June 20, 2009 12:52 AM
To: Jonathan A. Marshall
Subject: Re: Scrapbook position-altering buttons
Thanks. That did seem to fix things. Great work.
Now, I'm wondering if there is a way to make the center button center
on the object itself (no matter where its location happens to be).
So, if I move the control, instead of having it center on 0,0 in the
scrapbook, it would center on the button itself. Is that something
easily done? I'd like to create some sort of clickable objects that
would cause the screen to center on them.
On Jun 19, 10:58 pm, Jonathan A. Marshall wrote:
> Fixed in http://jam.limebits.com/scrapbook-introduction3/ .
>
> The problem was that each instance of the content/controls-fixed*.txt
> file contains its own <script>, which causes a click handler to be
> registered for /all/ of the arrow4 controls. So if there are three
> arrow4 controls in the scrapbook, the panning was invoked three times --
> triple the distance.
>
> I modified the <script> to ensure that it gets run only once.
>
> There are probably better fixes.
>
> * Change the script to register the click handler only for the
> particular arrow4 instance; or
>
> * Move the script into index.html as a { load: function(){} } option
> for the jQuery invocation of the scrapbook.
>
> Thanks,
> --Jonathan
>
=====
========
However, it's not currently implemented to recognize multiple users acting
simultaneously on the same scrapbook items.
For casual use, you can probably modify scrapbook to reload each item
periodically, and again just before writing its position -- and then handle
the case of someone else having moved the item.
Or to do it the "right" way (avoiding race conditions) you can use the
WebDAV locking and eTag features.
Thanks,
--Jonathan
-----Original Message-----
From: Clayburn
Sent: Saturday, June 20, 2009 11:17 PM
To: LimeBits