-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathattempt.txt
47 lines (24 loc) · 1.33 KB
/
attempt.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Hi javascriptissexy at (you know) gmail.com
Thx for your EXCELLENT article on "this" and "that" :-)
http://javascriptissexy.com/understand-javascripts-this-with-clarity-and-master-it/
I have spent many hours, but I cannot find the flaw in my construction.
You are my last hope *g*
Please compare these two outputs, visually:
http://altsheets.ddns.net/d3/animatelogo/animatelogo.html
http://altsheets.ddns.net/d3/animatelogo/animatelogo_attempt.html
In the latter, I had been trying to get rid of this stupid redundancy of 12 identical getter&setter functions (*):
https://github.com/altsheets/d3-animatelogo/blob/master/animatelogo.js#L137-L196
by creating them automatically:
https://github.com/altsheets/d3-animatelogo/blob/master/animatelogo_attempt.js#L148-L155
BUT
something does not work.
And I think it might be my lack of understanding of the this-function.
Perhaps you can immediately see my flaw?
(I have already tried many things, with and without 'that', etc.)
It is a strategy that I have been successfully using a lot - but in Python.
Now I am new to JS, and some picky details are hair tearingly different.
Thanks a million. And keep up the good work! Enjoy your late summer!
your AltSheetsDev
:-)
(*) most of the code architecture is not by me but come
from mike's original http://bost.ocks.org/mike/chart/