View Single Post
Old 12-15-2012, 12:39 AM   PM User | #1
coffeecup
New Coder

 
Join Date: Jul 2012
Posts: 30
Thanks: 18
Thanked 0 Times in 0 Posts
coffeecup is an unknown quantity at this point
issues understanding code

Hello,

I have some issues to understand how parts of the following code are working:

demo:
http://devfiles.myopera.com/articles/649/example2.html
source:
http://devfiles.myopera.com/articles/649/example2.js

this is the part I have issues with:

Code:
var func = tool[ev.type];
    if (func) {
      func(ev);
    }
I don't quite get the idea behind this How does it work/what does it to?

Any help is welcome, thanks in advance!
coffeecup is offline   Reply With Quote