[ka-Map-users] Scroll wheel zoom

David Badke dbadke at uvic.ca
Tue Apr 18 18:33:15 EDT 2006


Paul:

Brave of you... I will make sure all is OK tomorrow morning (no time today).

David


Paul Spencer wrote:
> David,
>
> I've committed your code (untested even) to cvs.  Lemme know if it is 
> working, I don't have time to set up an appropriate test right now :)
>
> Cheers
>
> Paul
>
> On 18-Apr-06, at 1:51 PM, David Badke wrote:
>
>> Paul:
>>
>> I started looking at how to do this, and ended up actually doing it. 
>> All changes are in kaTool.js. It seems to work...
>>
>> The modified kaTool is available at: 
>> http://web.uvic.ca/~dbadke/kaTool.zip.
>>
>> The change is in three places: kaTool constructor (set up the 
>> default); new function kaTool.setMouseWheel (set the action to 
>> perform); function kaTool.onmousewheel (perform the action). The 
>> changes are all marked "D Badke".
>>
>> The action to be performed is saved in the tool object, so each tool 
>> can have different actions. The default is the same action as before 
>> (zoom), so it won't break existing code. See the comments for the 
>> setMouseWheel function for usage details.
>>
>> Let me know what you think.
>>
>> David
>>
>>
>> Paul Spencer wrote:
>>> David,
>>>
>>> this sounds like a reasonable request ... can you file a bug 
>>> (bugzilla.maptools.org) describing how you would like it to work 
>>> (i.e. how you would expect it to work if you wanted to call your own 
>>> action on scroll)
>>>
>>> Cheers
>>>
>>> Paul
>>>
>>> On 13-Apr-06, at 6:47 PM, David Badke wrote:
>>>
>>>> It would be nice if there was a way to disable the default scroll 
>>>> wheel action (zoom in/out), or better yet, define one's own action, 
>>>> without having to modify kaMap.js or kaTool,js. My test users 
>>>> objected to the zooming - they kept doing it by accident - so I had 
>>>> to disable it, meaning I changed kaMap.js, which I don't like to 
>>>> do. My code is a bit crude: :-[
>>>>
>>>> This works, but is not ideal. Anyway, any interest in making the 
>>>> scroll wheel action optional and/or configurable?
>>>>
>>>> David
>> -- 

-- 

David Badke
Humanities Computing and Media Center
University of Victoria, BC, Canada



More information about the ka-Map-users mailing list