~helioviewer/helioviewer.org/1.0

« back to all changes in this revision

Viewing changes to lib/helioviewer/EventMarker.js

  • Committer: V. Keith Hughitt
  • Date: 2009-07-31 14:52:52 UTC
  • Revision ID: hughitt1@kore-20090731145252-r8gniq1b5yo6g2ts
progress save: 2009/07/31

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
        });
169
169
 
170
170
        //Work-around: Move the tooltip dom-node into the event-marker node so that is follows when dragging.
171
 
        this.container.one('click', function(e){
172
 
            $(this).insert($$('body > .prototip').first().remove().setStyle({
173
 
                'top': '12px',
174
 
                'left': '8px'
175
 
            }));
176
 
            Event.observe(this, 'click', function(e){
177
 
                this.select('.prototip').first().setStyle({
 
171
        this.container.one('click', function(e) {
 
172
            var t = $$('body > .prototip');
 
173
            
 
174
            if (t.length > 0) {
 
175
                $(this).insert($$('body > .prototip').first().remove().setStyle({
178
176
                    'top': '12px',
179
177
                    'left': '8px'
 
178
                }));
 
179
                Event.observe(this, 'click', function(e){
 
180
                    this.select('.prototip').first().setStyle({
 
181
                        'top': '12px',
 
182
                        'left': '8px'
 
183
                    });
180
184
                });
181
 
            });
 
185
            }
182
186
        });
183
187
 
184
188
        },