Showing the mouse indicator on the content pane, not just the view panes.

This commit is contained in:
Samuel Clay 2010-06-15 18:43:14 -04:00
parent d7b5fb9f96
commit b7798198e4
2 changed files with 10 additions and 14 deletions

View file

@ -1766,13 +1766,13 @@ background: transparent;
#mouse-indicator { #mouse-indicator {
position: absolute; position: absolute;
top: 50px; top: 50px;
left: 0px; left: -10px;
opacity: 0;
background: transparent url('../img/reader/mouse_indicator.png') no-repeat 0 0; background: transparent url('../img/reader/mouse_indicator.png') no-repeat 0 0;
width: 10px; width: 10px;
height: 15px; height: 15px;
z-index: 10; z-index: 10;
cursor: pointer; cursor: pointer;
display: none;
} }
/* ============= */ /* ============= */

View file

@ -671,7 +671,6 @@
$iframe_contents $iframe_contents
.unbind('scroll') .unbind('scroll')
.scroll($.rescope(this.handle_scroll_story_iframe, this)); .scroll($.rescope(this.handle_scroll_story_iframe, this));
NEWSBLUR.log(['Hiding open_feed']);
this.hide_mouse_indicator(); this.hide_mouse_indicator();
$iframe_contents $iframe_contents
.unbind('mousemove.reader') .unbind('mousemove.reader')
@ -679,6 +678,9 @@
this.$s.$content_pane this.$s.$content_pane
.unbind('mouseleave.reader') .unbind('mouseleave.reader')
.bind('mouseleave.reader', $.rescope(this.hide_mouse_indicator, this)); .bind('mouseleave.reader', $.rescope(this.hide_mouse_indicator, this));
this.$s.$content_pane
.unbind('mouseenter.reader')
.bind('mouseenter.reader', $.rescope(this.show_mouse_indicator, this));
} }
}, },
@ -1258,7 +1260,6 @@
$iframe_contents $iframe_contents
.unbind('scroll') .unbind('scroll')
.scroll($.rescope(self.handle_scroll_story_iframe, self)); .scroll($.rescope(self.handle_scroll_story_iframe, self));
NEWSBLUR.log(['Hiding setup_feed_page_iframe_load']);
$iframe_contents $iframe_contents
.unbind('mousemove.reader') .unbind('mousemove.reader')
.bind('mousemove.reader', $.rescope(self.handle_mousemove_iframe_view, self)); .bind('mousemove.reader', $.rescope(self.handle_mousemove_iframe_view, self));
@ -2443,13 +2444,12 @@
hide_mouse_indicator: function() { hide_mouse_indicator: function() {
var self = this; var self = this;
NEWSBLUR.log(['hide_mouse_indicator']);
this.flags['mouse_indicator_hidden'] = true; this.flags['mouse_indicator_hidden'] = true;
this.$s.$mouse_indicator.animate({'opacity': 0}, { this.$s.$mouse_indicator.animate({'opacity': 0, 'left': -10}, {
'duration': 500, 'duration': 200,
'queue': false, 'queue': false,
'complete': function() { 'complete': function() {
self.$s.$mouse_indicator.css('display', 'none');
self.flags['mouse_indicator_hidden'] = true; self.flags['mouse_indicator_hidden'] = true;
} }
}); });
@ -2459,13 +2459,9 @@
var self = this; var self = this;
if (this.flags['mouse_indicator_hidden']) { if (this.flags['mouse_indicator_hidden']) {
NEWSBLUR.log(['show_mouse_indicator']);
this.flags['mouse_indicator_hidden'] = false; this.flags['mouse_indicator_hidden'] = false;
this.$s.$mouse_indicator.css({ this.$s.$mouse_indicator.animate({'opacity': 1, 'left': 0}, {
'display': 'block', 'duration': 200,
'opacity': 0
}).animate({'opacity': 1}, {
'duration': 500,
'queue': false, 'queue': false,
'complete': function() { 'complete': function() {
self.flags['mouse_indicator_hidden'] = false; self.flags['mouse_indicator_hidden'] = false;