When scrolling to and then highlighting a note, do so serially instead of in parallel.
Also made speed of scrolling to a note or message slightly faster.
This commit is contained in:
parent
d56710bf78
commit
3a4030fee5
6
NEWS
6
NEWS
|
@ -1,3 +1,9 @@
|
||||||
|
1.4.19:
|
||||||
|
* When scrolling to and then highlighting a note, do so serially instead of
|
||||||
|
in parallel.
|
||||||
|
* Made speed of scrolling to a note or message slightly faster.
|
||||||
|
* Removed big yellow "sign up for free" box from the sign up page itself.
|
||||||
|
|
||||||
1.4.18: July 28, 2008:
|
1.4.18: July 28, 2008:
|
||||||
* Fixed a bug where clicking the link for an updated note in an RSS feed did
|
* Fixed a bug where clicking the link for an updated note in an RSS feed did
|
||||||
not properly redirect to that note after login.
|
not properly redirect to that note after login.
|
||||||
|
|
|
@ -214,22 +214,30 @@ Editor.prototype.highlight = function ( scroll ) {
|
||||||
if ( scroll == undefined )
|
if ( scroll == undefined )
|
||||||
scroll = true;
|
scroll = true;
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
function do_highlight() {
|
||||||
|
if ( /Opera/.test( navigator.userAgent ) ) { // MochiKit's Highlight for iframes is broken in Opera
|
||||||
|
pulsate( self.iframe, options = { "pulses": 1, "duration": 0.5 } );
|
||||||
|
} else if ( self.iframe.contentDocument ) { // browsers such as Firefox
|
||||||
|
Highlight( self.iframe, options = { "queue": { "scope": "highlight", "limit": 1 } } );
|
||||||
|
} else { // browsers such as IE
|
||||||
|
if ( self.document && self.document.body )
|
||||||
|
Highlight( self.document.body, options = { "queue": { "scope": "highlight", "limit": 1 } } );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( scroll ) {
|
if ( scroll ) {
|
||||||
// if the editor is already completely on-screen, then there's no need to scroll
|
// if the editor is already completely on-screen, then there's no need to scroll
|
||||||
var viewport_position = getViewportPosition();
|
var viewport_position = getViewportPosition();
|
||||||
if ( getElementPosition( this.note_controls ).y < viewport_position.y ||
|
if ( getElementPosition( this.note_controls ).y < viewport_position.y ||
|
||||||
getElementPosition( this.iframe ).y + getElementDimensions( this.iframe ).h > viewport_position.y + getViewportDimensions().h )
|
getElementPosition( this.iframe ).y + getElementDimensions( this.iframe ).h > viewport_position.y + getViewportDimensions().h ) {
|
||||||
new ScrollTo( this.note_controls );
|
new ScrollTo( this.note_controls, { "afterFinish": do_highlight, "duration": 0.5 } );
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( /Opera/.test( navigator.userAgent ) ) { // MochiKit's Highlight for iframes is broken in Opera
|
do_highlight();
|
||||||
pulsate( this.iframe, options = { "pulses": 1, "duration": 0.5 } );
|
|
||||||
} else if ( this.iframe.contentDocument ) { // browsers such as Firefox
|
|
||||||
Highlight( this.iframe, options = { "queue": { "scope": "highlight", "limit": 1 } } );
|
|
||||||
} else { // browsers such as IE
|
|
||||||
if ( this.document && this.document.body )
|
|
||||||
Highlight( this.document.body, options = { "queue": { "scope": "highlight", "limit": 1 } } );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Editor.prototype.exec_command = function ( command, parameter ) {
|
Editor.prototype.exec_command = function ( command, parameter ) {
|
||||||
|
|
|
@ -2287,7 +2287,7 @@ Wiki.prototype.scroll_to = function ( node ) {
|
||||||
var viewport_position = getViewportPosition();
|
var viewport_position = getViewportPosition();
|
||||||
if ( getElementPosition( node ).y < viewport_position.y ||
|
if ( getElementPosition( node ).y < viewport_position.y ||
|
||||||
getElementPosition( node ).y + getElementDimensions( node ).h > viewport_position.y + getViewportDimensions().h )
|
getElementPosition( node ).y + getElementDimensions( node ).h > viewport_position.y + getViewportDimensions().h )
|
||||||
new ScrollTo( node );
|
new ScrollTo( node, { "duration": 0.5 } );
|
||||||
}
|
}
|
||||||
|
|
||||||
Wiki.prototype.clear_messages = function () {
|
Wiki.prototype.clear_messages = function () {
|
||||||
|
|
Reference in New Issue